diff options
author | Martin Baulig <martin@home-of-linux.org> | 1999-12-12 14:20:17 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 1999-12-12 14:20:17 +0000 |
commit | 881c2a208669f096339d755d21c1a8d2d267ca40 (patch) | |
tree | fdddae7b8b8f870bef30a771ad06614f8f3cd40b /include/glibtop/mountlist.h | |
parent | a33f4df47e398aaf62043ed98229977e42ac2241 (diff) | |
download | libgtop-881c2a208669f096339d755d21c1a8d2d267ca40.tar.gz |
All functions which return an array now take a `glibtop_array *array'
1999-12-12 Martin Baulig <martin@home-of-linux.org>
All functions which return an array now take a `glibtop_array *array'
parameter instead of a `glibtop_<feature> *buf' one.
For compatibility, we typedef the corresponding `glibtop_<feature>'s
to `glibtop_array' in <glibtop/compat_10.h>.
This has the advantage that scripting languages like Guile with an
array implementation which stores the length of an array in the
array don't need the `glibtop_array' parameter at all any longer.
We'll also add convenient functions which return GPtrArray's here.
* include/glibtop/proclist.h (glibtop_proclist): Removed.
(glibtop_get_proclist_*): This now takes a `glibtop_array' parameter
instead of a `glibtop_proclist' one.
* include/glibtop/procmap.h (glibtop_proc_map): Removed.
(glibtop_get_proc_map_*): This now takes a `glibtop_array' parameter
instead of a `glibtop_proc_map' one.
* include/glibtop/mountlist.h (glibtop_mountlist): Removed.
(glibtop_get_mountlist_*): This now takes a `glibtop_array' parameter
instead of a `glibtop_mountlist' one.
* include/glibtop/interfaces.h (glibtop_interface_names): Removed.
(glibtop_get_interface_names_*): This now takes a `glibtop_array'
parameter instead of a `glibtop_interface_name' one.
* include/glibtop/compat_10.h: New file. Contains some typedefs and
#defines to keep compatibility until the big restructurement is
completely done.
Diffstat (limited to 'include/glibtop/mountlist.h')
-rw-r--r-- | include/glibtop/mountlist.h | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/include/glibtop/mountlist.h b/include/glibtop/mountlist.h index 89a1dc70..897a2424 100644 --- a/include/glibtop/mountlist.h +++ b/include/glibtop/mountlist.h @@ -29,18 +29,13 @@ #include <glibtop.h> #include <glibtop/global.h> -BEGIN_LIBGTOP_DECLS - -#define GLIBTOP_MOUNTLIST_NUMBER 0 -#define GLIBTOP_MOUNTLIST_TOTAL 1 -#define GLIBTOP_MOUNTLIST_SIZE 2 +#include <glibtop/compat_10.h> +#include <glibtop/array.h> -#define GLIBTOP_MAX_MOUNTLIST 3 +BEGIN_LIBGTOP_DECLS typedef struct _glibtop_mountentry glibtop_mountentry; -typedef struct _glibtop_mountlist glibtop_mountlist; - struct _glibtop_mountentry { u_int64_t dev; @@ -49,23 +44,15 @@ struct _glibtop_mountentry char type [GLIBTOP_MOUNTENTRY_LEN+1]; }; -struct _glibtop_mountlist -{ - u_int64_t flags, - number, /* GLIBTOP_MOUNTLIST_NUMBER */ - total, /* GLIBTOP_MOUNTLIST_TOTAL */ - size; /* GLIBTOP_MOUNTLIST_SIZE */ -}; - -#define glibtop_get_mountlist(mountlist,all_fs) glibtop_get_mountlist_l(glibtop_global_server, mountlist, all_fs) +#define glibtop_get_mountlist(array,all_fs) glibtop_get_mountlist_l(glibtop_global_server, array, all_fs) #define glibtop_get_mountlist_r glibtop_get_mountlist_s glibtop_mountentry * -glibtop_get_mountlist_l (glibtop *server, glibtop_mountlist *buf, int all_fs); +glibtop_get_mountlist_l (glibtop *server, glibtop_array *array, int all_fs); glibtop_mountentry * -glibtop_get_mountlist_s (glibtop *server, glibtop_mountlist *buf, int all_fs); +glibtop_get_mountlist_s (glibtop *server, glibtop_array *array, int all_fs); #ifdef GLIBTOP_NAMES |