using functions from `xmalloc.c'.
1998-07-06 Martin Baulig <martin@home-of-linux.org> * sysdeps/common/mountlist.c: using functions from `xmalloc.c'. * sysdeps/common/error.c: all functions now accept NULL as `server' argument.
This commit is contained in:
committed by
Martin Baulig
parent
2aa20e2060
commit
0b4f757b2b
15
ChangeLog
15
ChangeLog
@@ -1,5 +1,20 @@
|
|||||||
1998-07-06 Martin Baulig <martin@home-of-linux.org>
|
1998-07-06 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* sysdeps/common/mountlist.c: using functions from `xmalloc.c'.
|
||||||
|
|
||||||
|
* sysdeps/common/error.c: all functions now accept NULL as
|
||||||
|
`server' argument.
|
||||||
|
|
||||||
|
* acconfig.h (AFS, MOUNTED_FREAD, MOUNTED_FREAD_FSTYP,
|
||||||
|
MOUNTED_GETFSSTAT, MOUNTED_GETMNT, MOUNTED_GETMNTENT1,
|
||||||
|
MOUNTED_GETMNTENT2, MOUNTED_GETMNTINFO, MOUNTED_LISTMNTENT,
|
||||||
|
MOUNTED_VMOUNT, STAT_STATFS3_OSF1, STAT_READ_FILSYS,
|
||||||
|
STAT_STATFS2_BSIZE, STAT_STATFS2_FSIZE, STAT_STATFS2_FS_DATA,
|
||||||
|
STAT_STATFS4, STAT_STATVFS, STATFS_TRUNCATES_BLOCK_COUNTS):
|
||||||
|
New macros.
|
||||||
|
|
||||||
|
* configure.in: added GNOME_FILEUTILS_CHECKS.
|
||||||
|
|
||||||
* sysdeps/common/{fsusage, mountlist}.[ch]:
|
* sysdeps/common/{fsusage, mountlist}.[ch]:
|
||||||
Imported from GNU Fileutils 3.16.
|
Imported from GNU Fileutils 3.16.
|
||||||
|
|
||||||
|
@@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
#include <glibtop/error.h>
|
#include <glibtop/error.h>
|
||||||
|
|
||||||
|
#define DEFAULT_NAME "ERROR"
|
||||||
|
|
||||||
/* Prints error message and exits. */
|
/* Prints error message and exits. */
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -30,7 +32,7 @@ glibtop_error_r (glibtop *server, char *format, ...)
|
|||||||
|
|
||||||
va_start (ap, format);
|
va_start (ap, format);
|
||||||
|
|
||||||
fprintf (stderr, "%s: ", server->name);
|
fprintf (stderr, "%s: ", server ? server->name : DEFAULT_NAME);
|
||||||
vfprintf (stderr, format, ap);
|
vfprintf (stderr, format, ap);
|
||||||
fprintf (stderr, "\n");
|
fprintf (stderr, "\n");
|
||||||
|
|
||||||
@@ -45,7 +47,7 @@ glibtop_error_io_r (glibtop *server, char *format, ...)
|
|||||||
|
|
||||||
va_start (ap, format);
|
va_start (ap, format);
|
||||||
|
|
||||||
fprintf (stderr, "%s: ", server->name);
|
fprintf (stderr, "%s: ", server ? server->name : DEFAULT_NAME);
|
||||||
vfprintf (stderr, format, ap);
|
vfprintf (stderr, format, ap);
|
||||||
fprintf (stderr, ": %s\n", strerror (errno));
|
fprintf (stderr, ": %s\n", strerror (errno));
|
||||||
|
|
||||||
@@ -60,7 +62,7 @@ glibtop_warn_r (glibtop *server, char *format, ...)
|
|||||||
|
|
||||||
va_start (ap, format);
|
va_start (ap, format);
|
||||||
|
|
||||||
fprintf (stderr, "%s: ", server->name);
|
fprintf (stderr, "%s: ", server ? server->name : DEFAULT_NAME);
|
||||||
vfprintf (stderr, format, ap);
|
vfprintf (stderr, format, ap);
|
||||||
fprintf (stderr, "\n");
|
fprintf (stderr, "\n");
|
||||||
|
|
||||||
@@ -74,7 +76,7 @@ glibtop_warn_io_r (glibtop *server, char *format, ...)
|
|||||||
|
|
||||||
va_start (ap, format);
|
va_start (ap, format);
|
||||||
|
|
||||||
fprintf (stderr, "%s: ", server->name);
|
fprintf (stderr, "%s: ", server ? server->name : DEFAULT_NAME);
|
||||||
vfprintf (stderr, format, ap);
|
vfprintf (stderr, format, ap);
|
||||||
fprintf (stderr, ": %s\n", strerror (errno));
|
fprintf (stderr, ": %s\n", strerror (errno));
|
||||||
|
|
||||||
|
@@ -34,15 +34,17 @@ void free ();
|
|||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/xmalloc.h>
|
||||||
|
|
||||||
#undef xmalloc
|
#undef xmalloc
|
||||||
#undef xrealloc
|
#undef xrealloc
|
||||||
#undef xstrdup
|
#undef xstrdup
|
||||||
|
|
||||||
#define xmalloc g_malloc
|
#define xmalloc(p1) glibtop_malloc_r (NULL, p1)
|
||||||
#define xrealloc g_realloc
|
#define xrealloc(p1,p2) glibtop_realloc_r (NULL, p1, p2)
|
||||||
#define xstrdup g_strdup
|
#define xstrdup(p1) glibtop_strdup_r (NULL, p1)
|
||||||
|
#define xfree(p1) glibtop_free_r (NULL, p1)
|
||||||
|
|
||||||
char *strstr ();
|
char *strstr ();
|
||||||
void error ();
|
void error ();
|
||||||
|
Reference in New Issue
Block a user