/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "lua_stub_generator.h"
-
+#include "simgrid_lua.h"
+#include "xbt.h"
#include <stdio.h>
-#include "xbt/sysdep.h"
-#include "xbt/function_types.h"
-#include "xbt/log.h"
-#include "surf/surfxml_parse.h"
-#include "surf/surf.h"
-#include "portable.h" /* Needed for the time of the SIMIX convertion */
-#include <stdarg.h>
-
-#include <lua.h>
-#include <lauxlib.h>
-#include <lualib.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 MAKEFILE_FILENAME_REMOTE "%s.Makefile.remote"
#define DEPLOYMENT "%s.deploy.sh"
-char *warning = NULL;
-
/**********************************************/
/**** Generate the file for the simulator *****/
/**********************************************/
"\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";
/***************************************
OUT = fopen(filename, "w");
- xbt_assert1(OUT, "Unable to open %s for writing", filename);
+ xbt_assert(OUT, "Unable to open %s for writing", filename);
fprintf(OUT, "%s", SIM_PREEMBULE);
sprintf(filename, RL_SOURCENAME, project, key);
OUT = fopen(filename, "w");
- xbt_assert1(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"
sprintf(filename, MAKEFILE_FILENAME_AM, project);
OUT = fopen(filename, "w");
- xbt_assert1(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");
sprintf(filename, MAKEFILE_FILENAME_LOCAL, project);
OUT = fopen(filename, "w");
- xbt_assert1(OUT, "Unable to open %s for writing", filename);
+ xbt_assert(OUT, "Unable to open %s for writing", filename);
free(filename);
fprintf(OUT,
"\t$(CC) $(INCLUDES) $(DEFS) $(CFLAGS) -c -o $@ $<\n" "\n");
fprintf(OUT,
- "## Rules for tarballs and cleaning\n"
+ "## Rules for tarballs and cleaning\n"
"DIST_FILES= $(EXTRA_DIST) $(GENERATED_C_FILES) $(PRECIOUS_C_FILES) "
MAKEFILE_FILENAME_LOCAL " " /*MAKEFILE_FILENAME_REMOTE */ "\n"
"distdir: $(DIST_FILES)\n" "\trm -rf $(DISTDIR)\n"