Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 146437 | Differences between
and this patch

Collapse All | Expand All

(-)mc-4.6.1/src/subshell.c.1 (-1 / +17 lines)
Lines 91-96 Link Here
91
TRUE;
91
TRUE;
92
#endif
92
#endif
93
93
94
/* Don't allow ctrl+o (panels ON) if shell already dunning a command: */
95
int subshell_blocks_ctrlo=1;
96
94
/* File descriptor of the pseudoterminal used by the subshell */
97
/* File descriptor of the pseudoterminal used by the subshell */
95
int subshell_pty = 0;
98
int subshell_pty = 0;
96
99
Lines 894-900 Link Here
894
    fd_set read_set;		/* For `select' */
897
    fd_set read_set;		/* For `select' */
895
    int maxfdp;
898
    int maxfdp;
896
    int bytes;			/* For the return value from `read' */
899
    int bytes;			/* For the return value from `read' */
897
    int i;			/* Loop counter */
900
    int i,j;			/* Loop counter */
898
901
899
    struct timeval wtime;	/* Maximum time we wait for the subshell */
902
    struct timeval wtime;	/* Maximum time we wait for the subshell */
900
    struct timeval *wptr;
903
    struct timeval *wptr;
Lines 992-997 Link Here
992
		exit (1);
995
		exit (1);
993
	    }
996
	    }
994
997
998
	    if (subshell_blocks_ctrlo) {
999
		if (pty_buffer[0] == subshell_switch_key &&
1000
		    subshell_ready == TRUE) {
1001
		    	    subshell_state = INACTIVE;
1002
		    	    return TRUE;
1003
                	}
1004
		    // remove ctrl+o codes from buffer:
1005
		    for (i = 0,j = 0; i < bytes; ++i)
1006
			if (pty_buffer[i] != subshell_switch_key)
1007
                    	    pty_buffer[j++] = pty_buffer[i];
1008
		    bytes = j;
1009
            } else {
995
	    for (i = 0; i < bytes; ++i)
1010
	    for (i = 0; i < bytes; ++i)
996
		if (pty_buffer[i] == subshell_switch_key) {
1011
		if (pty_buffer[i] == subshell_switch_key) {
997
		    write (subshell_pty, pty_buffer, i);
1012
		    write (subshell_pty, pty_buffer, i);
Lines 1000-1005 Link Here
1000
		    return TRUE;
1015
		    return TRUE;
1001
		}
1016
		}
1002
1017
1018
	    }
1003
	    write (subshell_pty, pty_buffer, bytes);
1019
	    write (subshell_pty, pty_buffer, bytes);
1004
	    subshell_ready = FALSE;
1020
	    subshell_ready = FALSE;
1005
	} else {
1021
	} else {

Return to bug 146437