summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/lib/win32main.c
blob: aa1c1f865d7ca157f9628279b72cdd4d645dafa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "config.h"

/* The entry point: set up for reading the command line, which will
   happen in `topenin', then call the main body.  Public domain. */

extern TEXDLL void mainbody P1H(void);
extern TEXDLL void maininit P2H(int, string *);

int
main P2C(int, ac,  string *, av)
{
#ifdef __EMX__
  _wildcard (&ac, &av);
  _response (&ac, &av);
#endif

#if defined(WIN32)
  /* if _DEBUG is not defined, these macros will result in nothing. */
   SETUP_CRTDBG;
   /* Set the debug-heap flag so that freed blocks are kept on the
    linked list, to catch any inadvertent use of freed memory */
   SET_CRT_DEBUG_FIELD( _CRTDBG_DELAY_FREE_MEM_DF );
#endif

  maininit(ac, av);

  /* Call the real main program.  */
  mainbody ();
  return EXIT_SUCCESS;
}