From d5836a5d0f7d04b47a0eb9c6bab4d793e2c61ea0 Mon Sep 17 00:00:00 2001 From: mquinson Date: Mon, 26 Apr 2004 10:14:42 +0000 Subject: [PATCH] Generate code compatible with the new interfaces git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@85 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/gras_stub_generator | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/examples/gras_stub_generator b/examples/gras_stub_generator index 63828eb4ec..0914718d07 100755 --- a/examples/gras_stub_generator +++ b/examples/gras_stub_generator @@ -60,7 +60,7 @@ foreach (keys %process) { int launch_$_(int argc, char *argv[]) { if (gras_process_init()) exit(1); $_(argc,argv); - if (gras_process_finalize()) exit(1); + if (gras_process_exit()) exit(1); return 0; } @@ -81,7 +81,7 @@ int main (int argc,char *argv[]) { /* Simulation setting */ MSG_global_init(); MSG_set_verbosity(MSG_SILENT); - MSG_set_channel_number(MAX_CHANNEL); + MSG_set_channel_number(GRAS_MAX_CHANNEL); MSG_create_environment(argv[1]); /* Application deployment */ @@ -115,11 +115,6 @@ $warn #include #include -/* signal handler for SIGPIPE from NWS */ -void SocketFailure(int sig); -/* minimum needed from diagnostic.h for initialization, so that we don''t have to ship this file */ -typedef enum {DIAGLOG, DIAGINFO, DIAGWARN, DIAGERROR, DIAGFATAL, DIAGDEBUG} DiagLevels; -void DirectDiagnostics(DiagLevels level, FILE *whereTo); /* user code */ int $pname(int argc, char *argv[]); @@ -128,19 +123,12 @@ $warn int main(int argc, char *argv[]){ int errcode; - DirectDiagnostics(DIAGDEBUG, stdout); - DirectDiagnostics(DIAGINFO, stdout); - DirectDiagnostics(DIAGLOG, stdout); - DirectDiagnostics(DIAGWARN, stderr); - DirectDiagnostics(DIAGERROR, stderr); - DirectDiagnostics(DIAGFATAL, stderr); - - signal(SIGPIPE, SocketFailure); - + gras_init(&argc,argv); gras_process_init(); errcode=$pname(argc,argv); - gras_process_finalize(); - + gras_process_exit(); + gras_exit(); + return errcode; } -- 2.20.1