1. PyPA
  2. Python Packaging Authority Projects
  3. distlib

Commits

Vinay Sajip  committed e231db5

Launchers updated.

  • Participants
  • Parent commits 8eaa557
  • Branches default

Comments (0)

Files changed (5)

File PC/launcher.c

View file
  • Ignore whitespace
 
 static char *
 find_exe(char * line) {
-    char * p;
+	char * p;
 
-    while ((p = StrStrIA(line, ".exe")) != NULL) {
-        char c = p[4];
+	while ((p = StrStrIA(line, ".exe")) != NULL) {
+		char c = p[4];
 
-        if ((c == '\0') || (c == '"') || isspace(c))
-            break;
-        line = &p[4];
-    }
-    return p;
+		if ((c == '\0') || (c == '"') || isspace(c))
+			break;
+		line = &p[4];
+	}
+	return p;
 }
 
 static char *
 find_executable_and_args(char * line, char ** argp)
 {
-    char * p = find_exe(line);
+	char * p = find_exe(line);
 
-    assert(p != NULL, "Expected to find a command ending in '.exe' in shebang line.");
-    p += 4;
-    if (*line == '"') {
-        assert(*p == '"', "Expected terminating double-quote for executable in shebang line.");
-        *p++ = '\0';
-        ++line;
-    }
-    /* p points just past the executable. It must either be a NUL or whitespace. */
-    assert(*p != '"', "Terminating quote without starting quote for executable in shebang line.");
-    /* Now we can skip the whitespace, having checked that it's there. */
-    while(*p && isspace(*p))
-        *p++ = '\0';    /* Ensure parameters are not included in executable */
-    *argp = p;
-    return line;
+	assert(p != NULL, "Expected to find a command ending in '.exe' in shebang line.");
+	p += 4;
+	if (*line == '"') {
+		assert(*p == '"', "Expected terminating double-quote for executable in shebang line.");
+		*p++ = '\0';
+		++line;
+	}
+	/* p points just past the executable. It must either be a NUL or whitespace. */
+	assert(*p != '"', "Terminating quote without starting quote for executable in shebang line.");
+	/* Now we can skip the whitespace, having checked that it's there. */
+	while(*p && isspace(*p))
+		*p++ = '\0';    /* Ensure args are not included in executable */
+	*argp = p;
+	return line;
 }
 
 static int
     ++cp;
     while (*cp && isspace(*cp))
         ++cp;
-    p = NULL;
-    cp = find_executable_and_args(cp, &p);
-    assert(cp != NULL, "Expected to find executable in shebang line");
-    assert(p != NULL, "Expected to find arguments (even if empty) in shebang line");
-     /* 3 spaces + 4 quotes + NUL */
+	p = NULL;
+	cp = find_executable_and_args(cp, &p);
+	assert(cp != NULL, "Expected to find executable in shebang line");
+	assert(p != NULL, "Expected to find arguments (even if empty) in shebang line");
+	 /* 3 spaces + 4 quotes + NUL */
     len = strlen(cp) + strlen(p) + 8 + strlen(psp) + strlen(cmdline);
     cmdp = calloc(len, sizeof(char));
     assert(cmdp != NULL, "Expected to be able to allocate command line memory");
     _snprintf_s(cmdp, len, len, "\"%s\" %s \"%s\" %s", cp, p, psp, cmdline);
     run_child(cmdp);  /* never actually returns */
     free(cmdp);
-    return 0;
+	return 0;
 }
 
 #if defined(_CONSOLE)
 {
     return process(__argc, __argv);
 }
-#endif
+#endif

File distlib/t32.exe

  • Ignore whitespace
Binary file modified.

File distlib/t64.exe

  • Ignore whitespace
Binary file modified.

File distlib/w32.exe

  • Ignore whitespace
Binary file modified.

File distlib/w64.exe

  • Ignore whitespace
Binary file modified.