View | Details | Raw Unified
Collapse All | Expand All

(-) mc-4.6.1-orig/src/subshell.c (-12 / +1 lines)
 Lines 722-738    Link Here 
     * Print every character in octal format with the leading backslash.
     * Print every character in octal format with the leading backslash.
     * tcsh and zsh may require 4-digit octals, bash < 2.05b doesn't like them.
     * tcsh and zsh may require 4-digit octals, bash < 2.05b doesn't like them.
     */
     */
    if (subshell_type == BASH) {
	for (; *s; s++) {
	    /* Must quote numbers, so that they are not glued to octals */
	    if (isalpha ((unsigned char) *s)) {
		*d++ = (unsigned char) *s;
	    } else {
		sprintf (d, "\\%03o", (unsigned char) *s);
		d += 4;
	    }
	}
    } else {
	for (; *s; s++) {
	for (; *s; s++) {
	    if (isalnum ((unsigned char) *s)) {
	    if (isalnum ((unsigned char) *s)) {
		*d++ = (unsigned char) *s;
		*d++ = (unsigned char) *s;
 Lines 741-747    Link Here 
		d += 5;
		d += 5;
	    }
	    }
	}
	}
    }
    memcpy (d, common_end, sizeof (common_end));
    memcpy (d, common_end, sizeof (common_end));