mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Move definition of IS*() macros to setup_once.h
This commit is contained in:
parent
8c38ea4ebc
commit
71c6335293
@ -17,6 +17,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* NOTICE *
|
||||||
|
* ======== *
|
||||||
|
* *
|
||||||
|
* Content of header files lib/setup_once.h and ares/setup_once.h *
|
||||||
|
* must be kept in sync. Modify the other one if you change this. *
|
||||||
|
* *
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we have the MSG_NOSIGNAL define, make sure we use
|
* If we have the MSG_NOSIGNAL define, make sure we use
|
||||||
* it as the fourth argument of send() and recv()
|
* it as the fourth argument of send() and recv()
|
||||||
@ -67,7 +77,7 @@
|
|||||||
(RECV_TYPE_ARG4)(SEND_4TH_ARG))
|
(RECV_TYPE_ARG4)(SEND_4TH_ARG))
|
||||||
#endif
|
#endif
|
||||||
#else /* HAVE_RECV */
|
#else /* HAVE_RECV */
|
||||||
#ifdef DJGPP
|
#ifdef MSDOS
|
||||||
#define sread(x,y,z) (ssize_t)read_s((int)(x), (char *)(y), (int)(z))
|
#define sread(x,y,z) (ssize_t)read_s((int)(x), (char *)(y), (int)(z))
|
||||||
#endif
|
#endif
|
||||||
#ifndef sread
|
#ifndef sread
|
||||||
@ -94,7 +104,7 @@
|
|||||||
(SEND_TYPE_ARG4)(SEND_4TH_ARG))
|
(SEND_TYPE_ARG4)(SEND_4TH_ARG))
|
||||||
#endif
|
#endif
|
||||||
#else /* HAVE_SEND */
|
#else /* HAVE_SEND */
|
||||||
#ifdef DJGPP
|
#ifdef MSDOS
|
||||||
#define swrite(x,y,z) (ssize_t)write_s((int)(x), (char *)(y), (int)(z))
|
#define swrite(x,y,z) (ssize_t)write_s((int)(x), (char *)(y), (int)(z))
|
||||||
#endif
|
#endif
|
||||||
#ifndef swrite
|
#ifndef swrite
|
||||||
@ -105,5 +115,18 @@
|
|||||||
#endif /* HAVE_SEND */
|
#endif /* HAVE_SEND */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Uppercase macro versions of ANSI/ISO is*() functions/macros which
|
||||||
|
* avoid negative number inputs whith argument byte codes > 127.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ISSPACE(x) (isspace((int) ((unsigned char)x)))
|
||||||
|
#define ISDIGIT(x) (isdigit((int) ((unsigned char)x)))
|
||||||
|
#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
|
||||||
|
#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
|
||||||
|
#define ISGRAPH(x) (isgraph((int) ((unsigned char)x)))
|
||||||
|
#define ISALPHA(x) (isalpha((int) ((unsigned char)x)))
|
||||||
|
|
||||||
|
|
||||||
#endif /* __SETUP_ONCE_H */
|
#endif /* __SETUP_ONCE_H */
|
||||||
|
|
||||||
|
10
lib/setup.h
10
lib/setup.h
@ -348,16 +348,6 @@ int fileno( FILE *stream);
|
|||||||
#define DEBUGF(x)
|
#define DEBUGF(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ISSPACE
|
|
||||||
/* typecasting craze to avoid negative number inputs to these macros */
|
|
||||||
#define ISSPACE(x) (isspace((int)((unsigned char)x)))
|
|
||||||
#define ISDIGIT(x) (isdigit((int)((unsigned char)x)))
|
|
||||||
#define ISALNUM(x) (isalnum((int)((unsigned char)x)))
|
|
||||||
#define ISXDIGIT(x) (isxdigit((int)((unsigned char)x)))
|
|
||||||
#define ISGRAPH(x) (isgraph((int)((unsigned char)x)))
|
|
||||||
#define ISALPHA(x) (isalpha((int)((unsigned char)x)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Include macros and defines that should only be processed once.
|
* Include macros and defines that should only be processed once.
|
||||||
*/
|
*/
|
||||||
|
@ -24,6 +24,16 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* NOTICE *
|
||||||
|
* ======== *
|
||||||
|
* *
|
||||||
|
* Content of header files lib/setup_once.h and ares/setup_once.h *
|
||||||
|
* must be kept in sync. Modify the other one if you change this. *
|
||||||
|
* *
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we have the MSG_NOSIGNAL define, make sure we use
|
* If we have the MSG_NOSIGNAL define, make sure we use
|
||||||
* it as the fourth argument of send() and recv()
|
* it as the fourth argument of send() and recv()
|
||||||
@ -112,5 +122,18 @@
|
|||||||
#endif /* HAVE_SEND */
|
#endif /* HAVE_SEND */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Uppercase macro versions of ANSI/ISO is*() functions/macros which
|
||||||
|
* avoid negative number inputs whith argument byte codes > 127.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ISSPACE(x) (isspace((int) ((unsigned char)x)))
|
||||||
|
#define ISDIGIT(x) (isdigit((int) ((unsigned char)x)))
|
||||||
|
#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
|
||||||
|
#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
|
||||||
|
#define ISGRAPH(x) (isgraph((int) ((unsigned char)x)))
|
||||||
|
#define ISALPHA(x) (isalpha((int) ((unsigned char)x)))
|
||||||
|
|
||||||
|
|
||||||
#endif /* __SETUP_ONCE_H */
|
#endif /* __SETUP_ONCE_H */
|
||||||
|
|
||||||
|
16
src/setup.h
16
src/setup.h
@ -184,16 +184,12 @@ int fileno( FILE *stream);
|
|||||||
#define strdup(ptr) curlx_strdup(ptr)
|
#define strdup(ptr) curlx_strdup(ptr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ISSPACE
|
/*
|
||||||
/* typecasting craze to avoid negative number inputs to these macros */
|
* Include macros and defines that should only be processed once.
|
||||||
/* copied from lib/setup.h */
|
*/
|
||||||
#define ISSPACE(x) (isspace((int)((unsigned char)x)))
|
|
||||||
#define ISDIGIT(x) (isdigit((int)((unsigned char)x)))
|
#ifndef __SETUP_ONCE_H
|
||||||
#define ISALNUM(x) (isalnum((int)((unsigned char)x)))
|
#include "setup_once.h"
|
||||||
#define ISXDIGIT(x) (isxdigit((int)((unsigned char)x)))
|
|
||||||
#define ISGRAPH(x) (isgraph((int)((unsigned char)x)))
|
|
||||||
#define ISALPHA(x) (isalpha((int)((unsigned char)x)))
|
|
||||||
#define ISPRINT(x) (isprint((int)((unsigned char)x)))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __SRC_CURL_SETUP_H */
|
#endif /* __SRC_CURL_SETUP_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user