Good catch, there is even one more problem I believe - it can still
run past the beginning of the buffer (e.g. if you use "///").
This is a bit more more efficient due to fewer calls to strlen and
fixes both problems:
if (*buf) {
p = buf + strlen(buf) - 1;
while (p>=buf && *p == fsp) *(
On 3/24/2007 6:02 PM, Jeffrey Horner wrote:
> Hello,
>
>
> I've been wondering why my no-optimization R-devel builds have been
> hanging during "building/updating package indices ...". I tracked it
> down with gdb to this line from do_basename in utils.c:
>
> while ( *(p = buf + strlen(buf) -