lsystem.c (a5f0fb151d90effe79714de0fa059954725fe57f) | lsystem.c (c9346414d95d69f958210e825deb3b086dac3529) |
---|---|
1/* 2 * Copyright (C) 1984-2000 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 11 12/* 13 * Routines to execute other programs. 14 * Necessarily very OS dependent. 15 */ 16 | 1/* 2 * Copyright (C) 1984-2000 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 11 12/* 13 * Routines to execute other programs. 14 * Necessarily very OS dependent. 15 */ 16 |
17#include <signal.h> | |
18#include "less.h" | 17#include "less.h" |
18#include <signal.h> |
|
19#include "position.h" 20 21#if MSDOS_COMPILER 22#include <dos.h> 23#ifdef _MSC_VER 24#include <direct.h> 25#define setdisk(n) _chdrive((n)+1) 26#else --- 75 unchanged lines hidden (view full) --- 102#if HAVE_DUP 103 /* 104 * Force standard input to be the user's terminal 105 * (the normal standard input), even if less's standard input 106 * is coming from a pipe. 107 */ 108 inp = dup(0); 109 close(0); | 19#include "position.h" 20 21#if MSDOS_COMPILER 22#include <dos.h> 23#ifdef _MSC_VER 24#include <direct.h> 25#define setdisk(n) _chdrive((n)+1) 26#else --- 75 unchanged lines hidden (view full) --- 102#if HAVE_DUP 103 /* 104 * Force standard input to be the user's terminal 105 * (the normal standard input), even if less's standard input 106 * is coming from a pipe. 107 */ 108 inp = dup(0); 109 close(0); |
110#if OS2 111 /* The __open() system call translates "/dev/tty" to "con". */ 112 if (__open("/dev/tty", OPEN_READ) < 0) 113#else |
|
110 if (open("/dev/tty", OPEN_READ) < 0) | 114 if (open("/dev/tty", OPEN_READ) < 0) |
115#endif |
|
111 dup(inp); 112#endif 113 114 /* 115 * Pass the command to the system to be executed. 116 * If we have a SHELL environment variable, use 117 * <$SHELL -c "command"> instead of just <command>. 118 * If the command is empty, just invoke a shell. --- 392 unchanged lines hidden --- | 116 dup(inp); 117#endif 118 119 /* 120 * Pass the command to the system to be executed. 121 * If we have a SHELL environment variable, use 122 * <$SHELL -c "command"> instead of just <command>. 123 * If the command is empty, just invoke a shell. --- 392 unchanged lines hidden --- |