Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 1 | /*********************************************************** |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 2 | Copyright (c) 2000, BeOpen.com. |
| 3 | Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
| 4 | Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
| 5 | All rights reserved. |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 6 | |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 7 | See the file "Misc/COPYRIGHT" for information on usage and |
| 8 | redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 9 | ******************************************************************/ |
| 10 | |
| 11 | /* Python interpreter main program */ |
| 12 | |
| 13 | #include "Python.h" |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 14 | #include "osdefs.h" |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 15 | |
Guido van Rossum | 66a7013 | 1996-12-09 18:46:58 +0000 | [diff] [blame] | 16 | #ifdef HAVE_UNISTD_H |
| 17 | #include <unistd.h> |
| 18 | #endif |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 19 | |
Guido van Rossum | 3e7ae7a | 1997-01-17 22:05:38 +0000 | [diff] [blame] | 20 | #ifdef MS_WINDOWS |
| 21 | #include <fcntl.h> |
| 22 | #endif |
| 23 | |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 24 | #if defined(PYOS_OS2) || defined(MS_WINDOWS) |
| 25 | #define PYTHONHOMEHELP "<prefix>\\lib" |
| 26 | #else |
| 27 | #define PYTHONHOMEHELP "<prefix>/python1.5" |
| 28 | #endif |
| 29 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 30 | /* Interface to getopt(): */ |
| 31 | extern int optind; |
| 32 | extern char *optarg; |
| 33 | extern int getopt(); /* PROTO((int, char **, char *)); -- not standardized */ |
| 34 | |
| 35 | |
Guido van Rossum | ac56b03 | 1996-07-21 02:33:38 +0000 | [diff] [blame] | 36 | /* For Py_GetArgcArgv(); set by main() */ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 37 | static char **orig_argv; |
| 38 | static int orig_argc; |
| 39 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 40 | /* Short usage message (with %s for argv0) */ |
| 41 | static char *usage_line = |
Guido van Rossum | 6b86a42 | 1999-01-28 15:07:47 +0000 | [diff] [blame] | 42 | "usage: %s [option] ... [-c cmd | file | -] [arg] ...\n"; |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 43 | |
| 44 | /* Long usage message, split into parts < 512 bytes */ |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 45 | static char *usage_top = "\ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 46 | Options and arguments (and corresponding environment variables):\n\ |
| 47 | -d : debug output from parser (also PYTHONDEBUG=x)\n\ |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 48 | -i : inspect interactively after running script, (also PYTHONINSPECT=x)\n\ |
Guido van Rossum | bba92ca | 1998-04-10 19:39:15 +0000 | [diff] [blame] | 49 | and force prompts, even if stdin does not appear to be a terminal\n\ |
Guido van Rossum | e7adf3e | 1998-10-07 14:50:06 +0000 | [diff] [blame] | 50 | -O : optimize generated bytecode (a tad; also PYTHONOPTIMIZE=x)\n\ |
Guido van Rossum | 6b86a42 | 1999-01-28 15:07:47 +0000 | [diff] [blame] | 51 | -OO : remove doc-strings in addition to the -O optimizations\n\ |
Guido van Rossum | 7922bd7 | 1997-08-29 22:34:47 +0000 | [diff] [blame] | 52 | -S : don't imply 'import site' on initialization\n\ |
Guido van Rossum | bba92ca | 1998-04-10 19:39:15 +0000 | [diff] [blame] | 53 | -t : issue warnings about inconsistent tab usage (-tt: issue errors)\n\ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 54 | "; |
Guido van Rossum | 7922bd7 | 1997-08-29 22:34:47 +0000 | [diff] [blame] | 55 | static char *usage_mid = "\ |
Guido van Rossum | bba92ca | 1998-04-10 19:39:15 +0000 | [diff] [blame] | 56 | -u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\ |
Guido van Rossum | c15a9a1 | 2000-05-01 17:54:33 +0000 | [diff] [blame] | 57 | -U : Unicode literals: treats '...' literals like u'...'\n\ |
Guido van Rossum | 7922bd7 | 1997-08-29 22:34:47 +0000 | [diff] [blame] | 58 | -v : verbose (trace import statements) (also PYTHONVERBOSE=x)\n\ |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 59 | -x : skip first line of source, allowing use of non-Unix forms of #!cmd\n\ |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 60 | -c cmd : program passed in as string (terminates option list)\n\ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 61 | file : program read from script file\n\ |
| 62 | - : program read from stdin (default; interactive mode if a tty)\n\ |
Guido van Rossum | 7922bd7 | 1997-08-29 22:34:47 +0000 | [diff] [blame] | 63 | "; |
| 64 | static char *usage_bot = "\ |
Guido van Rossum | bba92ca | 1998-04-10 19:39:15 +0000 | [diff] [blame] | 65 | arg ...: arguments passed to program in sys.argv[1:]\n\ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 66 | Other environment variables:\n\ |
| 67 | PYTHONSTARTUP: file executed on interactive startup (no default)\n\ |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 68 | PYTHONPATH : '%c'-separated list of directories prefixed to the\n\ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 69 | default module search path. The result is sys.path.\n\ |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 70 | PYTHONHOME : alternate <prefix> directory (or <prefix>%c<exec_prefix>).\n\ |
| 71 | The default module search path uses %s.\n\ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 72 | "; |
| 73 | |
| 74 | |
| 75 | /* Main program */ |
| 76 | |
Guido van Rossum | 9c1201f | 1998-12-07 14:28:47 +0000 | [diff] [blame] | 77 | DL_EXPORT(int) |
Guido van Rossum | ed52aac | 1997-07-19 19:20:32 +0000 | [diff] [blame] | 78 | Py_Main(argc, argv) |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 79 | int argc; |
| 80 | char **argv; |
| 81 | { |
| 82 | int c; |
| 83 | int sts; |
| 84 | char *command = NULL; |
| 85 | char *filename = NULL; |
| 86 | FILE *fp = stdin; |
| 87 | char *p; |
| 88 | int inspect = 0; |
| 89 | int unbuffered = 0; |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 90 | int skipfirstline = 0; |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 91 | int stdin_is_interactive = 0; |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 92 | |
Guido van Rossum | ac56b03 | 1996-07-21 02:33:38 +0000 | [diff] [blame] | 93 | orig_argc = argc; /* For Py_GetArgcArgv() */ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 94 | orig_argv = argv; |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 95 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 96 | if ((p = getenv("PYTHONINSPECT")) && *p != '\0') |
| 97 | inspect = 1; |
| 98 | if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0') |
| 99 | unbuffered = 1; |
| 100 | |
Guido van Rossum | c15a9a1 | 2000-05-01 17:54:33 +0000 | [diff] [blame] | 101 | while ((c = getopt(argc, argv, "c:diOStuUvxX")) != EOF) { |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 102 | if (c == 'c') { |
| 103 | /* -c is the last option; following arguments |
| 104 | that look like options are left for the |
| 105 | the command to interpret. */ |
| 106 | command = malloc(strlen(optarg) + 2); |
| 107 | if (command == NULL) |
| 108 | Py_FatalError( |
| 109 | "not enough memory to copy -c argument"); |
| 110 | strcpy(command, optarg); |
| 111 | strcat(command, "\n"); |
| 112 | break; |
| 113 | } |
| 114 | |
| 115 | switch (c) { |
| 116 | |
| 117 | case 'd': |
| 118 | Py_DebugFlag++; |
| 119 | break; |
| 120 | |
| 121 | case 'i': |
| 122 | inspect++; |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 123 | Py_InteractiveFlag++; |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 124 | break; |
| 125 | |
Guido van Rossum | 7614da6 | 1997-03-03 19:14:45 +0000 | [diff] [blame] | 126 | case 'O': |
| 127 | Py_OptimizeFlag++; |
| 128 | break; |
| 129 | |
Guido van Rossum | 7922bd7 | 1997-08-29 22:34:47 +0000 | [diff] [blame] | 130 | case 'S': |
| 131 | Py_NoSiteFlag++; |
| 132 | break; |
| 133 | |
Guido van Rossum | bba92ca | 1998-04-10 19:39:15 +0000 | [diff] [blame] | 134 | case 't': |
| 135 | Py_TabcheckFlag++; |
| 136 | break; |
| 137 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 138 | case 'u': |
| 139 | unbuffered++; |
| 140 | break; |
| 141 | |
| 142 | case 'v': |
| 143 | Py_VerboseFlag++; |
| 144 | break; |
| 145 | |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 146 | case 'x': |
| 147 | skipfirstline = 1; |
| 148 | break; |
| 149 | |
Guido van Rossum | c15a9a1 | 2000-05-01 17:54:33 +0000 | [diff] [blame] | 150 | case 'U': |
| 151 | Py_UnicodeFlag++; |
| 152 | break; |
| 153 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 154 | /* This space reserved for other options */ |
| 155 | |
| 156 | default: |
| 157 | fprintf(stderr, usage_line, argv[0]); |
| 158 | fprintf(stderr, usage_top); |
Guido van Rossum | 7922bd7 | 1997-08-29 22:34:47 +0000 | [diff] [blame] | 159 | fprintf(stderr, usage_mid); |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 160 | fprintf(stderr, usage_bot, |
| 161 | DELIM, DELIM, PYTHONHOMEHELP); |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 162 | exit(2); |
| 163 | /*NOTREACHED*/ |
| 164 | |
| 165 | } |
| 166 | } |
| 167 | |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 168 | if (command == NULL && optind < argc && |
| 169 | strcmp(argv[optind], "-") != 0) |
| 170 | { |
| 171 | filename = argv[optind]; |
| 172 | if (filename != NULL) { |
| 173 | if ((fp = fopen(filename, "r")) == NULL) { |
| 174 | fprintf(stderr, "%s: can't open file '%s'\n", |
| 175 | argv[0], filename); |
| 176 | exit(2); |
| 177 | } |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 178 | else if (skipfirstline) { |
Guido van Rossum | dc8b569 | 1999-04-19 17:54:19 +0000 | [diff] [blame] | 179 | int ch; |
| 180 | /* Push back first newline so line numbers |
| 181 | remain the same */ |
| 182 | while ((ch = getc(fp)) != EOF) { |
| 183 | if (ch == '\n') { |
| 184 | (void)ungetc(ch, fp); |
| 185 | break; |
| 186 | } |
| 187 | } |
Guido van Rossum | a075ce1 | 1997-12-05 21:56:45 +0000 | [diff] [blame] | 188 | } |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 189 | } |
| 190 | } |
| 191 | |
| 192 | stdin_is_interactive = Py_FdIsInteractive(stdin, (char *)0); |
| 193 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 194 | if (unbuffered) { |
Guido van Rossum | f22d7e2 | 1997-01-11 19:28:55 +0000 | [diff] [blame] | 195 | #ifdef MS_WINDOWS |
Guido van Rossum | 3e7ae7a | 1997-01-17 22:05:38 +0000 | [diff] [blame] | 196 | _setmode(fileno(stdin), O_BINARY); |
| 197 | _setmode(fileno(stdout), O_BINARY); |
Guido van Rossum | f22d7e2 | 1997-01-11 19:28:55 +0000 | [diff] [blame] | 198 | #endif |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 199 | #ifndef MPW |
Guido van Rossum | 22ffac1 | 1998-03-06 15:30:39 +0000 | [diff] [blame] | 200 | #ifdef HAVE_SETVBUF |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 201 | setvbuf(stdin, (char *)NULL, _IONBF, BUFSIZ); |
| 202 | setvbuf(stdout, (char *)NULL, _IONBF, BUFSIZ); |
| 203 | setvbuf(stderr, (char *)NULL, _IONBF, BUFSIZ); |
Guido van Rossum | 22ffac1 | 1998-03-06 15:30:39 +0000 | [diff] [blame] | 204 | #else /* !HAVE_SETVBUF */ |
| 205 | setbuf(stdin, (char *)NULL); |
| 206 | setbuf(stdout, (char *)NULL); |
| 207 | setbuf(stderr, (char *)NULL); |
| 208 | #endif /* !HAVE_SETVBUF */ |
| 209 | #else /* MPW */ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 210 | /* On MPW (3.2) unbuffered seems to hang */ |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 211 | setvbuf(stdin, (char *)NULL, _IOLBF, BUFSIZ); |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 212 | setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ); |
| 213 | setvbuf(stderr, (char *)NULL, _IOLBF, BUFSIZ); |
Guido van Rossum | 22ffac1 | 1998-03-06 15:30:39 +0000 | [diff] [blame] | 214 | #endif /* MPW */ |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 215 | } |
Guido van Rossum | 2a21219 | 1997-04-11 21:57:53 +0000 | [diff] [blame] | 216 | else if (Py_InteractiveFlag) { |
Guido van Rossum | b31c7dc | 1997-04-11 22:19:12 +0000 | [diff] [blame] | 217 | #ifdef MS_WINDOWS |
| 218 | /* Doesn't have to have line-buffered -- use unbuffered */ |
Guido van Rossum | 01b7ced | 1999-02-09 18:36:51 +0000 | [diff] [blame] | 219 | /* Any set[v]buf(stdin, ...) screws up Tkinter :-( */ |
Guido van Rossum | b31c7dc | 1997-04-11 22:19:12 +0000 | [diff] [blame] | 220 | setvbuf(stdout, (char *)NULL, _IONBF, BUFSIZ); |
Guido van Rossum | 22ffac1 | 1998-03-06 15:30:39 +0000 | [diff] [blame] | 221 | #else /* !MS_WINDOWS */ |
| 222 | #ifdef HAVE_SETVBUF |
Guido van Rossum | b31c7dc | 1997-04-11 22:19:12 +0000 | [diff] [blame] | 223 | setvbuf(stdin, (char *)NULL, _IOLBF, BUFSIZ); |
| 224 | setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ); |
Guido van Rossum | 22ffac1 | 1998-03-06 15:30:39 +0000 | [diff] [blame] | 225 | #endif /* HAVE_SETVBUF */ |
| 226 | #endif /* !MS_WINDOWS */ |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 227 | /* Leave stderr alone - it should be unbuffered anyway. */ |
| 228 | } |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 229 | |
Guido van Rossum | ed52aac | 1997-07-19 19:20:32 +0000 | [diff] [blame] | 230 | Py_SetProgramName(argv[0]); |
| 231 | Py_Initialize(); |
| 232 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 233 | if (Py_VerboseFlag || |
Guido van Rossum | 129e91a | 1997-02-14 21:00:50 +0000 | [diff] [blame] | 234 | (command == NULL && filename == NULL && stdin_is_interactive)) |
Guido van Rossum | fe4dfc7 | 1997-05-19 18:33:01 +0000 | [diff] [blame] | 235 | fprintf(stderr, "Python %s on %s\n%s\n", |
| 236 | Py_GetVersion(), Py_GetPlatform(), Py_GetCopyright()); |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 237 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 238 | |
| 239 | if (command != NULL) { |
| 240 | /* Backup optind and force sys.argv[0] = '-c' */ |
| 241 | optind--; |
| 242 | argv[optind] = "-c"; |
| 243 | } |
| 244 | |
| 245 | PySys_SetArgv(argc-optind, argv+optind); |
| 246 | |
Guido van Rossum | 3d26cc9 | 1997-09-16 16:11:28 +0000 | [diff] [blame] | 247 | if ((inspect || (command == NULL && filename == NULL)) && |
| 248 | isatty(fileno(stdin))) { |
| 249 | PyObject *v; |
| 250 | v = PyImport_ImportModule("readline"); |
| 251 | if (v == NULL) |
| 252 | PyErr_Clear(); |
| 253 | else |
| 254 | Py_DECREF(v); |
| 255 | } |
| 256 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 257 | if (command) { |
| 258 | sts = PyRun_SimpleString(command) != 0; |
Guido van Rossum | 05f7c50 | 1997-08-02 03:00:42 +0000 | [diff] [blame] | 259 | free(command); |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 260 | } |
| 261 | else { |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 262 | if (filename == NULL && stdin_is_interactive) { |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 263 | char *startup = getenv("PYTHONSTARTUP"); |
| 264 | if (startup != NULL && startup[0] != '\0') { |
| 265 | FILE *fp = fopen(startup, "r"); |
| 266 | if (fp != NULL) { |
| 267 | (void) PyRun_SimpleFile(fp, startup); |
| 268 | PyErr_Clear(); |
| 269 | fclose(fp); |
| 270 | } |
| 271 | } |
| 272 | } |
| 273 | sts = PyRun_AnyFile( |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 274 | fp, |
| 275 | filename == NULL ? "<stdin>" : filename) != 0; |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 276 | if (filename != NULL) |
| 277 | fclose(fp); |
| 278 | } |
| 279 | |
Guido van Rossum | 775af91 | 1997-02-14 19:50:32 +0000 | [diff] [blame] | 280 | if (inspect && stdin_is_interactive && |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 281 | (filename != NULL || command != NULL)) |
| 282 | sts = PyRun_AnyFile(stdin, "<stdin>") != 0; |
| 283 | |
Guido van Rossum | 5d1770e | 1997-08-05 02:23:48 +0000 | [diff] [blame] | 284 | Py_Finalize(); |
Guido van Rossum | 05f7c50 | 1997-08-02 03:00:42 +0000 | [diff] [blame] | 285 | return sts; |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 286 | } |
| 287 | |
| 288 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 289 | /* Make the *original* argc/argv available to other modules. |
| 290 | This is rare, but it is needed by the secureware extension. */ |
| 291 | |
| 292 | void |
Guido van Rossum | ac56b03 | 1996-07-21 02:33:38 +0000 | [diff] [blame] | 293 | Py_GetArgcArgv(argc, argv) |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 294 | int *argc; |
| 295 | char ***argv; |
| 296 | { |
| 297 | *argc = orig_argc; |
| 298 | *argv = orig_argv; |
| 299 | } |