Added source code

This commit is contained in:
hellisabove
2023-03-18 20:26:52 +02:00
commit f3ea0095df
188 changed files with 48888 additions and 0 deletions
+624
View File
@@ -0,0 +1,624 @@
#line 2 "osdep/dos"
/*
* $Id: dos 13299 2003-11-25 17:35:10Z hubert $
*
* Program: Operating system dependent routines - MS DOS
*
*
* Michael Seibel
* Networks and Distributed Computing
* Computing and Communications
* University of Washington
* Administration Builiding, AG-44
* Seattle, Washington, 98195, USA
* Internet: mikes@cac.washington.edu
*
* Please address all bugs and comments to "pine-bugs@cac.washington.edu"
*
*
* Pine and Pico are registered trademarks of the University of Washington.
* No commercial use of these trademarks may be made without prior written
* permission of the University of Washington.
*
* Pine, Pico, and Pilot software and its included text are Copyright
* 1989-1998 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*
* Notes:
* - mouse support added (mss, 921215)
*
* Portions of this code derived from MicroEMACS 3.10:
*
* MSDOS.C: Operating specific I/O and Spawning functions
* under the MS/PCDOS operating system
* for MicroEMACS 3.10
* (C)opyright 1988 by Daniel M. Lawrence
*
*/
#include <fcntl.h>
#include <bios.h>
#include "dos_gen.h"
/*
* Internal functions...
*/
int enhanced_keybrd PROTO((void));
int dont_interrupt PROTO((void));
int interrupt_ok PROTO((void));
int specialkey PROTO((unsigned int));
char *pfnexpand PROTO((char *, size_t));
int ssleep PROTO((long));
int sleep PROTO((int));
/*
* Useful global def's
*/
int timeo = 0;
time_t time_of_last_input;
int (*pcollator)();
static int enhncd = 0; /* keyboard of enhanced variety? */
union REGS rg;
struct SREGS segreg;
static int oldbut; /* Previous state of mouse buttons */
static unsigned short oldbreak; /* Original state of break key */
static char ptmpfile[128]; /* popen temp file */
/*
* Include generic DOS/Windows routines
*/
/* #include "dos_gen.c" */
/*
* DISable ctrl-break interruption
*/
dont_interrupt()
{
/* get original value, to be restored later... */
rg.h.ah = 0x33; /* control-break check dos call */
rg.h.al = 0; /* get the current state */
rg.h.dl = 0; /* pre-set it OFF */
intdos(&rg, &rg); /* go for it! */
oldbreak = rg.h.dl;
/* kill the ctrl-break interupt */
rg.h.ah = 0x33; /* control-break check dos call */
rg.h.al = 1; /* set the current state */
rg.h.dl = 0; /* set it OFF */
intdos(&rg, &rg); /* go for it! */
}
/*
* re-enable ctrl-break interruption
*/
interrupt_ok()
{
/* restore the ctrl-break interupt */
rg.h.ah = 0x33; /* control-break check dos call */
rg.h.al = 1; /* set to new state */
rg.h.dl = oldbreak; /* set it to its original value */
intdos(&rg, &rg); /* go for it! */
}
/*
* return true if an enhanced keyboard is present
*/
enhanced_keybrd()
{
/* and check for extended keyboard */
rg.h.ah = 0x05;
rg.x.cx = 0xffff;
int86(BIOS_KEYBRD, &rg, &rg);
rg.h.ah = 0x10;
int86(BIOS_KEYBRD, &rg, &rg);
return(rg.x.ax == 0xffff);
}
/*
* This function is called once to set up the terminal device streams.
*/
ttopen()
{
dont_interrupt(); /* don't allow interrupt */
enhncd = enhanced_keybrd(); /* check for extra keys */
#if MOUSE
init_mouse();
#else /* !MOUSE */
mexist = 0;
#endif /* MOUSE */
return(1);
}
/*
* ttresize - recompute the screen dimensions if necessary, and then
* adjust pico's internal buffers accordingly
*/
void
ttresize ()
{
return;
}
#ifdef MOUSE
/*
* init_mouse - check for and initialize mouse driver...
*/
init_mouse()
{
long miaddr; /* mouse interupt routine address */
if(mexist)
return(TRUE);
/* check if the mouse drive exists first */
rg.x.ax = 0x3533; /* look at the interrupt 33 address */
intdosx(&rg, &rg, &segreg);
miaddr = (((long)segreg.es) << 16) + (long)rg.x.bx;
if (miaddr == 0 || *(char *)miaddr == 0xcf) {
mexist = FALSE;
return(TRUE);
}
/* and then check for the mouse itself */
rg.x.ax = 0; /* mouse status flag */
int86(BIOS_MOUSE, &rg, &rg); /* check for the mouse interupt */
mexist = (rg.x.ax != 0);
nbuttons = rg.x.bx;
if (mexist == FALSE)
return(TRUE);
/* if the mouse exists.. get it in the upper right corner */
rg.x.ax = 4; /* set mouse cursor position */
rg.x.cx = (term.t_ncol/2) << 3; /* Center of display... */
rg.x.dx = 1 << 3; /* Second line down */
int86(BIOS_MOUSE, &rg, &rg);
/* and set its attributes */
rg.x.ax = 10; /* set text cursor */
rg.x.bx = 0; /* software text cursor please */
rg.x.cx = 0x77ff; /* screen mask */
rg.x.dx = 0x7700; /* cursor mask */
int86(BIOS_MOUSE, &rg, &rg);
return(TRUE);
}
/*
* mouseon - call made available for programs calling pico to turn ON the
* mouse cursor.
*/
void
mouseon()
{
rg.x.ax = 1; /* Show Cursor */
int86(BIOS_MOUSE, &rg, &rg);
}
/*
* mouseon - call made available for programs calling pico to turn OFF the
* mouse cursor.
*/
void
mouseoff()
{
rg.x.ax = 2; /* Hide Cursor */
int86(BIOS_MOUSE, &rg, &rg);
}
#endif
/*
* This function gets called just before we go back home to the command
* interpreter.
*/
ttclose()
{
if(!Pmaster)
interrupt_ok();
return(1);
}
/*
* Flush terminal buffer. Does real work where the terminal output is buffered
* up. A no-operation on systems where byte at a time terminal I/O is done.
*/
ttflush()
{
return(1);
}
/*
* specialkey - return special key definition
*/
specialkey(kc)
unsigned kc;
{
switch(kc){
case 0x3b00 : return(F1);
case 0x3c00 : return(F2);
case 0x3d00 : return(F3);
case 0x3e00 : return(F4);
case 0x3f00 : return(F5);
case 0x4000 : return(F6);
case 0x4100 : return(F7);
case 0x4200 : return(F8);
case 0x4300 : return(F9);
case 0x4400 : return(F10);
case 0x8500 : return(F11);
case 0x8600 : return(F12);
case 0x4800 : return(KEY_UP);
case 0x5000 : return(KEY_DOWN);
case 0x4b00 : return(KEY_LEFT);
case 0x4d00 : return(KEY_RIGHT);
case 0x4700 : return(KEY_HOME);
case 0x4f00 : return(KEY_END);
case 0x4900 : return(KEY_PGUP);
case 0x5100 : return(KEY_PGDN);
case 0x5300 : return(KEY_DEL);
case 0x48e0 : return(KEY_UP); /* grey key version */
case 0x50e0 : return(KEY_DOWN); /* grey key version */
case 0x4be0 : return(KEY_LEFT); /* grey key version */
case 0x4de0 : return(KEY_RIGHT); /* grey key version */
case 0x47e0 : return(KEY_HOME); /* grey key version */
case 0x4fe0 : return(KEY_END); /* grey key version */
case 0x49e0 : return(KEY_PGUP); /* grey key version */
case 0x51e0 : return(KEY_PGDN); /* grey key version */
case 0x53e0 : return(KEY_DEL); /* grey key version */
default : return(NODATA);
}
}
/*
* Read a character from the terminal, performing no editing and doing no echo
* at all. Also mouse events are forced into the input stream here.
*/
int
ttgetc(return_on_intr, recorder, bail_handler)
int return_on_intr;
int (*recorder)();
int (*bail_handler)();
{
return(_bios_keybrd(enhncd ? _NKEYBRD_READ : _KEYBRD_READ));
}
/*
* ctrlkey - used to check if the key hit was a control key.
*/
ctrlkey()
{
return(_bios_keybrd(enhncd ? _NKEYBRD_SHIFTSTATUS : _KEYBRD_SHIFTSTATUS)
& 0x04);
}
/*
* win_multiplex - give DOS in a window a shot at the CPU
*/
win_multiplex()
{
rg.x.ax = 0x1680;
int86(DOS_MULTIPLEX, &rg, &rg);
}
/*
* Read in a key.
* Do the standard keyboard preprocessing. Convert the keys to the internal
* character set. Resolves escape sequences and returns no-op if global
* timeout value exceeded.
*/
GetKey()
{
unsigned ch = 0, lch, intrupt = 0;
long timein;
if(mexist || timeo){
timein = time(0L);
#ifdef MOUSE
if(mexist){
rg.x.ax = 1; /* Show Cursor */
int86(BIOS_MOUSE, &rg, &rg);
}
#endif
while(!_bios_keybrd(enhncd ? _NKEYBRD_READY : _KEYBRD_READY)){
#if MOUSE
if(timeo && time(0L) >= timein+timeo){
if(mexist){
rg.x.ax = 2; /* Hide Cursor */
int86(BIOS_MOUSE, &rg, &rg);
}
return(NODATA);
}
if(checkmouse(&ch,0,0,0)){ /* something happen ?? */
if(mexist){
rg.x.ax = 2; /* Hide Cursor */
int86(BIOS_MOUSE, &rg, &rg);
}
curwp->w_flag |= WFHARD;
return(ch);
}
#else
if(time(0L) >= timein+timeo)
return(NODATA);
#endif /* MOUSE */
/*
* Surrender the CPU...
*/
if(!intrupt++)
win_multiplex();
}
#ifdef MOUSE
if(mexist){
rg.x.ax = 2; /* Hide Cursor */
int86(BIOS_MOUSE, &rg, &rg);
}
#endif /* MOUSE */
}
ch = (*term.t_getchar)(0, NULL, NULL);
lch = (ch&0xff);
if(lch & 0x80 && Pmaster && Pmaster->hibit_entered)
*Pmaster->hibit_entered = 1;
return((lch && (lch != 0xe0 || !(ch & 0xff00)))
? (lch < ' ') ? (CTRL|(lch + '@'))
: (lch == ' ' && ctrlkey()) ? (CTRL|'@') : lch
: specialkey(ch));
}
#if MOUSE
/*
* checkmouse - look for mouse events in key menu and return
* appropriate value.
* NOTE: "down", "xxx", and "yyy" aren't used under DOS.
*/
int
checkmouse(ch, down, xxx, yyy)
unsigned *ch;
int down, xxx, yyy;
{
register int k; /* current bit/button of mouse */
int mcol; /* current mouse column */
int mrow; /* current mouse row */
int sstate; /* current shift key status */
int newbut; /* new state of the mouse buttons */
int button;
int rv = 0;
if(!mexist)
return(FALSE);
/* check to see if any mouse buttons are different */
rg.x.ax = 3; /* Get button status and mouse position */
int86(BIOS_MOUSE, &rg, &rg);
newbut = rg.x.bx;
mcol = rg.x.cx >> 3;
mrow = (rg.x.dx >> 3);
/* only notice changes */
if (oldbut == newbut)
return(FALSE);
if (mcol < 0) /* only on screen presses are legit! */
mcol = 0;
if (mrow < 0)
mrow = 0;
sstate = 0; /* get the shift key status as well */
rg.h.ah = 2;
int86(BIOS_KEYBRD, &rg, &rg);
sstate = rg.h.al;
button = M_BUTTON_LEFT;
for (k=1; k != (1 << nbuttons); k = k<<1) {
/* For each button on the mouse */
if ((oldbut&k) != (newbut&k)) {
if(k == 1){
static int oindex;
int i = 0;
MENUITEM *mp;
if(newbut&k) /* button down */
oindex = -1;
for(mp = mfunc; mp; mp = mp->next)
if(mp->action && M_ACTIVE(mrow, mcol, mp))
break;
if(mp){
unsigned long r;
r = (*mp->action)((newbut&k) ? M_EVENT_DOWN : M_EVENT_UP,
mrow, mcol, button, 0);
if(r & 0xffff){
*ch = (unsigned)((r>>16)&0xffff);
rv = TRUE;
}
}
else{
while(1){ /* see if we understand event */
if(i >= 12){
i = -1;
break;
}
if(M_ACTIVE(mrow, mcol, &menuitems[i]))
break;
i++;
}
if(newbut&k){ /* button down */
oindex = i; /* remember where */
if(i != -1) /* invert label */
invert_label(1, &menuitems[i]);
}
else{ /* button up */
if(oindex != -1){
if(i == oindex){
*ch = menuitems[i].val;
rv = 1;
}
}
}
}
if(!(newbut&k) && oindex != -1)
invert_label(0, &menuitems[oindex]); /* restore label */
}
oldbut = newbut;
return(rv);
}
++button;
}
return(FALSE);
}
/*
* invert_label - highlight the label of the given menu item.
*/
void
invert_label(state, m)
int state;
MENUITEM *m;
{
int i, j, r, c, p, col_offset;
char *lp;
int old_state = getrevstate();
if(m->val == mnoop)
return;
rg.h.ah = 3; /* get cursor position */
int86(BIOS_VIDEO, &rg, &rg);
p = rg.h.bh;
c = rg.h.dl;
r = rg.h.dh;
rg.x.ax = 2; /* Hide Cursor */
int86(BIOS_MOUSE, &rg, &rg);
/*
* Leave the command name bold
*/
col_offset = (state || !(lp=strchr(m->label, ' '))) ? 0 : (lp - m->label);
(*term.t_move)(m->tl.r, m->tl.c + col_offset);
(*term.t_rev)(state);
for(i = m->tl.r; i <= m->br.r; i++)
for(j = m->tl.c + col_offset; j <= m->br.c; j++)
if(i == m->lbl.r && j == m->lbl.c + col_offset){ /* show label?? */
lp = m->label + col_offset;
while(*lp && j++ < m->br.c)
(*term.t_putchar)(*lp++);
continue;
}
else
(*term.t_putchar)(' ');
(*term.t_rev)(old_state);
rg.h.ah = 2;
rg.h.bh = p;
rg.h.dh = r;
rg.h.dl = c;
int86(BIOS_VIDEO, &rg, &rg); /* restore old position */
rg.x.ax = 1; /* Show Cursor */
int86(BIOS_MOUSE, &rg, &rg);
}
#endif /* MOUSE */
/*
* alt_editor - fork off an alternate editor for mail message composition
*
* NOTE: Not yet used under DOS
*/
alt_editor(f, n)
int f, n;
{
return(-1);
}
/*
* bktoshell - suspend and wait to be woken up
*/
int
bktoshell() /* suspend MicroEMACS and wait to wake up */
{
int i;
char *shell;
(*term.t_move)(term.t_nrow, 0);
if(system((shell = getenv("COMSPEC")) ? shell : "command") == -1)
emlwrite("Error loading %s", shell ? shell : "COMMAND.COM");
else
pico_refresh(0, 1); /* redraw */
return(1);
}
/*
* P_open - run the given command in a sub-shell returning a file pointer
* from which to read the output
*
* note:
* For OS's other than unix, you will have to rewrite this function.
* Hopefully it'll be easy to exec the command into a temporary file,
* and return a file pointer to that opened file or something.
*/
FILE *P_open(c)
char *c;
{
char cmdbuf[NLINE];
sprintf(ptmpfile, tmpnam(NULL));
sprintf(cmdbuf, "%s > %s", c, ptmpfile);
if(system(cmdbuf) == -1){
unlink(ptmpfile);
return(NULL);
}
return(fopen(ptmpfile, "r"));
}
/*
* P_close - close the given descriptor
*
*/
void
P_close(fp)
FILE *fp;
{
fclose(fp); /* doesn't handle return codes */
unlink(ptmpfile);
}
+41
View File
@@ -0,0 +1,41 @@
/*
* $Id: dos_gen.h 7884 1998-02-28 00:15:44Z hubert $
*
* Program: Operating system dependent header - MS DOS Generic
*
*
* Michael Seibel
* Networks and Distributed Computing
* Computing and Communications
* University of Washington
* Administration Builiding, AG-44
* Seattle, Washington, 98195, USA
* Internet: mikes@cac.washington.edu
*
* Please address all bugs and comments to "pine-bugs@cac.washington.edu"
*
*
* Pine and Pico are registered trademarks of the University of Washington.
* No commercial use of these trademarks may be made without prior written
* permission of the University of Washington.
*
* Pine, Pico, and Pilot software and its included text are Copyright
* 1989-1998 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*
* Notes:
* - This file should contain the cross section of functions useful
* in both DOS and Windows ports of pico.
*
*/
#ifdef TURBOC
/*
* big stack for turbo C
*/
extern unsigned _stklen = 16384;
#endif
+1274
View File
File diff suppressed because it is too large Load Diff
+50
View File
@@ -0,0 +1,50 @@
/*
* Program: File sync emulator
*
* Author: Mark Crispin
* Networks and Distributed Computing
* Computing & Communications
* University of Washington
* Administration Building, AG-44
* Seattle, WA 98195
* Internet: MRC@CAC.Washington.EDU
*
* Date: 3 May 1995
* Last Edited: 3 May 1995
*
* Copyright 1995 by the University of Washington
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appears in all copies and that both the
* above copyright notice and this permission notice appear in supporting
* documentation, and that the name of the University of Washington not be
* used in advertising or publicity pertaining to distribution of the software
* without specific, written prior permission. This software is made
* available "as is", and
* THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
* WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
* NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
* (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
/* Emulator for BSD fsync() call
* Accepts: file name
* Returns: 0 if successful, -1 if failure
*/
int
our_fsync(fd)
int fd;
{
sync();
return 0;
}
+17
View File
@@ -0,0 +1,17 @@
/*
* getcwd
*/
char *
getcwd(pth, len)
char *pth;
size_t len;
{
extern char *getwd();
if(!pth)
pth = (char *)malloc(len+1);
return(getwd(pth));
}
+32
View File
@@ -0,0 +1,32 @@
#if !defined(lint) && !defined(DOS)
static char rcsid[] = "$Id: header 7884 1998-02-28 00:15:44Z hubert $";
#endif
/*
* Program: Routines to support file browser in pico and Pine composer
*
*
* Michael Seibel
* Networks and Distributed Computing
* Computing and Communications
* University of Washington
* Administration Builiding, AG-44
* Seattle, Washington, 98195, USA
* Internet: mikes@cac.washington.edu
*
* Please address all bugs and comments to "pine-bugs@cac.washington.edu"
*
*
* Pine and Pico are registered trademarks of the University of Washington.
* No commercial use of these trademarks may be made without prior written
* permission of the University of Washington.
*
* Pine, Pico, and Pilot software and its included text are Copyright
* 1989-1998 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*/
#include "headers.h"
+76
View File
@@ -0,0 +1,76 @@
#if !defined(lint) && !defined(DOS)
static char rcsid[] = "$Id: includer.c 11688 2001-06-21 17:54:43Z hubert $";
#endif
#include <stdio.h>
#include <string.h>
/*
* Inflexible cat with include files.
* The include lines must look exactly like include(filename) with no
* spaces before the include, or between the parens and the surrounding
* characters.
*
* This probably ought to just be a script that uses "cat".
*/
main(argc, argv)
int argc;
char *argv[];
{
FILE * infile = stdin;
FILE * outfile = stdout;
if (argc > 1) {
if ((infile = fopen(argv[1], "r")) == NULL) {
fprintf(stderr, "includer: can't open '%s' for input\n", argv[1]);
exit(1);
}
if (argc > 2) {
if ((outfile = fopen(argv[2], "w")) == NULL) {
fprintf(stderr, "includer: can't create '%s'\n", argv[2]);
exit(1);
}
}
}
readfile(infile, outfile);
exit(0);
}
readfile(fpin, fpout)
FILE *fpin, *fpout;
{
char line[BUFSIZ+1];
FILE *fp;
char *p, *fname, *fend;
while ((p = fgets(line, BUFSIZ, fpin)) != NULL) {
if (!strncmp("include(", p, strlen("include("))) {
/* do include */
fname = strchr(p, '(');
if (fname == NULL) {
fprintf(stderr, "Can't find include file %s\n", p);
exit(1);
}
fname++;
fend = strrchr(fname, ')');
if (fend == NULL) {
fprintf(stderr, "Can't find include file %s\n", p);
exit(1);
}
*fend = '\0';
if ((fp = fopen(fname, "r")) == NULL) {
fprintf(stderr, "Can't open include file %s\n", fname);
exit(1);
}
readfile(fp, fpout);
fclose(fp);
/* skip if comment line (begins with ;) */
}else if (*p != ';') {
fputs(p, fpout);
}
}
return(1);
}
Executable
+26
View File
@@ -0,0 +1,26 @@
#! /bin/csh -f
#
# This only finds include dependencies 1-level deep.
# It's just a big, dumb, grep.
cp makefile makefile.bak
rm -f /tmp/inc$$
foreach i ( `/bin/ls *.ic | sed 's/.ic//'` )
echo -n ${i}.c: >> /tmp/inc$$
foreach j ( `(/bin/ls)` )
grep -s "include($j)" ${i}.ic
if ($status == 0)then
echo -n " ${j}" >> /tmp/inc$$
endif
end
echo " ${i}.ic" >> /tmp/inc$$
end
cat makefile.bas /tmp/inc$$ > makefile
rm -f /tmp/inc$$
+73
View File
@@ -0,0 +1,73 @@
# Don't edit makefile, edit makefile.bas instead.
#
RM= rm -f
ALL= os-a32.c os-a41.c os-aix.c \
os-aux.c os-bs2.c os-bsd.c os-bsf.c os-bsi.c os-bso.c \
os-cvx.c os-dos.c os-dpx.c os-dyn.c \
os-gen.c os-hpp.c os-isc.c os-lnx.c \
os-lyn.c os-mnt.c os-neb.c os-nxt.c \
os-os2.c os-osf.c os-osx.c os-pt1.c os-ptx.c \
os-s40.c os-sco.c os-sgi.c os-sun.c \
os-sv4.c os-ult.c os-win.c os-wnt.c \
os-3b1.c os-att.c os-sc5.c os-nto.c
.SUFFIXES: .ic
.ic.c:
./includer < $*.ic > $*.c
all: includer $(ALL)
includer: includer.c
$(CC) -o includer includer.c
clean:
$(RM) $(ALL) includer
# You don't have to run this unless you change a .ic file.
depend:
./makedep
# Makedep only catches 1-level deep includes. If something depends on a
# 2nd-level include, put it here.
os-3b1.c: header raw.io read.sel spell.unx term.cap unix os-3b1.ic
os-a32.c: header raw.ios read.sel spell.unx term.cap unix os-a32.ic
os-a41.c: header raw.ios read.sel spell.unx term.inf unix os-a41.ic
os-aix.c: header raw.brk read.sel spell.unx term.cap unix os-aix.ic
os-att.c: header raw.io read.sel spell.unx term.cap unix os-att.ic
os-aux.c: header raw.io read.sel spell.unx term.cap unix os-aux.ic
os-bs2.c: header raw.ios read.sel spell.unx term.cap unix os-bs2.ic
os-bsd.c: getcwd header raw.brk read.sel spell.unx term.cap unix os-bsd.ic
os-bsf.c: header raw.ios read.sel spell.unx term.cap unix os-bsf.ic
os-bsi.c: header raw.brk read.sel spell.unx term.cap unix os-bsi.ic
os-bso.c: header raw.ios read.sel spell.unx term.cap unix os-bso.ic
os-cvx.c: header raw.ios read.sel spell.unx term.cap unix os-cvx.ic
os-dos.c: dos dosgen header term.dos os-dos.ic
os-dpx.c: header raw.ios read.sel spell.unx term.cap unix os-dpx.ic
os-dyn.c: getcwd header raw.brk read.sel spell.unx term.cap unix os-dyn.ic
os-gen.c: header raw.ios read.sel spell.unx term.cap unix os-gen.ic
os-hpp.c: header raw.io read.sel spell.unx term.cap unix os-hpp.ic
os-isc.c: header raw.io read.sel spell.unx term.cap truncate unix os-isc.ic
os-lnx.c: header raw.ios read.sel spell.unx term.inf unix os-lnx.ic
os-lyn.c: getcwd header raw.ios read.sel spell.unx term.cap unix os-lyn.ic
os-mnt.c: header raw.brk read.sel spell.unx term.cap unix os-mnt.ic
os-neb.c: header raw.ios read.sel spell.unx term.cap unix os-neb.ic
os-nto.c: header raw.ios read.sel spell.unx term.cap unix os-nto.ic
os-nxt.c: getcwd header raw.brk read.sel spell.unx term.cap unix os-nxt.ic
os-os2.c: header os2 spell.os2 term.dos os-os2.ic
os-osf.c: header raw.ios read.sel spell.unx term.cap unix os-osf.ic
os-osx.c: header raw.brk read.sel spell.unx term.cap unix os-osx.ic
os-pt1.c: header raw.io read.pol spell.unx term.inf unix os-pt1.ic
os-ptx.c: header raw.io read.pol spell.unx term.inf unix os-ptx.ic
os-s40.c: header raw.brk read.sel spell.unx term.cap unix os-s40.ic
os-sc5.c: header raw.ios read.sel spell.unx term.inf unix os-sc5.ic
os-sco.c: fsync.non header raw.io read.sel spell.unx term.inf truncate unix os-sco.ic
os-sgi.c: header raw.ios read.sel spell.unx term.inf unix os-sgi.ic
os-sun.c: header raw.brk read.sel spell.unx term.cap unix os-sun.ic
os-sv4.c: header raw.ios read.pol spell.unx term.inf unix os-sv4.ic
os-ult.c: header raw.brk read.sel spell.unx term.cap unix os-ult.ic
os-win.c: dosgen header spell.ms win os-win.ic
os-wnt.c: dosgen header spell.ms win os-wnt.ic
+35
View File
@@ -0,0 +1,35 @@
# Don't edit makefile, edit makefile.bas instead.
#
RM= rm -f
ALL= os-a32.c os-a41.c os-aix.c \
os-aux.c os-bs2.c os-bsd.c os-bsf.c os-bsi.c os-bso.c \
os-cvx.c os-dos.c os-dpx.c os-dyn.c \
os-gen.c os-hpp.c os-isc.c os-lnx.c \
os-lyn.c os-mnt.c os-neb.c os-nxt.c \
os-os2.c os-osf.c os-osx.c os-pt1.c os-ptx.c \
os-s40.c os-sco.c os-sgi.c os-sun.c \
os-sv4.c os-ult.c os-win.c os-wnt.c \
os-3b1.c os-att.c os-sc5.c os-nto.c
.SUFFIXES: .ic
.ic.c:
./includer < $*.ic > $*.c
all: includer $(ALL)
includer: includer.c
$(CC) -o includer includer.c
clean:
$(RM) $(ALL) includer
# You don't have to run this unless you change a .ic file.
depend:
./makedep
# Makedep only catches 1-level deep includes. If something depends on a
# 2nd-level include, put it here.
+73
View File
@@ -0,0 +1,73 @@
# Don't edit makefile, edit makefile.bas instead.
#
RM= rm -f
ALL= os-a32.c os-a41.c os-aix.c \
os-aux.c os-bs2.c os-bsd.c os-bsf.c os-bsi.c os-bso.c \
os-cvx.c os-dos.c os-dpx.c os-dyn.c \
os-gen.c os-hpp.c os-isc.c os-lnx.c \
os-lyn.c os-mnt.c os-neb.c os-nxt.c \
os-os2.c os-osf.c os-osx.c os-pt1.c os-ptx.c \
os-s40.c os-sco.c os-sgi.c os-sun.c \
os-sv4.c os-ult.c os-win.c os-wnt.c \
os-3b1.c os-att.c os-sc5.c os-nto.c
.SUFFIXES: .ic
.ic.c:
./includer < $*.ic > $*.c
all: includer $(ALL)
includer: includer.c
$(CC) -o includer includer.c -ldl
clean:
$(RM) $(ALL) includer
# You don't have to run this unless you change a .ic file.
depend:
./makedep
# Makedep only catches 1-level deep includes. If something depends on a
# 2nd-level include, put it here.
os-3b1.c: header raw.io read.sel spell.unx term.cap unix os-3b1.ic
os-a32.c: header raw.ios read.sel spell.unx term.cap unix os-a32.ic
os-a41.c: header raw.ios read.sel spell.unx term.inf unix os-a41.ic
os-aix.c: header raw.brk read.sel spell.unx term.cap unix os-aix.ic
os-att.c: header raw.io read.sel spell.unx term.cap unix os-att.ic
os-aux.c: header raw.io read.sel spell.unx term.cap unix os-aux.ic
os-bs2.c: header raw.ios read.sel spell.unx term.cap unix os-bs2.ic
os-bsd.c: getcwd header raw.brk read.sel spell.unx term.cap unix os-bsd.ic
os-bsf.c: header raw.ios read.sel spell.unx term.cap unix os-bsf.ic
os-bsi.c: header raw.brk read.sel spell.unx term.cap unix os-bsi.ic
os-bso.c: header raw.ios read.sel spell.unx term.cap unix os-bso.ic
os-cvx.c: header raw.ios read.sel spell.unx term.cap unix os-cvx.ic
os-dos.c: dos dosgen header term.dos os-dos.ic
os-dpx.c: header raw.ios read.sel spell.unx term.cap unix os-dpx.ic
os-dyn.c: getcwd header raw.brk read.sel spell.unx term.cap unix os-dyn.ic
os-gen.c: header raw.ios read.sel spell.unx term.cap unix os-gen.ic
os-hpp.c: header raw.io read.sel spell.unx term.cap unix os-hpp.ic
os-isc.c: header raw.io read.sel spell.unx term.cap truncate unix os-isc.ic
os-lnx.c: header raw.ios read.sel spell.unx term.inf unix os-lnx.ic
os-lyn.c: getcwd header raw.ios read.sel spell.unx term.cap unix os-lyn.ic
os-mnt.c: header raw.brk read.sel spell.unx term.cap unix os-mnt.ic
os-neb.c: header raw.ios read.sel spell.unx term.cap unix os-neb.ic
os-nto.c: header raw.ios read.sel spell.unx term.cap unix os-nto.ic
os-nxt.c: getcwd header raw.brk read.sel spell.unx term.cap unix os-nxt.ic
os-os2.c: header os2 spell.os2 term.dos os-os2.ic
os-osf.c: header raw.ios read.sel spell.unx term.cap unix os-osf.ic
os-osx.c: header raw.brk read.sel spell.unx term.cap unix os-osx.ic
os-pt1.c: header raw.io read.pol spell.unx term.inf unix os-pt1.ic
os-ptx.c: header raw.io read.pol spell.unx term.inf unix os-ptx.ic
os-s40.c: header raw.brk read.sel spell.unx term.cap unix os-s40.ic
os-sc5.c: header raw.ios read.sel spell.unx term.inf unix os-sc5.ic
os-sco.c: fsync.non header raw.io read.sel spell.unx term.inf truncate unix os-sco.ic
os-sgi.c: header raw.ios read.sel spell.unx term.inf unix os-sgi.ic
os-sun.c: header raw.brk read.sel spell.unx term.cap unix os-sun.ic
os-sv4.c: header raw.ios read.pol spell.unx term.inf unix os-sv4.ic
os-ult.c: header raw.brk read.sel spell.unx term.cap unix os-ult.ic
os-win.c: dosgen header spell.ms win os-win.ic
os-wnt.c: dosgen header spell.ms win os-wnt.ic
+27
View File
@@ -0,0 +1,27 @@
# Don't edit makefile, edit makefile.bas instead.
#
RM= del
ALL = os-dos.c os-win.c os-wnt.c
.SUFFIXES: .ic
.ic.c:
.\includer < $*.ic > $*.c
all: includer.exe $(ALL)
includer.exe: includer.c
$(CC) /F 4000 -o includer.exe includer.c
clean:
$(RM) $(ALL) includer.exe
# You don't have to run this unless you change a .ic file.
depend:
echo Dependencies must be built under Unix
os-win.c: os-win.ic header dosgen win spell.ms
os-wnt.c: os-win.ic header dosgen win spell.ms
os-dos.c: os-dos.ic header dosgen dos term.dos
+191
View File
@@ -0,0 +1,191 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Convergent Tech 3b1 version. See also the os-3b1.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <string.h>
#include <sys/types.h>
#include <sys/dir.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*
* 3b1 definition requirements
*/
#define opendir(dn) fopen(dn, "r")
#define closedir(dirp) fclose(dirp)
typedef struct
{
int dd_fd; /* file descriptor */
int dd_loc; /* offset in block */
int dd_size; /* amount of valid data */
char *dd_buf; /* directory block */
} DIR; /* stream data from opendir() */
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h>*//* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h>*//* only one or the other */
/* #define SigType void */ /* value returned by sig handlers is void */
#define SigType int /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS *//* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType int /* qsort arg is of type void * */
/* #define QSType void */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
#define HAVE_TERMIO /* this is for pure System V */
#include <termio.h> /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Convergent Tech 3b1 os-3b1.ic file for building os-3b1.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.io)
include(term.cap)
+189
View File
@@ -0,0 +1,189 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, AIX 3.2 version. See also the os-a32.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#define USE_DIRENT
#include <sys/dir.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
/* #include <signal.h> */ /* sometimes both required, sometimes */
#include <sys/signal.h> /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIGNALHASARG 1
#define SIG_PROTO(args) args
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#include <termio.h> /* this is needed for struct winsize on aix */
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*------------ AIX 3.2 needs this for types passed select() ------------*/
#include <sys/select.h>
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/* memmove() is a built-in for AIX 3.2 xlc. */
#define bcopy(a,b,s) memmove (b, a, s)
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; AIX 3.2 os-a32.ic file for building os-a32.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+184
View File
@@ -0,0 +1,184 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, AIX 4.1 version. See also the os-a41.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#define USE_DIRENT
#include <sys/dir.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
/* #include <signal.h> */ /* sometimes both required, sometimes */
#include <sys/signal.h> /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIGNALHASARG 1
#define SIG_PROTO(args) args
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */ /* qsort arg is of type char * */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#include <termio.h> /* this is needed for struct winsize on aix */
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
#define USE_TERMINFO /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*------------ AIX 4.1 needs this for types passed select() ------------*/
#include <sys/select.h>
#define setpgrp setpgid
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/* memmove() is a built-in for AIX 3.2 xlc. */
#define bcopy(a,b,s) memmove (b, a, s)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; AIX 4.1 os-a41.ic file for building os-a41.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.inf)
+181
View File
@@ -0,0 +1,181 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, AIX 370 version. See also the os-aix.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#define USE_DIRENT
#include <dirent.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS *//* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; AIX 370 os-aix.ic file for building os-aix.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.brk)
include(term.cap)
+181
View File
@@ -0,0 +1,181 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, ?? version. See also the os-att.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <string.h>
#include <sys/types.h>
#define USE_DIRENT
#include <dirent.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType int
/* #define QSType void */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
#define HAVE_TERMIO /* this is for pure System V */
#include <termio.h> /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; ?? os-att.ic file for building os-att.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.io)
include(term.cap)
+189
View File
@@ -0,0 +1,189 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, A/UX version. See also the os-aux.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <sys/types.h>
#define USE_DIRENT
#include <sys/dir.h>
#include <stdlib.h>
#include <strings.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
#include <malloc.h>
#include <sys/uio.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
#include <sys/signal.h> /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
#define HAVE_TERMIO /* this is for pure System V */
#include <termio.h> /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/* memcpy() is no good for overlapping blocks. If that's a problem, use
* the memmove() in ../c-client
*/
#define bcopy(a,b,s) memcpy (b, a, s)
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; A/UX os-aux.ic file for building os-aux.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.io)
include(term.cap)
+178
View File
@@ -0,0 +1,178 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, BSDI V2-V4 version. See also the os-bs2.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <sys/dir.h>
#include <stdlib.h>
#include <string.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
/* #include <signal.h> */ /* sometimes both required, sometimes */
#include <sys/signal.h> /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
#define NON_BLOCKING_IO FNDELAY /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/var/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
/* extern char *sys_errlist[]; */
/* extern int sys_nerr; */
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; BSDI V2-V4 os-bs2.ic file for building os-bs2.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+184
View File
@@ -0,0 +1,184 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, BSD 4.3 version. See also the os-bsd.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
char *getenv();
FILE *tmpfile();
extern int stat();
extern int errno;
typedef long fpos_t;
#include <string.h>
#include <sys/types.h>
#include <sys/dir.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
/* #include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
/* #define SigType void */ /* value returned by sig handlers is void */
#define SigType int /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
/* #define QSType void */
#define QSType char /* qsort arg is of type char * */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
#define NON_BLOCKING_IO FNDELAY /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+17
View File
@@ -0,0 +1,17 @@
;
; BSD 4.3 os-bsd.ic file for building os-bsd.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.brk)
include(term.cap)
include(getcwd)
+182
View File
@@ -0,0 +1,182 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, FreeBSD version. See also the os-bsf.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define USE_DIRENT
#include <dirent.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/* #define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
/* extern char *sys_errlist[]; */
/* extern int sys_nerr; */
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; FreeBSD os-bsf.ic file for building os-bsf.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+179
View File
@@ -0,0 +1,179 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, BSDI V1 version. See also the os-bsi.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <sys/dir.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
/* #include <signal.h> */ /* sometimes both required, sometimes */
#include <sys/signal.h> /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
#define NON_BLOCKING_IO FNDELAY /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/var/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
/* extern char *sys_errlist[]; */
/* extern int sys_nerr; */
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; BSCI V1 os-bsi.ic file for building os-bsi.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.brk)
include(term.cap)
+180
View File
@@ -0,0 +1,180 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, OpenBSD version. See also the os-bso.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#define USE_DIRENT
#include <sys/types.h>
#include <sys/dir.h>
#include <stdlib.h>
#include <string.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/* #define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/var/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/local/bin/ispell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
/* extern char *sys_errlist[]; */
/* extern int sys_nerr; */
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; OpenBSD os-bso.ic file for building os-bso.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+181
View File
@@ -0,0 +1,181 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Convex version. See also the os-cvx.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <string.h>
#include <stdlib.h>
#define USE_DIRENT
#include <dirent.h>
char *getenv();
FILE *tmpfile();
extern int errno;
int fgetpos(); int fsetpos();
typedef long fpos_t;
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
/* #include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
/* #define SigType void */ /* value returned by sig handlers is void */
#define SigType int /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
/* #define QSType void */
#define QSType char /* qsort arg is of type char * */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Convex os-cvx.ic file for building os-cvx.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+192
View File
@@ -0,0 +1,192 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Cygwin b20.1 version. See also the os-cyg.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
Port maintainer: Eduardo Chappa <chappa@math.washington.edu>
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#define USE_DIRENT
#include <dirent.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/*#include <sys/signal.h> */ /* only one or the other */
#ifndef SIGSYS
#define SIGSYS SIGUNUSED
#endif
#ifndef SIGEMT
#define SIGEMT SIGUNUSED
#endif
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#undef vfork
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
#define LPASS8 0x0800
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/var/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/* If stat is strictly POSIX and stat'ing a directory returns a meaningless
st_size value, define this. */
#define STAT_STRICT_POSIX 1
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Cygwin B2.01 os-cyg.ic file for building os-cyg.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+195
View File
@@ -0,0 +1,195 @@
#line 2 "osdep\os-dos.h"
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, DOS version. See also the os-dos.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
/*-------- Standard ANSI functions usually defined in stdlib.h ---------*/
#include <stdlib.h>
#include <string.h>
#include <dos.h>
#include <direct.h>
#include <search.h>
#undef CTRL
#include <sys/types.h>
#include <sys/stat.h>
#include <io.h>
#include <sys/stat.h>
#ifdef PCTCP
#include <4bsddefs.h> /* PC/TCP Include Files */
#include <netdb.h>
#undef signal /* override their stupid def */
#define sleep _sleep /* use pico's sleep function */
#undef write /* make way:c-client def's write */
#undef SIGCHLD
#else
#ifdef LWP
#include <sys/socket.h> /* LanWorkplace Include Files */
#include <netinet/in.h>
#include <netdb.h>
#else
#ifdef PCNFS
#include <tklib.h>
#include <netdb.h>
#define ENAMETOOLONG 0 /* unsupported errno value */
#else
#include <tcp.h> /* WATTCP Include File */
#define ENAMETOOLONG 0 /* unsupported errno value */
#define word p_word /* compensate for bad args labels */
#endif
#endif
#endif
#include <dos.h>
#include <direct.h>
#include <memory.h>
#include <fcntl.h>
#include <sys/timeb.h>
#undef ERROR
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) args
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned long usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-------- Is window resizing available? -------------------------------*/
/* #define RESIZING */ /* SIGWINCH and friends */
/* Actually, under windows it is, but RESIZING compiles in UNIX
* signals code for determining when the window resized. Window's
* works differently. */
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (25)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '\\'
#define S_FILESEP "\\"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#undef SPELLER
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (S_IREAD | S_IWRITE)
#define IBMPC 1
#ifdef PCTCP
#define sleep _sleep
#define _O_RDONLY O_RDONLY
#endif
/*
* IBM PC ROM BIOS Services used
*/
#define BIOS_VIDEO 0x10
#define BIOS_KEYBRD 0x16
#define BIOS_MOUSE 0x33
#define DOS_MULTIPLEX 0x2f
#ifdef maindef
/* possible names and paths of help files under different OSs */
char *pathname[] = {
"picorc",
"pico.hlp",
"\\usr\\local\\",
"\\usr\\lib\\",
""
};
#define NPNAMES (sizeof(pathname)/sizeof(char *))
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
jmp_buf got_hup;
#endif /* _PICO_OS_INCLUDED */
+11
View File
@@ -0,0 +1,11 @@
;
; DOS os-dos.ic file for building os-dos.c.
;
; Boilerplate header.
include(header)
include(dos)
include(dosgen)
include(term.dos)
+180
View File
@@ -0,0 +1,180 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Bull DPX/2 B.O.S. version. See also the os-dpx.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
FILE *tmpfile();
#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
#define USE_DIRENT
#include <dirent.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
#define SYSV_SIGNALS /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
/* #define QSType void */
#define QSType char /* qsort arg is of type char * */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*------------ DPX needs this for types passed select() ------------*/
#include <sys/select.h>
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Bull DPX/2 B.O.S os-dpx.ic file for building os-dpx.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+190
View File
@@ -0,0 +1,190 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Dynix version. See also the os-dyn.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <strings.h>
#include <sys/dir.h>
char *getenv();
extern char *getcwd();
void *memset();
void *malloc();
void free();
void *realloc();
extern int errno;
typedef long fpos_t;
typedef unsigned long size_t;
#define strchr index
#define strrchr rindex
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
/* #define SigType void */ /* value returned by sig handlers is void */
#define SigType int /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+17
View File
@@ -0,0 +1,17 @@
;
; Sequent Dynix (not ptx) os-dyn.ic file for building os-dyn.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.brk)
include(term.cap)
include(getcwd)
+173
View File
@@ -0,0 +1,173 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, generic version.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
/* These three may vary widely from port to port. */
#include <string.h>
#include <stdlib.h>
#include <sys/dir.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIGNALHASARG 1
#define SIG_PROTO(args) args
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Generic os-gen.ic file for building os-gen.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+178
View File
@@ -0,0 +1,178 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Sun Solaris (with gcc) version. See also the os-sol.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
FILE *tmpfile();
#include <sys/types.h>
#define USE_DIRENT
#include <dirent.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
#define USE_POLL /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
#define USE_TERMINFO /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#define bcopy(a,b,s) memcpy (b, a, s)
#endif /* _PICO_OS_INCLUDED */
+174
View File
@@ -0,0 +1,174 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, SunOS 4.1 version. See also the os-sun.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
char *getenv();
typedef long fpos_t;
#include <sys/types.h>
#include <sys/dir.h>
#include <string.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
#define NON_BLOCKING_IO FNDELAY /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+175
View File
@@ -0,0 +1,175 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, HP/UX version. See also the os-hpp.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
#define USE_DIRENT
#include <dirent.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
#define HAVE_TERMIO /* this is for pure System V */
#include <termio.h> /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; HP/UX os-hpp.ic file for building os-hpp.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.io)
include(term.cap)
+193
View File
@@ -0,0 +1,193 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, ISC version. See also the os-isc.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
char *getenv();
#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
#define USE_DIRENT
#include <dirent.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
#define HAVE_TERMIO /* this is for pure System V */
#include <termio.h> /* Sys V */
#include <sys/bsdtypes.h>
#include <sys/sioctl.h>
#include <sys/stream.h> /* for ptem.h */
#include <sys/ptem.h> /* for struct winsize */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/* memcpy() is no good for overlapping blocks. If that's a problem, use
* the memmove() in ../c-client
*/
#define bcopy(a,b,s) memcpy (b, a, s)
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+17
View File
@@ -0,0 +1,17 @@
;
; ISC os-isc.ic file for building os-isc.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.io)
include(term.cap)
include(truncate)
+194
View File
@@ -0,0 +1,194 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Linux 0.99.10 version. See also the os-lnx.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#define USE_DIRENT
#include <sys/dir.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#ifndef SIGSYS
#define SIGSYS SIGUNUSED
#endif
#ifndef SIGEMT
#define SIGEMT SIGUNUSED
#endif
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIGNALHASARG 1
#define SIG_PROTO(args) args
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
#define USE_TERMINFO /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
#define LPASS8 0x0800
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/var/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
/* extern char *sys_errlist[]; */
/* extern int sys_nerr; */
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Linux 0.99.10 os-lnx.ic file for building os-lnx.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.inf)
+175
View File
@@ -0,0 +1,175 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Lynxos version. See also the os-lyn.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
extern int stat();
extern char *getcwd(char *, int);
extern int errno;
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/dir.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
/* #include <signal.h> */ /* sometimes both required, sometimes */
#include <sys/signal.h> /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
#define NON_BLOCKING_IO FNDELAY /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+17
View File
@@ -0,0 +1,17 @@
;
; Lynxos os-lyn.ic file for building os-lyn.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
include(getcwd)
+173
View File
@@ -0,0 +1,173 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Machten version. See also the os-mct.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <sys/dir.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIGNALHASARG 1
#define SIG_PROTO(args) args
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
#define NON_BLOCKING_IO FNDELAY /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/var/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+188
View File
@@ -0,0 +1,188 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, MiNT version. See also the os-mnt.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#define USE_DIRENT
#include <sys/dir.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#ifndef SIGSYS
#define SIGSYS SIGUNUSED
#endif
#ifndef SIGEMT
#define SIGEMT SIGUNUSED
#endif
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */ /* qsort arg is of type char * */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NDELAY
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*-------------- MiNT needs also this -----------------------------------*/
#define EAGAIN EWOULDBLOCK
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
#define LPASS8 0x0800
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/var/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; MiNT os-mnt.ic file for building os-mnt.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.brk)
include(term.cap)
+183
View File
@@ -0,0 +1,183 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, NetBSD version. See also the os-neb.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#define USE_DIRENT
#include <dirent.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
#include <sys/uio.h>
#include <unistd.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcasecmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef u_int32_t usign32_t;
typedef u_int16_t usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/var/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
/* extern char *sys_errlist[]; */
/* extern int sys_nerr; */
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; NetBSD os-neb.ic file for building os-neb.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+179
View File
@@ -0,0 +1,179 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, QNX Neutrino version.
(Kris Eric Warkentin <kewarken@qnx.com>)
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
/* These three may vary widely from port to port. */
#include <string.h>
#include <stdlib.h>
#include <sys/dir.h>
#define USE_DIRENT
#include <dirent.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
#include <errno.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIGNALHASARG 1
#define SIG_PROTO(args) args
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/var/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; QNX Neutrino os-nto.ic file for building os-nto.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+172
View File
@@ -0,0 +1,172 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, NeXT version. See also the os-nxt.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <sys/dir.h>
#include <stdlib.h>
#include <string.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIGNALHASARG 1
#define SIG_PROTO(args) args
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
#define NON_BLOCKING_IO FNDELAY /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+17
View File
@@ -0,0 +1,17 @@
;
; NeXT os-nxt.ic file for building os-nxt.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.brk)
include(term.cap)
include(getcwd)
+186
View File
@@ -0,0 +1,186 @@
#line 2 "osdep\os-os2.h"
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, OS/2 version. See also the os-os2.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
/*-------- Standard ANSI functions usually defined in stdlib.h ---------*/
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#define USE_DIRENT
#include <dirent.h>
#define INCL_BASE
#define INCL_NOPM
#define INCL_VIO
#define INCL_KBD
#define INCL_MOU
#define INCL_DOS
#define <os2.h>
#include <io.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <memory.h>
#include <fcntl.h>
#include <sys/timeb.h>
#undef ERROR
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#undef SIGCHLD /* clear unsupp'd signal def */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned long usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
#define QcompType const void
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-------- Is window resizing available? -------------------------------*/
/* #define RESIZING */
/* Actually, under windows it is, but RESIZING compiles in UNIX
* signals code for determining when the window resized. Window's
* works differently. */
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (25)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '\\'
#define S_FILESEP "\\"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "ispell"
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (S_IREAD | S_IWRITE)
#define IBMPC 1
#define _O_RDONLY O_RDONLY
#ifdef maindef
/* possible names and paths of help files under different OSs */
char *pathname[] = {
"picorc",
"pico.hlp",
"\\usr\\local\\",
"\\usr\\lib\\",
""
};
#define NPNAMES (sizeof(pathname)/sizeof(char *))
jmp_buf got_hup;
struct KBSTREE *kpadseqs = NULL;
int os2_fflush(FILE *f);
#ifndef fflush
#define fflush os2_fflush
#endif
#endif
int kbd_ready();
int kbd_getkey();
int kbd_peek();
void kbd_flush();
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+11
View File
@@ -0,0 +1,11 @@
;
; OS/2 os-os2.ic file for building os-os2.c.
;
; Boilerplate header.
include(header)
include(os2)
include(term.dos)
include(spell.os2)
+187
View File
@@ -0,0 +1,187 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, OSF/1 version. See also the os-osf.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
char *getenv(); /* often declared in stdlib.h */
FILE *tmpfile();
extern int errno;
typedef long fpos_t;
#define USE_DIRENT
#include <stdlib.h>
#include <malloc.h>
#include <sys/dir.h>
#include <string.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
/* #include <time.h> */
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
/* #define QSType void */ /* qsort arg is of type void * */
/* #define QSType char */
#define QSType size_t
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
/* extern char *sys_errlist[]; */
/* extern int sys_nerr; */
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; OSF/1 os-osf.ic file for building os-osf.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.cap)
+194
View File
@@ -0,0 +1,194 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Mac OS X version. See also the os-osx.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
char *getenv();
FILE *tmpfile();
extern int stat();
extern int errno;
#include <string.h>
#include <sys/types.h>
#include <sys/dir.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*------- Mac OS X specific includes -----------------------------------*/
#include <Carbon/Carbon.h>
#include <ApplicationServices/ApplicationServices.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
/* #include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
/* #define QSType void */
#define QSType char /* qsort arg is of type char * */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
#define NON_BLOCKING_IO FNDELAY /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/*
* There is a vfork on MacOS X but it clashes with our use. We set
* SIGCHLD to default action in the child in open_system_pipe and that
* turns out to affect the parent as well. So just use fork.
*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
/* extern int sys_nerr; */
/* the following is so there won't be collisions is OSX */
#define normal pico_normal
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Mac OS X os-osx.ic file for building os-osx.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.brk)
include(term.cap)
+188
View File
@@ -0,0 +1,188 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Sequent Dynix/PTX 1.4 version. See also the os-pt1.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
#define u_int pid_t
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <string.h>
#include <sys/types.h>
#define USE_DIRENT
#include <dirent.h>
#include <stdlib.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <stropts.h>
#include <poll.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
#define SYSV_SIGNALS /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/* DYNIX/ptx signal semantics are AT&T/POSIX; the sigset() call sets
the handler permanently, more like BSD signal(). */
#define signal(s,f) sigset (s, f)
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
#define HAVE_TERMIO /* this is for pure System V */
#include <termio.h> /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
#define USE_POLL /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
#define USE_TERMINFO /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/* memcpy() is no good for overlapping blocks. If that's a problem, use
* the memmove() in ../c-client
*/
#define bcopy(a,b,s) memcpy (b, a, s)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Sequent Dynix/PTX 1.4 os-pt1.ic file for building os-pt1.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.pol)
include(raw.io)
include(term.inf)
+185
View File
@@ -0,0 +1,185 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Sequent Dynix/PTX version. See also the os-ptx.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
#define u_int pid_t
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <string.h>
#include <sys/types.h>
#define USE_DIRENT
#include <dirent.h>
#include <stdlib.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <stropts.h>
#include <poll.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
#define HAVE_TERMIO /* this is for pure System V */
#include <termio.h> /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
#define USE_POLL /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
#define USE_TERMINFO /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/* memcpy() is no good for overlapping blocks. If that's a problem, use
* the memmove() in ../c-client
*/
#define bcopy(a,b,s) memcpy (b, a, s)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Sequent Dynix/PTX os-ptx.ic file for building os-ptx.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.pol)
include(raw.io)
include(term.inf)
+183
View File
@@ -0,0 +1,183 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, SunOS 4.0 version. See also the os-s40.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
typedef long fpos_t;
void *malloc();
void free();
void *realloc();
#include <sys/types.h>
#include <sys/dir.h>
#include <string.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
/* #include <time.h> */
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
/* #define QSType void */
#define QSType char /* qsort arg is of type char * */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
#define NON_BLOCKING_IO FNDELAY /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; SunOS 4.0 os-s40.ic file for building os-s40.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.brk)
include(term.cap)
+187
View File
@@ -0,0 +1,187 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, SCO Open Server 5.x version. See also the os-sc5.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#define USE_DIRENT
#include <dirent.h>
#include <sys/stream.h>
#include <sys/ptem.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* signal handling is broken in the delivered SCO shells, so punt on
suspending the current session */
#if defined(SIGTSTP)
#undef SIGTSTP
#endif
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
#define USE_TERMINFO /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (25)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/* memcpy() is no good for overlapping blocks. If that's a problem, use
* the memmove() in ../c-client
*/
#define bcopy(a,b,s) memcpy (b, a, s)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; SCO os-sc5.ic file for building os-sc5.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.inf)
+195
View File
@@ -0,0 +1,195 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, SCO version. See also the os-sco.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#define USE_DIRENT
#include <dirent.h>
#include <sys/stream.h>
#include <sys/ptem.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* signal handling is broken in the delivered SCO shells, so punt on
suspending the current session */
#if defined(SIGTSTP)
#undef SIGTSTP
#endif
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
#define SYSV_SIGNALS /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
#define HAVE_TERMIO /* this is for pure System V */
#include <termio.h> /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
#define USE_TERMINFO /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
/* NOTE: Current reports are that ioctl(TIOCGWINSZ) either fails or */
/* reports constant values, so there is no utility in having */
/* RESIZING enabled for SCO Unix. */
/* #if defined(TIOCGWINSZ) && defined(SIGWINCH) */
/* #define RESIZING */
/* #endif */
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/* memcpy() is no good for overlapping blocks. If that's a problem, use
* the memmove() in ../c-client
*/
#define bcopy(a,b,s) memcpy (b, a, s)
/*
* ftruncate is missing on SCO UNIX (availabe from OpenServer 5 on)
*/
#define ftruncate chsize
#endif /* _PICO_OS_INCLUDED */
+19
View File
@@ -0,0 +1,19 @@
;
; SCO os-sco.ic file for building os-sco.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.io)
include(term.inf)
include(truncate)
include(fsync.non)
+183
View File
@@ -0,0 +1,183 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, SGI version. See also the os-sgi.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
#define ANSI /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#define USE_DIRENT
#include <dirent.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
#define SYSV_SIGNALS /* use System-V signal semantics (ttyin.c) */
#define SIGNALHASARG 1
#define SIG_PROTO(args) args
/*
* Special for sgi, these aren't declared if -ansi flag used.
* We don't understand why that is.
*/
extern SigType (*sigset(int, SigType(*)SIG_PROTO((int))))(int);
extern FILE *popen(const char *, const char *);
extern FILE *fdopen(int, const char *);
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
#define USE_TERMINFO /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; SGI os-sgi.ic file for building os-sgi.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.ios)
include(term.inf)
+178
View File
@@ -0,0 +1,178 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Sun Solaris version. See also the os-sol.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
FILE *tmpfile();
#include <sys/types.h>
#define USE_DIRENT
#include <dirent.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
#define USE_POLL /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
#define USE_TERMINFO /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#define bcopy(a,b,s) memcpy (b, a, s)
#endif /* _PICO_OS_INCLUDED */
+181
View File
@@ -0,0 +1,181 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, SunOS 4.1 version. See also the os-sun.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
char *getenv();
typedef long fpos_t;
#include <sys/types.h>
#include <sys/dir.h>
#include <string.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */ /* qsort arg is of type char * */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
/*#define NON_BLOCKING_IO O_NONBLOCK */ /* POSIX style */
#define NON_BLOCKING_IO FNDELAY /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
/*
* Make sys_errlist visible
*/
extern char *sys_errlist[];
extern int sys_nerr;
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; SunOS 4.1 os-sun.ic file for building os-sun.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.brk)
include(term.cap)
+183
View File
@@ -0,0 +1,183 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, System V R4 version. See also the os-sv4.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
FILE *tmpfile();
#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
#define USE_DIRENT
#include <dirent.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
/* #include <locale.h> */ /* To make matching and sorting work right */
#define collator strucmp
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
#include <sys/time.h> /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
/* #define POSIX_SIGNALS */ /* use POSIX signal semantics (ttyin.c) */
#define SYSV_SIGNALS /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/* The sigset() call sets the handler permanently, more like BSD signal(). */
#define signal(s,f) sigset (s, f)
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
/* #define QSType void */
#define QSType char /* qsort arg is of type char * */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
/* #include <sgtty.h> */ /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
#define HAVE_TERMIOS /* this is an alternative */
#include <termios.h> /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
#define USE_POLL /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
#define USE_TERMINFO /* use terminfo instead of termcap */
/* #define USE_TERMCAP */ /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
/* #define HAVE_WAIT_UNION */ /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
#define vfork fork /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
#define bcopy(a,b,s) memcpy (b, a, s)
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Sun Solaris os-sol.ic file for building os-sol.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.pol)
include(raw.ios)
include(term.inf)
+173
View File
@@ -0,0 +1,173 @@
#ifndef _PICO_OS_INCLUDED
#define _PICO_OS_INCLUDED
/*----------------------------------------------------------------------
OS dependencies, Ultrix 4.2 version. See also the os-ult.c file.
The following stuff may need to be changed for a new port, but once
the port is done, it won't change. At the bottom of the file are a few
constants that you may want to configure differently than they
are configured, but probably not.
----*/
/*----------------- Are we ANSI? ---------------------------------------*/
/* #define ANSI */ /* this is an ANSI compiler */
/*------ If our compiler doesn't understand type void ------------------*/
/* #define void char */ /* no void in compiler */
#include <sys/dir.h>
#include <stdlib.h>
#include <string.h>
/*------- Some more includes that should usually be correct ------------*/
#include <pwd.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netdb.h>
/*----------------- locale.h -------------------------------------------*/
#include <locale.h> /* To make matching and sorting work right */
#define collator strcoll
/*----------------- time.h ---------------------------------------------*/
#include <time.h>
/* plain time.h isn't enough on some systems */
/* #include <sys/time.h> */ /* For struct timeval usually in time.h */
/*--------------- signal.h ---------------------------------------------*/
#include <signal.h> /* sometimes both required, sometimes */
/* #include <sys/signal.h> */ /* only one or the other */
#define SigType void /* value returned by sig handlers is void */
/* #define SigType int */ /* value returned by sig handlers is int */
#define POSIX_SIGNALS /* use POSIX signal semantics (ttyin.c) */
/* #define SYSV_SIGNALS */ /* use System-V signal semantics (ttyin.c) */
#define SIG_PROTO(args) ()
/*-------------- A couple typedef's for integer sizes ------------------*/
typedef unsigned int usign32_t;
typedef unsigned short usign16_t;
/*-------------- qsort argument type -----------------------------------*/
#define QSType void /* qsort arg is of type void * */
/* #define QSType char */
/*-------------- fcntl flag to set non-blocking IO ---------------------*/
#define NON_BLOCKING_IO O_NONBLOCK /* POSIX style */
/*#define NON_BLOCKING_IO FNDELAY */ /* good ol' bsd style */
/*
* Choose one of the following three terminal drivers
*/
/*--------- Good 'ol BSD -----------------------------------------------*/
#include <sgtty.h> /* BSD-based systems */
/*--------- System V terminal driver -----------------------------------*/
/* #define HAVE_TERMIO */ /* this is for pure System V */
/* #include <termio.h> */ /* Sys V */
/*--------- POSIX terminal driver --------------------------------------*/
/* #define HAVE_TERMIOS */ /* this is an alternative */
/* #include <termios.h> */ /* POSIX */
/* Don't need to define this but do need to use either read.sel or read.pol
* in osdep. */
/*-------- Use poll system call instead of select ----------------------*/
/* #define USE_POLL */ /* use the poll() system call instead of select() */
/*-------- Use terminfo database instead of termcap --------------------*/
/* #define USE_TERMINFO */ /* use terminfo instead of termcap */
#define USE_TERMCAP /* use termcap */
/*-- What argument does wait(2) take? Define this if it is a union -----*/
#define HAVE_WAIT_UNION /* the arg to wait is a union wait * */
/*-------- Is window resizing available? -------------------------------*/
#if defined(TIOCGWINSZ) && defined(SIGWINCH)
#define RESIZING /* SIGWINCH and friends */
#endif
/*-------- If no vfork, use regular fork -------------------------------*/
/* #define vfork fork */ /* vfork is just a lightweight fork, so can use fork */
/*---- When no screen size can be discovered this is the size used -----*/
#define DEFAULT_LINES_ON_TERMINAL (24)
#define DEFAULT_COLUMNS_ON_TERMINAL (80)
#define NROW DEFAULT_LINES_ON_TERMINAL
#define NCOL DEFAULT_COLUMNS_ON_TERMINAL
/*----------------------------------------------------------------------
Pico OS dependencies.
----*/
/*
* File name separator, as a char and string
*/
#define C_FILESEP '/'
#define S_FILESEP "/"
/*
* Place where mail gets delivered (for pico's new mail checking)
*/
#define MAILDIR "/usr/spool/mail"
/*
* What and where the tool that checks spelling is located. If this is
* undefined, then the spelling checker is not compiled into pico.
*/
#define SPELLER "/usr/bin/spell"
#ifdef MOUSE
#define XTERM_MOUSE_ON "\033[?1000h" /* DECSET with parm 1000 */
#define XTERM_MOUSE_OFF "\033[?1000l" /* DECRST with parm 1000 */
#endif
/*
* Mode passed chmod() to make tmp files exclusively user read/write-able
*/
#define MODE_READONLY (0600)
extern char *getpass();
#endif /* _PICO_OS_INCLUDED */
+15
View File
@@ -0,0 +1,15 @@
;
; Ultrix 4.2 os-ult.ic file for building os-ult.c.
;
; Boilerplate header.
include(header)
include(unix)
include(spell.unx)
include(read.sel)
include(raw.brk)
include(term.cap)
+1712
View File
File diff suppressed because it is too large Load Diff
+216
View File
@@ -0,0 +1,216 @@
/*
* TTY setup routines. These are the BSD-style routines.
*/
static struct sgttyb _raw_tty, _original_tty;
static struct ltchars _raw_ltchars, _original_ltchars;
static struct tchars _raw_tchars, _original_tchars;
static int _raw_lmode, _original_lmode;
/*
* current raw state
*/
static short _inraw = 0;
/*
* Set up the tty driver
*
* Args: state -- which state to put it in. 1 means go into raw (cbreak),
* 0 out of raw.
*
* Result: returns 0 if successful and -1 if not.
*/
int
Raw(state)
int state;
{
/** state is either ON or OFF, as indicated by call **/
/* Check return code only on first call. If it fails we're done for and
if it goes OK the others will probably go OK too. */
if(state == 0 && _inraw){
/*----- restore state to original -----*/
if(ioctl(STDIN_FD, TIOCSETP, &_original_tty) < 0)
return(-1);
(void)ioctl(STDIN_FD, TIOCSLTC, &_original_ltchars);
(void)ioctl(STDIN_FD, TIOCSETC, &_original_tchars);
(void)ioctl(STDIN_FD, TIOCLSET, &_original_lmode);
_inraw = 0;
}
else if(state == 1 && ! _inraw){
/*----- Go into raw mode (cbreak actually) ----*/
if(ioctl(STDIN_FD, TIOCGETP, &_original_tty) < 0)
return(-1);
(void)ioctl(STDIN_FD, TIOCGETP, &_raw_tty);
(void)ioctl(STDIN_FD, TIOCGETC, &_original_tchars);
(void)ioctl(STDIN_FD, TIOCGETC, &_raw_tchars);
(void)ioctl(STDIN_FD, TIOCGLTC, &_original_ltchars);
(void)ioctl(STDIN_FD, TIOCGLTC, &_raw_ltchars);
(void)ioctl(STDIN_FD, TIOCLGET, &_original_lmode);
(void)ioctl(STDIN_FD, TIOCLGET, &_raw_lmode);
_raw_tty.sg_flags &= ~(ECHO); /* echo off */
_raw_tty.sg_flags |= CBREAK; /* raw on */
_raw_tty.sg_flags &= ~CRMOD; /* Turn off CR -> LF mapping */
_raw_tchars.t_intrc = -1; /* Turn off ^C and ^D */
_raw_tchars.t_eofc = -1;
_raw_ltchars.t_lnextc = -1; /* Turn off ^V so we can use it */
_raw_ltchars.t_dsuspc = -1; /* Turn off ^Y so we can use it */
_raw_ltchars.t_suspc = -1; /* Turn off ^Z; we just read 'em */
_raw_ltchars.t_werasc = -1; /* Turn off ^w word erase */
_raw_ltchars.t_rprntc = -1; /* Turn off ^R reprint line */
_raw_ltchars.t_flushc = -1; /* Turn off ^O output flush */
(void)ioctl(STDIN_FD, TIOCSETP, &_raw_tty);
(void)ioctl(STDIN_FD, TIOCSLTC, &_raw_ltchars);
(void)ioctl(STDIN_FD, TIOCSETC, &_raw_tchars);
(void)ioctl(STDIN_FD, TIOCLSET, &_raw_lmode);
_inraw = 1;
}
return(0);
}
/*
* Set up the tty driver to use XON/XOFF flow control
*
* Args: state -- True to make sure XON/XOFF turned on, FALSE off.
*
* Result: none.
*/
void
xonxoff_proc(state)
int state;
{
if(_inraw){
if(state){
if(_raw_tchars.t_startc == -1 || _raw_tchars.t_stopc == -1){
_raw_tchars.t_startc = 'Q' - '@'; /* Turn ON ^S/^Q */
_raw_tchars.t_stopc = 'S' - '@';
(void)ioctl(STDIN_FD, TIOCSETC, &_raw_tchars);
}
}
else{
if(!(_raw_tchars.t_startc == -1 && _raw_tchars.t_stopc == -1)){
_raw_tchars.t_startc = -1; /* Turn off ^S/^Q */
_raw_tchars.t_stopc = -1;
(void)ioctl(STDIN_FD, TIOCSETC, &_raw_tchars);
}
}
}
}
/*
* Set up the tty driver to do LF->CR translation
*
* Args: state -- True to turn on translation, false to write raw LF's
*
* Result: none.
*/
void
crlf_proc(state)
int state;
{
if(_inraw){
if(state){ /* turn ON NL->CR on output */
if(!(_raw_tty.sg_flags & CRMOD)){
_raw_tty.sg_flags |= CRMOD;
(void)ioctl(STDIN_FD, TIOCSETP, &_raw_tty);
}
}
else{ /* turn OFF NL-CR on output */
if(_raw_tty.sg_flags & CRMOD){
_raw_tty.sg_flags &= ~CRMOD;
(void)ioctl(STDIN_FD, TIOCSETP, &_raw_tty);
}
}
}
}
/*
* Set up the tty driver to hanle interrupt char
*
* Args: state -- True to turn on interrupt char, false to not
*
* Result: tty driver that'll send us SIGINT or not
*/
void
intr_proc(state)
int state;
{
if(_inraw){
if(state){
_raw_tchars.t_intrc = ctrl('C');
(void)ioctl(STDIN_FD, TIOCSETC, &_raw_tchars);
}
else{
_raw_tchars.t_intrc = -1;
(void)ioctl(STDIN_FD, TIOCSETC, &_raw_tchars);
}
}
}
/*
* Discard any pending input characters
*
* Args: none
*
* Result: pending input buffer flushed
*/
void
flush_input()
{
#ifdef TIOCFLUSH
#ifdef FREAD
int i = FREAD;
#else
int i = 1;
#endif
ioctl(STDIN_FD, TIOCFLUSH, &i);
#endif /* TIOCFLUSH */
}
/*
* Turn off hi bit stripping
*/
void
bit_strip_off()
{
_raw_lmode |= LPASS8;
#ifdef NXT
_raw_lmode |= LPASS8OUT;
#endif
(void)ioctl(STDIN_FD, TIOCLSET, &_raw_lmode);
}
/*
* Turn off quit character (^\) if possible
*/
void
quit_char_off()
{
_raw_tchars.t_quitc = -1;
(void)ioctl(STDIN_FD, TIOCSETC, &_raw_tchars);
}
/*
* Returns TRUE if tty is < 4800, 0 otherwise.
*/
int
ttisslow()
{
return((int)_raw_tty.sg_ispeed < B4800);
}
+178
View File
@@ -0,0 +1,178 @@
/*
* TTY setup routines. These are the TERMIO-style (System V) routines.
*/
static struct termio _raw_tty, _original_tty;
/*
* current raw state
*/
static short _inraw = 0;
/*
* Set up the tty driver
*
* Args: state -- which state to put it in. 1 means go into raw (cbreak),
* 0 out of raw.
*
* Result: returns 0 if successful and -1 if not.
*/
int
Raw(state)
int state;
{
/** state is either ON or OFF, as indicated by call **/
/* Check return code only on first call. If it fails we're done for and
if it goes OK the others will probably go OK too. */
if(state == 0 && _inraw){
/*----- restore state to original -----*/
if(ioctl(STDIN_FD, TCSETAW, &_original_tty) < 0)
return(-1);
_inraw = 0;
}
else if(state == 1 && ! _inraw){
/*----- Go into raw mode (cbreak actually) ----*/
if(ioctl(STDIN_FD, TCGETA, &_original_tty) < 0)
return(-1);
(void)ioctl(STDIN_FD, TCGETA, &_raw_tty); /** again! **/
_raw_tty.c_lflag &= ~(ICANON | ECHO); /* noecho raw mode */
_raw_tty.c_lflag &= ~ISIG; /* disable signals */
_raw_tty.c_iflag &= ~ICRNL; /* turn off CR->NL on input */
_raw_tty.c_oflag &= ~ONLCR; /* turn off NL->CR on output */
_raw_tty.c_cc[VMIN] = 1; /* min # of chars to queue */
_raw_tty.c_cc[VTIME] = 0; /* min time to wait for input*/
_raw_tty.c_cc[VINTR] = ctrl('C'); /* make it our special char */
_raw_tty.c_cc[VQUIT] = 0;
(void)ioctl(STDIN_FD, TCSETAW, &_raw_tty);
_inraw = 1;
}
return(0);
}
/*
* Set up the tty driver to use XON/XOFF flow control
*
* Args: state -- True to make sure XON/XOFF turned on, FALSE off.
*
* Result: none.
*/
void
xonxoff_proc(state)
int state;
{
if(_inraw){
if(state){
if(!(_raw_tty.c_iflag & IXON)){
_raw_tty.c_iflag |= IXON; /* turn ON ^S/^Q on input */
(void)ioctl(STDIN_FD, TCSETAW, &_raw_tty);
}
}
else{
if(_raw_tty.c_iflag & IXON){
_raw_tty.c_iflag &= ~IXON; /* turn off ^S/^Q on input */
(void)ioctl(STDIN_FD, TCSETAW, &_raw_tty);
}
}
}
}
/*
* Set up the tty driver to do LF->CR translation
*
* Args: state -- True to turn on translation, false to write raw LF's
*
* Result: none.
*/
void
crlf_proc(state)
int state;
{
if(_inraw){
if(state){ /* turn ON NL->CR on output */
if(!(_raw_tty.c_oflag & ONLCR)){
_raw_tty.c_oflag |= ONLCR;
(void)ioctl(STDIN_FD, TCSETAW, &_raw_tty);
}
}
else{ /* turn OFF NL-CR on output */
if(_raw_tty.c_oflag & ONLCR){
_raw_tty.c_oflag &= ~ONLCR;
(void)ioctl(STDIN_FD, TCSETAW, &_raw_tty);
}
}
}
}
/*
* Set up the tty driver to hanle interrupt char
*
* Args: state -- True to turn on interrupt char, false to not
*
* Result: tty driver that'll send us SIGINT or not
*/
void
intr_proc(state)
int state;
{
if(_inraw){
if(state){
_raw_tty.c_lflag |= ISIG; /* enable signals */
(void)ioctl(STDIN_FD, TCSETAW, &_raw_tty);
}
else{
_raw_tty.c_lflag &= ~ISIG; /* disable signals */
(void)ioctl(STDIN_FD, TCSETAW, &_raw_tty);
}
}
}
/*
* Discard any pending input characters
*
* Args: none
*
* Result: pending input buffer flushed
*/
void
flush_input()
{
ioctl(STDIN_FD, TCFLSH, 0);
}
/*
* Turn off hi bit stripping
*/
void
bit_strip_off()
{
}
/*
* Turn off quit character (^\) if possible
*/
void
quit_char_off()
{
}
/*
* Returns TRUE if tty is < 4800, 0 otherwise.
*/
int
ttisslow()
{
return((_raw_tty.c_cflag&CBAUD) < (unsigned int)B4800);
}
+182
View File
@@ -0,0 +1,182 @@
/*
* TTY setup routines. These are the TERMIOS-style (POSIX) routines.
*/
static struct termios _raw_tty, _original_tty;
/*
* current raw state
*/
static short _inraw = 0;
/*
* Set up the tty driver
*
* Args: state -- which state to put it in. 1 means go into raw (cbreak),
* 0 out of raw.
*
* Result: returns 0 if successful and -1 if not.
*/
int
Raw(state)
int state;
{
/** state is either ON or OFF, as indicated by call **/
/* Check return code only on first call. If it fails we're done for and
if it goes OK the others will probably go OK too. */
if(state == 0 && _inraw){
/*----- restore state to original -----*/
if(tcsetattr(STDIN_FD, TCSADRAIN, &_original_tty) < 0)
return -1;
_inraw = 0;
}
else if(state == 1 && ! _inraw){
/*----- Go into raw mode (cbreak actually) ----*/
if(tcgetattr(STDIN_FD, &_original_tty) < 0)
return -1;
tcgetattr(STDIN_FD, &_raw_tty);
_raw_tty.c_lflag &= ~(ICANON | ECHO | IEXTEN); /* noecho raw mode */
_raw_tty.c_lflag &= ~ISIG; /* disable signals */
_raw_tty.c_iflag &= ~ICRNL; /* turn off CR->NL on input */
_raw_tty.c_oflag &= ~ONLCR; /* turn off NL->CR on output */
_raw_tty.c_cc[VMIN] = '\01'; /* min # of chars to queue */
_raw_tty.c_cc[VTIME] = '\0'; /* min time to wait for input*/
_raw_tty.c_cc[VINTR] = ctrl('C'); /* make it our special char */
_raw_tty.c_cc[VQUIT] = 0;
_raw_tty.c_cc[VSUSP] = 0;
tcsetattr(STDIN_FD, TCSADRAIN, &_raw_tty);
_inraw = 1;
}
return(0);
}
/*
* Set up the tty driver to use XON/XOFF flow control
*
* Args: state -- True to make sure XON/XOFF turned on, FALSE off.
*
* Result: none.
*/
void
xonxoff_proc(state)
int state;
{
if(_inraw){
if(state){
if(!(_raw_tty.c_iflag & IXON)){
_raw_tty.c_iflag |= IXON;
tcsetattr (STDIN_FD, TCSADRAIN, &_raw_tty);
}
}
else{
if(_raw_tty.c_iflag & IXON){
_raw_tty.c_iflag &= ~IXON; /* turn off ^S/^Q on input */
tcsetattr (STDIN_FD, TCSADRAIN, &_raw_tty);
}
}
}
}
/*
* Set up the tty driver to do LF->CR translation
*
* Args: state -- True to turn on translation, false to write raw LF's
*
* Result: none.
*/
void
crlf_proc(state)
int state;
{
if(_inraw){
if(state){ /* turn ON NL->CR on output */
if(!(_raw_tty.c_oflag & ONLCR)){
_raw_tty.c_oflag |= ONLCR;
tcsetattr (STDIN_FD, TCSADRAIN, &_raw_tty);
}
}
else{ /* turn OFF NL-CR on output */
if(_raw_tty.c_oflag & ONLCR){
_raw_tty.c_oflag &= ~ONLCR;
tcsetattr (STDIN_FD, TCSADRAIN, &_raw_tty);
}
}
}
}
/*
* Set up the tty driver to hanle interrupt char
*
* Args: state -- True to turn on interrupt char, false to not
*
* Result: tty driver that'll send us SIGINT or not
*/
void
intr_proc(state)
int state;
{
if(_inraw){
if(state){
_raw_tty.c_lflag |= ISIG; /* enable signals */
tcsetattr(STDIN_FD, TCSADRAIN, &_raw_tty);
}
else{
_raw_tty.c_lflag &= ~ISIG; /* disable signals */
tcsetattr(STDIN_FD, TCSADRAIN, &_raw_tty);
}
}
}
/*
* Discard any pending input characters
*
* Args: none
*
* Result: pending input buffer flushed
*/
void
flush_input()
{
tcflush(STDIN_FD, TCIFLUSH);
}
/*
* Turn off hi bit stripping
*/
void
bit_strip_off()
{
_raw_tty.c_iflag &= ~ISTRIP;
tcsetattr(STDIN_FD, TCSADRAIN, &_raw_tty);
}
/*
* Turn off quit character (^\) if possible
*/
void
quit_char_off()
{
}
/*
* Returns TRUE if tty is < 4800, 0 otherwise.
*/
int
ttisslow()
{
return(cfgetospeed(&_raw_tty) < B4800);
}
+95
View File
@@ -0,0 +1,95 @@
#include <stropts.h>
#include <poll.h>
/*
* Check whether or not a character is ready to be read, or time out.
* This version uses a poll call.
*
* Args: time_out -- number of seconds before it will time out.
*
* Result: NO_OP_IDLE: timed out before any chars ready, time_out > 25
* NO_OP_COMMAND: timed out before any chars ready, time_out <= 25
* READ_INTR: read was interrupted
* READY_TO_READ: input is available
* BAIL_OUT: reading input failed, time to bail gracefully
* PANIC_NOW: system call error, die now
*/
int
input_ready(time_out)
int time_out;
{
struct pollfd pollfd;
int res;
fflush(stdout);
if(time_out > 0){
/* Check to see if there are bytes to read with a timeout */
pollfd.fd = STDIN_FD;
pollfd.events = POLLIN;
res = poll (&pollfd, 1, time_out * 1000);
if(res >= 0){ /* status bits OK? */
if(pollfd.revents & (POLLERR | POLLNVAL))
res = -1; /* bad news, exit below! */
else if(pollfd.revents & POLLHUP)
return(BAIL_OUT);
}
if(res < 0){
if(errno == EINTR || errno == EAGAIN)
return(READ_INTR);
return(PANIC_NOW);
}
if(res == 0){ /* the select timed out */
if(getppid() == 1){
/* Parent is init! */
return(BAIL_OUT);
}
/*
* "15" is the minimum allowed mail check interval.
* Anything less, and we're being told to cycle thru
* the command loop because some task is pending...
*/
return(time_out < IDLE_TIMEOUT ? NO_OP_COMMAND : NO_OP_IDLE);
}
}
time_of_last_input = time((time_t *) 0);
return(READY_TO_READ);
}
/*
* Read one character from STDIN.
*
* Result: -- the single character read
* READ_INTR -- read was interrupted
* BAIL_OUT -- read error of some sort
*/
int
read_one_char()
{
int res;
unsigned char c;
res = read(STDIN_FD, &c, 1);
if(res <= 0){
/*
* Error reading from terminal!
* The only acceptable failure is being interrupted. If so,
* return a value indicating such...
*/
if(res < 0 && errno == EINTR)
return(READ_INTR);
else
return(BAIL_OUT);
}
return((int)c);
}
+90
View File
@@ -0,0 +1,90 @@
/*
* Check whether or not a character is ready to be read, or time out.
* This version uses a select call.
*
* Args: time_out -- number of seconds before it will time out.
*
* Result: NO_OP_IDLE: timed out before any chars ready, time_out > 25
* NO_OP_COMMAND: timed out before any chars ready, time_out <= 25
* READ_INTR: read was interrupted
* READY_TO_READ: input is available
* BAIL_OUT: reading input failed, time to bail gracefully
* PANIC_NOW: system call error, die now
*/
int
input_ready(time_out)
int time_out;
{
struct timeval tmo;
fd_set readfds, errfds;
int res;
fflush(stdout);
if(time_out > 0){
/* Check to see if there are bytes to read with a timeout */
FD_ZERO(&readfds);
FD_ZERO(&errfds);
FD_SET(STDIN_FD, &readfds);
FD_SET(STDIN_FD, &errfds);
tmo.tv_sec = time_out;
tmo.tv_usec = 0;
res = select(STDIN_FD+1, &readfds, 0, &errfds, &tmo);
if(res < 0){
if(errno == EINTR || errno == EAGAIN)
return(READ_INTR);
return(BAIL_OUT);
}
if(res == 0){ /* the select timed out */
if(getppid() == 1){
/* Parent is init! */
return(BAIL_OUT);
}
/*
* "15" is the minimum allowed mail check interval.
* Anything less, and we're being told to cycle thru
* the command loop because some task is pending...
*/
return(time_out < IDLE_TIMEOUT ? NO_OP_COMMAND : NO_OP_IDLE);
}
}
time_of_last_input = time((time_t *) 0);
return(READY_TO_READ);
}
/*
* Read one character from STDIN.
*
* Result: -- the single character read
* READ_INTR -- read was interrupted
* BAIL_OUT -- read error of some sort
*/
int
read_one_char()
{
int res;
unsigned char c;
res = read(STDIN_FD, &c, 1);
if(res <= 0){
/*
* Error reading from terminal!
* The only acceptable failure is being interrupted. If so,
* return a value indicating such...
*/
if(res < 0 && errno == EINTR)
return(READ_INTR);
else
return(BAIL_OUT);
}
return((int)c);
}
+246
View File
@@ -0,0 +1,246 @@
#line 2 "osdep/spell.ms"
/*
* Program: msspell.c
*
*
* Thomas Unger and Michael Seibel
* Networks and Distributed Computing
* Computing and Communications
* University of Washington
* Administration Builiding, AG-44
* Seattle, Washington, 98195, USA
* Internet: pine@cac.washington.edu
*
* Please address all bugs and comments to "pine-bugs@cac.washington.edu"
*
*
* Pine and Pico are registered trademarks of the University of Washington.
* No commercial use of these trademarks may be made without prior written
* permission of the University of Washington.
*
* Pine, Pico, and Pilot software and its included text are Copyright
* 1989-2002 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*/
#include "headers.h"
#ifdef SPELLER
#include "../spell/spell.h"
extern FILE *gfDebugFile = NULL;
int movetoword PROTO((char *));
#define NSHLINES 12
static char *spellhelp[] = {
"Spell Check Help",
" ",
"\tThe spell checker examines all words in the text. It then",
"\toffers each misspelled word for correction while simultaneously",
"\thighlighting it in the text. To leave a word unchanged simply",
"~\thit ~R~e~t~u~r~n at the edit prompt. If a word has been corrected,",
"\teach occurrence of the incorrect word is offered for replacement.",
" ",
"~\tSpell checking can be cancelled at any time by typing ~^~C (~F~3)",
"\tafter exiting help.",
" ",
"End of Spell Check Help",
" ",
NULL
};
static char *pinespellhelp[] = {
"Spell Check Help",
" ",
"\tThe spell checker examines all words in the text. It then",
"\toffers each misspelled word for correction while simultaneously",
"\thighlighting it in the text. To leave a word unchanged simply",
"\thit Return at the edit prompt. If a word has been corrected,",
"\teach occurrence of the incorrect word is offered for replacement.",
" ",
"\tSpell checking can be cancelled at any time by typing ^C (F3)",
"\tafter exiting help.",
" ",
"End of Spell Check Help",
" ",
NULL
};
extern HWND ghTTYWnd;
/*
* spell() - check for potentially missspelled words and offer them for
* correction
*/
spell(f, n)
int f, n;
{
int wlen, bsize, ret, begi, endi, offset, i, qlen;
char wbuf[NLINE], *lbuf;
FILE *p;
LINE *lbp; /* pointer to line before current line */
struct StrStResult result;
setimark(0, 1);
gotobob(0, 1);
emlwrite("Checking spelling...",NULL); /* greetings */
ret = 1;
StResetUserDict((char *) getenv("USER_DICTIONARY"), NULL);
qlen = (Pmaster && Pmaster->quote_str) ? strlen(Pmaster->quote_str) : 0;
lbuf = (char *) malloc(sizeof(char));
bsize = 0;
for(lbp = curbp->b_linep; lbp != curbp->b_linep->l_bp; lbp = lforw(lbp)){
/*
* before, we were accessing the current line, but since that can
* potentially be free()'d (like in chword()), we should only access
* the line from the line before (hence all the lforw(lbp)'s).
*/
if(qlen){ /* quoted line? */
i = 0;
if(qlen <= llength(lforw(lbp)))
while(i < qlen && Pmaster->quote_str[i] == lgetc(lforw(lbp), i).c)
i++;
if(i == qlen)
continue;
}
if(bsize < llength(lforw(lbp)) + 2){ /* resize line buffer? */
bsize = llength(lforw(lbp));
if(!(lbuf = (char *)realloc(lbuf, (bsize + 1) * sizeof(char)))){
emlwrite("Can't reallocate internal buffer!", NULL);
ret = 0; /* FAILURE ! */
break;
}
}
for(i = 0; i < llength(lforw(lbp)); i++) /* copy line to buffer */
lbuf[i] = lgetc(lforw(lbp), i).c;
lbuf[i] = '\0'; /* initialize */
begi = endi = offset = 0;
while(wlen = StParseLine(lbuf, wbuf, &begi, &endi, i))
if(!SpellWord(wbuf, 0, ghTTYWnd, &result)){
if(movetoword(wbuf) != TRUE)
break;
update();
(*term.t_rev)(1);
pputs(wbuf, 1); /* and highlight it */
(*term.t_rev)(0);
SpellWord(wbuf, ST_INTERACTIVE, ghTTYWnd, &result);
curwp->w_flag |= WFMOVE; /* put cursor back */
sgarbk = 0; /* fake no-keymenu-change! */
update();
pputs(wbuf, 0); /* un-highlight */
if(result.code & (ST_EXIT | ST_ERROR)){
if(result.code & ST_EXIT)
emlwrite("Spell Checking Cancelled", NULL);
lbp = NULL; /* stop looking */
ret = 0;
break;
}
else if(result.replace[0]){
chword(wbuf, result.replace); /* correct word */
offset += strlen(result.replace) - wlen;
update(); /* place cursor */
}
}
if(!lbp) /* more to come? */
break;
}
StResetUserDict(NULL, NULL);
StClearHist();
swapimark(0, 1);
curwp->w_flag |= WFHARD|WFMODE;
sgarbk = TRUE;
if(ret)
emlwrite("Done checking spelling", NULL);
return(ret);
}
/*
* movetoword() - move to the first occurance of the word w
*
* returns:
* TRUE upon success
* FALSE otherwise
*
* BUG - since it only moves to the first occurence, there is
* no possibility to ignore the first misspelling and
* change the second.
*/
movetoword(w)
char *w;
{
int i;
int ret = FALSE;
int olddoto;
LINE *olddotp;
register int off; /* curwp offset */
register LINE *lp; /* curwp line */
olddoto = curwp->w_doto; /* save where we are */
olddotp = curwp->w_dotp;
curwp->w_bufp->b_mode |= MDEXACT; /* case sensitive */
while(forscan(&i, w, NULL, 0, 1) == TRUE){
if(i)
break; /* wrap NOT allowed! */
lp = curwp->w_dotp; /* for convenience */
off = curwp->w_doto;
/*
* We want to minimize the number of substrings that we report
* as matching a misspelled word...
*/
if(off == 0 || !isalpha((unsigned char)lgetc(lp, off - 1).c)){
off += strlen(w);
if((!isalpha((unsigned char)lgetc(lp, off).c) || off == llength(lp))
&& lgetc(lp, 0).c != '>'){
ret = TRUE;
break;
}
}
forwchar(0, 1); /* move on... */
}
curwp->w_bufp->b_mode ^= MDEXACT; /* case insensitive */
if(ret == FALSE){
curwp->w_dotp = olddotp;
curwp->w_doto = olddoto;
}
else
curwp->w_flag |= WFHARD;
return(ret);
}
#endif /* SPELLER */
+117
View File
@@ -0,0 +1,117 @@
/*
* Pine and Pico are registered trademarks of the University of Washington.
* No commercial use of these trademarks may be made without prior written
* permission of the University of Washington.
*
* Pine, Pico, and Pilot software and its included text are Copyright
* 1989-1998 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*/
#ifdef SPELLER
/*
* spell - fork off an spell checker
* this is different for OS/2 with ispell; here, the document
* correction and interface is provided by ispell itself
*/
#define MAXARGS 10
spell(f, n)
int f, n;
{
char sp[NLINE]; /* buf holding spell command */
char *fn; /* tmp holder for file name */
char *cp;
char *args[MAXARGS]; /* ptrs into edit command */
int child, rc, i, done = 0;
long l;
int stat;
FILE *p;
if(Pmaster == NULL)
return(-1);
if((fn = writetmp(0, NULL)) == NULL){
emlwrite("Can't write temp file for spell checker");
return(-1);
}
if((cp = (char *)getenv("SPELL")) == NULL)
cp = SPELLER;
strcpy(sp,cp);
if((fn=writetmp(1, NULL)) == NULL){ /* get temp file */
emlwrite("Problem writing temp file for spell checker", NULL);
return(-1);
}
strcat(sp, " ");
strcat(sp, fn);
cp = sp;
for(i=0; *cp != '\0';i++) { /* build args array */
if(i < MAXARGS) {
args[i] = NULL; /* in case we break out */
}
else{
emlwrite("Too many args for command!", NULL);
return(-1);
}
while(isspace((unsigned char)(*cp)))
if(*cp != '\0')
cp++;
else break;
args[i] = cp;
while(!isspace((unsigned char)(*cp)))
if(*cp != '\0')
cp++;
else
break;
if(*cp != '\0')
*cp++ = '\0';
}
args[i] = NULL;
(*Pmaster->tty_fix)(0);
emlwrite("Invoking spell checker...", NULL);
{
void (*ohup)() = signal(SIGHUP, SIG_IGN); /* ignore signals for now */
void (*oint)() = signal(SIGINT, SIG_IGN);
cp=args[0];
rc = spawnvp(P_WAIT, cp, args);
signal(SIGHUP, ohup); /* restore signals */
signal(SIGINT, oint);
}
(*Pmaster->tty_fix)(1);
dont_interrupt();
if (rc==-1) { /* Can't run it */
emlwrite("error attempting to run speller", NULL);
}
/*
* replace edited text with new text
*/
else{
rc = 0;
curbp->b_flag &= ~BFCHG; /* make sure old text gets blasted */
readin(fn, 0, 0); /* read new text overwriting old */
curbp->b_flag |= BFCHG; /* mark dirty for packbuf() */
}
unlink(fn); /* blast temp file */
ttopen(); /* reset the signals */
pico_refresh(0, 1); /* redraw */
return(rc);
}
#endif /* SPELLER */
+255
View File
@@ -0,0 +1,255 @@
/*
* Program: spell.c
*
*
* Michael Seibel
* Networks and Distributed Computing
* Computing and Communications
* University of Washington
* Administration Builiding, AG-44
* Seattle, Washington, 98195, USA
* Internet: mikes@cac.washington.edu
*
* Please address all bugs and comments to "pine-bugs@cac.washington.edu"
*
*
* Pine and Pico are registered trademarks of the University of Washington.
* No commercial use of these trademarks may be made without prior written
* permission of the University of Washington.
*
* Pine, Pico, and Pilot software and its included text are Copyright
* 1989-2002 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*/
#ifdef SPELLER
int movetoword PROTO((char *));
#define NSHLINES 12
static char *spellhelp[] = {
"Spell Check Help",
" ",
"\tThe spell checker examines all words in the text. It then",
"\toffers each misspelled word for correction while simultaneously",
"\thighlighting it in the text. To leave a word unchanged simply",
"~\thit ~R~e~t~u~r~n at the edit prompt. If a word has been corrected,",
"\teach occurrence of the incorrect word is offered for replacement.",
" ",
"~\tSpell checking can be cancelled at any time by typing ~^~C (~F~3)",
"\tafter exiting help.",
" ",
"End of Spell Check Help",
" ",
NULL
};
static char *pinespellhelp[] = {
"Spell Check Help",
" ",
"\tThe spell checker examines all words in the text. It then",
"\toffers each misspelled word for correction while simultaneously",
"\thighlighting it in the text. To leave a word unchanged simply",
"\thit Return at the edit prompt. If a word has been corrected,",
"\teach occurrence of the incorrect word is offered for replacement.",
" ",
"\tSpell checking can be cancelled at any time by typing ^C (F3)",
"\tafter exiting help.",
" ",
"End of Spell Check Help",
" ",
NULL
};
/*
* spell() - check for potentially missspelled words and offer them for
* correction
*/
spell(f, n)
int f, n;
{
int status, next, ret;
FILE *p;
char *b, *sp, *fn;
char wb[NLINE], cb[NLINE];
FILE *P_open();
setimark(0, 1);
emlwrite("Checking spelling...", NULL); /* greetings */
if(alt_speller)
return(alt_editor(1, 0)); /* f == 1 means fork speller */
if((fn = writetmp(0, NULL)) == NULL){
emlwrite("Can't write temp file for spell checker", NULL);
return(-1);
}
if((sp = (char *)getenv("SPELL")) == NULL)
sp = SPELLER;
if(fexist(sp, "x", (off_t *)NULL) != FIOSUC){
emlwrite("\007Spell-checking file \"%s\" not found", sp);
return(-1);
}
sprintf(cb, "( %s ) < %s", sp, fn); /* pre-use buffer! */
if((p = P_open(cb)) == NULL){ /* read output from command */
unlink(fn);
emlwrite("Can't fork spell checker", NULL);
return(-1);
}
ret = 1;
while(fgets(wb, NLINE, p) != NULL && ret){
if((b = (char *)strchr(wb,'\n')) != NULL)
*b = '\0';
strcpy(cb, wb);
gotobob(0, 1);
status = TRUE;
next = 1;
while(status){
if(next++)
if(movetoword(wb) != TRUE)
break;
update();
(*term.t_rev)(1);
pputs(wb, 1); /* highlight word */
(*term.t_rev)(0);
if(strcmp(cb, wb)){
char prompt[2*NLINE + 32];
sprintf(prompt, "Replace \"%s\" with \"%s\"", wb, cb);
status=mlyesno(prompt, TRUE);
}
else
status=mlreplyd("Edit a replacement: ", cb, NLINE, QDEFLT, NULL);
curwp->w_flag |= WFMOVE; /* put cursor back */
sgarbk = 0; /* fake no-keymenu-change! */
update();
pputs(wb, 0); /* un-highlight */
switch(status){
case TRUE:
chword(wb, cb); /* correct word */
case FALSE:
update(); /* place cursor */
break;
case ABORT:
emlwrite("Spell Checking Cancelled", NULL);
ret = FALSE;
status = FALSE;
break;
case HELPCH:
if(Pmaster){
VARS_TO_SAVE *saved_state;
saved_state = save_pico_state();
(*Pmaster->helper)(pinespellhelp,
"Help with Spelling Checker", 1);
if(saved_state){
restore_pico_state(saved_state);
free_pico_state(saved_state);
}
}
else
pico_help(spellhelp, "Help with Spelling Checker", 1);
case (CTRL|'L'):
next = 0; /* don't get next word */
sgarbf = TRUE; /* repaint full screen */
update();
status = TRUE;
continue;
default:
emlwrite("Huh?", NULL); /* shouldn't get here, but.. */
status = TRUE;
sleep(1);
break;
}
forwword(0, 1); /* goto next word */
}
}
P_close(p); /* clean up */
unlink(fn);
swapimark(0, 1);
curwp->w_flag |= WFHARD|WFMODE;
sgarbk = TRUE;
if(ret)
emlwrite("Done checking spelling", NULL);
return(ret);
}
/*
* movetoword() - move to the first occurance of the word w
*
* returns:
* TRUE upon success
* FALSE otherwise
*/
movetoword(w)
char *w;
{
int i;
int ret = FALSE;
int olddoto;
LINE *olddotp;
register int off; /* curwp offset */
register LINE *lp; /* curwp line */
olddoto = curwp->w_doto; /* save where we are */
olddotp = curwp->w_dotp;
curwp->w_bufp->b_mode |= MDEXACT; /* case sensitive */
while(forscan(&i, w, NULL, 0, 1) == TRUE){
if(i)
break; /* wrap NOT allowed! */
lp = curwp->w_dotp; /* for convenience */
off = curwp->w_doto;
/*
* We want to minimize the number of substrings that we report
* as matching a misspelled word...
*/
if(off == 0 || !isalpha((unsigned char)lgetc(lp, off - 1).c)){
off += strlen(w);
if((!isalpha((unsigned char)lgetc(lp, off).c) || off == llength(lp))
&& lgetc(lp, 0).c != '>'){
ret = TRUE;
break;
}
}
forwchar(0, 1); /* move on... */
}
curwp->w_bufp->b_mode ^= MDEXACT; /* case insensitive */
if(ret == FALSE){
curwp->w_dotp = olddotp;
curwp->w_doto = olddoto;
}
else
curwp->w_flag |= WFHARD;
return(ret);
}
#endif /* SPELLER */
+166
View File
@@ -0,0 +1,166 @@
#if !defined(DOS)
static char rcsid[] = "$Id: term.ans 7884 1998-02-28 00:15:44Z hubert $";
#endif
/*
* Program: ANSI terminal driver routines
*
*
* Michael Seibel
* Networks and Distributed Computing
* Computing and Communications
* University of Washington
* Administration Builiding, AG-44
* Seattle, Washington, 98195, USA
* Internet: mikes@cac.washington.edu
*
* Please address all bugs and comments to "pine-bugs@cac.washington.edu"
*
* Pine and Pico are registered trademarks of the University of Washington.
* No commercial use of these trademarks may be made without prior written
* permission of the University of Washington.
*
* Pine, Pico, and Pilot software and its included text are Copyright
* 1989-1998 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*/
/*
* The routines in this file provide support for ANSI style terminals
* over a serial line. The serial I/O services are provided by routines in
* "termio.c". It compiles into nothing if not an ANSI device.
*/
#define termdef 1 /* don't define "term" external */
#if ANSI_DRIVER
#define MARGIN 8 /* size of minimim margin and */
#define SCRSIZ 64 /* scroll size for extended lines */
#define MROW 2 /* rows in menu */
#define BEL 0x07 /* BEL character. */
#define ESC 0x1B /* ESC character. */
extern int ttopen(); /* Forward references. */
extern int ttgetc();
extern int ttputc();
extern int ttflush();
extern int ttclose();
extern int ansimove();
extern int ansieeol();
extern int ansieeop();
extern int ansibeep();
extern int ansiopen();
extern int ansiterminalinfo();
extern int ansirev();
/*
* Standard terminal interface dispatch table. Most of the fields point into
* "termio" code.
*/
#if defined(VAX) && !defined(__ALPHA)
globaldef
#endif
TERM term = {
NROW-1,
NCOL,
MARGIN,
SCRSIZ,
MROW,
ansiopen,
ansiterminalinfo,
ttclose,
ttgetc,
ttputc,
ttflush,
ansimove,
ansieeol,
ansieeop,
ansibeep,
ansirev
};
ansimove(row, col)
{
ttputc(ESC);
ttputc('[');
ansiparm(row+1);
ttputc(';');
ansiparm(col+1);
ttputc('H');
}
ansieeol()
{
ttputc(ESC);
ttputc('[');
ttputc('K');
}
ansieeop()
{
ttputc(ESC);
ttputc('[');
ttputc('J');
}
ansirev(state) /* change reverse video state */
int state; /* TRUE = reverse, FALSE = normal */
{
static int PrevState = 0;
if(state != PrevState) {
PrevState = state ;
ttputc(ESC);
ttputc('[');
ttputc(state ? '7': '0');
ttputc('m');
}
}
ansibeep()
{
ttputc(BEL);
ttflush();
}
ansiparm(n)
register int n;
{
register int q;
q = n/10;
if (q != 0)
ansiparm(q);
ttputc((n%10) + '0');
}
#endif
ansiterminalinfo(termcap_wins)
int termcap_wins;
{
#if V7
register char *cp;
char *getenv();
if ((cp = getenv("TERM")) == NULL) {
puts("Shell variable TERM not defined!");
exit(1);
}
if (strcmp(cp, "vt100") != 0) {
puts("Terminal type not 'vt100'!");
exit(1);
}
#endif
revexist = TRUE;
}
ansiopen()
{
ttopen();
}

Some files were not shown because too many files have changed in this diff Show More