X-Git-Url: http://winboard.nl/cgi-bin?p=polyglot.git;a=blobdiff_plain;f=gui.c;h=9a0d102922195ee046350e97659aebf9bdea9d1a;hp=9dbe6f5867f4f136c8a16d499adc552ad3076a44;hb=HEAD;hpb=e15efca6667b2673b4c1a5879a6917eab6800e58 diff --git a/gui.c b/gui.c index 9dbe6f5..9a0d102 100644 --- 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