Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2000:
[Freeciv-Dev] strspn
Home

[Freeciv-Dev] strspn

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] strspn
From: Mathias Hasselmann <Mathias.Hasselmann@xxxxxx>
Date: Fri, 14 Jul 2000 19:21:08 +0200

While hacking arround in client/gui-gtk/helpdlg.c (I want to have
a searchable help index) I have found sequences like this:

    for(top=pitem->topic; *top==' '; ++top);

Why do not replace them with the ANSI function strspn?

    top = pitem->topic + strspn (pitem->topic, " ");

Well this looks not as good (C-ish) as the variant above,
but strspn is replaced by inline assembler code by some
compilers...

Ciao
-- 
PGP: 1024-Bit DSA: ID 55E572F3, 1024-Bit RSA: ID EAAF7CF1
WWW: http://www.informatik.hu-berlin.de/~hasselma/
     http://www.dominanz-haus.de/



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] strspn, Mathias Hasselmann <=