Changeset 3656 in kBuild
- Timestamp:
- Nov 4, 2024 1:56:03 AM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/job.c
r3655 r3656 442 442 /* List of known POSIX (or POSIX-ish) shells. */ 443 443 static const char *unix_shells[] = { 444 #ifdef KMK 445 "kmk_ash", 446 "kmk_kash", 447 #endif 444 448 "sh", 445 449 "bash", … … 1780 1784 for (i = 0; argv[i]; i++) 1781 1785 fprintf (stderr, "%s ", argv[i]); 1782 fprintf (stderr, "\n" , argv[i]);1786 fprintf (stderr, "\n"); 1783 1787 goto error; 1784 1788 } … … 3095 3099 But on MSDOS, if we use COMMAND.COM, double and single 3096 3100 quotes have the same effect. */ 3101 #ifdef KMK 3102 else if (instring == '"' && unixy_shell && *p == '\\') 3103 { 3104 /* If kmk_ash, allow simple escape sequence: \", \\, \$, \` */ 3105 char const ch2 = p[1]; 3106 if (is_kmk_shell 3107 && ( ch2 == '\"' 3108 || ch2 == '\\' 3109 || ch2 == '$' 3110 || ch2 == '`')) 3111 *ap++ = *++p; 3112 else 3113 goto slow; 3114 } 3115 else if (instring == '"' && unixy_shell && (*p == '$' || *p == '`')) 3116 goto slow; 3117 # ifdef WINDOWS32 3118 /* Quoted wildcard characters must be passed quoted to the 3119 command, so give up the fast route. */ 3120 else if (instring == '"' && !unixy_shell && (*p == '*' || *p == '?')) 3121 goto slow; 3122 else if (instring == '"' && !unixy_shell && p[0] == '\\' && p[1] == '"') /* bird: this smells */ 3123 *ap++ = *++p; 3124 # endif 3125 #else /* !KMK */ 3097 3126 else if (instring == '"' && strchr ("\\$`", *p) != 0 && unixy_shell) 3098 3127 goto slow; … … 3105 3134 *ap++ = *++p; 3106 3135 #endif 3136 #endif /* !KMK */ 3107 3137 else 3108 3138 *ap++ = *p;
Note:
See TracChangeset
for help on using the changeset viewer.