version 1.1, 2000/01/09 17:01:19 |
version 1.1.1.3, 2003/09/15 07:09:40 |
Line 95 LPSTR szMenuName; |
|
Line 95 LPSTR szMenuName; |
|
#define HELPFILE "wgnuplot.hlp" |
#define HELPFILE "wgnuplot.hlp" |
#endif |
#endif |
|
|
extern char version[]; |
extern char gnuplot_version[]; |
extern char patchlevel[]; |
extern char gnuplot_patchlevel[]; |
extern char date[]; |
extern char gnuplot_date[]; |
/*extern char *authors[];*/ |
/*extern char *authors[];*/ |
char *authors[]={ |
char *authors[]={ |
"Colin Kelly", |
"Colin Kelly", |
|
|
int CALLBACK WINEXPORT |
int CALLBACK WINEXPORT |
ShutDown(void) |
ShutDown(void) |
{ |
{ |
|
#if 0 /* HBB 19990505: try to avoid crash on clicking 'close' */ |
|
/* Problem was that WinExit was called *twice*, once directly, |
|
* and again via 'atexit'. This caused problems by double-freeing |
|
* of GlobalAlloc-ed memory inside TextClose() */ |
|
/* Caveat: relies on atexit() working properly */ |
WinExit(); |
WinExit(); |
|
#endif |
exit(0); |
exit(0); |
return 0; |
return 0; |
} |
} |
Line 158 int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPre |
|
Line 164 int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPre |
|
LPSTR tail; |
LPSTR tail; |
|
|
#ifdef __MSC__ /* MSC doesn't give us _argc and _argv[] so ... */ |
#ifdef __MSC__ /* MSC doesn't give us _argc and _argv[] so ... */ |
#define MAXCMDTOKENS 128 |
# ifdef WIN32 /* WIN32 has __argc and __argv */ |
|
# define _argv __argv |
|
# define _argc __argc |
|
# else |
|
# define MAXCMDTOKENS 128 |
int _argc=0; |
int _argc=0; |
LPSTR _argv[MAXCMDTOKENS]; |
LPSTR _argv[MAXCMDTOKENS]; |
_argv[_argc] = "wgnuplot.exe"; |
_argv[_argc] = "wgnuplot.exe"; |
_argv[++_argc] = _fstrtok( lpszCmdLine, " "); |
_argv[++_argc] = _fstrtok( lpszCmdLine, " "); |
while (_argv[_argc] != NULL) |
while (_argv[_argc] != NULL) |
_argv[++_argc] = _fstrtok( NULL, " "); |
_argv[++_argc] = _fstrtok( NULL, " "); |
|
# endif /* WIN32 */ |
#endif /* __MSC__ */ |
#endif /* __MSC__ */ |
|
|
szModuleName = (LPSTR)farmalloc(MAXSTR+1); |
szModuleName = (LPSTR)farmalloc(MAXSTR+1); |
Line 213 int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPre |
|
Line 224 int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPre |
|
textwin.AboutText = (LPSTR)farmalloc(1024); |
textwin.AboutText = (LPSTR)farmalloc(1024); |
CheckMemory(textwin.AboutText); |
CheckMemory(textwin.AboutText); |
sprintf(textwin.AboutText,"Version %s\nPatchlevel %s\nLast Modified %s\n%s\n%s, %s and many others", |
sprintf(textwin.AboutText,"Version %s\nPatchlevel %s\nLast Modified %s\n%s\n%s, %s and many others", |
version, patchlevel, date, gnuplot_copyright, authors[1], authors[0]); |
gnuplot_version, gnuplot_patchlevel, gnuplot_date, |
|
gnuplot_copyright, authors[1], authors[0]); |
textwin.AboutText = (LPSTR)farrealloc(textwin.AboutText, _fstrlen(textwin.AboutText)+1); |
textwin.AboutText = (LPSTR)farrealloc(textwin.AboutText, _fstrlen(textwin.AboutText)+1); |
CheckMemory(textwin.AboutText); |
CheckMemory(textwin.AboutText); |
|
|
Line 448 size_t MyFRead(void *ptr, size_t size, size_t n, FILE |
|
Line 460 size_t MyFRead(void *ptr, size_t size, size_t n, FILE |
|
#define MAX_PRT_LEN 256 |
#define MAX_PRT_LEN 256 |
static char win_prntmp[MAX_PRT_LEN+1]; |
static char win_prntmp[MAX_PRT_LEN+1]; |
|
|
extern GW graphwin; |
|
|
|
FILE * |
FILE * |
open_printer() |
open_printer() |
{ |
{ |