1 /* $NetBSD: defs.h,v 1.8 2009/04/14 08:50:06 lukem 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 *, ...) __printflike(1, 2);
101 struct ww
*findselwin(void);
102 void front(struct ww
*, char);
103 int getpos(int *, int *, int, int, int, int);
104 struct ww
*getwin(void);
105 void labelwin(struct ww
*);
107 int more(struct ww
*, char);
108 void movewin(struct ww
*, int, int);
109 struct ww
*openwin(int, int, int, int, int, int, char *, int, int,
111 struct ww
*openiwin(int, const char *);
112 void p_memerror(void);
116 void setescape(const char *);
117 int setlabel(struct ww
*, const char *);
118 void setselwin(struct ww
*);
121 void sizewin(struct ww
*, int, int);
122 void startwin(struct ww
*);
123 void stopwin(struct ww
*);
125 void verror(const char *, va_list) __printflike(1, 0);
126 void waitnl(struct ww
*);
127 int waitnl1(struct ww
*, const char *);