* lib/rename-dest-slash.c: Include stdbool.h but not string.h.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 12 Oct 2006 05:36:20 +0000 (05:36 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 12 Oct 2006 05:36:20 +0000 (05:36 +0000)
commit1fc2fce03990926f17f1c6a8daaccada668b02c7
tree1ed28fb3f6f87db26e0458e95831bdb1e5cd15b5
parente70d209b6b770c1b7e26a4d093ebac5ed278ed68
* lib/rename-dest-slash.c: Include stdbool.h but not string.h.
(has_trailing_slash): Omit size arg; all callers changed.
Omit 'inline', since it doesn't help performance and we'd
need to configure it.
Don't count //, ///, etc. as having a trailing slash.
As a side effect, this removes a C99ism reported by Matthew Woehlke.
(rpl_rename_dest_slash): On failure, use rename's errno rather
than (in some cases) an incorrect or junk errno.
Simplify code by removing need to compute length; this does
cause it to make two passes instead of one over the file name,
but it's worth it.
ChangeLog
lib/rename-dest-slash.c