diff --git a/ChangeLog b/ChangeLog index d9fe86fa..564c072e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,37 @@ +1999-12-12 Martin Baulig + + All functions which return an array now take a `glibtop_array *array' + parameter instead of a `glibtop_ *buf' one. + + For compatibility, we typedef the corresponding `glibtop_'s + to `glibtop_array' in . + + 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. + 1999-12-12 Martin Baulig * include/glibtop/array.h: New file. diff --git a/features.def b/features.def index 3271961d..4cd6d704 100644 --- a/features.def +++ b/features.def @@ -6,7 +6,7 @@ retval|loadavg|double(loadavg[3]):ulong(nr_running,nr_tasks,last_pid) retval|shm_limits|ulong(shmmax,shmmin,shmmni,shmseg,shmall) retval|msg_limits|ulong(msgpool,msgmap,msgmax,msgmnb,msgmni,msgssz,msgtql) retval|sem_limits|ulong(semmap,semmni,semmns,semmnu,semmsl,semopm,semume,semusz,semvmx,semaem) -pointer(unsigned)|proclist|ulong(number,size,total)|long(which,arg) +pointer(unsigned)|proclist|array|long(which,arg) retval|proc_state|string(cmd):unsigned(state):ulong(uid,gid,ruid,rgid,has_cpu,processor,last_processor)|pid_t(pid) retval|proc_uid|long(uid,euid,gid,egid,suid,sgid,fsuid,fsgid,pid,ppid,pgrp,session,tty,tpgid,priority,nice,ngroups,groups[GLIBTOP_MAX_GROUPS])|pid_t(pid) retval|proc_mem|long(size,vsize,resident,share,rss,rss_rlim)|pid_t(pid) @@ -15,10 +15,10 @@ retval|proc_signal|ulong(signal[2],blocked[2],sigignore[2],sigcatch[2])|pid_t(pi retval|proc_kernel|ulong(k_flags,min_flt,maj_flt,cmin_flt,cmaj_flt,kstk_esp,kstk_eip,nwchan):string(wchan)|pid_t(pid) retval|proc_segment|ulong(text_rss,shlib_rss,data_rss,stack_rss,dirty_size,start_code,end_code,start_data,end_data,start_brk,end_brk,start_stack,start_mmap,arg_start,arg_end,env_start,env_end)|pid_t(pid) char *|proc_args|ulong(size)|pid_t(pid):unsigned(max_len) -array(glibtop_map_entry)|proc_map|ulong(number,size,total)|pid_t(pid) -array(glibtop_mountentry)|@mountlist|ulong(number,size,total)|int(all_fs) +array(glibtop_map_entry)|proc_map|array|pid_t(pid) +array(glibtop_mountentry)|@mountlist|array|int(all_fs) retval|@fsusage|ulong(blocks,bfree,bavail,files,ffree)|string(mount_dir) -array(glibtop_interface)|interface_names|ulong(number,size,total)|ulong(interface,number,instance,strategy) +array(glibtop_interface)|interface_names|array|ulong(interface,number,instance,strategy) retval|netinfo|ulong(if_flags,transport,mtu,subnet,address)|string(interface):unsigned(transport) retval|netload|ulong(packets_in,packets_out,packets_total,bytes_in,bytes_out,bytes_total,errors_in,errors_out,errors_total,collisions)|string(interface):unsigned(transport,protocol) retval|ppp|ulong(state,bytes_in,bytes_out)|ushort(device) diff --git a/include/glibtop/Makefile.am b/include/glibtop/Makefile.am index 28a79174..66de9b1b 100644 --- a/include/glibtop/Makefile.am +++ b/include/glibtop/Makefile.am @@ -8,4 +8,4 @@ glibtop_HEADERS = close.h loadavg.h prockernel.h procstate.h \ procsignal.h read_data.h union.h types.h gnuserv.h \ parameter.h mountlist.h fsusage.h procmap.h signal.h \ inodedb.h sysinfo.h ppp.h procargs.h netload.h \ - netinfo.h interfaces.h limits.h + netinfo.h interfaces.h limits.h array.h compat_10.h diff --git a/include/glibtop/array.h b/include/glibtop/array.h index b6825dc5..bb5b4c6d 100644 --- a/include/glibtop/array.h +++ b/include/glibtop/array.h @@ -31,16 +31,20 @@ BEGIN_LIBGTOP_DECLS +#define GLIBTOP_ARRAY_NUMBER 0 +#define GLIBTOP_ARRAY_SIZE 1 +#define GLIBTOP_ARRAY_TOTAL 2 + +#define GLIBTOP_MAX_ARRAY 3 + typedef struct _glibtop_array glibtop_array; struct _glibtop_array { - u_int64_t number, /* Number of elements */ - size, /* Size of a single element */ - size; /* Total size of the array */ + u_int64_t flags, + number, /* GLIBTOP_ARRAY_NUMBER */ + size, /* GLIBTOP_ARRAY_SIZE */ + total; /* GLIBTOP_ARRAY_TOTAL */ }; -GPtrArray * /* internal use only */ -_glibtop_list_to_array (glibtop *array, gpointer data); - #endif diff --git a/include/glibtop/compat_10.h b/include/glibtop/compat_10.h new file mode 100644 index 00000000..4dfaf1c4 --- /dev/null +++ b/include/glibtop/compat_10.h @@ -0,0 +1,74 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ + +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 1.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef __GLIBTOP_COMPAT10_H__ +#define __GLIBTOP_COMPAT10_H__ + +#include +#include + +BEGIN_LIBGTOP_DECLS + +/* glibtop_proclist */ + +#define GLIBTOP_PROCLIST_NUMBER GLIBTOP_ARRAY_NUMBER +#define GLIBTOP_PROCLIST_SIZE GLIBTOP_ARRAY_SIZE +#define GLIBTOP_PROCLIST_TOTAL GLIBTOP_ARRAY_TOTAL + +#define GLIBTOP_MAX_PROCLIST GLIBTOP_MAX_ARRAY + +typedef struct _glibtop_array glibtop_proclist; + +/* glibtop_mountlist */ + +#define GLIBTOP_MOUNTLIST_NUMBER GLIBTOP_ARRAY_NUMBER +#define GLIBTOP_MOUNTLIST_SIZE GLIBTOP_ARRAY_SIZE +#define GLIBTOP_MOUNTLIST_TOTAL GLIBTOP_ARRAY_TOTAL + +#define GLIBTOP_MAX_MOUNTLIST GLIBTOP_MAX_ARRAY + +typedef struct _glibtop_array glibtop_mountlist; + +/* glibtop_proc_map */ + +#define GLIBTOP_PROC_MAP_NUMBER GLIBTOP_ARRAY_NUMBER +#define GLIBTOP_PROC_MAP_SIZE GLIBTOP_ARRAY_SIZE +#define GLIBTOP_PROC_MAP_TOTAL GLIBTOP_ARRAY_TOTAL + +#define GLIBTOP_MAX_PROC_MAP GLIBTOP_MAX_ARRAY + +typedef struct _glibtop_array glibtop_proc_map; + +/* glibtop_interface_names */ + +#define GLIBTOP_INTERFACE_NAMES_NUMBER GLIBTOP_ARRAY_NUMBER +#define GLIBTOP_INTERFACE_NAMES_SIZE GLIBTOP_ARRAY_SIZE +#define GLIBTOP_INTERFACE_NAMES_TOTAL GLIBTOP_ARRAY_TOTAL + +#define GLIBTOP_MAX_INTERFACE_NAMES GLIBTOP_MAX_ARRAY + +typedef struct _glibtop_array glibtop_interface_names; + +#endif diff --git a/include/glibtop/interfaces.h b/include/glibtop/interfaces.h index bea7ced7..adf6b995 100644 --- a/include/glibtop/interfaces.h +++ b/include/glibtop/interfaces.h @@ -29,6 +29,9 @@ #include #include +#include +#include + BEGIN_LIBGTOP_DECLS #define GLIBTOP_INTERFACE_IF_FLAGS 0 @@ -43,14 +46,6 @@ BEGIN_LIBGTOP_DECLS typedef struct _glibtop_interface glibtop_interface; -#define GLIBTOP_INTERFACE_NAMES_NUMBER 0 -#define GLIBTOP_INTERFACE_NAMES_SIZE 1 -#define GLIBTOP_INTERFACE_NAMES_TOTAL 2 - -#define GLIBTOP_MAX_INTERFACE_NAMES 3 - -typedef struct _glibtop_interface_names glibtop_interface_names; - typedef enum _glibtop_interface_type glibtop_interface_type; typedef enum _glibtop_transport glibtop_transport; typedef enum _glibtop_protocol glibtop_protocol; @@ -144,15 +139,7 @@ struct _glibtop_interface char name [GLIBTOP_INTERFACE_LEN]; }; -struct _glibtop_interface_names -{ - u_int64_t flags, - number, /* GLIBTOP_INTERFACES_NUMBER */ - size, /* GLIBTOP_INTERFACES_SIZE */ - total; /* GLIBTOP_INTERFACES_TOTAL */ -}; - -#define glibtop_get_interface_names(buf,interface,number,instance,strategy) glibtop_get_interface_names_l (glibtop_global_server, buf, interface, number, instance, strategy) +#define glibtop_get_interface_names(array,interface,number,instance,strategy) glibtop_get_interface_names_l (glibtop_global_server, array, interface, number, instance, strategy) #if GLIBTOP_SUID_INTERFACE_NAMES #define glibtop_get_interface_names_r glibtop_get_interface_names_p @@ -160,14 +147,14 @@ struct _glibtop_interface_names #define glibtop_get_interface_names_r glibtop_get_interface_names_s #endif -glibtop_interface *glibtop_get_interface_names_l (glibtop *server, glibtop_interface_names *buf, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy); +glibtop_interface *glibtop_get_interface_names_l (glibtop *server, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy); #if GLIBTOP_SUID_INTERFACE_NAMES int glibtop_init_interface_names_p (glibtop *server); -glibtop_interface *glibtop_get_interface_names_p (glibtop *server, glibtop_interface_names *buf, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy); +glibtop_interface *glibtop_get_interface_names_p (glibtop *server, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy); #else int glibtop_init_interface_names_s (glibtop *server); -glibtop_interface *glibtop_get_interface_names_s (glibtop *server, glibtop_interface_names *buf, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy); +glibtop_interface *glibtop_get_interface_names_s (glibtop *server, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy); #endif #ifdef GLIBTOP_NAMES 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 #include +#include +#include + BEGIN_LIBGTOP_DECLS -#define GLIBTOP_MOUNTLIST_NUMBER 0 -#define GLIBTOP_MOUNTLIST_TOTAL 1 -#define GLIBTOP_MOUNTLIST_SIZE 2 - -#define GLIBTOP_MAX_MOUNTLIST 3 - 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 diff --git a/include/glibtop/proclist.h b/include/glibtop/proclist.h index e0ce0f41..a0fe9172 100644 --- a/include/glibtop/proclist.h +++ b/include/glibtop/proclist.h @@ -29,14 +29,11 @@ #include #include +#include +#include + BEGIN_LIBGTOP_DECLS -#define GLIBTOP_PROCLIST_NUMBER 0 -#define GLIBTOP_PROCLIST_TOTAL 1 -#define GLIBTOP_PROCLIST_SIZE 2 - -#define GLIBTOP_MAX_PROCLIST 3 - /* You can use the folowing constants as the `which' member of * glibtop_get_proclist () to specify which processes to fetch. */ @@ -55,17 +52,7 @@ BEGIN_LIBGTOP_DECLS #define GLIBTOP_EXCLUDE_SYSTEM 0x2000 #define GLIBTOP_EXCLUDE_NOTTY 0x4000 -typedef struct _glibtop_proclist glibtop_proclist; - -struct _glibtop_proclist -{ - u_int64_t flags, - number, /* GLIBTOP_PROCLIST_NUMBER */ - total, /* GLIBTOP_PROCLIST_TOTAL */ - size; /* GLIBTOP_PROCLIST_SIZE */ -}; - -#define glibtop_get_proclist(proclist,which,arg) glibtop_get_proclist_l(glibtop_global_server, proclist, which, arg) +#define glibtop_get_proclist(array,which,arg) glibtop_get_proclist_l(glibtop_global_server, array, which, arg) #if GLIBTOP_SUID_PROCLIST #define glibtop_get_proclist_r glibtop_get_proclist_p @@ -74,20 +61,20 @@ struct _glibtop_proclist #endif unsigned * -glibtop_get_proclist_l (glibtop *server, glibtop_proclist *buf, +glibtop_get_proclist_l (glibtop *server, glibtop_array *array, int64_t which, int64_t arg); #if GLIBTOP_SUID_PROCLIST int glibtop_init_proclist_p (glibtop *server); unsigned * -glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf, +glibtop_get_proclist_p (glibtop *server, glibtop_array *array, int64_t which, int64_t arg); #else int glibtop_init_proclist_s (glibtop *server); unsigned * -glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf, +glibtop_get_proclist_s (glibtop *server, glibtop_array *array, int64_t which, int64_t arg); #endif diff --git a/include/glibtop/procmap.h b/include/glibtop/procmap.h index eceafea5..fbcda9d4 100644 --- a/include/glibtop/procmap.h +++ b/include/glibtop/procmap.h @@ -29,14 +29,11 @@ #include #include +#include +#include + BEGIN_LIBGTOP_DECLS -#define GLIBTOP_PROC_MAP_NUMBER 0 -#define GLIBTOP_PROC_MAP_TOTAL 1 -#define GLIBTOP_PROC_MAP_SIZE 2 - -#define GLIBTOP_MAX_PROC_MAP 3 - #define GLIBTOP_MAP_ENTRY_START 1 #define GLIBTOP_MAP_ENTRY_END 2 #define GLIBTOP_MAP_ENTRY_OFFSET 3 @@ -57,23 +54,13 @@ BEGIN_LIBGTOP_DECLS typedef struct _glibtop_map_entry glibtop_map_entry; -typedef struct _glibtop_proc_map glibtop_proc_map; - struct _glibtop_map_entry { u_int64_t flags, start, end, offset, perm, inode, device; char filename [GLIBTOP_MAP_FILENAME_LEN+1]; }; -struct _glibtop_proc_map -{ - u_int64_t flags, - number, /* GLIBTOP_PROC_MAP_NUMBER */ - total, /* GLIBTOP_PROC_MAP_TOTAL */ - size; /* GLIBTOP_PROC_MAP_SIZE */ -}; - -#define glibtop_get_proc_map(proc_map,pid) glibtop_get_proc_map_l(glibtop_global_server, proc_map, pid) +#define glibtop_get_proc_map(array,pid) glibtop_get_proc_map_l(glibtop_global_server, array, pid) #if GLIBTOP_SUID_PROC_MAP #define glibtop_get_proc_map_r glibtop_get_proc_map_p @@ -82,18 +69,18 @@ struct _glibtop_proc_map #endif glibtop_map_entry * -glibtop_get_proc_map_l (glibtop *server, glibtop_proc_map *buf, pid_t pid); +glibtop_get_proc_map_l (glibtop *server, glibtop_array *array, pid_t pid); #if GLIBTOP_SUID_PROC_MAP int glibtop_init_proc_map_p (glibtop *server); glibtop_map_entry * -glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf, pid_t pid); +glibtop_get_proc_map_p (glibtop *server, glibtop_array *array, pid_t pid); #else int glibtop_init_proc_map_s (glibtop *server); glibtop_map_entry * -glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid); +glibtop_get_proc_map_s (glibtop *server, glibtop_array *array, pid_t pid); #endif #ifdef GLIBTOP_NAMES diff --git a/include/glibtop/union.h b/include/glibtop/union.h index e072b213..68abdaf1 100644 --- a/include/glibtop/union.h +++ b/include/glibtop/union.h @@ -68,7 +68,7 @@ union _glibtop_union glibtop_shm_limits shm_limits; glibtop_msg_limits msg_limits; glibtop_sem_limits sem_limits; - glibtop_proclist proclist; + glibtop_array proclist; glibtop_proc_state proc_state; glibtop_proc_uid proc_uid; glibtop_proc_mem proc_mem; @@ -77,10 +77,10 @@ union _glibtop_union glibtop_proc_kernel proc_kernel; glibtop_proc_segment proc_segment; glibtop_proc_args proc_args; - glibtop_proc_map proc_map; - glibtop_mountlist mountlist; + glibtop_array proc_map; + glibtop_array mountlist; glibtop_fsusage fsusage; - glibtop_interface_names interface_names; + glibtop_array interface_names; glibtop_netinfo netinfo; glibtop_netload netload; glibtop_ppp ppp; diff --git a/lib/lib.pl b/lib/lib.pl index 83a32320..320bf5c8 100755 --- a/lib/lib.pl +++ b/lib/lib.pl @@ -211,6 +211,12 @@ sub output { if ($line_fields[3] eq '') { $sysdeps_code .= sprintf ("\t%sglibtop_get_%s_s (server%s);\n", $prefix, $feature, $call_param); + } elsif ($line_fields[3] eq 'array') { + $sysdeps_code .= sprintf ("\t%sglibtop_get_%s_s (server, array%s);\n", + $prefix, $feature, $call_param); + } elsif ($line_fields[3] =~ /^array/) { + $sysdeps_code .= sprintf ("\t%sglibtop_get_%s_s (server, array, buf%s);\n", + $prefix, $feature, $call_param); } else { $sysdeps_code .= sprintf ("\t%sglibtop_get_%s_s (server, buf%s);\n", $prefix, $feature, $call_param); @@ -243,6 +249,9 @@ sub output { "_LIBGTOP_SEND_len", "_LIBGTOP_SEND_ptr"); if ($line_fields[3] eq '') { $call_code .= sprintf ("\t\t\t%s0, NULL,\n", $call_prefix_space); + } elsif ($line_fields[3] eq 'array') { + $call_code .= sprintf ("\t\t\t%ssizeof (glibtop_array), array,\n", + $call_prefix_space); } else { $call_code .= sprintf ("\t\t\t%ssizeof (glibtop_%s), buf,\n", $call_prefix_space, $feature); @@ -263,7 +272,7 @@ sub output { $check_code = "check_missing:\n"; $check_code .= "\t/* Make sure that all required fields are present. */\n"; - if (!($line_fields[3] eq '')) { + if (!(($line_fields[3] eq '') or ($line_fields[3] eq 'array'))) { $check_code .= "\tif (buf->flags & server->required." . $feature . ")\n"; $check_code .= "\t\t_glibtop_missing_feature (server, \"" . $feature . "\", buf->flags,\n\t\t\t\t\t &server->required." . $feature . ");\n"; @@ -284,6 +293,12 @@ sub output { if ($line_fields[3] eq '') { $func_decl .= sprintf ("glibtop_get_%s_l (glibtop *server%s)\n", $feature, $param_decl); + } elsif ($line_fields[3] eq 'array') { + $func_decl .= sprintf ("glibtop_get_%s_l (glibtop *server, glibtop_array *array%s)\n", + $feature, $param_decl); + } elsif ($line_fields[3] =~ /^array/) { + $func_decl .= sprintf ("glibtop_get_%s_l (glibtop *server, glibtop_array *array, %s *buf%s)\n", + $feature, 'glibtop_'.$feature, $param_decl); } else { $func_decl .= sprintf ("glibtop_get_%s_l (glibtop *server, %s *buf%s)\n", $feature, 'glibtop_'.$feature, $param_decl); diff --git a/sysdeps/names/interfaces.c b/sysdeps/names/interfaces.c index 91b30e82..a222d650 100644 --- a/sysdeps/names/interfaces.c +++ b/sysdeps/names/interfaces.c @@ -25,24 +25,10 @@ #include -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[] = { }; diff --git a/sysdeps/names/mountlist.c b/sysdeps/names/mountlist.c index b58af685..d54b167d 100644 --- a/sysdeps/names/mountlist.c +++ b/sysdeps/names/mountlist.c @@ -25,26 +25,10 @@ #include -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[] = { }; diff --git a/sysdeps/names/proclist.c b/sysdeps/names/proclist.c index 4d6fc245..74721c1e 100644 --- a/sysdeps/names/proclist.c +++ b/sysdeps/names/proclist.c @@ -25,26 +25,10 @@ #include -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[] = { }; diff --git a/sysdeps/names/procmap.c b/sysdeps/names/procmap.c index 4ffba00f..625c5c81 100644 --- a/sysdeps/names/procmap.c +++ b/sysdeps/names/procmap.c @@ -25,26 +25,10 @@ #include -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[] = { };