Create the `_glibtop_init_hook_s' as well.

2000-01-12  Martin Baulig  <martin@home-of-linux.org>

	* marshal.pl: Create the `_glibtop_init_hook_s' as well.
This commit is contained in:
Martin Baulig
2000-01-12 13:10:35 +00:00
committed by Martin Baulig
parent 7e20f2f5f2
commit fc4f288ce1
2 changed files with 19 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
2000-01-12 Martin Baulig <martin@home-of-linux.org>
* marshal.pl: Create the `_glibtop_init_hook_s' as well.
* marshal.pl: Don't create code for things which are now
in the new `glibtop-backend-common' backend.

View File

@@ -60,7 +60,7 @@ sub output {
$features{++$feature_count} = $orig;
return if $orig =~ /^@//;
return if $orig =~ /^@/;
if ($retval eq 'retval') {
$retval_param = '&retval';
@@ -163,6 +163,7 @@ sub output {
print $total_code;
}
$init_hook_code = '';
$call_vector_code = '';
for ($nr = 1; $nr <= $feature_count; $nr++) {
$feature = $features{$nr};
@@ -174,10 +175,25 @@ for ($nr = 1; $nr <= $feature_count; $nr++) {
(qq[\#if GLIBTOP_SUID_%s\n\tNULL,\n\#else\n\t_glibtop_get_%s_c,\n\#endif\n],
&toupper($feature), $feature);
}
if (!($feature =~ /^@/)) {
$init_hook_code .= sprintf
(qq[\#if !GLIBTOP_SUID_%s\n\tglibtop_init_%s_s,\n\#endif\n],
&toupper($feature), $feature);
}
}
$init_hook_code .= sprintf (qq[\tNULL\n]);
chop $init_hook_code;
chop $call_vector_code;
print 'glibtop_call_vector glibtop_backend_sysdeps_call_vector = {';
print $call_vector_code;
print '};';
print '';
print 'glibtop_init_func_t _glibtop_init_hook_s [] = {';
print $init_hook_code;
print '};';
print '';