Deleted Added
sdiff udiff text old ( 170257 ) new ( 191930 )
full compact
1/*
2 * Copyright (C) 1984-2007 Mark Nudelman
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
7 * For more information about less, or for information on how to
8 * contact the author, see the README file.
9 */
10

--- 33 unchanged lines hidden (view full) ---

44 char *donemsg;
45{
46 register int inp;
47#if HAVE_SHELL
48 register char *shell;
49 register char *p;
50#endif
51 IFILE save_ifile;
52#if MSDOS_COMPILER
53 char cwd[FILENAME_MAX+1];
54#endif
55
56 /*
57 * Print the command which is to be executed,
58 * unless the command starts with a "-".
59 */
60 if (cmd[0] == '-')
61 cmd++;
62 else
63 {
64 clear_bot();
65 putstr("!");
66 putstr(cmd);
67 putstr("\n");
68 }
69
70#if MSDOS_COMPILER
71 /*
72 * Working directory is global on MSDOS.
73 * The child might change the working directory, so we
74 * must save and restore CWD across calls to "system",
75 * or else we won't find our file when we return and
76 * try to "reedit_ifile" it.
77 */
78 getcwd(cwd, FILENAME_MAX);
79#endif
80
81 /*
82 * Close the current input file.
83 */
84 save_ifile = save_curr_ifile();
85 (void) edit_ifile(NULL_IFILE);
86
87 /*

--- 99 unchanged lines hidden (view full) ---

187 putstr(" (press RETURN)");
188 get_return();
189 putchr('\n');
190 flush();
191 }
192 init();
193 screen_trashed = 1;
194
195#if MSDOS_COMPILER
196 /*
197 * Restore the previous directory (possibly
198 * changed by the child program we just ran).
199 */
200 chdir(cwd);
201#if MSDOS_COMPILER != DJGPPC
202 /*
203 * Some versions of chdir() don't change to the drive

--- 166 unchanged lines hidden ---