]> git.saurik.com Git - apple/shell_cmds.git/blame - window/defs.h
shell_cmds-17.1.tar.gz
[apple/shell_cmds.git] / window / defs.h
CommitLineData
44bd5ea7
A
1/* $NetBSD: defs.h,v 1.4 1997/11/21 08:35:59 lukem Exp $ */
2
3/*
4 * Copyright (c) 1983, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * Edward Wang at The University of California, Berkeley.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the University of
21 * California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)defs.h 8.1 (Berkeley) 6/6/93
39 */
40
41#include <sys/time.h>
42#include "value.h"
43#include "ww.h"
44
45#ifndef EXTERN
46#define EXTERN extern
47#endif
48
49#define NWINDOW 9
50
51EXTERN struct timeval starttime;
52
53EXTERN struct ww *window[NWINDOW]; /* the windows */
54EXTERN struct ww *selwin; /* the selected window */
55EXTERN struct ww *lastselwin; /* the last selected window */
56EXTERN struct ww *cmdwin; /* the command window */
57EXTERN struct ww *framewin; /* the window for framing */
58EXTERN struct ww *boxwin; /* the window for the box */
59EXTERN struct ww *fgwin; /* the last foreground window */
60
61#define isfg(w) ((w)->ww_order <= fgwin->ww_order)
62
63EXTERN char *default_shell[128]; /* default shell argv */
64EXTERN char *default_shellfile; /* default shell program */
65EXTERN int default_nline; /* default buffer size for new windows */
66EXTERN int default_smooth; /* default "smooth" parameter */
67EXTERN char escapec; /* the escape character */
68
69/* flags */
70EXTERN char quit; /* quit command issued */
71EXTERN char terse; /* terse mode */
72EXTERN char debug; /* debug mode */
73EXTERN char incmd; /* in command mode */
74
75void addwin __P((struct ww *, char));
76int ccinit __P((void));
77void ccend __P((void));
78void ccflush __P((void));
79void ccreset __P((void));
80void ccstart __P((void));
81void c_colon __P((void));
82void c_debug __P((void));
83void c_help __P((void));
84void c_move __P((struct ww *));
85void c_put __P((void));
86void c_quit __P((void));
87void c_size __P((struct ww *));
88void c_window __P((void));
89void c_yank __P((void));
90void closeiwin __P((struct ww *));
91void closewin __P((struct ww *));
92void closewin1 __P((struct ww *));
93int cx_beginbuf __P((char *, struct value *, int));
94int cx_beginfile __P((char *));
95void cx_end __P((void));
96void deletewin __P((struct ww *));
97void docmd __P((void));
98int doconfig __P((void));
99void dodefault __P((void));
100int dolongcmd __P((char *, struct value *, int));
101int dosource __P((char *));
102void error __P((const char *, ...));
103void err_end __P((void));
104int findid __P((void));
105struct ww *findselwin __P((void));
106void front __P((struct ww *, char));
107int getpos __P((int *, int *, int, int, int, int));
108struct ww *getwin __P((void));
109void labelwin __P((struct ww *));
110void mloop __P((void));
111int more __P((struct ww *, char));
112void movewin __P((struct ww *, int, int));
113struct ww *openwin __P((int, int, int, int, int, int, char *, int, int,
114 char *, char **));
115struct ww *openiwin __P((int, char *));
116void p_memerror __P((void));
117void p_start __P((void));
118void reframe __P((void));
119void setcmd __P((char));
120void setescape __P((char *));
121int setlabel __P((struct ww *, char *));
122void setselwin __P((struct ww *));
123void setterse __P((char));
124void setvars __P((void));
125void sizewin __P((struct ww *, int, int));
126void startwin __P((struct ww *));
127void stopwin __P((struct ww *));
128int s_gettok __P((void));
129void verror __P((const char *, va_list));
130void waitnl __P((struct ww *));
131int waitnl1 __P((struct ww *, char *));