mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Added isblank().
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14942 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#
|
||||
# $Id: GNUmakefile.68k,v 1.52 2005-05-08 08:51:29 obarthel Exp $
|
||||
# $Id: GNUmakefile.68k,v 1.53 2005-05-11 20:15:24 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
#
|
||||
@ -127,6 +127,7 @@ C_LIB = \
|
||||
ctype_isalnum.o \
|
||||
ctype_isalpha.o \
|
||||
ctype_isascii.o \
|
||||
ctype_isblank.o \
|
||||
ctype_iscntrl.o \
|
||||
ctype_isdigit.o \
|
||||
ctype_isgraph.o \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# $Id: GNUmakefile.os4,v 1.55 2005-05-08 08:51:29 obarthel Exp $
|
||||
# $Id: GNUmakefile.os4,v 1.56 2005-05-11 20:15:25 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
#
|
||||
@ -125,6 +125,7 @@ C_LIB = \
|
||||
ctype_isalnum.o \
|
||||
ctype_isalpha.o \
|
||||
ctype_isascii.o \
|
||||
ctype_isblank.o \
|
||||
ctype_iscntrl.o \
|
||||
ctype_isdigit.o \
|
||||
ctype_isgraph.o \
|
||||
|
||||
@ -60,6 +60,8 @@
|
||||
|
||||
- mktime() now handles one leap second gracefully.
|
||||
|
||||
- Added isblank().
|
||||
|
||||
|
||||
c.lib 1.191 (9.4.2005)
|
||||
|
||||
|
||||
52
library/ctype_isblank.c
Normal file
52
library/ctype_isblank.c
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* $Id: ctype_isblank.c,v 1.1 2005-05-11 20:15:25 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2005 by Olaf Barthel <olsen@sourcery.han.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _CTYPE_HEADERS_H
|
||||
#include "ctype_headers.h"
|
||||
#endif /* _CTYPE_HEADERS_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#undef isspace
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
isblank(int c)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (c == '\t' || c == ' ');
|
||||
|
||||
return(result);
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: ctype.h,v 1.5 2005-01-09 15:20:33 obarthel Exp $
|
||||
* $Id: ctype.h,v 1.6 2005-05-11 20:15:28 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -57,6 +57,7 @@ extern int islower(int c);
|
||||
extern int isupper(int c);
|
||||
|
||||
extern int isspace(int c);
|
||||
extern int isblank(int c);
|
||||
|
||||
extern int tolower(int c);
|
||||
extern int toupper(int c);
|
||||
@ -99,6 +100,7 @@ extern const unsigned char __ctype_table[];
|
||||
#define islower(c) ((__ctype_table[(c) & 255] & __CTYPE_LOWER_CASE) != 0)
|
||||
#define isupper(c) ((__ctype_table[(c) & 255] & __CTYPE_UPPER_CASE) != 0)
|
||||
#define isspace(c) ((__ctype_table[(c) & 255] & __CTYPE_WHITE_SPACE) != 0)
|
||||
#define isblank(c) ((c) == ' ' || (c) == '\t')
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdio.h,v 1.13 2005-05-08 17:02:16 obarthel Exp $
|
||||
* $Id: stdio.h,v 1.14 2005-05-11 20:15:28 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -377,7 +377,6 @@ extern int putchar_unlocked(int c);
|
||||
extern FILE * fdopen(int file_descriptor, const char * type);
|
||||
extern int fileno(FILE * file);
|
||||
extern int asprintf(char **ret, const char *format, ...);
|
||||
extern int snprintf(char *s,size_t size,const char *format,...);
|
||||
extern int vsnprintf(char *s,size_t size,const char *format,va_list arg);
|
||||
extern int pclose(FILE *stream);
|
||||
extern FILE * popen(const char *command, const char *type);
|
||||
@ -426,6 +425,7 @@ extern int __vasprintf(const char *file,int line,char **ret,const char *format,v
|
||||
extern int vfscanf(FILE *stream, const char *format, va_list arg);
|
||||
extern int vsscanf(const char *s, const char *format, va_list arg);
|
||||
extern int vscanf(const char *format,va_list arg);
|
||||
extern int snprintf(char *s,size_t size,const char *format,...);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# $Id: smakefile,v 1.40 2005-05-08 08:51:29 obarthel Exp $
|
||||
# $Id: smakefile,v 1.41 2005-05-11 20:15:25 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
#
|
||||
@ -104,6 +104,7 @@ CTYPE_OBJ = \
|
||||
ctype_isalnum.o \
|
||||
ctype_isalpha.o \
|
||||
ctype_isascii.o \
|
||||
ctype_isblank.o \
|
||||
ctype_iscntrl.o \
|
||||
ctype_isdigit.o \
|
||||
ctype_isgraph.o \
|
||||
|
||||
Reference in New Issue
Block a user