The R Project SVN R

Rev

Rev 42592 | Rev 50913 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 42592 Rev 42593
Line 47... Line 47...
47
 *  If it is two, the environ parameter will also be passed.
47
 *  If it is two, the environ parameter will also be passed.
48
 *  We define the main function as returning void, so this
48
 *  We define the main function as returning void, so this
49
 *  method ignores any value returned from main.
49
 *  method ignores any value returned from main.
50
 */
50
 */
51
 
51
 
52
#define PASS_ARGS 2
52
#define PASS_ARGS 1 /* formerly in graphapp/internal.h */
53
 
53
 
54
int PASCAL
54
int PASCAL
55
WinMain (HINSTANCE Instance, HINSTANCE PrevInstance, LPSTR CmdLine,
55
WinMain (HINSTANCE Instance, HINSTANCE PrevInstance, LPSTR CmdLine,
56
	 int CmdShow)
56
	 int CmdShow)
57
{
57
{
58
    char **dummy_environ;
-
 
59
#if (PASS_ARGS > 1) /* define argc, argv, environ */
58
#if (PASS_ARGS > 1) /* define argc, argv, environ */
60
    extern int _argc;
59
    extern int _argc;
61
    extern char **_argv;
60
    extern char **_argv;
62
    extern char **environ;
61
    extern char **environ;
63
    extern void AppMain(int argc, char **argv, char **envp);
62
    extern void AppMain(int argc, char **argv, char **envp);
Line 68... Line 67...
68
#else /* else pass zero and NULL to main */
67
#else /* else pass zero and NULL to main */
69
    extern void AppMain(int argc, char **argv);
68
    extern void AppMain(int argc, char **argv);
70
#endif /* end arg declarations */
69
#endif /* end arg declarations */
71
 
70
 
72
#ifdef WIN64
71
#ifdef WIN64
-
 
72
    char **dummy_environ;
73
    /* '1' means globbing is enabled */
73
    /* '1' means globbing is enabled */
74
    (void) __getmainargs (&_argc, &_argv, &dummy_environ, 1);
74
    (void) __getmainargs (&_argc, &_argv, &dummy_environ, 1);
75
#endif
75
#endif
76
 
76
 
77
    GA_startgraphapp(Instance, PrevInstance, CmdShow);
77
    GA_startgraphapp(Instance, PrevInstance, CmdShow);