]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add backward compatibility with -s.
authorGuido van Rossum <guido@python.org>
Wed, 2 Jan 1991 13:50:48 +0000 (13:50 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 2 Jan 1991 13:50:48 +0000 (13:50 +0000)
Add initregexp() call.

Modules/config.c.in

index 60f2cf2e11a370100197086cfc78a58455009465..1ddc518d8ce77ecf0efb050fade00b67586c63c6 100644 (file)
@@ -15,7 +15,13 @@ initargs(p_argc, p_argv)
 {
        extern char *getenv();
        char *display;
-       
+
+       /* Ignore an initial argument of '-s', for backward compatibility */
+       if (*p_argc > 1 && strcmp((*p_argv)[1], "-s") == 0) {
+               (*p_argv)[1] = (*p_argv)[0];
+               (*p_argc)--, (*p_argv)++;
+       }
+
        /* Assume we have to initialize stdwin if either of the following
           conditions holds:
           - the environment variable $DISPLAY is set
@@ -45,6 +51,7 @@ initcalls()
 {
        inittime();
        initmath();
+       initregexp();
        initposix();
 #ifdef USE_AUDIO
        initaudio();