summaryrefslogtreecommitdiff
path: root/src/wmain.c
blob: 6cf3e579738f781d73ae17c3cc5ffcb748646214 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <windows.h>
#include <stdlib.h> /* declaration of __argc and __argv */

extern int main(int, char **);

int PASCAL WinMain(HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int ncmdshow)
{
  int rc;
  
  extern int __argc;     /* this seems to work for all the compilers we tested, except Watcom compilers */
  extern char** __argv;
  
  rc = main(__argc, __argv);
  
  return rc;
}