TAGS: distinfo $(..)MakeTAGS
$(MAKE) $(addprefix -f ,$^) $@
+$(..)po/%.pot: distinfo $(..)MakeTAGS
+ $(MAKE) $(addprefix -f ,$^) $@
+
+
.PHONY: echo-headers
echo-headers:
@echo $(headers)
ifdef gettext-srcdir
-%:: $(gettext-srcdir)/intl/%.glibc; $(copysrc)
-%:: $(gettext-srcdir)/intl/%.c; $(copysrc)
-%:: $(gettext-srcdir)/intl/%.h; $(copysrc)
+%.h:: $(gettext-srcdir)/intl/%.glibc; $(copysrc)
+%.c:: $(gettext-srcdir)/intl/%.c; $(copysrc)
+%.h:: $(gettext-srcdir)/intl/%.h; $(copysrc)
define copysrc
cp -f $< $@.new
-/* dcgettext.c -- implemenatation of the dcgettext(3) function
- Copyright (C) 1995 Software Foundation, Inc.
+/* dcgettext.c -- implementation of the dcgettext(3) function
+ Copyright (C) 1995 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
-# ifdef HAVE_ALLOCA_H || defined _LIBC
+# if defined HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
struct binding *_nl_domain_bindings;
/* Prototypes for local functions. */
-static char *find_msg __P ((struct loaded_domain *domain, const char *msgid));
-static const char *category_to_name __P((int category));
-static const char *guess_category_value __P((int category,
- const char *categoryname));
+static char *find_msg PARAMS ((struct loaded_domain *domain,
+ const char *msgid));
+static const char *category_to_name PARAMS ((int category));
+static const char *guess_category_value PARAMS ((int category,
+ const char *categoryname));
/* Names for the libintl functions are a problem. They must not clash
char *dirname, *xdomainname;
char *single_locale;
char *retval;
+ int saved_errno = errno;
/* If no real MSGID is given return NULL. */
if (msgid == NULL)
}
if (ret == NULL)
- /* We cannot get the current working directory. Don't signal an
- error but simply return the default string. */
- return (char *) msgid;
+ {
+ /* We cannot get the current working directory. Don't signal an
+ error but simply return the default string. */
+ errno = saved_errno;
+ return (char *) msgid;
+ }
/* We don't want libintl.a to depend on any other library. So
we avoid the non-standard function stpcpy. In GNU C Library
domain. Return the MSGID. */
if (strcmp (single_locale, "C") == 0
|| strcmp (single_locale, "POSIX") == 0)
- return (char *) msgid;
+ {
+ errno = saved_errno;
+ return (char *) msgid;
+ }
/* Find structure describing the message catalog matching the
{
int cnt;
- for (cnt = 0; domain->successor[cnt] != NULL; --cnt)
+ for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
{
retval = find_msg (domain->successor[cnt], msgid);
}
if (retval != NULL)
- return retval;
+ {
+ errno = saved_errno;
+ return retval;
+ }
}
}
/* NOTREACHED */
while (1)
{
- if (idx >= W (domain->must_swap, domain->hash_size) - incr)
- idx -= W (domain->must_swap, domain->hash_size) - incr;
+ if (idx >= domain->hash_size - incr)
+ idx -= domain->hash_size - incr;
else
idx += incr;
-/* Copyright (C) 1991, 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1996 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
return -1;
}
- fd = dirp->__fd;
+ fd = dirp->fd;
- free ((PTR) dirp->__data);
+ free ((PTR) dirp->data);
free ((PTR) dirp);
return __close (fd);
-/* Copyright (C) 1993, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996 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
#define _DIRSTREAM_H 1
-#define __need_size_t
-#include <stddef.h>
+#include <sys/types.h>
/* Directory stream type.
size_t __offset; /* Current offset into the block. */
size_t __size; /* Total valid data in the block. */
- struct dirent __entry; /* Returned by `readdir'. */
+ off_t pos; /* Position of next entry to read. */
};
#define _DIR_dirfd(dirp) ((dirp)->__fd)
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 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
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <errno.h>
#include <limits.h>
#include <stddef.h>
#include <unistd.h>
#include <stdio.h>
-#include "direct.h" /* This file defines `struct direct'. */
#include "dirstream.h"
/* Open a directory stream on NAME. */
DIR *
-DEFUN(opendir, (name), CONST char *name)
+opendir (const char *name)
{
DIR *dirp;
struct stat statbuf;
goto lose;
}
- dirp = (DIR *) calloc (1, sizeof (DIR) + NAME_MAX); /* Zero-fill. */
+ dirp = (DIR *) calloc (1, sizeof (DIR)); /* Zero-fill. */
if (dirp == NULL)
lose:
{
}
#ifdef _STATBUF_ST_BLKSIZE
- if (statbuf.st_blksize < sizeof (struct direct))
- dirp->__allocation = sizeof (struct direct);
+ if (statbuf.st_blksize < sizeof (struct dirent))
+ dirp->allocation = sizeof (struct dirent);
else
- dirp->__allocation = statbuf.st_blksize;
+ dirp->allocation = statbuf.st_blksize;
#else
- dirp->__allocation = (BUFSIZ < sizeof (struct direct) ?
- sizeof (struct direct) : BUFSIZ);
+ dirp->allocation = (BUFSIZ < sizeof (struct dirent) ?
+ sizeof (struct dirent) : BUFSIZ);
#endif
- dirp->__data = (char *) malloc (dirp->__allocation);
- if (dirp->__data == NULL)
+ dirp->data = (char *) malloc (dirp->allocation);
+ if (dirp->data == NULL)
{
int save = errno;
- free ((PTR) dirp);
+ free (dirp);
(void) __close (fd);
errno = save;
return NULL;
}
- dirp->__fd = fd;
+ dirp->fd = fd;
return dirp;
}
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 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
p = memchr ((PTR) dp->d_name, '\0', D_NAMLEN (dp) + 1);
d->d_namlen = (p != NULL) ? p - dp->d_name : D_NAMLEN (dp);
memcpy (d->d_name, dp->d_name, d->d_namlen + 1);
+ d->d_type = DT_UNKNOWN;
+ d->d_reclen = &d->d_name[d->d_namlen + 1] - (char *) d;
return d;
}
}
void
DEFUN(seekdir, (dirp, pos), DIR *dirp AND __off_t pos)
{
- (void) __lseek(dirp->__fd, pos, SEEK_SET);
- dirp->__size = 0;
- dirp->__offset = 0;
+ (void) __lseek(dirp->fd, pos, SEEK_SET);
+ dirp->size = 0;
+ dirp->offset = 0;
}
return (off_t) -1;
}
- pos = __lseek(dirp->__fd, (off_t) 0, SEEK_CUR);
+ pos = __lseek(dirp->fd, (off_t) 0, SEEK_CUR);
if (pos == (off_t) -1)
return (off_t) -1;
- return pos + dirp->__size - dirp->__offset;
+ return pos + dirp->size - dirp->offset;
}