1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-14 23:46:10 +00:00
freebsd-ports/misc/display/files/patch-aa
Bill Fenner 65cf88075b Display runs a specified command over and over, printing the output
through curses(3X). The command can be compound and the delay
between executions is settable on the command line.  The output
from the command had better fit on a single screen, of course.

PR:		ports/4384
Submitted by:	Stephen J. Roznowski <sjr@home.net>
1997-11-24 00:26:01 +00:00

60 lines
985 B
Plaintext

*** ../display.c Mon Aug 25 18:45:10 1997
--- display.c Mon Aug 25 18:48:31 1997
***************
*** 8,13 ****
--- 8,14 ----
#include <curses.h>
#include <signal.h>
#include <ctype.h>
+ #include <stdio.h>
#define DEFAULT_DELAY 5
***************
*** 16,30 ****
static char *Command;
static int Delay;
main(argc, argv)
int argc;
char *argv[];
{
- extern void parse_args(),
- die(),
- display();
-
parse_args(argc, argv);
signal(SIGHUP, die);
--- 17,28 ----
static char *Command;
static int Delay;
+ static void die(), display(), parse_args(), usage();
main(argc, argv)
int argc;
char *argv[];
{
parse_args(argc, argv);
signal(SIGHUP, die);
***************
*** 54,60 ****
static void display()
{
! auto FILE *fp, *popen();
auto char ch;
if (!(fp = popen(Command, "r"))) {
--- 52,58 ----
static void display()
{
! auto FILE *fp;
auto char ch;
if (!(fp = popen(Command, "r"))) {