mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-11 09:51:56 +02:00
Define ISLOWER and ISUPPER independent of STDC_HEADERS.
Define ISDIGIT and use it instead of isdigit.
This commit is contained in:
16
src/dd.c
16
src/dd.c
@@ -55,13 +55,15 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#ifdef STDC_HEADERS
|
|
||||||
#define ISLOWER islower
|
#ifndef isascii
|
||||||
#define ISUPPER isupper
|
#define isascii(c) 1
|
||||||
#else
|
|
||||||
#define ISLOWER(c) (isascii ((c)) && islower ((c)))
|
|
||||||
#define ISUPPER(c) (isascii ((c)) && isupper ((c)))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define ISLOWER(c) (isascii (c) && islower (c))
|
||||||
|
#define ISUPPER(c) (isascii (c) && isupper (c))
|
||||||
|
#define ISDIGIT(c) (isascii (c) && isdigit (c))
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
@@ -839,7 +841,7 @@ parse_integer (str)
|
|||||||
register int temp;
|
register int temp;
|
||||||
register char *p = str;
|
register char *p = str;
|
||||||
|
|
||||||
while (isdigit (*p))
|
while (ISDIGIT (*p))
|
||||||
{
|
{
|
||||||
n = n * 10 + *p - '0';
|
n = n * 10 + *p - '0';
|
||||||
p++;
|
p++;
|
||||||
|
|||||||
Reference in New Issue
Block a user