From 720cb52cf3f68346ba7411723deddedf182c6029 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Wed, 12 Jan 2000 13:04:09 +0000 Subject: [PATCH] Don't create code for things which are now in the new 2000-01-12 Martin Baulig * marshal.pl: Don't create code for things which are now in the new `glibtop-backend-common' backend. --- backends/sysdeps/ChangeLog | 5 +++++ backends/sysdeps/marshal.pl | 16 +++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/backends/sysdeps/ChangeLog b/backends/sysdeps/ChangeLog index f8e76308..66894d8d 100644 --- a/backends/sysdeps/ChangeLog +++ b/backends/sysdeps/ChangeLog @@ -1,3 +1,8 @@ +2000-01-12 Martin Baulig + + * marshal.pl: Don't create code for things which are now + in the new `glibtop-backend-common' backend. + 2000-01-02 Martin Baulig * marshal.pl: New file. Automatically creates `marshal.c'. diff --git a/backends/sysdeps/marshal.pl b/backends/sysdeps/marshal.pl index 1bbe16fc..2c42559c 100644 --- a/backends/sysdeps/marshal.pl +++ b/backends/sysdeps/marshal.pl @@ -58,7 +58,9 @@ sub output { $space = $feature; $space =~ s/./ /g; - $features{++$feature_count} = $feature; + $features{++$feature_count} = $orig; + + return if $orig =~ /^@//; if ($retval eq 'retval') { $retval_param = '&retval'; @@ -113,7 +115,7 @@ sub output { } if ($param_decl eq '') { - $param_decl = ",\n " . $space . ' '; + $param_decl = ",\n " . $space . ' '; } else { $param_decl = $param_decl . ', '; @@ -165,9 +167,13 @@ $call_vector_code = ''; for ($nr = 1; $nr <= $feature_count; $nr++) { $feature = $features{$nr}; - $call_vector_code .= sprintf - (qq[\#if GLIBTOP_SUID_%s\n\tNULL,\n\#else\n\t_glibtop_get_%s_c,\n\#endif\n], - &toupper($feature), $feature); + if ($feature =~ /^@/) { + $call_vector_code .= sprintf (qq[\tNULL,\n]); + } else { + $call_vector_code .= sprintf + (qq[\#if GLIBTOP_SUID_%s\n\tNULL,\n\#else\n\t_glibtop_get_%s_c,\n\#endif\n], + &toupper($feature), $feature); + } } print 'glibtop_call_vector glibtop_backend_sysdeps_call_vector = {';