Commit c1811f0c authored by Benoit Perrot's avatar Benoit Perrot
Browse files

Index: ChangeLog

from  Benoit Perrot <benoit@lrde.epita.fr>

	* monoburg.c (emit_header): Extract includes emission.
parent 4170c488
2004-11-07 Benoit Perrot <benoit@lrde.epita.fr>
* monoburg.c (emit_header): Extract includes emission.
2004-11-07 Benoit Perrot <benoit@lrde.epita.fr>
* monoburg.c (emit_state): Do not forward define MBState type.
......
......@@ -266,15 +266,26 @@ term_compare_func (Term *t1, Term *t2)
}
static void
emit_header ()
emit_includes ()
{
GList *l;
if (with_glib) {
output ("#include <glib.h>\n");
output ("\n");
}
else {
output ("# include <stdio.h>\n");
output ("# include <stdlib.h>\n");
output ("# include <stdarg.h>\n");
output ("# include <assert.h>\n");
}
}
static void
emit_header ()
{
GList *l;
if (!with_glib) {
output ("#ifndef guint8\n");
output ("# define guint8 unsigned char\n");
output ("#endif /* !guint8 */\n");
......@@ -286,11 +297,6 @@ emit_header ()
output ("#endif /* !gpointer */\n");
output ("\n");
output ("#if !defined(g_new) || !defined(g_new0)\n");
output ("# include <stdio.h>\n");
output ("# include <stdlib.h>\n");
output ("#endif /* !defined(g_new) || !defined(g_new0) */\n");
output ("#ifndef g_new\n");
output ("static void *\n");
output ("mono_burg_xmalloc_ (size_t size)\n");
......@@ -325,11 +331,6 @@ emit_header ()
output ("#endif /* !g_new0 */\n");
output ("\n");
output ("#if !defined(g_error) || !defined(g_warning)\n");
output ("# include <stdio.h>\n");
output ("# include <stdarg.h>\n");
output ("#endif /* !defined(g_error) || !defined(g_warning) */\n");
output ("#ifndef g_error\n");
output ("static int\n");
output ("mono_burg_error_ (const char *format, ...)\n");
......@@ -366,7 +367,6 @@ emit_header ()
output ("\n");
output ("#ifndef g_assert\n");
output ("# include <assert.h>\n");
output ("# define g_assert assert\n");
output ("#endif /* !g_assert */\n");
output ("\n");
......@@ -1170,6 +1170,7 @@ main (int argc, char *argv [])
} else
outputfd = stdout;
emit_includes ();
if (infiles) {
GList *l = infiles;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment