nfs: fix real/effective id mismatch in nfs_access
[dragonfly.git] / usr.bin / window / defs.h
blob6ecdd5e9de817f2f7651d5476e96d6f5571e672d
1 /* $NetBSD: defs.h,v 1.8 2009/04/14 08:50:06 lukem Exp $ */
3 /*
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
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. 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
32 * SUCH DAMAGE.
34 * @(#)defs.h 8.1 (Berkeley) 6/6/93
37 #include <sys/time.h>
38 #include "value.h"
39 #include "ww.h"
41 #ifndef EXTERN
42 #define EXTERN extern
43 #endif
45 #define NWINDOW 9
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 */
65 /* flags */
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);
72 int ccinit(void);
73 void ccend(void);
74 void ccflush(void);
75 void ccreset(void);
76 void ccstart(void);
77 void c_colon(void);
78 void c_debug(void);
79 void c_help(void);
80 void c_move(struct ww *);
81 void c_put(void);
82 void c_quit(void);
83 void c_size(struct ww *);
84 void c_window(void);
85 void c_yank(void);
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 *);
91 void cx_end(void);
92 void deletewin(struct ww *);
93 void docmd(void);
94 int doconfig(void);
95 void dodefault(void);
96 int dolongcmd(char *, struct value *, int);
97 int dosource(char *);
98 void error(const char *, ...)
99 __attribute__((__format__(__printf__, 1, 2)));
100 void err_end(void);
101 int findid(void);
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 *);
107 void mloop(void);
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,
111 char *, char **);
112 struct ww *openiwin(int, const char *);
113 void p_memerror(void);
114 void p_start(void);
115 void reframe(void);
116 void setcmd(char);
117 void setescape(const char *);
118 int setlabel(struct ww *, const char *);
119 void setselwin(struct ww *);
120 void setterse(char);
121 void setvars(void);
122 void sizewin(struct ww *, int, int);
123 void startwin(struct ww *);
124 void stopwin(struct ww *);
125 int s_gettok(void);
126 void verror(const char *, va_list);
127 void waitnl(struct ww *);
128 int waitnl1(struct ww *, const char *);