git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [patch] fork optional branch point normazilation

From
Petr Baudis <pasky@ucw.cz>
Date
Apr 18, 2005, 00:23 UTC
Message-ID
<20050418002326.GC1461@pasky.ji.cz>
In-Reply-To
<Pine.LNX.4.58.0504171636590.7211@ppc970.osdl.org>

Dear diary, on Mon, Apr 18, 2005 at 01:39:10AM CEST, I got a letter where Linus Torvalds <torvalds@osdl.org> told me that...

Show 18 quoted lines
> 
> 
> 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.
Show 14 quoted lines
> +       /*
> +        * 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
Previous: Linus TorvaldsNext: Linus Torvalds
Message 8 of 12 in “fork optional branch point normazilation”
  1. fork optional branch point normazilationBrad Roberts, Apr 17, 2005
  2. Petr BaudisApr 17, 2005
  3. Brad RobertsApr 17, 2005
  4. Linus TorvaldsApr 17, 2005
  5. Daniel BarkalowApr 17, 2005
  6. Brad RobertsApr 17, 2005
  7. Linus TorvaldsApr 17, 2005
  8. Petr BaudisApr 18, 2005
  9. Linus TorvaldsApr 18, 2005
  10. remove_special() tentative fix.Junio C Hamano, Apr 18, 2005
  11. Brad RobertsApr 18, 2005
  12. Martin SchlemmerApr 18, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.