DragonFly BSD
DragonFly submit List (threaded) for 2004-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

index -> strchr / rindex -> strrchr


From: "Douwe Kiela" <virtus@xxxxxxxxxx>
Date: Sun, 29 Aug 2004 23:39:47 +0200

Hey folks..
I was browsing around the source and discovered that the non-standard
index() and rindex() functions are used everywhere.. Since standards are
important, I suggest we replace these functions with the standard-compliant
functions that do the exact same thing. I quote:

"index and rindex do the same as strchr and strrchr but are non standard"

I suck at shellscripting, but after a few tries I made a script that uses
sed to replace these functions everywhere in the tree.. the patch for the
usr.bin tree can be found here:

http://virtus.ath.cx/dfbsd/usr.bin.index.diff

The reason I didn't use the script on all dirs is that I wanted to know what
you guys think first before I'm going go all over the source.. if you don't
agree then all the work would've been for nothing (not that is that much
work ;-))

Let me know what you guys think.. if you agree expect some more patches
coming up.

Regards,
Douwe




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