Back to index

tetex-bin  3.0
win32main.c
Go to the documentation of this file.
00001 #include "config.h"
00002 
00003 /* The entry point: set up for reading the command line, which will
00004    happen in `topenin', then call the main body.  Public domain. */
00005 
00006 extern TEXDLL void mainbody P1H(void);
00007 extern TEXDLL void maininit P2H(int, string *);
00008 
00009 int
00010 main P2C(int, ac,  string *, av)
00011 {
00012 #ifdef __EMX__
00013   _wildcard (&ac, &av);
00014   _response (&ac, &av);
00015 #endif
00016 
00017 #if defined(WIN32)
00018   /* if _DEBUG is not defined, these macros will result in nothing. */
00019    SETUP_CRTDBG;
00020    /* Set the debug-heap flag so that freed blocks are kept on the
00021     linked list, to catch any inadvertent use of freed memory */
00022    SET_CRT_DEBUG_FIELD( _CRTDBG_DELAY_FREE_MEM_DF );
00023 #endif
00024 
00025   maininit(ac, av);
00026 
00027   /* Call the real main program.  */
00028   mainbody ();
00029   return EXIT_SUCCESS;
00030 }