Dear diary, on Mon, Apr 18, 2005 at 01:39:10AM CEST, I got a letter where Linus Torvalds <[EMAIL PROTECTED]> told me that... > > > On Sun, 17 Apr 2005, Brad Roberts wrote: > > > > braddr:x:1000:1000:Brad Roberts,,,:/home/braddr:/bin/bash > > > > All gecos entries on all my debian boxes are of the form: > > > > fullname, office number, office extension, and home number > > Ahh, ok. > > I'll make the "cleanup" thing just remove strange characters from the end, > that should fix this kind of thing for now. > > I'd just remove everything after the first strange number, but I can also > see people using the "lastname, firstname" format, and I'd hate to just > ignore firstname in that case.
> + /* > + * Go back, and remove crud from the end: some people > + * have commas etc in their gecos field > + */ > + dst--; > + while (--dst >= p) { > + unsigned char c = *dst; > + switch (c) { > + case ',': case ';': case '.': > + *dst = 0; > + continue; > + } > + break; > + } Am I just slow or does the first dst-- make it miss the last trailing /[,;.]/? -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html