"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lsystem.c" between
less-530.tar.gz and less-548.tar.gz

About: less is a file pager (a program that displays text files similar to "more" or "pg"). Beta version.

lsystem.c  (less-530):lsystem.c  (less-548)
/* /*
* Copyright (C) 1984-2017 Mark Nudelman * Copyright (C) 1984-2018 Mark Nudelman
* *
* You may distribute under the terms of either the GNU General Public * You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file. * License or the Less License, as specified in the README file.
* *
* For more information, see the README file. * For more information, see the README file.
*/ */
/* /*
* Routines to execute other programs. * Routines to execute other programs.
* Necessarily very OS dependent. * Necessarily very OS dependent.
*/ */
#include "less.h" #include "less.h"
#include <signal.h> #include <signal.h>
#include "position.h" #include "position.h"
#if MSDOS_COMPILER #if MSDOS_COMPILER
#include <dos.h> #include <dos.h>
#if MSDOS_COMPILER==WIN32C && defined(MINGW)
#include <direct.h>
#define setdisk(n) _chdrive((n)+1)
#else
#ifdef _MSC_VER #ifdef _MSC_VER
#include <direct.h> #include <direct.h>
#define setdisk(n) _chdrive((n)+1) #define setdisk(n) _chdrive((n)+1)
#else #else
#include <dir.h> #include <dir.h>
#endif #endif
#endif #endif
#endif
extern int screen_trashed; extern int screen_trashed;
extern IFILE curr_ifile; extern IFILE curr_ifile;
#if HAVE_SYSTEM #if HAVE_SYSTEM
/* /*
* Pass the specified command to a shell to be executed. * Pass the specified command to a shell to be executed.
* Like plain "system()", but handles resetting terminal modes, etc. * Like plain "system()", but handles resetting terminal modes, etc.
*/ */
skipping to change at line 292 skipping to change at line 297
* Feed it the file contents between the positions spos and epos. * Feed it the file contents between the positions spos and epos.
*/ */
public int public int
pipe_data(cmd, spos, epos) pipe_data(cmd, spos, epos)
char *cmd; char *cmd;
POSITION spos; POSITION spos;
POSITION epos; POSITION epos;
{ {
FILE *f; FILE *f;
int c; int c;
extern FILE *popen();
/* /*
* This is structured much like lsystem(). * This is structured much like lsystem().
* Since we're running a shell program, we must be careful * Since we're running a shell program, we must be careful
* to perform the necessary deinitialization before running * to perform the necessary deinitialization before running
* the command, and reinitialization after it. * the command, and reinitialization after it.
*/ */
if (ch_seek(spos) != 0) if (ch_seek(spos) != 0)
{ {
error("Cannot seek to start position", NULL_PARG); error("Cannot seek to start position", NULL_PARG);
 End of changes. 4 change blocks. 
2 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)