diff options
author | thegeorg <[email protected]> | 2024-06-09 16:27:06 +0300 |
---|---|---|
committer | thegeorg <[email protected]> | 2024-06-09 16:36:11 +0300 |
commit | dc2056233ab4b16a84dcea43f683eaa0df0a720a (patch) | |
tree | 1c846583e9a458e31f4d4b37c60b5e2dfba5eb97 /contrib/tools/bison/lib | |
parent | 9d3d6bc09cab4e631a4babeefd81a1d194867658 (diff) |
contrib/tools/bison: Revert some harmless patches
7ba13f28ff2841bd4468387feaa6536b3e372bde
Diffstat (limited to 'contrib/tools/bison/lib')
-rw-r--r-- | contrib/tools/bison/lib/c-strcasecmp.c | 4 | ||||
-rw-r--r-- | contrib/tools/bison/lib/c-strncasecmp.c | 4 | ||||
-rw-r--r-- | contrib/tools/bison/lib/concat-filename.c | 2 | ||||
-rw-r--r-- | contrib/tools/bison/lib/getopt.c | 4 | ||||
-rw-r--r-- | contrib/tools/bison/lib/mbswidth.c | 2 | ||||
-rw-r--r-- | contrib/tools/bison/lib/obstack.c | 26 | ||||
-rw-r--r-- | contrib/tools/bison/lib/stpcpy.c | 5 | ||||
-rw-r--r-- | contrib/tools/bison/lib/wchar--.h | 7 |
8 files changed, 23 insertions, 31 deletions
diff --git a/contrib/tools/bison/lib/c-strcasecmp.c b/contrib/tools/bison/lib/c-strcasecmp.c index cd4e4d49cb7..ef85f0e67db 100644 --- a/contrib/tools/bison/lib/c-strcasecmp.c +++ b/contrib/tools/bison/lib/c-strcasecmp.c @@ -26,8 +26,8 @@ int c_strcasecmp (const char *s1, const char *s2) { - const unsigned char *p1 = (const unsigned char *) s1; - const unsigned char *p2 = (const unsigned char *) s2; + register const unsigned char *p1 = (const unsigned char *) s1; + register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2) diff --git a/contrib/tools/bison/lib/c-strncasecmp.c b/contrib/tools/bison/lib/c-strncasecmp.c index 053c70a73a9..04404b00cd4 100644 --- a/contrib/tools/bison/lib/c-strncasecmp.c +++ b/contrib/tools/bison/lib/c-strncasecmp.c @@ -26,8 +26,8 @@ int c_strncasecmp (const char *s1, const char *s2, size_t n) { - const unsigned char *p1 = (const unsigned char *) s1; - const unsigned char *p2 = (const unsigned char *) s2; + register const unsigned char *p1 = (const unsigned char *) s1; + register const unsigned char *p2 = (const unsigned char *) s2; unsigned char c1, c2; if (p1 == p2 || n == 0) diff --git a/contrib/tools/bison/lib/concat-filename.c b/contrib/tools/bison/lib/concat-filename.c index b749d6838b2..68168dcd53e 100644 --- a/contrib/tools/bison/lib/concat-filename.c +++ b/contrib/tools/bison/lib/concat-filename.c @@ -23,7 +23,7 @@ #include <errno.h> #include <stdlib.h> -#include "string--.h" +#include <string.h> #include "filename.h" diff --git a/contrib/tools/bison/lib/getopt.c b/contrib/tools/bison/lib/getopt.c index 4b3d2670676..ef0f4ceec7c 100644 --- a/contrib/tools/bison/lib/getopt.c +++ b/contrib/tools/bison/lib/getopt.c @@ -181,7 +181,7 @@ exchange (char **argv, struct _getopt_data *d) { /* Bottom segment is the short one. */ int len = middle - bottom; - int i; + register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) @@ -198,7 +198,7 @@ exchange (char **argv, struct _getopt_data *d) { /* Top segment is the short one. */ int len = top - middle; - int i; + register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) diff --git a/contrib/tools/bison/lib/mbswidth.c b/contrib/tools/bison/lib/mbswidth.c index 65710375926..7c2dfce8864 100644 --- a/contrib/tools/bison/lib/mbswidth.c +++ b/contrib/tools/bison/lib/mbswidth.c @@ -30,7 +30,7 @@ #include <ctype.h> /* Get mbstate_t, mbrtowc(), mbsinit(), wcwidth(). */ -#include "wchar--.h" +#include <wchar.h> /* Get iswcntrl(). */ #include <wctype.h> diff --git a/contrib/tools/bison/lib/obstack.c b/contrib/tools/bison/lib/obstack.c index 9b2883e4ac6..d915449defb 100644 --- a/contrib/tools/bison/lib/obstack.c +++ b/contrib/tools/bison/lib/obstack.c @@ -143,7 +143,7 @@ _obstack_begin (struct obstack *h, void *(*chunkfun) (long), void (*freefun) (void *)) { - struct _obstack_chunk *chunk; /* points to new chunk */ + register struct _obstack_chunk *chunk; /* points to new chunk */ if (alignment == 0) alignment = DEFAULT_ALIGNMENT; @@ -190,7 +190,7 @@ _obstack_begin_1 (struct obstack *h, int size, int alignment, void (*freefun) (void *, void *), void *arg) { - struct _obstack_chunk *chunk; /* points to new chunk */ + register struct _obstack_chunk *chunk; /* points to new chunk */ if (alignment == 0) alignment = DEFAULT_ALIGNMENT; @@ -241,11 +241,11 @@ _obstack_begin_1 (struct obstack *h, int size, int alignment, void _obstack_newchunk (struct obstack *h, int length) { - struct _obstack_chunk *old_chunk = h->chunk; - struct _obstack_chunk *new_chunk; - long new_size; - long obj_size = h->next_free - h->object_base; - long i; + register struct _obstack_chunk *old_chunk = h->chunk; + register struct _obstack_chunk *new_chunk; + register long new_size; + register long obj_size = h->next_free - h->object_base; + register long i; long already; char *object_base; @@ -318,8 +318,8 @@ int _obstack_allocated_p (struct obstack *h, void *obj); int _obstack_allocated_p (struct obstack *h, void *obj) { - struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ - struct _obstack_chunk *plp; /* point to previous chunk if any */ + register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ + register struct _obstack_chunk *plp; /* point to previous chunk if any */ lp = (h)->chunk; /* We use >= rather than > since the object cannot be exactly at @@ -341,8 +341,8 @@ _obstack_allocated_p (struct obstack *h, void *obj) void __obstack_free (struct obstack *h, void *obj) { - struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ - struct _obstack_chunk *plp; /* point to previous chunk if any */ + register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */ + register struct _obstack_chunk *plp; /* point to previous chunk if any */ lp = h->chunk; /* We use >= because there cannot be an object at the beginning of a chunk. @@ -377,8 +377,8 @@ strong_alias (obstack_free, _obstack_free) int _obstack_memory_used (struct obstack *h) { - struct _obstack_chunk* lp; - int nbytes = 0; + register struct _obstack_chunk* lp; + register int nbytes = 0; for (lp = h->chunk; lp != 0; lp = lp->prev) { diff --git a/contrib/tools/bison/lib/stpcpy.c b/contrib/tools/bison/lib/stpcpy.c index f5aa8d67e95..01b70c3b791 100644 --- a/contrib/tools/bison/lib/stpcpy.c +++ b/contrib/tools/bison/lib/stpcpy.c @@ -21,7 +21,6 @@ #include <config.h> #include <string.h> -#include <stdlib.h> #undef __stpcpy #if defined(_LIBC) || (defined(__MACH__) && defined(stpcpy)) @@ -36,8 +35,8 @@ char * __stpcpy (char *dest, const char *src) { - char *d = dest; - const char *s = src; + register char *d = dest; + register const char *s = src; do *d++ = *s; diff --git a/contrib/tools/bison/lib/wchar--.h b/contrib/tools/bison/lib/wchar--.h deleted file mode 100644 index 41751e00acf..00000000000 --- a/contrib/tools/bison/lib/wchar--.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include <wchar.h> - -#if defined(_WIN32) -int wcwidth(wchar_t c); -#endif |