A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Split simgrid_lua.c in one source file per module
[simgrid.git]
/
src
/
bindings
/
lua
/
lua_stub_generator.c
diff --git
a/src/bindings/lua/lua_stub_generator.c
b/src/bindings/lua/lua_stub_generator.c
index
58dfda9
..
16d8f0b
100644
(file)
--- a/
src/bindings/lua/lua_stub_generator.c
+++ b/
src/bindings/lua/lua_stub_generator.c
@@
-7,6
+7,9
@@
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid_lua.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "simgrid_lua.h"
+#include "xbt.h"
+#include <stdio.h>
+#include <string.h>
#define WARN "/***********\n * DO NOT EDIT! THIS FILE HAS BEEN AUTOMATICALLY GENERATED FROM %s BY gras_stub_generator\n ***********/\n"
#define SIM_SOURCENAME "_%s_simulator.c"
#define WARN "/***********\n * DO NOT EDIT! THIS FILE HAS BEEN AUTOMATICALLY GENERATED FROM %s BY gras_stub_generator\n ***********/\n"
#define SIM_SOURCENAME "_%s_simulator.c"
@@
-24,8
+27,6
@@
#define MAKEFILE_FILENAME_REMOTE "%s.Makefile.remote"
#define DEPLOYMENT "%s.deploy.sh"
#define MAKEFILE_FILENAME_REMOTE "%s.Makefile.remote"
#define DEPLOYMENT "%s.deploy.sh"
-char *warning = NULL;
-
/**********************************************/
/**** Generate the file for the simulator *****/
/**********************************************/
/**********************************************/
/**** Generate the file for the simulator *****/
/**********************************************/
@@
-69,7
+70,9
@@
const char *SIM_MAIN_POSTEMBULE = "\n"
"\n"
" /* cleanup the place */\n"
" gras_clean();\n"
"\n"
" /* cleanup the place */\n"
" gras_clean();\n"
- " if (gras_log)\n" " free(gras_log);\n" " return 0;\n" "}\n";
+ " free(gras_log);\n"
+ " return 0;\n"
+ "}\n";
/***************************************
/***************************************
@@
-90,7
+93,7
@@
void generate_sim(const char *project)
OUT = fopen(filename, "w");
OUT = fopen(filename, "w");
- xbt_assert
1
(OUT, "Unable to open %s for writing", filename);
+ xbt_assert(OUT, "Unable to open %s for writing", filename);
fprintf(OUT, "%s", SIM_PREEMBULE);
fprintf(OUT, "%s", SIM_PREEMBULE);
@@
-149,7
+152,7
@@
void generate_rl(const char *project)
sprintf(filename, RL_SOURCENAME, project, key);
OUT = fopen(filename, "w");
sprintf(filename, RL_SOURCENAME, project, key);
OUT = fopen(filename, "w");
- xbt_assert
1
(OUT, "Unable to open %s for writing", filename);
+ xbt_assert(OUT, "Unable to open %s for writing", filename);
fprintf(OUT, "/* specific to Borland Compiler */\n"
"#ifdef __BORLANDC__\n"
fprintf(OUT, "/* specific to Borland Compiler */\n"
"#ifdef __BORLANDC__\n"
@@
-190,7
+193,7
@@
void generate_makefile_am(const char *project)
sprintf(filename, MAKEFILE_FILENAME_AM, project);
OUT = fopen(filename, "w");
sprintf(filename, MAKEFILE_FILENAME_AM, project);
OUT = fopen(filename, "w");
- xbt_assert
1
(OUT, "Unable to open %s for writing", filename);
+ xbt_assert(OUT, "Unable to open %s for writing", filename);
fprintf(OUT, "# AUTOMAKE variable definition\n");
fprintf(OUT, "INCLUDES= @CFLAGS_SimGrid@\n\n");
fprintf(OUT, "# AUTOMAKE variable definition\n");
fprintf(OUT, "INCLUDES= @CFLAGS_SimGrid@\n\n");
@@
-256,7
+259,7
@@
void generate_makefile_local(const char *project)
sprintf(filename, MAKEFILE_FILENAME_LOCAL, project);
OUT = fopen(filename, "w");
sprintf(filename, MAKEFILE_FILENAME_LOCAL, project);
OUT = fopen(filename, "w");
- xbt_assert
1
(OUT, "Unable to open %s for writing", filename);
+ xbt_assert(OUT, "Unable to open %s for writing", filename);
free(filename);
fprintf(OUT,
free(filename);
fprintf(OUT,