1 /* $NetBSD: defs.h,v 1.7 2003/08/07 11:17:25 agc Exp $ */
4 * Copyright (c) 1983, 1993
5 * The Regents of the University of California. All rights reserved.
7 * This code is derived from software contributed to Berkeley by
8 * Edward Wang at The University of California, Berkeley.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
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. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * @(#)defs.h 8.1 (Berkeley) 6/6/93
47 EXTERN
struct timeval starttime
;
49 EXTERN
struct ww
*window
[NWINDOW
]; /* the windows */
50 EXTERN
struct ww
*selwin
; /* the selected window */
51 EXTERN
struct ww
*lastselwin
; /* the last selected window */
52 EXTERN
struct ww
*cmdwin
; /* the command window */
53 EXTERN
struct ww
*framewin
; /* the window for framing */
54 EXTERN
struct ww
*boxwin
; /* the window for the box */
55 EXTERN
struct ww
*fgwin
; /* the last foreground window */
57 #define isfg(w) ((w)->ww_order <= fgwin->ww_order)
59 EXTERN
char *default_shell
[128]; /* default shell argv */
60 EXTERN
char *default_shellfile
; /* default shell program */
61 EXTERN
int default_nline
; /* default buffer size for new windows */
62 EXTERN
int default_smooth
; /* default "smooth" parameter */
63 EXTERN
char escapec
; /* the escape character */
66 EXTERN
char quit
; /* quit command issued */
67 EXTERN
char terse
; /* terse mode */
68 EXTERN
char debug
; /* debug mode */
69 EXTERN
char incmd
; /* in command mode */
71 void addwin(struct ww
*, char);
80 void c_move(struct ww
*);
83 void c_size(struct ww
*);
86 void closeiwin(struct ww
*);
87 void closewin(struct ww
*);
88 void closewin1(struct ww
*);
89 int cx_beginbuf(char *, struct value
*, int);
90 int cx_beginfile(char *);
92 void deletewin(struct ww
*);
96 int dolongcmd(char *, struct value
*, int);
98 void error(const char *, ...)
99 __attribute__((__format__(__printf__
, 1, 2)));
102 struct ww
*findselwin(void);
103 void front(struct ww
*, char);
104 int getpos(int *, int *, int, int, int, int);
105 struct ww
*getwin(void);
106 void labelwin(struct ww
*);
108 int more(struct ww
*, char);
109 void movewin(struct ww
*, int, int);
110 struct ww
*openwin(int, int, int, int, int, int, char *, int, int,
112 struct ww
*openiwin(int, const char *);
113 void p_memerror(void);
117 void setescape(const char *);
118 int setlabel(struct ww
*, const char *);
119 void setselwin(struct ww
*);
122 void sizewin(struct ww
*, int, int);
123 void startwin(struct ww
*);
124 void stopwin(struct ww
*);
126 void verror(const char *, va_list);
127 void waitnl(struct ww
*);
128 int waitnl1(struct ww
*, const char *);