DragonFly submit List (threaded) for 2004-08
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: index -> strchr / rindex -> strrchr
As a follow-up.. I have two questions..
This change is because the *index() functions are marked as LEGACY in "The
Open Group Base Specifications Issue 6, IEEE Std. 1003.1, 2004 Edition",
which means they are non-standard. All LEGACY functions have a provided
replacement function, like index() and rindex() have respectively strchr()
and strrchr(). This is the list of functions currently marked as LEGACY by
the standard:
bcmp - memory operations (LEGACY)
bcopy - memory operations (LEGACY)
bzero - memory operations (LEGACY)
ecvt, fcvt, gcvt - convert a floating-point number to a string (LEGACY) -
[These are already completely removed]
ftime - get date and time (LEGACY)
getwd - get the current working directory pathname (LEGACY)
index - character string operations (LEGACY)
mktemp - make a unique filename (LEGACY)
rindex - character string operations (LEGACY)
utimes - set file access and modification times (LEGACY)
wcswcs - find a wide substring (LEGACY)
I suggest we replace all these functions with their standard-compliant
equivalents, for example bcmp with memcmp and so forth. I also suggest we
make a note of this in the style(9) document, an example of what I am
thinking about can be found here:
http://leaf.dragonflybsd.org/~virtus/style.9.diff
It's a setup, perhaps it should be more clear, refer to the X/Open group
specification and name the replacements.
Furthermore, the manual page of the LEGACY function should note that it's a
LEGACY, and also name the replacement that IS standard compliant. Are there
any objections to any of these changes? If not, I will be patching the
source tree.
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
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]