static char rcsid[] = "@(#)$Id: shiftlower.c,v 1.8 2006/04/09 07:37:05 hurtta Exp $";
/******************************************************************************
* The Elm (ME+) Mail System - $Revision: 1.8 $ $State: Exp $
*
* Modified by: Kari Hurtta <hurtta+elm@posti.FMI.FI>
* (was hurtta+elm@ozone.FMI.FI)
******************************************************************************
* The Elm Mail System
*
* Copyright (c) 1988-1992 USENET Community Trust
* Copyright (c) 1986,1987 Dave Taylor
*****************************************************************************/
#include "headers.h"
DEBUG_VAR(Debug,__FILE__,"mem");
char *shift_lower(string)
CONST char *string;
{
/** return 'string' shifted to lower case. Do NOT touch the
actual string handed to us! **/
static char buffer[VERY_LONG_STRING];
char *bufptr = buffer;
CONST char *src0 = string;
if (string == NULL) {
buffer[0] = 0;
return( (char *) buffer);
}
for (; *string && bufptr - buffer < sizeof buffer;
string++, bufptr++)
#ifdef ASCII_CTYPE
if (isascii(string[i]))
#endif
*bufptr = tolower((unsigned char)*string);
*bufptr = 0;
if (*string != '\0') {
DPRINT(Debug,1,(&Debug,
"shift_lower: --- too long string (max=%d): %.30s...\n",
sizeof buffer -1,src0));
}
return( (char *) buffer);
}
/*
* Local Variables:
* mode:c
* c-basic-offset:4
* buffer-file-coding-system: iso-8859-1
* End:
*/
syntax highlighted by Code2HTML, v. 0.9.1