Mercurial > hg > xemacs-beta
comparison src/sysdep.c @ 3700:b3d7b8b98acf
[xemacs-hg @ 2006-11-25 12:40:15 by adrian]
Re: strlwr <54d9efdc0611230035sf15809o7e8b4f2b4ad62404@mail.gmail.com>
author | adrian |
---|---|
date | Sat, 25 Nov 2006 12:40:16 +0000 |
parents | 3e7493e76dc7 |
children | aa5ed11f473b |
comparison
equal
deleted
inserted
replaced
3699:5155e1ab55ae | 3700:b3d7b8b98acf |
---|---|
3489 | 3489 |
3490 #ifndef HAVE_WCHAR_H | 3490 #ifndef HAVE_WCHAR_H |
3491 size_t | 3491 size_t |
3492 wcslen (const wchar_t *s) | 3492 wcslen (const wchar_t *s) |
3493 { | 3493 { |
3494 const wchar_t *p = s; | |
3494 if (s == NULL) return NULL; | 3495 if (s == NULL) return NULL; |
3495 const wchar_t *p = s; | |
3496 | 3496 |
3497 while (*p++) | 3497 while (*p++) |
3498 ; | 3498 ; |
3499 | 3499 |
3500 return p - s; | 3500 return p - s; |
3507 | 3507 |
3508 #ifndef HAVE_STRLWR | 3508 #ifndef HAVE_STRLWR |
3509 char * | 3509 char * |
3510 strlwr (char *s) | 3510 strlwr (char *s) |
3511 { | 3511 { |
3512 REGISTER char *c; | |
3512 if (s == NULL) return NULL; | 3513 if (s == NULL) return NULL; |
3513 REGISTER char *c; | |
3514 | 3514 |
3515 for (c = s; *c; c++) | 3515 for (c = s; *c; c++) |
3516 { | 3516 { |
3517 *c = tolower (*c); | 3517 *c = tolower (*c); |
3518 } | 3518 } |