aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2017-12-03 20:25:16 -0600
committerYaakov Selkowitz <yselkowi@redhat.com>2018-01-17 11:47:08 -0600
commit0bda30e1ffd23488aa4a9b73f228089463fbee1a (patch)
treeb0efb851be762c4d530cc259070005318702321d /newlib/libc/stdio
parent6783860a2e4e4183c073f62e4bb938cea0e096c3 (diff)
downloadnewlib-0bda30e1ffd23488aa4a9b73f228089463fbee1a.zip
newlib-0bda30e1ffd23488aa4a9b73f228089463fbee1a.tar.gz
newlib-0bda30e1ffd23488aa4a9b73f228089463fbee1a.tar.bz2
ansification: remove _CONST
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r--newlib/libc/stdio/fdopen.c4
-rw-r--r--newlib/libc/stdio/fiscanf.c4
-rw-r--r--newlib/libc/stdio/fopen.c8
-rw-r--r--newlib/libc/stdio/fputs.c6
-rw-r--r--newlib/libc/stdio/freopen.c4
-rw-r--r--newlib/libc/stdio/fscanf.c4
-rw-r--r--newlib/libc/stdio/fsetpos.c4
-rw-r--r--newlib/libc/stdio/fvwrite.c2
-rw-r--r--newlib/libc/stdio/fvwrite.h2
-rw-r--r--newlib/libc/stdio/fwrite.c6
-rw-r--r--newlib/libc/stdio/fwscanf.c4
-rw-r--r--newlib/libc/stdio/iscanf.c4
-rw-r--r--newlib/libc/stdio/local.h24
-rw-r--r--newlib/libc/stdio/nano-vfprintf.c14
-rw-r--r--newlib/libc/stdio/nano-vfprintf_float.c2
-rw-r--r--newlib/libc/stdio/nano-vfprintf_i.c4
-rw-r--r--newlib/libc/stdio/nano-vfprintf_local.h6
-rw-r--r--newlib/libc/stdio/nano-vfscanf.c8
-rw-r--r--newlib/libc/stdio/perror.c4
-rw-r--r--newlib/libc/stdio/puts.c4
-rw-r--r--newlib/libc/stdio/putw.c2
-rw-r--r--newlib/libc/stdio/remove.c4
-rw-r--r--newlib/libc/stdio/rename.c4
-rw-r--r--newlib/libc/stdio/scanf.c4
-rw-r--r--newlib/libc/stdio/siprintf.c8
-rw-r--r--newlib/libc/stdio/siscanf.c16
-rw-r--r--newlib/libc/stdio/sniprintf.c8
-rw-r--r--newlib/libc/stdio/snprintf.c8
-rw-r--r--newlib/libc/stdio/sprintf.c8
-rw-r--r--newlib/libc/stdio/sscanf.c16
-rw-r--r--newlib/libc/stdio/swprintf.c4
-rw-r--r--newlib/libc/stdio/swscanf.c4
-rw-r--r--newlib/libc/stdio/tmpnam.c14
-rw-r--r--newlib/libc/stdio/vfprintf.c34
-rw-r--r--newlib/libc/stdio/vfscanf.c10
-rw-r--r--newlib/libc/stdio/vfwprintf.c16
-rw-r--r--newlib/libc/stdio/vfwscanf.c10
-rw-r--r--newlib/libc/stdio/viprintf.c4
-rw-r--r--newlib/libc/stdio/viscanf.c4
-rw-r--r--newlib/libc/stdio/vprintf.c4
-rw-r--r--newlib/libc/stdio/vscanf.c4
-rw-r--r--newlib/libc/stdio/vsiscanf.c8
-rw-r--r--newlib/libc/stdio/vsscanf.c8
-rw-r--r--newlib/libc/stdio/vswscanf.c4
-rw-r--r--newlib/libc/stdio/vwprintf.c4
-rw-r--r--newlib/libc/stdio/vwscanf.c4
-rw-r--r--newlib/libc/stdio/wscanf.c4
47 files changed, 168 insertions, 168 deletions
diff --git a/newlib/libc/stdio/fdopen.c b/newlib/libc/stdio/fdopen.c
index 7dda3c3..82b7a9b 100644
--- a/newlib/libc/stdio/fdopen.c
+++ b/newlib/libc/stdio/fdopen.c
@@ -56,7 +56,7 @@ FILE *
_DEFUN(_fdopen_r, (ptr, fd, mode),
struct _reent *ptr,
int fd,
- _CONST char *mode)
+ const char *mode)
{
register FILE *fp;
int flags, oflags;
@@ -125,7 +125,7 @@ _DEFUN(_fdopen_r, (ptr, fd, mode),
FILE *
_DEFUN(fdopen, (fd, mode),
int fd,
- _CONST char *mode)
+ const char *mode)
{
return _fdopen_r (_REENT, fd, mode);
}
diff --git a/newlib/libc/stdio/fiscanf.c b/newlib/libc/stdio/fiscanf.c
index 53fee84..7b497bd 100644
--- a/newlib/libc/stdio/fiscanf.c
+++ b/newlib/libc/stdio/fiscanf.c
@@ -29,7 +29,7 @@
int
#ifdef _HAVE_STDC
-fiscanf(FILE *fp, _CONST char *fmt, ...)
+fiscanf(FILE *fp, const char *fmt, ...)
#else
fiscanf(FILE *fp, fmt, va_alist)
FILE *fp;
@@ -54,7 +54,7 @@ fiscanf(FILE *fp, fmt, va_alist)
int
#ifdef _HAVE_STDC
-_fiscanf_r(struct _reent *ptr, FILE *fp, _CONST char *fmt, ...)
+_fiscanf_r(struct _reent *ptr, FILE *fp, const char *fmt, ...)
#else
_fiscanf_r(ptr, FILE *fp, fmt, va_alist)
struct _reent *ptr;
diff --git a/newlib/libc/stdio/fopen.c b/newlib/libc/stdio/fopen.c
index 92ec706..e6b0445 100644
--- a/newlib/libc/stdio/fopen.c
+++ b/newlib/libc/stdio/fopen.c
@@ -115,8 +115,8 @@ static char sccsid[] = "%W% (Berkeley) %G%";
FILE *
_DEFUN(_fopen_r, (ptr, file, mode),
struct _reent *ptr,
- _CONST char *__restrict file,
- _CONST char *__restrict mode)
+ const char *__restrict file,
+ const char *__restrict mode)
{
register FILE *fp;
register int f;
@@ -164,8 +164,8 @@ _DEFUN(_fopen_r, (ptr, file, mode),
FILE *
_DEFUN(fopen, (file, mode),
- _CONST char *file,
- _CONST char *mode)
+ const char *file,
+ const char *mode)
{
return _fopen_r (_REENT, file, mode);
}
diff --git a/newlib/libc/stdio/fputs.c b/newlib/libc/stdio/fputs.c
index 7adb89a..0fd051b 100644
--- a/newlib/libc/stdio/fputs.c
+++ b/newlib/libc/stdio/fputs.c
@@ -88,7 +88,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
int
_DEFUN(_fputs_r, (ptr, s, fp),
struct _reent * ptr,
- char _CONST *__restrict s,
+ char const *__restrict s,
FILE *__restrict fp)
{
#ifdef _FVWRITE_IN_STREAMIO
@@ -109,7 +109,7 @@ _DEFUN(_fputs_r, (ptr, s, fp),
_newlib_flockfile_end (fp);
return result;
#else
- _CONST char *p = s;
+ const char *p = s;
CHECK_INIT(ptr, fp);
@@ -136,7 +136,7 @@ error:
#ifndef _REENT_ONLY
int
_DEFUN(fputs, (s, fp),
- char _CONST *__restrict s,
+ char const *__restrict s,
FILE *__restrict fp)
{
return _fputs_r (_REENT, s, fp);
diff --git a/newlib/libc/stdio/freopen.c b/newlib/libc/stdio/freopen.c
index b9fee0c..7e70b9a 100644
--- a/newlib/libc/stdio/freopen.c
+++ b/newlib/libc/stdio/freopen.c
@@ -244,8 +244,8 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
FILE *
_DEFUN(freopen, (file, mode, fp),
- _CONST char *__restrict file,
- _CONST char *__restrict mode,
+ const char *__restrict file,
+ const char *__restrict mode,
register FILE *__restrict fp)
{
return _freopen_r (_REENT, file, mode, fp);
diff --git a/newlib/libc/stdio/fscanf.c b/newlib/libc/stdio/fscanf.c
index 87b51dd..40705a5 100644
--- a/newlib/libc/stdio/fscanf.c
+++ b/newlib/libc/stdio/fscanf.c
@@ -29,7 +29,7 @@
int
#ifdef _HAVE_STDC
-fscanf(FILE *__restrict fp, _CONST char *__restrict fmt, ...)
+fscanf(FILE *__restrict fp, const char *__restrict fmt, ...)
#else
fscanf(FILE *fp, fmt, va_alist)
FILE *fp;
@@ -60,7 +60,7 @@ _EXFUN(fiscanf, (FILE *, const char *, ...)
int
#ifdef _HAVE_STDC
-_fscanf_r(struct _reent *ptr, FILE *__restrict fp, _CONST char *__restrict fmt, ...)
+_fscanf_r(struct _reent *ptr, FILE *__restrict fp, const char *__restrict fmt, ...)
#else
_fscanf_r(ptr, FILE *fp, fmt, va_alist)
struct _reent *ptr;
diff --git a/newlib/libc/stdio/fsetpos.c b/newlib/libc/stdio/fsetpos.c
index ffc9d79..d765081 100644
--- a/newlib/libc/stdio/fsetpos.c
+++ b/newlib/libc/stdio/fsetpos.c
@@ -62,7 +62,7 @@ int
_DEFUN(_fsetpos_r, (ptr, iop, pos),
struct _reent * ptr,
FILE * iop,
- _CONST _fpos_t * pos)
+ const _fpos_t * pos)
{
int x = _fseek_r (ptr, iop, *pos, SEEK_SET);
@@ -76,7 +76,7 @@ _DEFUN(_fsetpos_r, (ptr, iop, pos),
int
_DEFUN(fsetpos, (iop, pos),
FILE * iop,
- _CONST _fpos_t * pos)
+ const _fpos_t * pos)
{
return _fsetpos_r (_REENT, iop, pos);
}
diff --git a/newlib/libc/stdio/fvwrite.c b/newlib/libc/stdio/fvwrite.c
index a0432a0..c93888d 100644
--- a/newlib/libc/stdio/fvwrite.c
+++ b/newlib/libc/stdio/fvwrite.c
@@ -51,7 +51,7 @@ _DEFUN(__sfvwrite_r, (ptr, fp, uio),
register struct __suio *uio)
{
register size_t len;
- register _CONST char *p = NULL;
+ register const char *p = NULL;
register struct __siov *iov;
register _READ_WRITE_RETURN_TYPE w, s;
char *nl;
diff --git a/newlib/libc/stdio/fvwrite.h b/newlib/libc/stdio/fvwrite.h
index 5c078fe..8b01a2a 100644
--- a/newlib/libc/stdio/fvwrite.h
+++ b/newlib/libc/stdio/fvwrite.h
@@ -22,7 +22,7 @@
* I/O descriptors for __sfvwrite_r().
*/
struct __siov {
- _CONST _PTR iov_base;
+ const _PTR iov_base;
size_t iov_len;
};
struct __suio {
diff --git a/newlib/libc/stdio/fwrite.c b/newlib/libc/stdio/fwrite.c
index a805eff..cfaa249 100644
--- a/newlib/libc/stdio/fwrite.c
+++ b/newlib/libc/stdio/fwrite.c
@@ -110,7 +110,7 @@ static char sccsid[] = "%W% (Berkeley) %G%";
size_t
_DEFUN(_fwrite_r, (ptr, buf, size, count, fp),
struct _reent * ptr,
- _CONST _PTR __restrict buf,
+ const _PTR __restrict buf,
size_t size,
size_t count,
FILE * __restrict fp)
@@ -144,7 +144,7 @@ _DEFUN(_fwrite_r, (ptr, buf, size, count, fp),
return (n - uio.uio_resid) / size;
#else
size_t i = 0;
- _CONST char *p = buf;
+ const char *p = buf;
n = count * size;
CHECK_INIT (ptr, fp);
@@ -171,7 +171,7 @@ ret:
#ifndef _REENT_ONLY
size_t
_DEFUN(fwrite, (buf, size, count, fp),
- _CONST _PTR __restrict buf,
+ const _PTR __restrict buf,
size_t size,
size_t count,
FILE * fp)
diff --git a/newlib/libc/stdio/fwscanf.c b/newlib/libc/stdio/fwscanf.c
index 8572f41..1b86a34 100644
--- a/newlib/libc/stdio/fwscanf.c
+++ b/newlib/libc/stdio/fwscanf.c
@@ -26,7 +26,7 @@
#ifndef _REENT_ONLY
int
-fwscanf (FILE *__restrict fp, _CONST wchar_t *__restrict fmt, ...)
+fwscanf (FILE *__restrict fp, const wchar_t *__restrict fmt, ...)
{
int ret;
va_list ap;
@@ -40,7 +40,7 @@ fwscanf (FILE *__restrict fp, _CONST wchar_t *__restrict fmt, ...)
#endif /* !_REENT_ONLY */
int
-_fwscanf_r (struct _reent *ptr, FILE *fp, _CONST wchar_t *fmt, ...)
+_fwscanf_r (struct _reent *ptr, FILE *fp, const wchar_t *fmt, ...)
{
int ret;
va_list ap;
diff --git a/newlib/libc/stdio/iscanf.c b/newlib/libc/stdio/iscanf.c
index f35acd2..aefd1a4 100644
--- a/newlib/libc/stdio/iscanf.c
+++ b/newlib/libc/stdio/iscanf.c
@@ -29,7 +29,7 @@
int
#ifdef _HAVE_STDC
-iscanf(_CONST char *fmt, ...)
+iscanf(const char *fmt, ...)
#else
iscanf(fmt, va_alist)
char *fmt;
@@ -54,7 +54,7 @@ iscanf(fmt, va_alist)
int
#ifdef _HAVE_STDC
-_iscanf_r(struct _reent *ptr, _CONST char *fmt, ...)
+_iscanf_r(struct _reent *ptr, const char *fmt, ...)
#else
_iscanf_r(ptr, fmt, va_alist)
struct _reent *ptr;
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index 511e5e3..b5fd119 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -143,14 +143,14 @@
extern wint_t _EXFUN(__fgetwc, (struct _reent *, FILE *));
extern wint_t _EXFUN(__fputwc, (struct _reent *, wchar_t, FILE *));
extern u_char *_EXFUN(__sccl, (char *, u_char *fmt));
-extern int _EXFUN(__svfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list));
-extern int _EXFUN(__ssvfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list));
-extern int _EXFUN(__svfiscanf_r,(struct _reent *,FILE *, _CONST char *,va_list));
-extern int _EXFUN(__ssvfiscanf_r,(struct _reent *,FILE *, _CONST char *,va_list));
-extern int _EXFUN(__svfwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list));
-extern int _EXFUN(__ssvfwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list));
-extern int _EXFUN(__svfiwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list));
-extern int _EXFUN(__ssvfiwscanf_r,(struct _reent *,FILE *, _CONST wchar_t *,va_list));
+extern int _EXFUN(__svfscanf_r,(struct _reent *,FILE *, const char *,va_list));
+extern int _EXFUN(__ssvfscanf_r,(struct _reent *,FILE *, const char *,va_list));
+extern int _EXFUN(__svfiscanf_r,(struct _reent *,FILE *, const char *,va_list));
+extern int _EXFUN(__ssvfiscanf_r,(struct _reent *,FILE *, const char *,va_list));
+extern int _EXFUN(__svfwscanf_r,(struct _reent *,FILE *, const wchar_t *,va_list));
+extern int _EXFUN(__ssvfwscanf_r,(struct _reent *,FILE *, const wchar_t *,va_list));
+extern int _EXFUN(__svfiwscanf_r,(struct _reent *,FILE *, const wchar_t *,va_list));
+extern int _EXFUN(__ssvfiwscanf_r,(struct _reent *,FILE *, const wchar_t *,va_list));
int _EXFUN(_svfprintf_r,(struct _reent *, FILE *, const char *,
va_list)
_ATTRIBUTE ((__format__ (__printf__, 3, 0))));
@@ -162,7 +162,7 @@ int _EXFUN(_svfwprintf_r,(struct _reent *, FILE *, const wchar_t *,
int _EXFUN(_svfiwprintf_r,(struct _reent *, FILE *, const wchar_t *,
va_list));
extern FILE *_EXFUN(__sfp,(struct _reent *));
-extern int _EXFUN(__sflags,(struct _reent *,_CONST char*, int*));
+extern int _EXFUN(__sflags,(struct _reent *,const char*, int*));
extern int _EXFUN(__sflush_r,(struct _reent *,FILE *));
#ifdef _STDIO_BSD_SEMANTICS
extern int _EXFUN(__sflushw_r,(struct _reent *,FILE *));
@@ -347,6 +347,6 @@ typedef enum __packed {
PWPOS, /* get positional parameter value for variable width or precision */
} __ACTION;
-extern _CONST __CH_CLASS __chclass[256];
-extern _CONST __STATE __state_table[MAX_STATE][MAX_CH_CLASS];
-extern _CONST __ACTION __action_table[MAX_STATE][MAX_CH_CLASS];
+extern const __CH_CLASS __chclass[256];
+extern const __STATE __state_table[MAX_STATE][MAX_CH_CLASS];
+extern const __ACTION __action_table[MAX_STATE][MAX_CH_CLASS];
diff --git a/newlib/libc/stdio/nano-vfprintf.c b/newlib/libc/stdio/nano-vfprintf.c
index f01e6a4..df20783 100644
--- a/newlib/libc/stdio/nano-vfprintf.c
+++ b/newlib/libc/stdio/nano-vfprintf.c
@@ -185,7 +185,7 @@ int
_DEFUN(__ssputs_r, (ptr, fp, buf, len),
struct _reent *ptr,
FILE *fp,
- _CONST char *buf,
+ const char *buf,
size_t len)
{
register int w;
@@ -261,7 +261,7 @@ _DEFUN(__ssprint_r, (ptr, fp, uio),
register size_t len;
register int w;
register struct __siov *iov;
- register _CONST char *p = NULL;
+ register const char *p = NULL;
iov = uio->uio_iov;
len = 0;
@@ -417,7 +417,7 @@ int
_DEFUN(__sfputs_r, (ptr, fp, buf, len),
struct _reent *ptr,
FILE *fp,
- _CONST char *buf,
+ const char *buf,
size_t len)
{
register int i;
@@ -448,13 +448,13 @@ _DEFUN(__sfputs_r, (ptr, fp, buf, len),
}
#endif /* STRING_ONLY. */
-int _EXFUN(_VFPRINTF_R, (struct _reent *, FILE *, _CONST char *, va_list));
+int _EXFUN(_VFPRINTF_R, (struct _reent *, FILE *, const char *, va_list));
#ifndef STRING_ONLY
int
_DEFUN(VFPRINTF, (fp, fmt0, ap),
FILE * fp,
- _CONST char *fmt0,
+ const char *fmt0,
va_list ap)
{
int result;
@@ -484,7 +484,7 @@ int
_DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap),
struct _reent *data,
FILE * fp,
- _CONST char *fmt0,
+ const char *fmt0,
va_list ap)
{
register char *fmt; /* Format string. */
@@ -494,7 +494,7 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap),
struct _prt_data_t prt_data; /* All data for decoding format string. */
/* Output function pointer. */
- int (*pfunc)(struct _reent *, FILE *, _CONST char *, size_t len);
+ int (*pfunc)(struct _reent *, FILE *, const char *, size_t len);
pfunc = __SPRINT;
diff --git a/newlib/libc/stdio/nano-vfprintf_float.c b/newlib/libc/stdio/nano-vfprintf_float.c
index aca24ae..98893e9 100644
--- a/newlib/libc/stdio/nano-vfprintf_float.c
+++ b/newlib/libc/stdio/nano-vfprintf_float.c
@@ -164,7 +164,7 @@ int
_printf_float (struct _reent *data,
struct _prt_data_t *pdata,
FILE * fp,
- int (*pfunc) (struct _reent *, FILE *, _CONST char *,
+ int (*pfunc) (struct _reent *, FILE *, const char *,
size_t len), va_list * ap)
{
#define _fpvalue (pdata->_double_)
diff --git a/newlib/libc/stdio/nano-vfprintf_i.c b/newlib/libc/stdio/nano-vfprintf_i.c
index 46945b3..f7da952 100644
--- a/newlib/libc/stdio/nano-vfprintf_i.c
+++ b/newlib/libc/stdio/nano-vfprintf_i.c
@@ -51,7 +51,7 @@ _printf_common (struct _reent *data,
int *realsz,
FILE *fp,
int (*pfunc)(struct _reent *, FILE *,
- _CONST char *, size_t len))
+ const char *, size_t len))
{
int n;
/*
@@ -106,7 +106,7 @@ error:
}
int
_printf_i (struct _reent *data, struct _prt_data_t *pdata, FILE *fp,
- int (*pfunc)(struct _reent *, FILE *, _CONST char *, size_t len),
+ int (*pfunc)(struct _reent *, FILE *, const char *, size_t len),
va_list *ap)
{
/* Field size expanded by dprec. */
diff --git a/newlib/libc/stdio/nano-vfprintf_local.h b/newlib/libc/stdio/nano-vfprintf_local.h
index 83b479e..51e1df8 100644
--- a/newlib/libc/stdio/nano-vfprintf_local.h
+++ b/newlib/libc/stdio/nano-vfprintf_local.h
@@ -215,11 +215,11 @@ _printf_common (struct _reent *data,
int *realsz,
FILE *fp,
int (*pfunc)(struct _reent *, FILE *,
- _CONST char *, size_t len));
+ const char *, size_t len));
extern int
_printf_i (struct _reent *data, struct _prt_data_t *pdata, FILE *fp,
- int (*pfunc)(struct _reent *, FILE *, _CONST char *, size_t len),
+ int (*pfunc)(struct _reent *, FILE *, const char *, size_t len),
va_list *ap);
/* Make _printf_float weak symbol, so it won't be linked in if target program
@@ -229,6 +229,6 @@ _printf_float (struct _reent *data,
struct _prt_data_t *pdata,
FILE *fp,
int (*pfunc)(struct _reent *, FILE *,
- _CONST char *, size_t len),
+ const char *, size_t len),
va_list *ap) _ATTRIBUTE((__weak__));
#endif
diff --git a/newlib/libc/stdio/nano-vfscanf.c b/newlib/libc/stdio/nano-vfscanf.c
index 99c13f2..f530480 100644
--- a/newlib/libc/stdio/nano-vfscanf.c
+++ b/newlib/libc/stdio/nano-vfscanf.c
@@ -146,7 +146,7 @@ Supporting OS subroutines required:
int
_DEFUN(VFSCANF, (fp, fmt, ap),
register FILE *fp,
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
CHECK_INIT(_REENT, fp);
@@ -160,7 +160,7 @@ _EXFUN(vfiscanf, (FILE *, const char *, __VALIST)
int
_DEFUN(__SVFSCANF, (fp, fmt0, ap),
register FILE *fp,
- char _CONST *fmt0,
+ char const *fmt0,
va_list ap)
{
return __SVFSCANF_R (_REENT, fp, fmt0, ap);
@@ -172,7 +172,7 @@ int
_DEFUN(_VFSCANF_R, (data, fp, fmt, ap),
struct _reent *data,
register FILE *fp,
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
CHECK_INIT(data, fp);
@@ -271,7 +271,7 @@ int
_DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
struct _reent *rptr,
register FILE *fp,
- char _CONST *fmt0,
+ char const *fmt0,
va_list ap)
{
register u_char *fmt = (u_char *) fmt0;
diff --git a/newlib/libc/stdio/perror.c b/newlib/libc/stdio/perror.c
index cd18291..cda8a11 100644
--- a/newlib/libc/stdio/perror.c
+++ b/newlib/libc/stdio/perror.c
@@ -61,7 +61,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
_VOID
_DEFUN(_perror_r, (ptr, s),
struct _reent *ptr,
- _CONST char *s)
+ const char *s)
{
char *error;
int dummy;
@@ -83,7 +83,7 @@ _DEFUN(_perror_r, (ptr, s),
_VOID
_DEFUN(perror, (s),
- _CONST char *s)
+ const char *s)
{
_perror_r (_REENT, s);
}
diff --git a/newlib/libc/stdio/puts.c b/newlib/libc/stdio/puts.c
index 36cc832..89a9485 100644
--- a/newlib/libc/stdio/puts.c
+++ b/newlib/libc/stdio/puts.c
@@ -67,7 +67,7 @@ static char sccsid[] = "%W% (Berkeley) %G%";
int
_DEFUN(_puts_r, (ptr, s),
struct _reent *ptr,
- _CONST char * s)
+ const char * s)
{
#ifdef _FVWRITE_IN_STREAMIO
int result;
@@ -126,7 +126,7 @@ err:
int
_DEFUN(puts, (s),
- char _CONST * s)
+ char const * s)
{
return _puts_r (_REENT, s);
}
diff --git a/newlib/libc/stdio/putw.c b/newlib/libc/stdio/putw.c
index 1e3c78c..5377d87 100644
--- a/newlib/libc/stdio/putw.c
+++ b/newlib/libc/stdio/putw.c
@@ -53,7 +53,7 @@ _DEFUN(putw, (w, fp),
int w,
register FILE *fp)
{
- if (fwrite ((_CONST char*)&w, sizeof (w), 1, fp) != 1)
+ if (fwrite ((const char*)&w, sizeof (w), 1, fp) != 1)
return EOF;
return 0;
}
diff --git a/newlib/libc/stdio/remove.c b/newlib/libc/stdio/remove.c
index 18c468d..810b282 100644
--- a/newlib/libc/stdio/remove.c
+++ b/newlib/libc/stdio/remove.c
@@ -61,7 +61,7 @@ Supporting OS subroutine required: <<unlink>>.
int
_DEFUN(_remove_r, (ptr, filename),
struct _reent *ptr,
- _CONST char *filename)
+ const char *filename)
{
if (_unlink_r (ptr, filename) == -1)
return -1;
@@ -73,7 +73,7 @@ _DEFUN(_remove_r, (ptr, filename),
int
_DEFUN(remove, (filename),
- _CONST char *filename)
+ const char *filename)
{
return _remove_r (_REENT, filename);
}
diff --git a/newlib/libc/stdio/rename.c b/newlib/libc/stdio/rename.c
index a2b0d41..a327708 100644
--- a/newlib/libc/stdio/rename.c
+++ b/newlib/libc/stdio/rename.c
@@ -55,8 +55,8 @@ Supporting OS subroutines required: <<link>>, <<unlink>>, or <<rename>>.
int
_DEFUN(rename, (old, new),
- _CONST char *old,
- _CONST char *new)
+ const char *old,
+ const char *new)
{
return _rename_r (_REENT, old, new);
}
diff --git a/newlib/libc/stdio/scanf.c b/newlib/libc/stdio/scanf.c
index 23e97b8..87cbeb7 100644
--- a/newlib/libc/stdio/scanf.c
+++ b/newlib/libc/stdio/scanf.c
@@ -29,7 +29,7 @@
int
#ifdef _HAVE_STDC
-scanf(_CONST char *__restrict fmt, ...)
+scanf(const char *__restrict fmt, ...)
#else
scanf(fmt, va_alist)
char *fmt;
@@ -61,7 +61,7 @@ _EXFUN(iscanf, (const char *, ...)
int
#ifdef _HAVE_STDC
-_scanf_r(struct _reent *ptr, _CONST char *__restrict fmt, ...)
+_scanf_r(struct _reent *ptr, const char *__restrict fmt, ...)
#else
_scanf_r(ptr, fmt, va_alist)
struct _reent *ptr;
diff --git a/newlib/libc/stdio/siprintf.c b/newlib/libc/stdio/siprintf.c
index 861fc8d..e336875 100644
--- a/newlib/libc/stdio/siprintf.c
+++ b/newlib/libc/stdio/siprintf.c
@@ -107,12 +107,12 @@ int
_DEFUN(_siprintf_r, (ptr, str, fmt),
struct _reent *ptr,
char *str,
- _CONST char *fmt _DOTS)
+ const char *fmt _DOTS)
#else
_siprintf_r(ptr, str, fmt, va_alist)
struct _reent *ptr;
char *str;
- _CONST char *fmt;
+ const char *fmt;
va_dcl
#endif
{
@@ -141,11 +141,11 @@ int
#ifdef _HAVE_STDC
_DEFUN(siprintf, (str, fmt),
char *str,
- _CONST char *fmt _DOTS)
+ const char *fmt _DOTS)
#else
siprintf(str, fmt, va_alist)
char *str;
- _CONST char *fmt;
+ const char *fmt;
va_dcl
#endif
{
diff --git a/newlib/libc/stdio/siscanf.c b/newlib/libc/stdio/siscanf.c
index 81d60d0..d5e62b4 100644
--- a/newlib/libc/stdio/siscanf.c
+++ b/newlib/libc/stdio/siscanf.c
@@ -88,13 +88,13 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#ifdef _HAVE_STDC
int
_DEFUN(siscanf, (str, fmt),
- _CONST char *str,
- _CONST char *fmt _DOTS)
+ const char *str,
+ const char *fmt _DOTS)
#else
int
siscanf(str, fmt, va_alist)
- _CONST char *str;
- _CONST char *fmt;
+ const char *str;
+ const char *fmt;
va_dcl
#endif
{
@@ -125,14 +125,14 @@ siscanf(str, fmt, va_alist)
int
_DEFUN(_siscanf_r, (ptr, str, fmt),
struct _reent *ptr,
- _CONST char *str,
- _CONST char *fmt _DOTS)
+ const char *str,
+ const char *fmt _DOTS)
#else
int
_siscanf_r(ptr, str, fmt, va_alist)
struct _reent *ptr;
- _CONST char *str;
- _CONST char *fmt;
+ const char *str;
+ const char *fmt;
va_dcl
#endif
{
diff --git a/newlib/libc/stdio/sniprintf.c b/newlib/libc/stdio/sniprintf.c
index 65e5b06..90e3027 100644
--- a/newlib/libc/stdio/sniprintf.c
+++ b/newlib/libc/stdio/sniprintf.c
@@ -36,13 +36,13 @@ _DEFUN (_sniprintf_r, (ptr, str, size, fmt),
struct _reent *ptr,
char *str,
size_t size,
- _CONST char *fmt _DOTS)
+ const char *fmt _DOTS)
#else
_sniprintf_r (ptr, str, size, fmt, va_alist)
struct _reent *ptr;
char *str;
size_t size;
- _CONST char *fmt;
+ const char *fmt;
va_dcl
#endif
{
@@ -80,12 +80,12 @@ int
_DEFUN (sniprintf, (str, size, fmt),
char *str,
size_t size,
- _CONST char *fmt _DOTS)
+ const char *fmt _DOTS)
#else
sniprintf (str, size, fmt, va_alist)
char *str;
size_t size;
- _CONST char *fmt;
+ const char *fmt;
va_dcl
#endif
{
diff --git a/newlib/libc/stdio/snprintf.c b/newlib/libc/stdio/snprintf.c
index 2066a56..aa7a636 100644
--- a/newlib/libc/stdio/snprintf.c
+++ b/newlib/libc/stdio/snprintf.c
@@ -35,13 +35,13 @@ _DEFUN(_snprintf_r, (ptr, str, size, fmt),
struct _reent *ptr,
char *__restrict str,
size_t size,
- _CONST char *__restrict fmt _DOTS)
+ const char *__restrict fmt _DOTS)
#else
_snprintf_r(ptr, str, size, fmt, va_alist)
struct _reent *ptr;
char *str;
size_t size;
- _CONST char *fmt;
+ const char *fmt;
va_dcl
#endif
{
@@ -85,12 +85,12 @@ int
_DEFUN(snprintf, (str, size, fmt),
char *__restrict str,
size_t size,
- _CONST char *__restrict fmt _DOTS)
+ const char *__restrict fmt _DOTS)
#else
snprintf(str, size, fmt, va_alist)
char *str;
size_t size;
- _CONST char *fmt;
+ const char *fmt;
va_dcl
#endif
{
diff --git a/newlib/libc/stdio/sprintf.c b/newlib/libc/stdio/sprintf.c
index 7ed0a0f..1948ff1 100644
--- a/newlib/libc/stdio/sprintf.c
+++ b/newlib/libc/stdio/sprintf.c
@@ -583,12 +583,12 @@ int
_DEFUN(_sprintf_r, (ptr, str, fmt),
struct _reent *ptr,
char *__restrict str,
- _CONST char *__restrict fmt _DOTS)
+ const char *__restrict fmt _DOTS)
#else
_sprintf_r(ptr, str, fmt, va_alist)
struct _reent *ptr;
char *__restrict str;
- _CONST char *__restrict fmt;
+ const char *__restrict fmt;
va_dcl
#endif
{
@@ -623,11 +623,11 @@ int
#ifdef _HAVE_STDC
_DEFUN(sprintf, (str, fmt),
char *__restrict str,
- _CONST char *__restrict fmt _DOTS)
+ const char *__restrict fmt _DOTS)
#else
sprintf(str, fmt, va_alist)
char *str;
- _CONST char *fmt;
+ const char *fmt;
va_dcl
#endif
{
diff --git a/newlib/libc/stdio/sscanf.c b/newlib/libc/stdio/sscanf.c
index bfec067..8a32325 100644
--- a/newlib/libc/stdio/sscanf.c
+++ b/newlib/libc/stdio/sscanf.c
@@ -427,13 +427,13 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#ifdef _HAVE_STDC
int
_DEFUN(sscanf, (str, fmt),
- _CONST char *__restrict str,
- _CONST char * fmt _DOTS)
+ const char *__restrict str,
+ const char * fmt _DOTS)
#else
int
sscanf(str, fmt, va_alist)
- _CONST char *str;
- _CONST char *fmt;
+ const char *str;
+ const char *fmt;
va_dcl
#endif
{
@@ -470,14 +470,14 @@ _EXFUN(siscanf, (const char *, const char *, ...)
int
_DEFUN(_sscanf_r, (ptr, str, fmt),
struct _reent *ptr,
- _CONST char *__restrict str,
- _CONST char *__restrict fmt _DOTS)
+ const char *__restrict str,
+ const char *__restrict fmt _DOTS)
#else
int
_sscanf_r(ptr, str, fmt, va_alist)
struct _reent *ptr;
- _CONST char *__restrict str;
- _CONST char *__restrict fmt;
+ const char *__restrict str;
+ const char *__restrict fmt;
va_dcl
#endif
{
diff --git a/newlib/libc/stdio/swprintf.c b/newlib/libc/stdio/swprintf.c
index 0ddc492..47a2657 100644
--- a/newlib/libc/stdio/swprintf.c
+++ b/newlib/libc/stdio/swprintf.c
@@ -557,7 +557,7 @@ _DEFUN(_swprintf_r, (ptr, str, size, fmt),
struct _reent *ptr,
wchar_t *str,
size_t size,
- _CONST wchar_t *fmt _DOTS)
+ const wchar_t *fmt _DOTS)
{
int ret;
va_list ap;
@@ -597,7 +597,7 @@ int
_DEFUN(swprintf, (str, size, fmt),
wchar_t *__restrict str,
size_t size,
- _CONST wchar_t *__restrict fmt _DOTS)
+ const wchar_t *__restrict fmt _DOTS)
{
int ret;
va_list ap;
diff --git a/newlib/libc/stdio/swscanf.c b/newlib/libc/stdio/swscanf.c
index d52d826..c8ae05b 100644
--- a/newlib/libc/stdio/swscanf.c
+++ b/newlib/libc/stdio/swscanf.c
@@ -415,7 +415,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#ifndef _REENT_ONLY
int
-swscanf (_CONST wchar_t *__restrict str, _CONST wchar_t *__restrict fmt, ...)
+swscanf (const wchar_t *__restrict str, const wchar_t *__restrict fmt, ...)
{
int ret;
va_list ap;
@@ -437,7 +437,7 @@ swscanf (_CONST wchar_t *__restrict str, _CONST wchar_t *__restrict fmt, ...)
#endif /* !_REENT_ONLY */
int
-_swscanf_r (struct _reent *ptr, _CONST wchar_t *str, _CONST wchar_t *fmt, ...)
+_swscanf_r (struct _reent *ptr, const wchar_t *str, const wchar_t *fmt, ...)
{
int ret;
va_list ap;
diff --git a/newlib/libc/stdio/tmpnam.c b/newlib/libc/stdio/tmpnam.c
index fbd60fc..d794a98 100644
--- a/newlib/libc/stdio/tmpnam.c
+++ b/newlib/libc/stdio/tmpnam.c
@@ -89,8 +89,8 @@ static int
_DEFUN(worker, (ptr, result, part1, part2, part3, part4),
struct _reent *ptr,
char *result,
- _CONST char *part1,
- _CONST char *part2,
+ const char *part1,
+ const char *part2,
int part3,
int *part4)
{
@@ -149,12 +149,12 @@ _DEFUN(_tmpnam_r, (p, s),
char *
_DEFUN(_tempnam_r, (p, dir, pfx),
struct _reent *p,
- _CONST char *dir,
- _CONST char *pfx)
+ const char *dir,
+ const char *pfx)
{
char *filename;
int length;
- _CONST char *prefix = (pfx) ? pfx : "";
+ const char *prefix = (pfx) ? pfx : "";
if (dir == NULL && (dir = getenv ("TMPDIR")) == NULL)
dir = P_tmpdir;
@@ -175,8 +175,8 @@ _DEFUN(_tempnam_r, (p, dir, pfx),
char *
_DEFUN(tempnam, (dir, pfx),
- _CONST char *dir,
- _CONST char *pfx)
+ const char *dir,
+ const char *pfx)
{
return _tempnam_r (_REENT, dir, pfx);
}
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
index 904dfa7..6413f6b 100644
--- a/newlib/libc/stdio/vfprintf.c
+++ b/newlib/libc/stdio/vfprintf.c
@@ -201,7 +201,7 @@ int
_DEFUN(__ssputs_r, (ptr, fp, buf, len),
struct _reent *ptr,
FILE *fp,
- _CONST char *buf,
+ const char *buf,
size_t len)
{
register int w;
@@ -275,7 +275,7 @@ _DEFUN(__ssprint_r, (ptr, fp, uio),
register size_t len;
register int w;
register struct __siov *iov;
- register _CONST char *p = NULL;
+ register const char *p = NULL;
iov = uio->uio_iov;
len = 0;
@@ -359,7 +359,7 @@ err:
}
#else /* !INTEGER_ONLY */
#ifndef _FVWRITE_IN_STREAMIO
-int __ssputs_r (struct _reent *, FILE *, _CONST char *, size_t);
+int __ssputs_r (struct _reent *, FILE *, const char *, size_t);
#endif
int __ssprint_r (struct _reent *, FILE *, register struct __suio *);
#endif /* !INTEGER_ONLY */
@@ -372,7 +372,7 @@ int
_DEFUN(__sfputs_r, (ptr, fp, buf, len),
struct _reent *ptr,
FILE *fp,
- _CONST char *buf,
+ const char *buf,
size_t len)
{
register int i;
@@ -442,7 +442,7 @@ out:
}
#else /* !INTEGER_ONLY */
#ifndef _FVWRITE_IN_STREAMIO
-int __sfputs_r (struct _reent *, FILE *, _CONST char *buf, size_t);
+int __sfputs_r (struct _reent *, FILE *, const char *buf, size_t);
#endif
int __sprint_r (struct _reent *, FILE *, register struct __suio *);
#endif /* !INTEGER_ONLY */
@@ -459,7 +459,7 @@ _NOINLINE_STATIC int
_DEFUN(__sbprintf, (rptr, fp, fmt, ap),
struct _reent *rptr,
register FILE *fp,
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
int ret;
@@ -644,13 +644,13 @@ _EXFUN(get_arg, (struct _reent *data, int n, char *fmt,
# define GROUPING 0x400 /* use grouping ("'" flag) */
#endif
-int _EXFUN(_VFPRINTF_R, (struct _reent *, FILE *, _CONST char *, va_list));
+int _EXFUN(_VFPRINTF_R, (struct _reent *, FILE *, const char *, va_list));
#ifndef STRING_ONLY
int
_DEFUN(VFPRINTF, (fp, fmt0, ap),
FILE * fp,
- _CONST char *fmt0,
+ const char *fmt0,
va_list ap)
{
int result;
@@ -663,7 +663,7 @@ int
_DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap),
struct _reent *data,
FILE * fp,
- _CONST char *fmt0,
+ const char *fmt0,
va_list ap)
{
register char *fmt; /* format string */
@@ -736,9 +736,9 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap),
* below longer.
*/
#define PADSIZE 16 /* pad chunk size */
- static _CONST char blanks[PADSIZE] =
+ static const char blanks[PADSIZE] =
{' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '};
- static _CONST char zeroes[PADSIZE] =
+ static const char zeroes[PADSIZE] =
{'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'};
#ifdef _MB_CAPABLE
@@ -1459,9 +1459,9 @@ string:
#ifdef _MB_CAPABLE
if (ch == 'S' || (flags & LONGINT)) {
mbstate_t ps;
- _CONST wchar_t *wcp;
+ const wchar_t *wcp;
- wcp = (_CONST wchar_t *)cp;
+ wcp = (const wchar_t *)cp;
size = m = 0;
memset ((_PTR)&ps, '\0', sizeof (mbstate_t));
@@ -1491,7 +1491,7 @@ string:
fp->_flags |= __SERR;
goto error;
}
- wcp = (_CONST wchar_t *)cp;
+ wcp = (const wchar_t *)cp;
}
if (size == 0)
@@ -1974,7 +1974,7 @@ exponent(char *p0, int exp, int fmtch)
the STRING_ONLY/INTEGER_ONLY versions here. */
#if defined (STRING_ONLY) && defined(INTEGER_ONLY)
-_CONST __CH_CLASS __chclass[256] = {
+const __CH_CLASS __chclass[256] = {
/* 00-07 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
/* 08-0f */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
/* 10-17 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
@@ -2009,7 +2009,7 @@ _CONST __CH_CLASS __chclass[256] = {
/* f8-ff */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
};
-_CONST __STATE __state_table[MAX_STATE][MAX_CH_CLASS] = {
+const __STATE __state_table[MAX_STATE][MAX_CH_CLASS] = {
/* '0' '1-9' '$' MODFR SPEC '.' '*' FLAG OTHER */
/* START */ { SFLAG, WDIG, DONE, SMOD, DONE, SDOT, VARW, SFLAG, DONE },
/* SFLAG */ { SFLAG, WDIG, DONE, SMOD, DONE, SDOT, VARW, SFLAG, DONE },
@@ -2024,7 +2024,7 @@ _CONST __STATE __state_table[MAX_STATE][MAX_CH_CLASS] = {
/* VPDIG */ { DONE, DONE, PREC, DONE, DONE, DONE, DONE, DONE, DONE },
};
-_CONST __ACTION __action_table[MAX_STATE][MAX_CH_CLASS] = {
+const __ACTION __action_table[MAX_STATE][MAX_CH_CLASS] = {
/* '0' '1-9' '$' MODFR SPEC '.' '*' FLAG OTHER */
/* START */ { NOOP, NUMBER, NOOP, GETMOD, GETARG, NOOP, NOOP, NOOP, NOOP },
/* SFLAG */ { NOOP, NUMBER, NOOP, GETMOD, GETARG, NOOP, NOOP, NOOP, NOOP },
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c
index 3f67b23..bf91dad 100644
--- a/newlib/libc/stdio/vfscanf.c
+++ b/newlib/libc/stdio/vfscanf.c
@@ -226,7 +226,7 @@ typedef unsigned long long u_long_long;
int
_DEFUN(VFSCANF, (fp, fmt, ap),
register FILE *fp,
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
struct _reent *reent = _REENT;
@@ -238,7 +238,7 @@ _DEFUN(VFSCANF, (fp, fmt, ap),
int
_DEFUN(__SVFSCANF, (fp, fmt0, ap),
register FILE *fp,
- char _CONST *fmt0,
+ char const *fmt0,
va_list ap)
{
return __SVFSCANF_R (_REENT, fp, fmt0, ap);
@@ -250,7 +250,7 @@ int
_DEFUN(_VFSCANF_R, (data, fp, fmt, ap),
struct _reent *data,
register FILE *fp,
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
CHECK_INIT(data, fp);
@@ -405,7 +405,7 @@ int
_DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
struct _reent *rptr,
register FILE *fp,
- char _CONST *fmt0,
+ char const *fmt0,
va_list ap)
{
register u_char *fmt = (u_char *) fmt0;
@@ -574,7 +574,7 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
#endif
/* `basefix' is used to avoid `if' tests in the integer scanner */
- static _CONST short basefix[17] =
+ static const short basefix[17] =
{10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
/* Macro to support positional arguments */
diff --git a/newlib/libc/stdio/vfwprintf.c b/newlib/libc/stdio/vfwprintf.c
index 7339ffe..ad684a2 100644
--- a/newlib/libc/stdio/vfwprintf.c
+++ b/newlib/libc/stdio/vfwprintf.c
@@ -149,7 +149,7 @@ SEEALSO
# undef _NO_LONGLONG
#endif
-int _EXFUN(_VFWPRINTF_R, (struct _reent *, FILE *, _CONST wchar_t *, va_list));
+int _EXFUN(_VFWPRINTF_R, (struct _reent *, FILE *, const wchar_t *, va_list));
/* Defined in vfprintf.c. */
#ifdef _FVWRITE_IN_STREAMIO
# ifdef STRING_ONLY
@@ -164,7 +164,7 @@ int _EXFUN(__SPRINT, (struct _reent *, FILE *, register struct __suio *));
# else
# define __SPRINT __sfputs_r
# endif
-int _EXFUN(__SPRINT, (struct _reent *, FILE *, _CONST char *, size_t));
+int _EXFUN(__SPRINT, (struct _reent *, FILE *, const char *, size_t));
#endif
#ifndef STRING_ONLY
#ifdef _UNBUF_STREAM_OPT
@@ -177,7 +177,7 @@ static int
_DEFUN(__sbwprintf, (rptr, fp, fmt, ap),
struct _reent *rptr,
register FILE *fp,
- _CONST wchar_t *fmt,
+ const wchar_t *fmt,
va_list ap)
{
int ret;
@@ -368,7 +368,7 @@ _EXFUN(get_arg, (struct _reent *data, int n, wchar_t *fmt,
int
_DEFUN(VFWPRINTF, (fp, fmt0, ap),
FILE *__restrict fp,
- _CONST wchar_t *__restrict fmt0,
+ const wchar_t *__restrict fmt0,
va_list ap)
{
int result;
@@ -381,7 +381,7 @@ int
_DEFUN(_VFWPRINTF_R, (data, fp, fmt0, ap),
struct _reent *data,
FILE * fp,
- _CONST wchar_t *fmt0,
+ const wchar_t *fmt0,
va_list ap)
{
register wchar_t *fmt; /* format string */
@@ -452,10 +452,10 @@ _DEFUN(_VFWPRINTF_R, (data, fp, fmt0, ap),
* below longer.
*/
#define PADSIZE 16 /* pad chunk size */
- static _CONST wchar_t blanks[PADSIZE] =
+ static const wchar_t blanks[PADSIZE] =
{L' ',L' ',L' ',L' ',L' ',L' ',L' ',L' ',
L' ',L' ',L' ',L' ',L' ',L' ',L' ',L' '};
- static _CONST wchar_t zeroes[PADSIZE] =
+ static const wchar_t zeroes[PADSIZE] =
{L'0',L'0',L'0',L'0',L'0',L'0',L'0',L'0',
L'0',L'0',L'0',L'0',L'0',L'0',L'0',L'0'};
@@ -519,7 +519,7 @@ _DEFUN(_VFWPRINTF_R, (data, fp, fmt0, ap),
}
#else
#define PRINT(ptr, len) { \
- if (__SPRINT (data, fp, (_CONST char *)(ptr), (len) * sizeof (wchar_t)) == EOF) \
+ if (__SPRINT (data, fp, (const char *)(ptr), (len) * sizeof (wchar_t)) == EOF) \
goto error; \
}
#define PAD(howmany, with) { \
diff --git a/newlib/libc/stdio/vfwscanf.c b/newlib/libc/stdio/vfwscanf.c
index 715f231..27b0623 100644
--- a/newlib/libc/stdio/vfwscanf.c
+++ b/newlib/libc/stdio/vfwscanf.c
@@ -228,7 +228,7 @@ static void * get_arg (int, va_list *, int *, void **);
int
_DEFUN(VFWSCANF, (fp, fmt, ap),
register FILE *__restrict fp,
- _CONST wchar_t *__restrict fmt,
+ const wchar_t *__restrict fmt,
va_list ap)
{
struct _reent *reent = _REENT;
@@ -240,7 +240,7 @@ _DEFUN(VFWSCANF, (fp, fmt, ap),
int
_DEFUN(__SVFWSCANF, (fp, fmt0, ap),
register FILE *fp,
- wchar_t _CONST *fmt0,
+ wchar_t const *fmt0,
va_list ap)
{
return __SVFWSCANF_R (_REENT, fp, fmt0, ap);
@@ -252,7 +252,7 @@ int
_DEFUN(_VFWSCANF_R, (data, fp, fmt, ap),
struct _reent *data,
register FILE *fp,
- _CONST wchar_t *fmt,
+ const wchar_t *fmt,
va_list ap)
{
CHECK_INIT(data, fp);
@@ -344,7 +344,7 @@ int
_DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
struct _reent *rptr,
register FILE *fp,
- wchar_t _CONST *fmt0,
+ wchar_t const *fmt0,
va_list ap)
{
register wchar_t *fmt = (wchar_t *) fmt0;
@@ -514,7 +514,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
#endif
/* `basefix' is used to avoid `if' tests in the integer scanner */
- static _CONST short basefix[17] =
+ static const short basefix[17] =
{10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
/* Macro to support positional arguments */
diff --git a/newlib/libc/stdio/viprintf.c b/newlib/libc/stdio/viprintf.c
index ef2a04e..950009d 100644
--- a/newlib/libc/stdio/viprintf.c
+++ b/newlib/libc/stdio/viprintf.c
@@ -106,7 +106,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
int
_DEFUN(viprintf, (fmt, ap),
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
struct _reent *reent = _REENT;
@@ -120,7 +120,7 @@ _DEFUN(viprintf, (fmt, ap),
int
_DEFUN(_viprintf_r, (ptr, fmt, ap),
struct _reent *ptr,
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
_REENT_SMALL_CHECK_INIT (ptr);
diff --git a/newlib/libc/stdio/viscanf.c b/newlib/libc/stdio/viscanf.c
index 569fad9..0c9b13f 100644
--- a/newlib/libc/stdio/viscanf.c
+++ b/newlib/libc/stdio/viscanf.c
@@ -90,7 +90,7 @@ Supporting OS subroutines required:
int
_DEFUN(viscanf, (fmt, ap),
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
struct _reent *reent = _REENT;
@@ -104,7 +104,7 @@ _DEFUN(viscanf, (fmt, ap),
int
_DEFUN(_viscanf_r, (ptr, fmt, ap),
struct _reent *ptr,
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
_REENT_SMALL_CHECK_INIT (ptr);
diff --git a/newlib/libc/stdio/vprintf.c b/newlib/libc/stdio/vprintf.c
index 26671f7..289c46c 100644
--- a/newlib/libc/stdio/vprintf.c
+++ b/newlib/libc/stdio/vprintf.c
@@ -30,7 +30,7 @@
int
_DEFUN(vprintf, (fmt, ap),
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
struct _reent *reent = _REENT;
@@ -49,7 +49,7 @@ _EXFUN(viprintf, (const char *, __VALIST) _ATTRIBUTE ((__alias__("vprintf"))));
int
_DEFUN(_vprintf_r, (ptr, fmt, ap),
struct _reent *ptr,
- _CONST char *__restrict fmt,
+ const char *__restrict fmt,
va_list ap)
{
_REENT_SMALL_CHECK_INIT (ptr);
diff --git a/newlib/libc/stdio/vscanf.c b/newlib/libc/stdio/vscanf.c
index 2506919..260359a 100644
--- a/newlib/libc/stdio/vscanf.c
+++ b/newlib/libc/stdio/vscanf.c
@@ -31,7 +31,7 @@
int
_DEFUN(vscanf, (fmt, ap),
- _CONST char *fmt,
+ const char *fmt,
va_list ap)
{
struct _reent *reent = _REENT;
@@ -50,7 +50,7 @@ _EXFUN(viscanf, (const char *, __VALIST) _ATTRIBUTE ((__alias__("vscanf"))));
int
_DEFUN(_vscanf_r, (ptr, fmt, ap),
struct _reent *ptr,
- _CONST char *__restrict fmt,
+ const char *__restrict fmt,
va_list ap)
{
_REENT_SMALL_CHECK_INIT (ptr);
diff --git a/newlib/libc/stdio/vsiscanf.c b/newlib/libc/stdio/vsiscanf.c
index cf5120f..6ad0f4a 100644
--- a/newlib/libc/stdio/vsiscanf.c
+++ b/newlib/libc/stdio/vsiscanf.c
@@ -36,8 +36,8 @@
int
_DEFUN(vsiscanf, (str, fmt, ap),
- _CONST char *str,
- _CONST char *fmt,
+ const char *str,
+ const char *fmt,
va_list ap)
{
return _vsiscanf_r (_REENT, str, fmt, ap);
@@ -48,8 +48,8 @@ _DEFUN(vsiscanf, (str, fmt, ap),
int
_DEFUN(_vsiscanf_r, (ptr, str, fmt, ap),
struct _reent *ptr,
- _CONST char *str,
- _CONST char *fmt,
+ const char *str,
+ const char *fmt,
va_list ap)
{
FILE f;
diff --git a/newlib/libc/stdio/vsscanf.c b/newlib/libc/stdio/vsscanf.c
index 706461d..87d4cd1 100644
--- a/newlib/libc/stdio/vsscanf.c
+++ b/newlib/libc/stdio/vsscanf.c
@@ -36,8 +36,8 @@
int
_DEFUN(vsscanf, (str, fmt, ap),
- _CONST char *__restrict str,
- _CONST char *__restrict fmt,
+ const char *__restrict str,
+ const char *__restrict fmt,
va_list ap)
{
return _vsscanf_r (_REENT, str, fmt, ap);
@@ -54,8 +54,8 @@ _EXFUN(vsiscanf, (const char *, const char *, __VALIST)
int
_DEFUN(_vsscanf_r, (ptr, str, fmt, ap),
struct _reent *ptr,
- _CONST char *__restrict str,
- _CONST char *__restrict fmt,
+ const char *__restrict str,
+ const char *__restrict fmt,
va_list ap)
{
FILE f;
diff --git a/newlib/libc/stdio/vswscanf.c b/newlib/libc/stdio/vswscanf.c
index 0d090f0..90393f5 100644
--- a/newlib/libc/stdio/vswscanf.c
+++ b/newlib/libc/stdio/vswscanf.c
@@ -37,7 +37,7 @@
#ifndef _REENT_ONLY
int
-vswscanf (_CONST wchar_t *__restrict str, _CONST wchar_t * __restrict fmt,
+vswscanf (const wchar_t *__restrict str, const wchar_t * __restrict fmt,
va_list ap)
{
return _vswscanf_r (_REENT, str, fmt, ap);
@@ -46,7 +46,7 @@ vswscanf (_CONST wchar_t *__restrict str, _CONST wchar_t * __restrict fmt,
#endif /* !_REENT_ONLY */
int
-_vswscanf_r (struct _reent *ptr, _CONST wchar_t *str, _CONST wchar_t *fmt,
+_vswscanf_r (struct _reent *ptr, const wchar_t *str, const wchar_t *fmt,
va_list ap)
{
FILE f;
diff --git a/newlib/libc/stdio/vwprintf.c b/newlib/libc/stdio/vwprintf.c
index 191fb70..2838136 100644
--- a/newlib/libc/stdio/vwprintf.c
+++ b/newlib/libc/stdio/vwprintf.c
@@ -27,7 +27,7 @@
int
_DEFUN(vwprintf, (fmt, ap),
- _CONST wchar_t *__restrict fmt,
+ const wchar_t *__restrict fmt,
va_list ap)
{
struct _reent *reent = _REENT;
@@ -41,7 +41,7 @@ _DEFUN(vwprintf, (fmt, ap),
int
_DEFUN(_vwprintf_r, (ptr, fmt, ap),
struct _reent *ptr,
- _CONST wchar_t *fmt,
+ const wchar_t *fmt,
va_list ap)
{
_REENT_SMALL_CHECK_INIT (ptr);
diff --git a/newlib/libc/stdio/vwscanf.c b/newlib/libc/stdio/vwscanf.c
index e40bded..3945e79 100644
--- a/newlib/libc/stdio/vwscanf.c
+++ b/newlib/libc/stdio/vwscanf.c
@@ -32,7 +32,7 @@
#ifndef _REENT_ONLY
int
-vwscanf (_CONST wchar_t *__restrict fmt, va_list ap)
+vwscanf (const wchar_t *__restrict fmt, va_list ap)
{
struct _reent *reent = _REENT;
@@ -43,7 +43,7 @@ vwscanf (_CONST wchar_t *__restrict fmt, va_list ap)
#endif /* !_REENT_ONLY */
int
-_vwscanf_r (struct _reent *ptr, _CONST wchar_t *fmt, va_list ap)
+_vwscanf_r (struct _reent *ptr, const wchar_t *fmt, va_list ap)
{
_REENT_SMALL_CHECK_INIT (ptr);
return __svfwscanf_r (ptr, _stdin_r (ptr), fmt, ap);
diff --git a/newlib/libc/stdio/wscanf.c b/newlib/libc/stdio/wscanf.c
index f953d9f..5a7c35a 100644
--- a/newlib/libc/stdio/wscanf.c
+++ b/newlib/libc/stdio/wscanf.c
@@ -26,7 +26,7 @@
#ifndef _REENT_ONLY
int
-wscanf(_CONST wchar_t *__restrict fmt, ...)
+wscanf(const wchar_t *__restrict fmt, ...)
{
int ret;
va_list ap;
@@ -42,7 +42,7 @@ wscanf(_CONST wchar_t *__restrict fmt, ...)
#endif /* !_REENT_ONLY */
int
-_wscanf_r(struct _reent *ptr, _CONST wchar_t *fmt, ...)
+_wscanf_r(struct _reent *ptr, const wchar_t *fmt, ...)
{
int ret;
va_list ap;