Add forgotten files 1.4.70b
[polyglot.git] / gui.c
diff --git a/gui.c b/gui.c
index 9dbe6f5..9a0d102 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -8,10 +8,6 @@
 #include "gui.h"
 #include "main.h"
 
-// constants
-
-static const int StringSize = 4096;
-
 // variables
 
 gui_t GUI[1];
@@ -52,7 +48,7 @@ void gui_init(gui_t *gui){
 #ifdef SIGPIPE
     signal(SIGPIPE,sig_pipe);
 #endif
-    pipex_open(gui->pipex,"GUI",NULL);
+    pipex_open(gui->pipex,"GUI",NULL,NULL);
 }
 
 
@@ -84,17 +80,14 @@ void gui_get(gui_t * gui, char *string) {
 
 void gui_send(gui_t * gui, const char format[], ...) {
 
-   va_list arg_list;
-   char string[StringSize];
+   char string[FormatBufferSize];
 
    ASSERT(gui!=NULL);
    ASSERT(format!=NULL);
 
    // format
 
-   va_start(arg_list,format);
-   vsprintf(string,format,arg_list);
-   va_end(arg_list);
+   CONSTRUCT_ARG_STRING(format,string);
 
    // send