diff Gui/interface.h @ 4852:534e7b5aaadb

mem corruption bug fix.
author pontscho
date Sun, 24 Feb 2002 21:57:16 +0000
parents ad868aae2a5c
children 13262bd21965
line wrap: on
line diff
--- a/Gui/interface.h	Sun Feb 24 21:27:47 2002 +0000
+++ b/Gui/interface.h	Sun Feb 24 21:57:16 2002 +0000
@@ -95,6 +95,7 @@
 
 #define guiXEvent 0
 #define guiCEvent 1
+#define guiIEvent 2
 
 extern void guiInit( int argc,char* argv[], char *envp[] );
 extern void guiGetEvent( int type,char * arg );
@@ -102,7 +103,7 @@
 
 #define gstrdup( s,ss ) { s=malloc( strlen( ss ) + 3 ); strcpy( s,ss ); }
 
-#define guiSetFilename( s,n ) { s=strdup( n ); }
+#define guiSetFilename( s,n ) { if ( s ) free( s ); s=strdup( n ); }
 
 #define guiSetDF( s,d,n )                       \
  {                                              \