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.
This commit is contained in:
committed by
Martin Baulig
parent
a33f4df47e
commit
881c2a2086
@@ -25,24 +25,10 @@
|
||||
|
||||
#include <glibtop/interfaces.h>
|
||||
|
||||
const char *glibtop_names_interface_names[GLIBTOP_MAX_INTERFACE_NAMES] =
|
||||
{
|
||||
"number", "size"
|
||||
};
|
||||
const char *glibtop_names_interface_names[] = { };
|
||||
|
||||
const unsigned glibtop_types_interface_names[GLIBTOP_MAX_INTERFACE_NAMES] =
|
||||
{
|
||||
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
|
||||
};
|
||||
const unsigned glibtop_types_interface_names[] = { };
|
||||
|
||||
const char *glibtop_labels_interface_names[GLIBTOP_MAX_INTERFACE_NAMES] =
|
||||
{
|
||||
N_ ("Number"),
|
||||
N_ ("Size")
|
||||
};
|
||||
const char *glibtop_labels_interface_names[] = { };
|
||||
|
||||
const char *glibtop_descriptions_interface_names[GLIBTOP_MAX_INTERFACE_NAMES] =
|
||||
{
|
||||
N_ ("Number"),
|
||||
N_ ("Size")
|
||||
};
|
||||
const char *glibtop_descriptions_interface_names[] = { };
|
||||
|
@@ -25,26 +25,10 @@
|
||||
|
||||
#include <glibtop/mountlist.h>
|
||||
|
||||
const char *glibtop_names_mountlist[GLIBTOP_MAX_MOUNTLIST] =
|
||||
{
|
||||
"number", "total", "size"
|
||||
};
|
||||
const char *glibtop_names_mountlist[] = { };
|
||||
|
||||
const unsigned glibtop_types_mountlist[GLIBTOP_MAX_MOUNTLIST] =
|
||||
{
|
||||
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
|
||||
};
|
||||
const unsigned glibtop_types_mountlist[] = { };
|
||||
|
||||
const char *glibtop_labels_mountlist[GLIBTOP_MAX_MOUNTLIST] =
|
||||
{
|
||||
N_ ("Number of list elements"),
|
||||
N_ ("Total size of list"),
|
||||
N_ ("Size of a single list element")
|
||||
};
|
||||
const char *glibtop_labels_mountlist[] = { };
|
||||
|
||||
const char *glibtop_descriptions_mountlist[GLIBTOP_MAX_MOUNTLIST] =
|
||||
{
|
||||
N_ ("Number of list elements"),
|
||||
N_ ("Total size of list"),
|
||||
N_ ("Size of a single list element")
|
||||
};
|
||||
const char *glibtop_descriptions_mountlist[] = { };
|
||||
|
@@ -25,26 +25,10 @@
|
||||
|
||||
#include <glibtop/proclist.h>
|
||||
|
||||
const char *glibtop_names_proclist[GLIBTOP_MAX_PROCLIST] =
|
||||
{
|
||||
"number", "total", "size"
|
||||
};
|
||||
const char *glibtop_names_proclist[] = { };
|
||||
|
||||
const unsigned glibtop_types_proclist[GLIBTOP_MAX_PROCLIST] =
|
||||
{
|
||||
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
|
||||
};
|
||||
const unsigned glibtop_types_proclist[] = { };
|
||||
|
||||
const char *glibtop_labels_proclist[GLIBTOP_MAX_PROCLIST] =
|
||||
{
|
||||
N_ ("Number of list elements"),
|
||||
N_ ("Total size of list"),
|
||||
N_ ("Size of a single list element")
|
||||
};
|
||||
const char *glibtop_labels_proclist[] = { };
|
||||
|
||||
const char *glibtop_descriptions_proclist[GLIBTOP_MAX_PROCLIST] =
|
||||
{
|
||||
N_ ("Number of list elements"),
|
||||
N_ ("Total size of list"),
|
||||
N_ ("Size of a single list element")
|
||||
};
|
||||
const char *glibtop_descriptions_proclist[] = { };
|
||||
|
@@ -25,26 +25,10 @@
|
||||
|
||||
#include <glibtop/procmap.h>
|
||||
|
||||
const char *glibtop_names_proc_map[GLIBTOP_MAX_PROC_MAP] =
|
||||
{
|
||||
"number", "total", "size"
|
||||
};
|
||||
const char *glibtop_names_proc_map[] = { };
|
||||
|
||||
const unsigned glibtop_types_proc_map[GLIBTOP_MAX_PROC_MAP] =
|
||||
{
|
||||
GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG, GLIBTOP_TYPE_ULONG
|
||||
};
|
||||
const unsigned glibtop_types_proc_map[] = { };
|
||||
|
||||
const char *glibtop_labels_proc_map[GLIBTOP_MAX_PROC_MAP] =
|
||||
{
|
||||
N_ ("Number of list elements"),
|
||||
N_ ("Total size of list"),
|
||||
N_ ("Size of a single list element")
|
||||
};
|
||||
const char *glibtop_labels_proc_map[] = { };
|
||||
|
||||
const char *glibtop_descriptions_proc_map[GLIBTOP_MAX_PROC_MAP] =
|
||||
{
|
||||
N_ ("Number of list elements"),
|
||||
N_ ("Total size of list"),
|
||||
N_ ("Size of a single list element")
|
||||
};
|
||||
const char *glibtop_descriptions_proc_map[] = { };
|
||||
|
Reference in New Issue
Block a user