DragonFly submit List (threaded) for 2004-08
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: index -> strchr / rindex -> strrchr
Generally speaking I like the work you are doing, and I'll get to
it when I get back from my little mini vacation :-)
However, I would enter a note of caution when it comes to running
function name replacement. Many of these replacements, probably most
of them, do not really move the project forward.
For example, I am wholely in favor of getting rid of strcpy(), strcat(),
mktemp(), and so forth... functions that are inherently insecure should
definitely be replaced, even for trivial uses.
I would be in favor of fixing up index() and rindex() since the mainstream
uses of strchr() and strrchr() these days .
I would not, however, replace any ofthe b*() functions. The bozos making
the new standards screwed up big time IMHO. I far prefer bzero(), bcmp(),
and bcopy() to junk they replaced them with.
:ftime - get date and time (LEGACY)
ok
:getwd - get the current working directory pathname (LEGACY)
ok
:index - character string operations (LEGACY)
ok
:mktemp - make a unique filename (LEGACY)
ok
:rindex - character string operations (LEGACY)
ok
:utimes - set file access and modification times (LEGACY)
maybe
:wcswcs - find a wide substring (LEGACY)
ok
:My second question is, should I change this everywhere, or just in bin/,
:sbin/, usr.bin/ and usr.sbin/ or also in lib/, sys/, et cetera? (I presume
:that these changes should not be made in contrib/ and gnu/ directories?
:
:Let me know what you guys think.
:
:Regards,
:Douwe
As a rule these sorts of changes should NOT be made to contrib/ code
or third-party maintained code. I would stick with the primary
directories for now. bin, sbin, usr.bin, usr.sbin, lib. Even sys,
though that requires a more involved review.
-Matt
Matthew Dillon
<dillon@xxxxxxxxxxxxx>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]