Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: our libc included iconv library



In message <200903031545.13333.explorer%flame.org@localhost>, Michael Graff 
writes:
>+       * This is for compatibilty wiht software that uses thees

"with"

>+      p = out_truncated;
>+      while (*p != '/' && *p != 0)
>+              p++;
>+      if (p[0] == '/' && p[1] == '/')
>+              p[0] = 0;

This seems to assert that "/" only occurs significantly as part of "//".
As an example, consider the string:

        foo/bar//ignoreme

The above code won't truncate it.

Maybe
        while (*p != 0) {
                if (p[0] == '/' && p[1] == '/') {
                        *p = '\0';
                        break;
                }
                ++p;
        }
?

-s


Home | Main Index | Thread Index | Old Index