summaryrefslogtreecommitdiff
path: root/gettext.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2000-02-09 07:02:18 +0000
committerPaul Smith <psmith@gnu.org>2000-02-09 07:02:18 +0000
commite68a27ec7b22753dd2a61585a69290ca2e3c9d80 (patch)
treeb7b5f3afa662aee4e12f13772aaa663f370e5564 /gettext.c
parent17f2dda0acc8f97e40819d75d99d85283d9027a1 (diff)
downloadgunmake-e68a27ec7b22753dd2a61585a69290ca2e3c9d80.tar.gz
* Fix some warnings in gettext.c and function.c
* Don't try to execute tests which are actually directories.
Diffstat (limited to 'gettext.c')
-rw-r--r--gettext.c46
1 files changed, 6 insertions, 40 deletions
diff --git a/gettext.c b/gettext.c
index b35b18d..aef9c01 100644
--- a/gettext.c
+++ b/gettext.c
@@ -563,7 +563,8 @@ _nl_explode_name (name, language, modifier, territory, codeset,
if (*codeset != cp && (*codeset)[0] != '\0')
{
- *normalized_codeset = _nl_normalize_codeset (*codeset,
+ *normalized_codeset = _nl_normalize_codeset ((const unsigned
+ char *)*codeset,
cp - *codeset);
if (strcmp (*codeset, *normalized_codeset) == 0)
free ((char *) *normalized_codeset);
@@ -1220,13 +1221,13 @@ read_alias_file (fname, fname_len)
unsigned char *value;
unsigned char *cp;
- if (fgets (buf, sizeof buf, fp) == NULL)
+ if (fgets ((char *)buf, sizeof buf, fp) == NULL)
/* EOF reached. */
break;
/* Possibly not the whole line fits into the buffer. Ignore
the rest of the line. */
- if (strchr (buf, '\n') == NULL)
+ if (strchr ((char *)buf, '\n') == NULL)
{
char altbuf[BUFSIZ];
do
@@ -1279,8 +1280,8 @@ read_alias_file (fname, fname_len)
if (nmap >= maxmap)
extend_alias_table ();
- alias_len = strlen (alias) + 1;
- value_len = strlen (value) + 1;
+ alias_len = strlen ((char *)alias) + 1;
+ value_len = strlen ((char *)value) + 1;
if (string_space_act + alias_len + value_len > string_space_max)
{
@@ -1750,41 +1751,6 @@ static const char *guess_category_value PARAMS ((int category,
const char *categoryname))
internal_function;
-/* For those loosing systems which don't have `alloca' we have to add
- some additional code emulating it. */
-#ifdef HAVE_ALLOCA
-/* Nothing has to be done. */
-# define ADD_BLOCK(list, address) /* nothing */
-# define FREE_BLOCKS(list) /* nothing */
-#else
-struct block_list
-{
- void *address;
- struct block_list *next;
-};
-# define ADD_BLOCK(list, addr) \
- do { \
- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
- /* If we cannot get a free block we cannot add the new element to \
- the list. */ \
- if (newp != NULL) { \
- newp->address = (addr); \
- newp->next = (list); \
- (list) = newp; \
- } \
- } while (0)
-# define FREE_BLOCKS(list) \
- do { \
- while (list != NULL) { \
- struct block_list *old = list; \
- list = list->next; \
- free (old); \
- } \
- } while (0)
-# undef alloca
-# define alloca(size) (malloc (size))
-#endif /* have alloca */
-
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __