Enrico Forestieri <[EMAIL PROTECTED]> writes:
> Agreed. But what's your point? I didn't mean to correct the possibly
> broken dvipost code but only to let it work (or not work) on Windows
> in the same way it works (or doesn't work) on *nix.

Fair enough.

Note, however, that "foo\bar/baz" is a valid path on Windows and might be
expected to work the same way as the equally valid "foo/bar/baz".

Personally, I'd change your code to something like

  char* p1 = strrchr(arg, '/');
  char* p2 = strrchr(arg, '\\');
  /* Not sure whether the casts are needed. */
  char* p = ((void*)p2 > (void*)p1) ? p2 : p1;

But I'll butt out now and go to bed.

Angus

Reply via email to