]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
Use new console system everywhere.
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index ef1841f713f73948bad62a805dfbb80618a4831e..c8440cc6be007a92c9233de05f28619fda2a96e8 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -532,6 +532,43 @@ uint32_t code_genstring   (const char *string);
 uint32_t code_cachedstring(const char *string);
 qcint    code_alloc_field (size_t qcsize);
 
+/*===================================================================*/
+/*============================ con.c ================================*/
+/*===================================================================*/
+enum {
+    CON_BLACK   = 30,
+    CON_RED,
+    CON_GREEN,
+    CON_BROWN,
+    CON_BLUE,
+    CON_MAGENTA,
+    CON_CYAN ,
+    CON_WHITE
+};
+
+/* message level */
+enum {
+    LVL_MSG,
+    LVL_WARNING,
+    LVL_ERROR
+};
+
+
+void con_vprintmsg (int level, const char *name, size_t line, const char *msgtype, const char *msg, va_list ap);
+void con_printmsg  (int level, const char *name, size_t line, const char *msgtype, const char *msg, ...);
+void con_cvprintmsg(void *ctx, int lvl, const char *msgtype, const char *msg, va_list ap);
+void con_cprintmsg (void *ctx, int lvl, const char *msgtype, const char *msg, ...);
+
+void con_close();
+void con_color(int state);
+void con_init ();
+void con_reset();
+int  con_change(const char *out, const char *err);
+int  con_verr  (const char *fmt, va_list va);
+int  con_vout  (const char *fmt, va_list va);
+int  con_err   (const char *fmt, ...);
+int  con_out   (const char *fmt, ...);
+
 /*===================================================================*/
 /*========================= assembler.c =============================*/
 /*===================================================================*/
@@ -609,10 +646,6 @@ static const struct {
 
     { "END"       , 0, 3 } /* virtual assembler instruction */
 };
-
-void asm_init (const char *, FILE **);
-void asm_close(FILE *);
-void asm_parse(FILE *);
 /*===================================================================*/
 /*============================= ast.c ===============================*/
 /*===================================================================*/
@@ -914,41 +947,16 @@ prog_section_def* prog_getdef    (qc_program *prog, qcint off);
 qcany*            prog_getedict  (qc_program *prog, qcint e);
 qcint             prog_tempstring(qc_program *prog, const char *_str);
 
-/*===================================================================*/
-/*===================== error.c message printer =====================*/
-/*===================================================================*/
-
-#ifndef WIN32
-enum {
-    CON_BLACK   = 30,
-    CON_RED,
-    CON_GREEN,
-    CON_BROWN,
-    CON_BLUE,
-    CON_MAGENTA,
-    CON_CYAN ,
-    CON_WHITE
-};
-#endif
-enum {
-    LVL_MSG,
-    LVL_WARNING,
-    LVL_ERROR
-};
-
-void vprintmsg (int level, const char *name, size_t line, const char *msgtype, const char *msg, va_list ap);
-void printmsg  (int level, const char *name, size_t line, const char *msgtype, const char *msg, ...);
-void cvprintmsg(lex_ctx ctx, int lvl, const char *msgtype, const char *msg, va_list ap);
-void cprintmsg (lex_ctx ctx, int lvl, const char *msgtype, const char *msg, ...);
 
 /*===================================================================*/
 /*===================== parser.c commandline ========================*/
 /*===================================================================*/
 
-bool parser_init   ();
-bool parser_compile(const char *filename);
-bool parser_finish (const char *output);
-void parser_cleanup();
+bool parser_init          ();
+bool parser_compile_file  (const char *filename);
+bool parser_compile_string(const char *name, const char *str);
+bool parser_finish        (const char *output);
+void parser_cleanup       ();
 
 /*===================================================================*/
 /*======================= main.c commandline ========================*/