All paths moved to path.h.
Cleanup in curses.h: removed reg definition. All include files reformatted for 4-space indent.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
/* assert.h 4.2 85/01/21 */
|
||||
|
||||
# ifndef NDEBUG
|
||||
# define _assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file \"%s\", line %d\n", __FILE__, __LINE__);exit(1);}}
|
||||
# define assert(ex) _assert(ex)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* ctype.h 4.2 85/09/04 */
|
||||
|
||||
#define _U 01
|
||||
#define _L 02
|
||||
#define _N 04
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <term.h>
|
||||
|
||||
#define bool int
|
||||
#define reg register
|
||||
|
||||
#define TRUE (1)
|
||||
#define FALSE (0)
|
||||
@@ -33,7 +32,6 @@ typedef struct sgttyb SGTTY;
|
||||
/*
|
||||
* Capabilities from termcap
|
||||
*/
|
||||
|
||||
extern bool AM, BS, CA, DA, DB, EO, HC, HZ, IN, MI, MS, NC, NS, OS, UL,
|
||||
XB, XN, XT, XS, XX;
|
||||
extern char *AL, *BC, *BT, *CD, *CE, *CL, *CM, *CR, *CS, *DC, *DL,
|
||||
@@ -131,7 +129,6 @@ int __void__;
|
||||
/*
|
||||
* psuedo functions
|
||||
*/
|
||||
|
||||
#define clearok(win,bf) (win->_clear = bf)
|
||||
#define leaveok(win,bf) (win->_leave = bf)
|
||||
#define scrollok(win,bf) (win->_scroll = bf)
|
||||
|
||||
@@ -47,9 +47,6 @@
|
||||
* if type is "rq", then use concatenation of fs_file and "quotas" to locate
|
||||
* quota file.
|
||||
*/
|
||||
#define _PATH_FSTAB "/etc/fstab"
|
||||
#define FSTAB "/etc/fstab" /* deprecated */
|
||||
|
||||
#define FSTAB_RW "rw" /* read/write device */
|
||||
#define FSTAB_RQ "rq" /* read/write with quotas */
|
||||
#define FSTAB_RO "ro" /* read-only device */
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
|
||||
extern double fabs(), floor(), ceil(), fmod(), ldexp();
|
||||
extern double sqrt(), hypot(), atof();
|
||||
extern double sin(), cos(), tan(), asin(), acos(), atan(), atan2();
|
||||
extern double exp(), log(), log10(), pow();
|
||||
extern double sinh(), cosh(), tanh();
|
||||
extern double gamma();
|
||||
extern double j0(), j1(), jn(), y0(), y1(), yn();
|
||||
double fabs(), floor(), ceil(), fmod(), ldexp();
|
||||
double sqrt(), hypot(), atof();
|
||||
double sin(), cos(), tan(), asin(), acos(), atan(), atan2();
|
||||
double exp(), log(), log10(), pow();
|
||||
double sinh(), cosh(), tanh();
|
||||
double gamma();
|
||||
double j0(), j1(), jn(), y0(), y1(), yn();
|
||||
|
||||
#define HUGE 1.701411733192644270e38
|
||||
#define LOGHUGE 39
|
||||
|
||||
@@ -10,11 +10,7 @@
|
||||
* Hashed key data base library.
|
||||
*/
|
||||
#define PBLKSIZ 1024
|
||||
#ifdef pdp11
|
||||
#define DBLKSIZ 512
|
||||
#else
|
||||
#define DBLKSIZ 4096
|
||||
#endif
|
||||
#define DBLKSIZ 1024
|
||||
|
||||
typedef struct {
|
||||
int dbm_dirf; /* open directory file */
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
*/
|
||||
struct nlist {
|
||||
char *n_name; /* In memory address of symbol name,
|
||||
or string table offset (file) */
|
||||
* or string table offset (file) */
|
||||
u_short n_len; /* Length of name in bytes */
|
||||
u_short n_type; /* Type of symbol - see below */
|
||||
u_int n_value; /* Symbol value */
|
||||
|
||||
@@ -24,18 +24,25 @@
|
||||
#define _PATH_CORE "/core"
|
||||
#define _PATH_DEV "/dev/"
|
||||
#define _PATH_CONSOLE "/dev/console"
|
||||
#define _PATH_LOG "/dev/log"
|
||||
#define _PATH_DEVNULL "/dev/null"
|
||||
#define _PATH_TTY "/dev/tty"
|
||||
#define _PATH_MEM "/dev/mem"
|
||||
#define _PATH_SWAP "/dev/swap"
|
||||
#define _PATH_FSTAB "/etc/fstab"
|
||||
#define _PATH_LOCALTIME "/etc/localtime"
|
||||
#define _PATH_MOTD "/etc/motd"
|
||||
#define _PATH_NOLOGIN "/etc/nologin"
|
||||
#define _PATH_PASSWD "/etc/passwd"
|
||||
#define _PATH_PTMP "/etc/ptmp"
|
||||
#define _PATH_SHADOW "/etc/shadow"
|
||||
#define _PATH_TERMCAP "/etc/termcap"
|
||||
#define _PATH_USRLIB "/lib/"
|
||||
#define _PATH_CTIMED "/libexec/ctimed"
|
||||
#define _PATH_LOCALLIB "/local/lib/"
|
||||
#define _PATH_SBIN "/sbin/"
|
||||
#define _PATH_USRSBIN "/sbin/"
|
||||
#define _PATH_MKPASSWD "/sbin/mkpasswd"
|
||||
#define _PATH_SENDMAIL "/sbin/sendmail"
|
||||
#define _PATH_SHARE "/share/"
|
||||
#define _PATH_ZONEINFO "/share/zoneinfo" /* Time zone object file directory */
|
||||
|
||||
@@ -34,7 +34,7 @@ struct psout {
|
||||
time_t o_cstime; /* u_cstime */
|
||||
short o_pgrp; /* p_pgrp */
|
||||
int o_sigs; /* sum of SIGINT & SIGQUIT,
|
||||
if == 2 proc is ignoring both.*/
|
||||
* if == 2 proc is ignoring both.*/
|
||||
char o_comm[MAXCOMLEN+1]; /* u_comm */
|
||||
char o_args[64]; /* best guess at args to process */
|
||||
};
|
||||
|
||||
@@ -15,11 +15,6 @@
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
#define _PATH_PASSWD "/etc/passwd"
|
||||
#define _PATH_SHADOW "/etc/shadow"
|
||||
#define _PATH_MKPASSWD "/sbin/mkpasswd"
|
||||
#define _PATH_PTMP "/etc/ptmp"
|
||||
|
||||
#define _PW_KEYBYNAME '0'
|
||||
#define _PW_KEYBYUID '1'
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* not the System V one.
|
||||
*/
|
||||
#define NSUBEXP 10
|
||||
|
||||
typedef struct regexp {
|
||||
char *startp[NSUBEXP];
|
||||
char *endp[NSUBEXP];
|
||||
|
||||
@@ -10,6 +10,4 @@ typedef unsigned char uint8_t;
|
||||
typedef unsigned short int uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define E_TERMCAP "/etc/termcap"
|
||||
|
||||
typedef unsigned char cc_t;
|
||||
typedef unsigned int speed_t;
|
||||
typedef unsigned int tcflag_t;
|
||||
@@ -145,5 +143,4 @@ extern int tcsetattr(int, int, struct termios *);
|
||||
#define TIOCSETAW _IOW(i, 92, struct termios)
|
||||
#define TIOCSETAF _IOW(i, 92, struct termios)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,13 +6,9 @@
|
||||
** Information about time zone files.
|
||||
*/
|
||||
|
||||
/* Time zone object file directory */
|
||||
#define TZDEFAULT "/etc/localtime"
|
||||
|
||||
/*
|
||||
** Each file begins with. . .
|
||||
*/
|
||||
|
||||
struct tzhead {
|
||||
char tzh_reserved[32]; /* reserved for future use */
|
||||
char tzh_timecnt[4]; /* coded number of transition times */
|
||||
@@ -96,5 +92,4 @@ struct tzhead {
|
||||
** Accurate only for the past couple of centuries;
|
||||
** that will probably do.
|
||||
*/
|
||||
|
||||
#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
* Define segment+offset and modified macros.
|
||||
* Place into the public domain.
|
||||
* --------------------------------------------------
|
||||
*/
|
||||
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
|
||||
#define MAXSEGNO 16384 /* max number of segments in a space */
|
||||
@@ -24,12 +23,12 @@ struct vspace {
|
||||
int v_fd; /* file for swapping */
|
||||
off_t v_foffset; /* offset for computing file addresses */
|
||||
int v_maxsegno; /* number of segments in this space */
|
||||
};
|
||||
};
|
||||
|
||||
struct dlink { /* general double link structure */
|
||||
struct dlink *fwd; /* forward link */
|
||||
struct dlink *back; /* back link */
|
||||
};
|
||||
};
|
||||
|
||||
struct vseg { /* structure of a segment in memory */
|
||||
struct dlink s_link; /* for linking into lru list */
|
||||
@@ -37,12 +36,11 @@ struct vseg { /* structure of a segment in memory */
|
||||
struct vspace *s_vspace; /* which virtual space */
|
||||
int s_lock_count;
|
||||
int s_flags;
|
||||
union
|
||||
{
|
||||
union {
|
||||
int _winfo[WORDSPERSEG]; /* the actual segment */
|
||||
char _cinfo[BYTESPERSEG];
|
||||
} v_un;
|
||||
};
|
||||
};
|
||||
|
||||
#define s_winfo v_un._winfo
|
||||
#define s_cinfo v_un._cinfo
|
||||
@@ -50,15 +48,16 @@ struct vseg { /* structure of a segment in memory */
|
||||
/* masks for s_flags */
|
||||
#define S_DIRTY 01 /* segment has been modified */
|
||||
|
||||
long nswaps; /* number of swaps */
|
||||
long nmapsegs; /* number of mapseg calls */
|
||||
long nswaps; /* number of swaps */
|
||||
long nmapsegs; /* number of mapseg calls */
|
||||
|
||||
int vminit(), vmopen();
|
||||
struct vseg *vmmapseg();
|
||||
void vmlock(), vmunlock(), vmclrseg(), vmmodify();
|
||||
void vmflush(), vmclose();
|
||||
int vminit(), vmopen();
|
||||
struct vseg *vmmapseg();
|
||||
void vmlock(), vmunlock(), vmclrseg(), vmmodify();
|
||||
void vmflush(), vmclose();
|
||||
|
||||
typedef long VADDR;
|
||||
|
||||
#define VMMODIFY(seg) (seg->s_flags |= S_DIRTY)
|
||||
#define VSEG(va) ((short)(va >> LOG2BPS))
|
||||
#define VOFF(va) ((u_short)va % BYTESPERSEG)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <strings.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <paths.h>
|
||||
#include "chpass.h"
|
||||
|
||||
char e1[] = ": ";
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <unistd.h>
|
||||
#include <fstab.h>
|
||||
#include <pwd.h>
|
||||
#include <paths.h>
|
||||
#include "fsck.h"
|
||||
|
||||
extern int returntosingle;
|
||||
@@ -269,7 +270,7 @@ main(argc, argv)
|
||||
* for stdio. There may be other problems like this. Enjoy.
|
||||
*/
|
||||
if (!getfsent())
|
||||
errexit("Can't open checklist file: %s\n",FSTAB);
|
||||
errexit("Can't open checklist file: %s\n", _PATH_FSTAB);
|
||||
setpassent(1);
|
||||
|
||||
memsize = (char*) sbrk(0) - (char*) &_start;
|
||||
@@ -296,7 +297,7 @@ main(argc, argv)
|
||||
do {
|
||||
anygtr = 0;
|
||||
if (setfsent() == 0)
|
||||
errexit("Can't open %s\n", FSTAB);
|
||||
errexit("Can't open %s\n", _PATH_FSTAB);
|
||||
while ((fsp = getfsent()) != 0) {
|
||||
if (strcmp(fsp->fs_vfstype, "ufs") ||
|
||||
(strcmp(fsp->fs_type, FSTAB_RW) &&
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <paths.h>
|
||||
|
||||
uid_t uid;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <paths.h>
|
||||
|
||||
typedef enum { MNTON, MNTFROM } mntwhat;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <paths.h>
|
||||
|
||||
char *passwd, *temp;
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <paths.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
static FILE *_fs_fp;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <pwd.h>
|
||||
#include <strings.h>
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
|
||||
static FILE *_pw_fp;
|
||||
static struct passwd _pw_entry;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
static void
|
||||
set_ch(win, y, x, ch)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
int y, x;
|
||||
{
|
||||
# ifdef FULLDEBUG
|
||||
@@ -38,11 +38,11 @@ set_ch(win, y, x, ch)
|
||||
* This routine adds the character to the current position
|
||||
*/
|
||||
int waddch(win, c)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
char c;
|
||||
{
|
||||
reg int x, y;
|
||||
reg int newx;
|
||||
int x, y;
|
||||
int newx;
|
||||
|
||||
x = win->_curx;
|
||||
y = win->_cury;
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
*/
|
||||
int
|
||||
waddstr(win, str)
|
||||
reg WINDOW *win;
|
||||
reg char *str;
|
||||
WINDOW *win;
|
||||
char *str;
|
||||
{
|
||||
# ifdef DEBUG
|
||||
fprintf(outf, "WADDSTR(\"%s\")\n", str);
|
||||
|
||||
@@ -12,13 +12,12 @@
|
||||
*/
|
||||
void
|
||||
box(win, vert, hor)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
char vert, hor;
|
||||
{
|
||||
|
||||
reg int i;
|
||||
reg int endy, endx;
|
||||
reg char *fp, *lp;
|
||||
int i;
|
||||
int endy, endx;
|
||||
char *fp, *lp;
|
||||
|
||||
endx = win->_maxx;
|
||||
endy = win->_maxy - 1;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* This routine clears the window.
|
||||
*/
|
||||
int wclear(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
werase(win);
|
||||
win->_clear = TRUE;
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
*/
|
||||
void
|
||||
wclrtobot(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
reg int y;
|
||||
reg char *sp, *end, *maxx;
|
||||
reg int startx, minx;
|
||||
int y;
|
||||
char *sp, *end, *maxx;
|
||||
int startx, minx;
|
||||
|
||||
startx = win->_curx;
|
||||
for (y = win->_cury; y < win->_maxy; y++) {
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
*/
|
||||
void
|
||||
wclrtoeol(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
reg char *sp, *end;
|
||||
reg int y, x;
|
||||
reg char *maxx;
|
||||
reg int minx;
|
||||
char *sp, *end;
|
||||
int y, x;
|
||||
char *maxx;
|
||||
int minx;
|
||||
|
||||
y = win->_cury;
|
||||
x = win->_curx;
|
||||
|
||||
@@ -290,8 +290,8 @@ out:
|
||||
void
|
||||
fgoto()
|
||||
{
|
||||
reg char *cgp;
|
||||
reg int l, c;
|
||||
char *cgp;
|
||||
int l, c;
|
||||
|
||||
if (destcol >= COLS) {
|
||||
destline += destcol / COLS;
|
||||
|
||||
@@ -115,9 +115,9 @@ zap()
|
||||
|
||||
int
|
||||
setterm(type)
|
||||
reg char *type;
|
||||
char *type;
|
||||
{
|
||||
reg int unknown;
|
||||
int unknown;
|
||||
static char genbuf[1024];
|
||||
# ifdef TIOCGWINSZ
|
||||
struct winsize win;
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
*/
|
||||
int
|
||||
wdelch(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
reg char *temp1, *temp2;
|
||||
reg char *end;
|
||||
char *temp1, *temp2;
|
||||
char *end;
|
||||
|
||||
end = &win->_y[win->_cury][win->_maxx - 1];
|
||||
temp1 = &win->_y[win->_cury][win->_curx];
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
*/
|
||||
int
|
||||
wdeleteln(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
reg char *temp;
|
||||
reg int y;
|
||||
reg char *end;
|
||||
char *temp;
|
||||
int y;
|
||||
char *end;
|
||||
|
||||
# ifdef DEBUG
|
||||
fprintf(outf, "DELETELN(%0.2o)\n", win);
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
*/
|
||||
int
|
||||
delwin(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
reg int i;
|
||||
reg WINDOW *wp, *np;
|
||||
int i;
|
||||
WINDOW *wp, *np;
|
||||
|
||||
if (win->_orig == NULL) {
|
||||
/*
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
*/
|
||||
void
|
||||
werase(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
reg int y;
|
||||
reg char *sp, *end, *start, *maxx;
|
||||
reg int minx;
|
||||
int y;
|
||||
char *sp, *end, *start, *maxx;
|
||||
int minx;
|
||||
|
||||
# ifdef DEBUG
|
||||
fprintf(outf, "WERASE(%0.2o)\n", win);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#define reg register
|
||||
|
||||
/*
|
||||
* This routine fills in "def" with the full name of the terminal.
|
||||
@@ -12,10 +11,9 @@
|
||||
*/
|
||||
char *
|
||||
fullname(bp, def)
|
||||
reg char *bp, *def;
|
||||
char *bp, *def;
|
||||
{
|
||||
|
||||
reg char *cp;
|
||||
char *cp;
|
||||
|
||||
*def = 0; /* in case no name */
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
* This routine reads in a character from the window.
|
||||
*/
|
||||
int wgetch(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
reg bool weset = FALSE;
|
||||
reg char inp;
|
||||
bool weset = FALSE;
|
||||
char inp;
|
||||
|
||||
if (!win->_scroll && (win->_flags&_FULLWIN)
|
||||
&& win->_curx == win->_maxx - 1 && win->_cury == win->_maxy - 1)
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
*/
|
||||
int
|
||||
wgetstr(win, str)
|
||||
reg WINDOW *win;
|
||||
reg char *str;
|
||||
WINDOW *win;
|
||||
char *str;
|
||||
{
|
||||
while ((*str = wgetch(win)) != ERR && *str != '\n')
|
||||
str++;
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
*/
|
||||
void
|
||||
_id_subwins(orig)
|
||||
register WINDOW *orig;
|
||||
WINDOW *orig;
|
||||
{
|
||||
register WINDOW *win;
|
||||
register int realy;
|
||||
register int y, oy;
|
||||
WINDOW *win;
|
||||
int realy;
|
||||
int y, oy;
|
||||
|
||||
realy = orig->_begy + orig->_cury;
|
||||
for (win = orig->_nextp; win != orig; win = win->_nextp) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
void
|
||||
idlok(win, bf)
|
||||
register WINDOW *win;
|
||||
WINDOW *win;
|
||||
bool bf;
|
||||
{
|
||||
if (bf)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
WINDOW *
|
||||
initscr()
|
||||
{
|
||||
reg char *sp;
|
||||
char *sp;
|
||||
int nfd;
|
||||
|
||||
# ifdef DEBUG
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
*/
|
||||
int
|
||||
winsch(win, c)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
char c;
|
||||
{
|
||||
reg char *temp1, *temp2;
|
||||
reg char *end;
|
||||
char *temp1, *temp2;
|
||||
char *end;
|
||||
|
||||
end = &win->_y[win->_cury][win->_curx];
|
||||
temp1 = &win->_y[win->_cury][win->_maxx - 1];
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
*/
|
||||
void
|
||||
winsertln(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
reg char *temp = 0;
|
||||
reg int y;
|
||||
reg char *end;
|
||||
char *temp = 0;
|
||||
int y;
|
||||
char *end;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(outf, "INSERTLN(%0.2o)\n", win);
|
||||
|
||||
@@ -3,16 +3,15 @@
|
||||
* All rights reserved. The Berkeley software License Agreement
|
||||
* specifies the terms and conditions for redistribution.
|
||||
*/
|
||||
#define reg register
|
||||
|
||||
/*
|
||||
* This routine fills in "def" with the long name of the terminal.
|
||||
*/
|
||||
char *
|
||||
longname(bp, def)
|
||||
reg char *bp, *def;
|
||||
char *bp, *def;
|
||||
{
|
||||
reg char *cp;
|
||||
char *cp;
|
||||
|
||||
while (*bp && *bp != ':' && *bp != '|')
|
||||
bp++;
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
* This routine moves the cursor to the given point
|
||||
*/
|
||||
int wmove(win, y, x)
|
||||
reg WINDOW *win;
|
||||
reg int y, x;
|
||||
WINDOW *win;
|
||||
int y, x;
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(outf, "MOVE to (%d, %d)\n", y, x);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
int
|
||||
mvscanw(y, x, fmt, args)
|
||||
reg int y, x;
|
||||
int y, x;
|
||||
char *fmt;
|
||||
int args;
|
||||
{
|
||||
@@ -20,8 +20,8 @@ mvscanw(y, x, fmt, args)
|
||||
|
||||
int
|
||||
mvwscanw(win, y, x, fmt, args)
|
||||
reg WINDOW *win;
|
||||
reg int y, x;
|
||||
WINDOW *win;
|
||||
int y, x;
|
||||
char *fmt;
|
||||
int args;
|
||||
{
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
*/
|
||||
int
|
||||
mvwin(win, by, bx)
|
||||
reg WINDOW *win;
|
||||
reg int by, bx;
|
||||
WINDOW *win;
|
||||
int by, bx;
|
||||
{
|
||||
register WINDOW *orig;
|
||||
register int dy, dx;
|
||||
WINDOW *orig;
|
||||
int dy, dx;
|
||||
|
||||
if (by + win->_maxy > LINES || bx + win->_maxx > COLS)
|
||||
return ERR;
|
||||
|
||||
@@ -22,8 +22,8 @@ static WINDOW *
|
||||
makenew(num_lines, num_cols, begy, begx)
|
||||
int num_lines, num_cols, begy, begx;
|
||||
{
|
||||
reg WINDOW *win;
|
||||
reg int by, bx, nl, nc;
|
||||
WINDOW *win;
|
||||
int by, bx, nl, nc;
|
||||
|
||||
by = begy;
|
||||
bx = begx;
|
||||
@@ -71,10 +71,10 @@ WINDOW *
|
||||
newwin(num_lines, num_cols, begy, begx)
|
||||
int num_lines, num_cols, begy, begx;
|
||||
{
|
||||
reg WINDOW *win;
|
||||
reg char *sp;
|
||||
reg int i, by, bx, nl, nc;
|
||||
reg int j;
|
||||
WINDOW *win;
|
||||
char *sp;
|
||||
int i, by, bx, nl, nc;
|
||||
int j;
|
||||
|
||||
by = begy;
|
||||
bx = begx;
|
||||
@@ -125,11 +125,11 @@ newwin(num_lines, num_cols, begy, begx)
|
||||
|
||||
WINDOW *
|
||||
subwin(orig, num_lines, num_cols, begy, begx)
|
||||
reg WINDOW *orig;
|
||||
WINDOW *orig;
|
||||
int num_lines, num_cols, begy, begx;
|
||||
{
|
||||
reg WINDOW *win;
|
||||
reg int by, bx, nl, nc;
|
||||
WINDOW *win;
|
||||
int by, bx, nl, nc;
|
||||
|
||||
by = begy;
|
||||
bx = begx;
|
||||
|
||||
@@ -15,12 +15,11 @@
|
||||
*/
|
||||
void
|
||||
overlay(win1, win2)
|
||||
reg WINDOW *win1, *win2;
|
||||
WINDOW *win1, *win2;
|
||||
{
|
||||
|
||||
reg char *sp, *end;
|
||||
reg int x, y, endy, endx, starty, startx;
|
||||
reg int y1,y2;
|
||||
char *sp, *end;
|
||||
int x, y, endy, endx, starty, startx;
|
||||
int y1,y2;
|
||||
|
||||
# ifdef DEBUG
|
||||
fprintf(outf, "OVERLAY(%0.2o, %0.2o);\n", win1, win2);
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
void
|
||||
overwrite(win1, win2)
|
||||
reg WINDOW *win1, *win2;
|
||||
WINDOW *win1, *win2;
|
||||
{
|
||||
reg int x, y, endy, endx, starty, startx;
|
||||
int x, y, endy, endx, starty, startx;
|
||||
|
||||
# ifdef DEBUG
|
||||
fprintf(outf, "OVERWRITE(%0.2o, %0.2o);\n", win1, win2);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
int
|
||||
_putchar(c)
|
||||
reg int c;
|
||||
int c;
|
||||
{
|
||||
putchar(c);
|
||||
#ifdef DEBUG
|
||||
|
||||
@@ -40,12 +40,12 @@ domvcur(oy, ox, ny, nx)
|
||||
*/
|
||||
STATIC int
|
||||
makech(win, wy)
|
||||
reg WINDOW *win;
|
||||
short wy;
|
||||
WINDOW *win;
|
||||
short wy;
|
||||
{
|
||||
reg char *nsp, *csp, *ce;
|
||||
reg short wx, lch, y;
|
||||
reg int nlsp = 0, clsp; /* last space in lines */
|
||||
char *nsp, *csp, *ce;
|
||||
short wx, lch, y;
|
||||
int nlsp = 0, clsp; /* last space in lines */
|
||||
|
||||
wx = win->_firstch[wy] - win->_ch_off;
|
||||
if (wx >= win->_maxx)
|
||||
@@ -198,10 +198,10 @@ short wy;
|
||||
}
|
||||
|
||||
int wrefresh(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
reg short wy;
|
||||
reg int retval;
|
||||
short wy;
|
||||
int retval;
|
||||
|
||||
/*
|
||||
* make sure were in visual state
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
*/
|
||||
int
|
||||
scroll(win)
|
||||
register WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
register int oy, ox;
|
||||
int oy, ox;
|
||||
|
||||
# ifdef DEBUG
|
||||
fprintf(outf, "SCROLL(%0.2o)\n", win);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
char *
|
||||
wstandout(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
if (!SO && !UC)
|
||||
return FALSE;
|
||||
@@ -26,7 +26,7 @@ wstandout(win)
|
||||
*/
|
||||
char *
|
||||
wstandend(win)
|
||||
reg WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
if (!SO && !UC)
|
||||
return FALSE;
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
*/
|
||||
void
|
||||
touchoverlap(win1, win2)
|
||||
reg WINDOW *win1, *win2;
|
||||
WINDOW *win1, *win2;
|
||||
{
|
||||
reg int y, endy, endx, starty, startx;
|
||||
int y, endy, endx, starty, startx;
|
||||
|
||||
# ifdef DEBUG
|
||||
fprintf(outf, "TOUCHOVERLAP(%0.2o, %0.2o);\n", win1, win2);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
*
|
||||
*/
|
||||
int touchwin(win)
|
||||
register WINDOW *win;
|
||||
WINDOW *win;
|
||||
{
|
||||
register int y, maxy;
|
||||
int y, maxy;
|
||||
|
||||
# ifdef DEBUG
|
||||
fprintf(outf, "TOUCHWIN(%0.2o)\n", win);
|
||||
@@ -27,8 +27,8 @@ int touchwin(win)
|
||||
* touch a given line
|
||||
*/
|
||||
int touchline(win, y, sx, ex)
|
||||
register WINDOW *win;
|
||||
register int y, sx, ex;
|
||||
WINDOW *win;
|
||||
int y, sx, ex;
|
||||
{
|
||||
# ifdef DEBUG
|
||||
fprintf(outf, "TOUCHLINE(%0.2o, %d, %d, %d)\n", win, y, sx, ex);
|
||||
|
||||
@@ -73,8 +73,3 @@ struct mtget {
|
||||
#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */
|
||||
#define MTIOCIEOT _IO ('m', 3) /* ignore EOT error */
|
||||
#define MTIOCEEOT _IO ('m', 4) /* enable EOT error */
|
||||
|
||||
#ifndef KERNEL
|
||||
#define DEFTAPE "/dev/rmt8"
|
||||
#define MT_DEF "/dev/nrmt8"
|
||||
#endif
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
#ifndef _SYS_SYSLOG_H_
|
||||
#define _SYS_SYSLOG_H_
|
||||
|
||||
#define _PATH_LOG "/dev/log"
|
||||
|
||||
/*
|
||||
* priorities/facilities are encoded into a single 16-bit quantity, where the
|
||||
* bottom 3 bits are the priority (0-7) and the top 13 bits are the facility
|
||||
|
||||
Reference in New Issue
Block a user