#include "nfsmount.h"
#include "nls.h"
-void *
-xmalloc (size_t size) {
- void *t;
-
- if (size == 0)
- return NULL;
-
- t = malloc (size);
- if (t == NULL)
- die (EX_SYSERR, _("not enough memory"));
-
- return t;
-}
-
-void *
-xrealloc (void *p, size_t size) {
- void *t;
-
- t = realloc(p, size);
- if (t == NULL)
- die (EX_SYSERR, _("not enough memory"));
-
- return t;
-}
-
-char *
-xstrdup (const char *s) {
- char *t;
-
- if (s == NULL)
- return NULL;
-
- t = strdup (s);
-
- if (t == NULL)
- die (EX_SYSERR, _("not enough memory"));
-
- return t;
-}
-
char *
xstrndup (const char *s, int n) {
char *t;
free (fmt2);
}
-/* Fatal error. Print message and exit. */
-void
-die (int err, const char *fmt, ...) {
- va_list args;
-
- va_start (args, fmt);
- vfprintf (stderr, fmt, args);
- fprintf (stderr, "\n");
- va_end (args);
-
- unlock_mtab ();
- exit (err);
-}
-
/* True if fstypes match. Null *TYPES means match anything,
except that swap types always return false. */
/* Accept nonfs,proc,devpts and nonfs,noproc,nodevpts