diff options
author | Ulrich Drepper <drepper@gmail.com> | 2012-01-07 23:57:22 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2012-01-07 23:57:22 -0500 |
commit | a784e502472fb3a1afa4d01a47c66b52d23e00f6 (patch) | |
tree | 5ebaa084119dcffe41671a62e2e799b172c57d24 /iconv | |
parent | 33808bf1164be2e7c8535bdd5ac398c75c33ed49 (diff) | |
download | glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.tar.gz glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.tar.xz glibc-a784e502472fb3a1afa4d01a47c66b52d23e00f6.zip |
Remove pre-ISO C support
No more __const.
Diffstat (limited to 'iconv')
-rw-r--r-- | iconv/gconv.h | 16 | ||||
-rw-r--r-- | iconv/gconv_int.h | 6 | ||||
-rw-r--r-- | iconv/gconv_simple.c | 2 | ||||
-rw-r--r-- | iconv/iconv.h | 4 | ||||
-rw-r--r-- | iconv/loop.c | 28 | ||||
-rw-r--r-- | iconv/skeleton.c | 64 |
6 files changed, 60 insertions, 60 deletions
diff --git a/iconv/gconv.h b/iconv/gconv.h index bc6d381aa0..24e2c0f3b7 100644 --- a/iconv/gconv.h +++ b/iconv/gconv.h @@ -70,7 +70,7 @@ struct __gconv_trans_data; /* Type of a conversion function. */ typedef int (*__gconv_fct) (struct __gconv_step *, struct __gconv_step_data *, - __const unsigned char **, __const unsigned char *, + const unsigned char **, const unsigned char *, unsigned char **, size_t *, int, int); /* Type of a specialized conversion function for a single byte to INTERNAL. */ @@ -84,18 +84,18 @@ typedef void (*__gconv_end_fct) (struct __gconv_step *); /* Type of a transliteration/transscription function. */ typedef int (*__gconv_trans_fct) (struct __gconv_step *, struct __gconv_step_data *, void *, - __const unsigned char *, - __const unsigned char **, - __const unsigned char *, unsigned char **, + const unsigned char *, + const unsigned char **, + const unsigned char *, unsigned char **, size_t *); /* Function to call to provide transliteration module with context. */ -typedef int (*__gconv_trans_context_fct) (void *, __const unsigned char *, - __const unsigned char *, +typedef int (*__gconv_trans_context_fct) (void *, const unsigned char *, + const unsigned char *, unsigned char *, unsigned char *); /* Function to query module about supported encoded character sets. */ -typedef int (*__gconv_trans_query_fct) (__const char *, __const char ***, +typedef int (*__gconv_trans_query_fct) (const char *, const char ***, size_t *); /* Constructor and destructor for local data for transliteration. */ @@ -117,7 +117,7 @@ struct __gconv_trans_data struct __gconv_step { struct __gconv_loaded_object *__shlib_handle; - __const char *__modname; + const char *__modname; int __counter; diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h index 79de975410..7508372707 100644 --- a/iconv/gconv_int.h +++ b/iconv/gconv_int.h @@ -267,9 +267,9 @@ extern int __gconv_translit_find (struct trans_struct *trans) extern int __gconv_transliterate (struct __gconv_step *step, struct __gconv_step_data *step_data, void *trans_data, - __const unsigned char *inbufstart, - __const unsigned char **inbufp, - __const unsigned char *inbufend, + const unsigned char *inbufstart, + const unsigned char **inbufp, + const unsigned char *inbufend, unsigned char **outbufstart, size_t *irreversible) attribute_hidden; diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c index d145a3e5ff..028822c918 100644 --- a/iconv/gconv_simple.c +++ b/iconv/gconv_simple.c @@ -34,7 +34,7 @@ #define BUILTIN_TRANSFORMATION(From, To, Cost, Name, Fct, BtowcFct, \ MinF, MaxF, MinT, MaxT) \ extern int Fct (struct __gconv_step *, struct __gconv_step_data *, \ - __const unsigned char **, __const unsigned char *, \ + const unsigned char **, const unsigned char *, \ unsigned char **, size_t *, int, int); #include "gconv_builtin.h" diff --git a/iconv/iconv.h b/iconv/iconv.h index 1d9b79bbae..774b0f1b4a 100644 --- a/iconv/iconv.h +++ b/iconv/iconv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2000, 2003, 2011 Free Software Foundation, Inc. +/* Copyright (C) 1997-2000, 2003, 2011, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ typedef void *iconv_t; This function is a possible cancellation point and therefore not marked with __THROW. */ -extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode); +extern iconv_t iconv_open (const char *__tocode, const char *__fromcode); /* Convert at most *INBYTESLEFT bytes from *INBUF according to the code conversion algorithm specified by CD and place up to diff --git a/iconv/loop.c b/iconv/loop.c index 2e88b1deef..e129261d71 100644 --- a/iconv/loop.c +++ b/iconv/loop.c @@ -66,8 +66,8 @@ #undef FCTNAME2 #if defined _STRING_ARCH_unaligned || !defined DEFINE_UNALIGNED /* We can handle unaligned memory access. */ -# define get16(addr) *((__const uint16_t *) (addr)) -# define get32(addr) *((__const uint32_t *) (addr)) +# define get16(addr) *((const uint16_t *) (addr)) +# define get32(addr) *((const uint32_t *) (addr)) /* We need no special support for writing values either. */ # define put16(addr, val) *((uint16_t *) (addr)) = (val) @@ -78,13 +78,13 @@ /* Distinguish between big endian and little endian. */ # if __BYTE_ORDER == __LITTLE_ENDIAN # define get16(addr) \ - (((__const unsigned char *) (addr))[1] << 8 \ - | ((__const unsigned char *) (addr))[0]) + (((const unsigned char *) (addr))[1] << 8 \ + | ((const unsigned char *) (addr))[0]) # define get32(addr) \ - (((((__const unsigned char *) (addr))[3] << 8 \ - | ((__const unsigned char *) (addr))[2]) << 8 \ - | ((__const unsigned char *) (addr))[1]) << 8 \ - | ((__const unsigned char *) (addr))[0]) + (((((const unsigned char *) (addr))[3] << 8 \ + | ((const unsigned char *) (addr))[2]) << 8 \ + | ((const unsigned char *) (addr))[1]) << 8 \ + | ((const unsigned char *) (addr))[0]) # define put16(addr, val) \ ({ uint16_t __val = (val); \ @@ -103,13 +103,13 @@ (void) 0; }) # else # define get16(addr) \ - (((__const unsigned char *) (addr))[0] << 8 \ - | ((__const unsigned char *) (addr))[1]) + (((const unsigned char *) (addr))[0] << 8 \ + | ((const unsigned char *) (addr))[1]) # define get32(addr) \ - (((((__const unsigned char *) (addr))[0] << 8 \ - | ((__const unsigned char *) (addr))[1]) << 8 \ - | ((__const unsigned char *) (addr))[2]) << 8 \ - | ((__const unsigned char *) (addr))[3]) + (((((const unsigned char *) (addr))[0] << 8 \ + | ((const unsigned char *) (addr))[1]) << 8 \ + | ((const unsigned char *) (addr))[2]) << 8 \ + | ((const unsigned char *) (addr))[3]) # define put16(addr, val) \ ({ uint16_t __val = (val); \ diff --git a/iconv/skeleton.c b/iconv/skeleton.c index baace6b3fb..72ac53641f 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -1,5 +1,5 @@ /* Skeleton for a conversion module. - Copyright (C) 1998-2002, 2005 Free Software Foundation, Inc. + Copyright (C) 1998-2002, 2005, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -39,24 +39,24 @@ FROM_LOOP_MIN_NEEDED_FROM FROM_LOOP_MAX_NEEDED_FROM - minimal/maximal number of bytes needed on input - of one round through the FROM_LOOP. Defaults - to MIN_NEEDED_FROM and MAX_NEEDED_FROM, respectively. + minimal/maximal number of bytes needed on input + of one round through the FROM_LOOP. Defaults + to MIN_NEEDED_FROM and MAX_NEEDED_FROM, respectively. FROM_LOOP_MIN_NEEDED_TO FROM_LOOP_MAX_NEEDED_TO - minimal/maximal number of bytes needed on output - of one round through the FROM_LOOP. Defaults - to MIN_NEEDED_TO and MAX_NEEDED_TO, respectively. + minimal/maximal number of bytes needed on output + of one round through the FROM_LOOP. Defaults + to MIN_NEEDED_TO and MAX_NEEDED_TO, respectively. TO_LOOP_MIN_NEEDED_FROM TO_LOOP_MAX_NEEDED_FROM - minimal/maximal number of bytes needed on input - of one round through the TO_LOOP. Defaults - to MIN_NEEDED_TO and MAX_NEEDED_TO, respectively. + minimal/maximal number of bytes needed on input + of one round through the TO_LOOP. Defaults + to MIN_NEEDED_TO and MAX_NEEDED_TO, respectively. TO_LOOP_MIN_NEEDED_TO TO_LOOP_MAX_NEEDED_TO - minimal/maximal number of bytes needed on output - of one round through the TO_LOOP. Defaults - to MIN_NEEDED_FROM and MAX_NEEDED_FROM, respectively. + minimal/maximal number of bytes needed on output + of one round through the TO_LOOP. Defaults + to MIN_NEEDED_FROM and MAX_NEEDED_FROM, respectively. FROM_DIRECTION this macro is supposed to return a value != 0 if we convert from the current character set, @@ -206,8 +206,8 @@ loops we have other definitions which allow optimized access. */ #ifdef _STRING_ARCH_unaligned /* We can handle unaligned memory access. */ -# define get16u(addr) *((__const uint16_t *) (addr)) -# define get32u(addr) *((__const uint32_t *) (addr)) +# define get16u(addr) *((const uint16_t *) (addr)) +# define get32u(addr) *((const uint32_t *) (addr)) /* We need no special support for writing values either. */ # define put16u(addr, val) *((uint16_t *) (addr)) = (val) @@ -216,13 +216,13 @@ /* Distinguish between big endian and little endian. */ # if __BYTE_ORDER == __LITTLE_ENDIAN # define get16u(addr) \ - (((__const unsigned char *) (addr))[1] << 8 \ - | ((__const unsigned char *) (addr))[0]) + (((const unsigned char *) (addr))[1] << 8 \ + | ((const unsigned char *) (addr))[0]) # define get32u(addr) \ - (((((__const unsigned char *) (addr))[3] << 8 \ - | ((__const unsigned char *) (addr))[2]) << 8 \ - | ((__const unsigned char *) (addr))[1]) << 8 \ - | ((__const unsigned char *) (addr))[0]) + (((((const unsigned char *) (addr))[3] << 8 \ + | ((const unsigned char *) (addr))[2]) << 8 \ + | ((const unsigned char *) (addr))[1]) << 8 \ + | ((const unsigned char *) (addr))[0]) # define put16u(addr, val) \ ({ uint16_t __val = (val); \ @@ -241,13 +241,13 @@ (void) 0; }) # else # define get16u(addr) \ - (((__const unsigned char *) (addr))[0] << 8 \ - | ((__const unsigned char *) (addr))[1]) + (((const unsigned char *) (addr))[0] << 8 \ + | ((const unsigned char *) (addr))[1]) # define get32u(addr) \ - (((((__const unsigned char *) (addr))[0] << 8 \ - | ((__const unsigned char *) (addr))[1]) << 8 \ - | ((__const unsigned char *) (addr))[2]) << 8 \ - | ((__const unsigned char *) (addr))[3]) + (((((const unsigned char *) (addr))[0] << 8 \ + | ((const unsigned char *) (addr))[1]) << 8 \ + | ((const unsigned char *) (addr))[2]) << 8 \ + | ((const unsigned char *) (addr))[3]) # define put16u(addr, val) \ ({ uint16_t __val = (val); \ @@ -554,8 +554,8 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, && consume_incomplete && (data->__statep->__count & 7) != 0) { /* Yep, we have some bytes left over. Process them now. - But this must not happen while we are called from an - error handler. */ + But this must not happen while we are called from an + error handler. */ assert (outbufstart == NULL); # if FROM_LOOP_MAX_NEEDED_FROM > 1 @@ -652,14 +652,14 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, ++data->__invocation_counter; /* If this is the last step leave the loop, there is nothing - we can do. */ + we can do. */ if (__builtin_expect (data->__flags & __GCONV_IS_LAST, 0)) { /* Store information about how many bytes are available. */ data->__outbuf = outbuf; /* Remember how many non-identical characters we - converted in a irreversible way. */ + converted in a irreversible way. */ *irreversible += lirreversible; break; @@ -782,7 +782,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, STORE_REST # else /* Make sure the remaining bytes fit into the state objects - buffer. */ + buffer. */ assert (inend - *inptrp < 4); size_t cnt; |