| version 1.3, 2002/08/29 01:24:23 |
version 1.4, 2002/09/06 14:59:15 |
| Line 273 void XGInit(int argc, char **argv, doubl |
|
| Line 273 void XGInit(int argc, char **argv, doubl |
|
| } |
} |
| else if (!WasDumpFileGiven) { |
else if (!WasDumpFileGiven) { |
| theEPSFile = (char *) malloc( |
theEPSFile = (char *) malloc( |
| (strlen(theInputFile) + strlen(theEPSExtension)) * sizeof(char)); |
(strlen(theInputFile) + strlen(theEPSExtension) + 1) * sizeof(char)); |
| theDumpFile = (char *) malloc( |
theDumpFile = (char *) malloc( |
| (strlen(theInputFile) + strlen(theEPSExtension)) * sizeof(char)); |
(strlen(theInputFile) + strlen(theEPSExtension) + 1) * sizeof(char)); |
| if (theEPSFile == NULL || theDumpFile == NULL) { |
if (theEPSFile == NULL || theDumpFile == NULL) { |
| fprintf(stderr, "Not enought memory!\n"); |
fprintf(stderr, "Not enought memory!\n"); |
| exit(1); |
exit(1); |
| Line 287 void XGInit(int argc, char **argv, doubl |
|
| Line 287 void XGInit(int argc, char **argv, doubl |
|
| } |
} |
| else { |
else { |
| theEPSFile = (char *) malloc( |
theEPSFile = (char *) malloc( |
| (findlen(theInputFile) + strlen(theEPSExtension)) * sizeof(char)); |
(findlen(theInputFile) + strlen(theEPSExtension) + 1) * sizeof(char)); |
| strncpy(theEPSFile, theInputFile, findlen(theInputFile)); |
strncpy(theEPSFile, theInputFile, findlen(theInputFile)); |
| strcat(theEPSFile, theEPSExtension); |
strcat(theEPSFile, theEPSExtension); |
| } |
} |
| Line 296 void XGInit(int argc, char **argv, doubl |
|
| Line 296 void XGInit(int argc, char **argv, doubl |
|
| /* Initializing the Window array */ |
/* Initializing the Window array */ |
| |
|
| sizeOfWindowArray = 10; |
sizeOfWindowArray = 10; |
| theWindowArray = (WindowType *)malloc(sizeof(WindowType)*sizeOfWindowArray); |
theWindowArray = (WindowType *) malloc(sizeof(WindowType) * sizeOfWindowArray); |
| numberOfWindows = 0; |
numberOfWindows = 0; |
| sizeIncrement = 10; |
sizeIncrement = 10; |
| |
|
| Line 548 void XGInitTclTk(void) |
|
| Line 548 void XGInitTclTk(void) |
|
| |
|
| interp = Tcl_CreateInterp(); |
interp = Tcl_CreateInterp(); |
| Tcl_Init(interp); |
Tcl_Init(interp); |
| str2 = (char *) malloc((strlen(ReqDisp) + strlen("-display ")) * sizeof(char)); |
str2 = (char *) malloc((strlen(ReqDisp) + strlen("-display ") + 1) * sizeof(char)); |
| if (str2 != NULL) |
if (str2 != NULL) |
| sprintf(str2, "-display %s", ReqDisp); |
sprintf(str2, "-display %s", ReqDisp); |
| else { |
else { |
| Line 557 void XGInitTclTk(void) |
|
| Line 557 void XGInitTclTk(void) |
|
| } |
} |
| Tcl_SetVar(interp, "argv", str2, 0); |
Tcl_SetVar(interp, "argv", str2, 0); |
| free(str2); |
free(str2); |
| |
|
| Tk_Init(interp); |
Tk_Init(interp); |
| mainWindow = Tk_MainWindow(interp); |
mainWindow = Tk_MainWindow(interp); |
| |
|