Deleted Added
full compact
main.c (24348) main.c (27963)
1/* main.c: This file contains the main control and user-interface routines
2 for the ed line editor. */
3/*-
4 * Copyright (c) 1993 Andrew Moore, Talke Studio.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
1/* main.c: This file contains the main control and user-interface routines
2 for the ed line editor. */
3/*-
4 * Copyright (c) 1993 Andrew Moore, Talke Studio.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

19 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $Id: main.c,v 1.9 1997/02/22 14:03:17 peter Exp $
29 */
30
31#ifndef lint
32static char * const copyright =
33"@(#) Copyright (c) 1993 Andrew Moore, Talke Studio. \n\
34 All rights reserved.\n";
35#endif /* not lint */
36
37#ifndef lint
27 */
28
29#ifndef lint
30static char * const copyright =
31"@(#) Copyright (c) 1993 Andrew Moore, Talke Studio. \n\
32 All rights reserved.\n";
33#endif /* not lint */
34
35#ifndef lint
36#if 0
38static char * const rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp";
37static char * const rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp";
38#else
39static char * const rcsid =
40 "$Id: main.c,v 1.10 1997/03/28 15:24:19 imp Exp $";
41#endif
39#endif /* not lint */
40
41/*
42 * CREDITS
43 *
44 * This program is based on the editor algorithm described in
45 * Brian W. Kernighan and P. J. Plauger's book "Software Tools
46 * in Pascal," Addison-Wesley, 1981.

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

52 * the bdes program by Matt Bishop of Dartmouth College,
53 * Hanover, NH.
54 *
55 */
56
57#include <sys/ioctl.h>
58#include <sys/wait.h>
59#include <ctype.h>
42#endif /* not lint */
43
44/*
45 * CREDITS
46 *
47 * This program is based on the editor algorithm described in
48 * Brian W. Kernighan and P. J. Plauger's book "Software Tools
49 * in Pascal," Addison-Wesley, 1981.

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

55 * the bdes program by Matt Bishop of Dartmouth College,
56 * Hanover, NH.
57 *
58 */
59
60#include <sys/ioctl.h>
61#include <sys/wait.h>
62#include <ctype.h>
60#include <setjmp.h>
61#include <pwd.h>
62#include <locale.h>
63#include <locale.h>
64#include <pwd.h>
65#include <setjmp.h>
63
64#include "ed.h"
65
66
67#ifdef _POSIX_SOURCE
68sigjmp_buf env;
69#else
70jmp_buf env;

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

95long current_addr; /* current address in editor buffer */
96long addr_last; /* last address in editor buffer */
97int lineno; /* script line number */
98char *prompt; /* command-line prompt */
99char *dps = "*"; /* default command-line prompt */
100
101char *usage = "usage: %s [-] [-sx] [-p string] [name]\n";
102
66
67#include "ed.h"
68
69
70#ifdef _POSIX_SOURCE
71sigjmp_buf env;
72#else
73jmp_buf env;

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

98long current_addr; /* current address in editor buffer */
99long addr_last; /* last address in editor buffer */
100int lineno; /* script line number */
101char *prompt; /* command-line prompt */
102char *dps = "*"; /* default command-line prompt */
103
104char *usage = "usage: %s [-] [-sx] [-p string] [name]\n";
105
103extern char errmsg[];
104extern int optind;
105extern char *optarg;
106
107/* ed: line editor */
108int
109main(argc, argv)
110 int argc;
111 char **argv;
112{
113 int c, n;
114 long status = 0;

--- 1328 unchanged lines hidden ---
106/* ed: line editor */
107int
108main(argc, argv)
109 int argc;
110 char **argv;
111{
112 int c, n;
113 long status = 0;

--- 1328 unchanged lines hidden ---