delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/12/04/09:22:33

Message-Id: <3.0.1.32.19971204082322.007d82f0@yacker.xiotech.com>
Date: Thu, 04 Dec 1997 08:23:22 -0600
To: djgpp-workers AT delorie DOT com
From: Randy Maas <randym AT acm DOT org>
Subject: string inline code
Mime-Version: 1.0

(I'm mailing this again since I screwed up the cc' & subject lines.  My
apologies)

Date: Thu, 04 Dec 1997 08:11:35 -0600
To: dj AT delorie DOT com
From: Randy Maas <randym AT acm DOT org>
Subject: djgpp-workers AT delorie DOT com

I've accumulated a series of string inline procedures.  Would these be
useful for djgpp?  The ones I've used as extern __inline__ are memset,
bzero, strlen, strcat, strncat, stricmp, strnicmp, strncasecmp, strcasecmp

looking at <ctype.h>, it seems that they would be split among two inlines:
<inlines/ctype.ha> and <inlines/ctype.hd>

I also noticed that tolower and toupper use an array.  I've used the
following equations before, although I'm sure if they cover all the cases
of the array...
# define my_tolower(c) (isupper(c)?('a'-1+((c)&31)):(c))
# define my_toupper(c) (islower(c)?(((c)&31)-'a'+1):(c))

Randy
randym AT acm DOT org

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019