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
+1318
View File
File diff suppressed because it is too large Load Diff
+878
View File
@@ -0,0 +1,878 @@
#if !defined(lint) && !defined(DOS)
static char rcsid[] = "$Id: basic.c 13654 2004-05-07 21:43:40Z jpf $";
#endif
/*
* Program: Cursor manipulation functions
*
*
* 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-2004 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 move the cursor around on the screen. They
* compute a new value for the cursor, then adjust ".". The display code
* always updates the cursor location, so only moves between lines, or
* functions that adjust the top line in the window and invalidate the
* framing, are hard.
*/
#include "headers.h"
#ifdef ANSI
int getgoal(struct LINE *);
#else
int getgoal();
#endif
/*
* Move the cursor to the
* beginning of the current line.
* Trivial.
*/
gotobol(f, n)
int f, n;
{
curwp->w_doto = 0;
return (TRUE);
}
/*
* Move the cursor backwards by "n" characters. If "n" is less than zero call
* "forwchar" to actually do the move. Otherwise compute the new cursor
* location. Error if you try and move out of the buffer. Set the flag if the
* line pointer for dot changes.
*/
backchar(f, n)
int f;
register int n;
{
register LINE *lp;
if (n < 0)
return (forwchar(f, -n));
while (n--) {
if (curwp->w_doto == 0) {
if ((lp=lback(curwp->w_dotp)) == curbp->b_linep){
if(Pmaster && Pmaster->headents)
/*
* go up into editing the mail header if on
* the top line and the user hits the left arrow!!!
*
* if the editor returns anything except -1, the
* user requested something special, so let
* pico know...
*/
return(HeaderEditor(2, 1));
else
return (FALSE);
}
curwp->w_dotp = lp;
curwp->w_doto = llength(lp);
curwp->w_flag |= WFMOVE;
} else
curwp->w_doto--;
}
return (TRUE);
}
/*
* Move the cursor to the end of the current line. Trivial. No errors.
*/
gotoeol(f, n)
int f, n;
{
curwp->w_doto = llength(curwp->w_dotp);
return (TRUE);
}
/*
* Move the cursor forwwards by "n" characters. If "n" is less than zero call
* "backchar" to actually do the move. Otherwise compute the new cursor
* location, and move ".". Error if you try and move off the end of the
* buffer. Set the flag if the line pointer for dot changes.
*/
forwchar(f, n)
int f;
register int n;
{
if (n < 0)
return (backchar(f, -n));
while (n--) {
if (curwp->w_doto == llength(curwp->w_dotp)) {
if (curwp->w_dotp == curbp->b_linep)
return (FALSE);
curwp->w_dotp = lforw(curwp->w_dotp);
curwp->w_doto = 0;
curwp->w_flag |= WFMOVE;
}
else
curwp->w_doto++;
}
return (TRUE);
}
/*
* move to a particular line.
* argument (n) must be a positive integer for
* this to actually do anything
*/
gotoline(f, n)
int f, n;
{
if (n < 1) /* if a bogus argument...then leave */
return(FALSE);
/* first, we go to the start of the buffer */
curwp->w_dotp = lforw(curbp->b_linep);
curwp->w_doto = 0;
return(forwline(f, n-1));
}
/*
* Goto the beginning of the buffer. Massive adjustment of dot. This is
* considered to be hard motion; it really isn't if the original value of dot
* is the same as the new value of dot. Normally bound to "M-<".
*/
gotobob(f, n)
int f, n;
{
curwp->w_dotp = lforw(curbp->b_linep);
curwp->w_doto = 0;
curwp->w_flag |= WFHARD;
return (TRUE);
}
/*
* Move to the end of the buffer. Dot is always put at the end of the file
* (ZJ). The standard screen code does most of the hard parts of update.
* Bound to "M->".
*/
gotoeob(f, n)
int f, n;
{
curwp->w_dotp = curbp->b_linep;
curwp->w_doto = 0;
curwp->w_flag |= WFHARD;
return (TRUE);
}
/*
* Move forward by full lines. If the number of lines to move is less than
* zero, call the backward line function to actually do it. The last command
* controls how the goal column is set. Bound to "C-N". No errors are
* possible.
*/
forwline(f, n)
int f, n;
{
register LINE *dlp;
if (n < 0)
return (backline(f, -n));
if ((lastflag&CFCPCN) == 0) /* Reset goal if last */
curgoal = getccol(FALSE); /* not C-P or C-N */
thisflag |= CFCPCN;
dlp = curwp->w_dotp;
while (n-- && dlp!=curbp->b_linep)
dlp = lforw(dlp);
curwp->w_dotp = dlp;
curwp->w_doto = getgoal(dlp);
curwp->w_flag |= WFMOVE;
return (TRUE);
}
/*
* This function is like "forwline", but goes backwards. The scheme is exactly
* the same. Check for arguments that are less than zero and call your
* alternate. Figure out the new line and call "movedot" to perform the
* motion. No errors are possible. Bound to "C-P".
*/
backline(f, n)
int f, n;
{
register LINE *dlp;
if (n < 0)
return (forwline(f, -n));
if(Pmaster && Pmaster->headents){
/*
* go up into editing the mail header if on the top line
* and the user hits the up arrow!!!
*/
if (lback(curwp->w_dotp) == curbp->b_linep)
/*
* if the editor returns anything except -1 then the user
* has requested something special, so let pico know...
*/
return(HeaderEditor(1, 1));
}
if ((lastflag&CFCPCN) == 0) /* Reset goal if the */
curgoal = getccol(FALSE); /* last isn't C-P, C-N */
thisflag |= CFCPCN;
dlp = curwp->w_dotp;
while (n-- && lback(dlp)!=curbp->b_linep)
dlp = lback(dlp);
curwp->w_dotp = dlp;
curwp->w_doto = getgoal(dlp);
curwp->w_flag |= WFMOVE;
return (TRUE);
}
/*
* go back to the begining of the current paragraph
* here we look for a <NL><NL> or <NL><TAB> or <NL><SPACE>
* combination to delimit the begining of a paragraph
*/
gotobop(f, n)
int f, n; /* default Flag & Numeric argument */
{
int quoted, qlen;
char qstr[NLINE], qstr2[NLINE];
if (n < 0) /* the other way...*/
return(gotoeop(f, -n));
while (n-- > 0) { /* for each one asked for */
while(lisblank(curwp->w_dotp)
&& lback(curwp->w_dotp) != curbp->b_linep){
curwp->w_dotp = lback(curwp->w_dotp);
curwp->w_doto = 0;
}
/* scan line by line until we come to a line ending with
* a <NL><NL> or <NL><TAB> or <NL><SPACE>
*
* PLUS: if there's a quote string, a quoted-to-non-quoted
* line transition.
*/
quoted = (glo_quote_str || (Pmaster && Pmaster->quote_str))
? quote_match(glo_quote_str ? glo_quote_str : Pmaster->quote_str,
curwp->w_dotp, qstr, NLINE) : 0;
qlen = quoted ? strlen(qstr) : 0;
while(lback(curwp->w_dotp) != curbp->b_linep
&& llength(lback(curwp->w_dotp)) > qlen
&& ((glo_quote_str || (Pmaster && Pmaster->quote_str))
? (quoted == quote_match(glo_quote_str ? glo_quote_str
: Pmaster->quote_str,
lback(curwp->w_dotp),
qstr2, NLINE)
&& !strcmp(qstr, qstr2))
: 1)
&& lgetc(curwp->w_dotp, qlen).c != TAB
&& lgetc(curwp->w_dotp, qlen).c != ' ')
curwp->w_dotp = lback(curwp->w_dotp);
if(n){
/* keep looking */
if(lback(curwp->w_dotp) == curbp->b_linep)
break;
else
curwp->w_dotp = lback(curwp->w_dotp);
curwp->w_doto = 0;
}
else{
/* leave cursor on first word in para */
curwp->w_doto = 0;
while(isspace((unsigned char)lgetc(curwp->w_dotp, curwp->w_doto).c))
if(++curwp->w_doto >= llength(curwp->w_dotp)){
curwp->w_doto = 0;
curwp->w_dotp = lforw(curwp->w_dotp);
if(curwp->w_dotp == curbp->b_linep)
break;
}
}
}
curwp->w_flag |= WFMOVE; /* force screen update */
return(TRUE);
}
/*
* go forword to the end of the current paragraph
* here we look for a <NL><NL> or <NL><TAB> or <NL><SPACE>
* combination to delimit the begining of a paragraph
*/
gotoeop(f, n)
int f, n; /* default Flag & Numeric argument */
{
int quoted, qlen;
char qstr[NLINE], qstr2[NLINE];
if (n < 0) /* the other way...*/
return(gotobop(f, -n));
while (n-- > 0) { /* for each one asked for */
while(lisblank(curwp->w_dotp)){
curwp->w_doto = 0;
if((curwp->w_dotp = lforw(curwp->w_dotp)) == curbp->b_linep)
break;
}
/* scan line by line until we come to a line ending with
* a <NL><NL> or <NL><TAB> or <NL><SPACE>
*
* PLUS: if there's a quote string, a quoted-to-non-quoted
* line transition.
*/
quoted = ((glo_quote_str || (Pmaster && Pmaster->quote_str))
? quote_match(glo_quote_str ? glo_quote_str : Pmaster->quote_str,
curwp->w_dotp, qstr, NLINE) : 0);
qlen = quoted ? strlen(qstr) : 0;
while(curwp->w_dotp != curbp->b_linep
&& llength(lforw(curwp->w_dotp)) > qlen
&& ((glo_quote_str || (Pmaster && Pmaster->quote_str))
? (quoted == quote_match(glo_quote_str ? glo_quote_str
: Pmaster->quote_str,
lforw(curwp->w_dotp),
qstr2, NLINE)
&& !strcmp(qstr, qstr2))
: 1)
&& lgetc(lforw(curwp->w_dotp), qlen).c != TAB
&& lgetc(lforw(curwp->w_dotp), qlen).c != ' ')
curwp->w_dotp = lforw(curwp->w_dotp);
curwp->w_doto = llength(curwp->w_dotp);
/* still looking? */
if(n){
if(curwp->w_dotp == curbp->b_linep)
break;
else
curwp->w_dotp = lforw(curwp->w_dotp);
curwp->w_doto = 0;
}
}
curwp->w_flag |= WFMOVE; /* force screen update */
return(curwp->w_dotp != curbp->b_linep);
}
/*
* This routine, given a pointer to a LINE, and the current cursor goal
* column, return the best choice for the offset. The offset is returned.
* Used by "C-N" and "C-P".
*/
getgoal(dlp)
register LINE *dlp;
{
register int c;
register int col;
register int newcol;
register int dbo;
col = 0;
dbo = 0;
while (dbo != llength(dlp)) {
c = lgetc(dlp, dbo).c;
newcol = col;
if (c == '\t')
newcol |= 0x07;
else if (c<0x20 || c==0x7F)
++newcol;
++newcol;
if (newcol > curgoal)
break;
col = newcol;
++dbo;
}
return (dbo);
}
/*
* Scroll the display forward (up) n lines.
*/
scrollforw (n, movedot)
register int n;
int movedot;
{
register LINE *lp;
LINE *lp2;
register int nl;
int i;
nl = n;
lp = curwp->w_linep;
while (n-- && lp!=curbp->b_linep)
lp = lforw(lp);
if (movedot) { /* Move dot to top of page. */
curwp->w_dotp = lp;
curwp->w_doto = 0;
}
curwp->w_flag |= WFHARD;
if(lp == curbp->b_linep)
return(TRUE);
else
curwp->w_linep = lp;
/*
* if the header is open, close it ...
*/
if(Pmaster && Pmaster->headents && ComposerTopLine != COMPOSER_TOP_LINE){
n -= ComposerTopLine - COMPOSER_TOP_LINE;
ToggleHeader(0);
}
/*
* scroll down from the top the same number of lines we've moved
* forward
*/
if(optimize)
scrollup(curwp, -1, nl-n-1);
if(!movedot){
/* Requested to not move the dot. Look for the dot in the current
* window. loop through all lines, stop when at end of window
* or endof buffer. If the dot is found, it can stay where it
* is, otherwise we do need to move it.
*/
movedot = TRUE;
for ( lp2 = lp, i = 0;
lp2 != curbp->b_linep && i < curwp->w_ntrows;
lp2 = lforw(lp2), ++i) {
if (curwp->w_dotp == lp2) {
movedot = FALSE;
break;
}
}
if (movedot) {
/* Dot not found in window. Move to first line of window. */
curwp->w_dotp = lp;
curwp->w_doto = 0;
}
}
return (TRUE);
}
/*
* Scroll forward by a specified number of lines, or by a full page if no
* argument. Bound to "C-V". The "2" in the arithmetic on the window size is
* the overlap; this value is the default overlap value in ITS EMACS. Because
* this zaps the top line in the display window, we have to do a hard update.
*/
forwpage(f, n)
int f;
register int n;
{
if (f == FALSE) {
n = curwp->w_ntrows - 2; /* Default scroll. */
if (n <= 0) /* Forget the overlap */
n = 1; /* if tiny window. */
} else if (n < 0)
return (backpage(f, -n));
#if CVMVAS
else /* Convert from pages */
n *= curwp->w_ntrows; /* to lines. */
#endif
return (scrollforw (n, TRUE));
}
/*
* Scroll back (down) number of lines.
*/
scrollback (n, movedot)
register int n;
int movedot;
{
register LINE *lp, *tp;
register int nl;
int i;
if(Pmaster && Pmaster->headents){
/*
* go up into editing the mail header if on the top line
* and the user hits the up arrow!!!
*/
if (lback(curwp->w_dotp) == curbp->b_linep){
/*
* if the editor returns anything except -1 then the user
* has requested something special, so let pico know...
*/
return(HeaderEditor(1, 1));
}
}
/*
* Count back the number of lines requested.
*/
nl = n;
lp = curwp->w_linep;
while (n-- && lback(lp)!=curbp->b_linep)
lp = lback(lp);
curwp->w_linep = lp;
curwp->w_flag |= WFHARD;
/*
* scroll down from the top the same number of lines we've moved
* forward
*
* This isn't too cool, but it has to be this way so we can
* gracefully scroll in the message header
*/
if(Pmaster && Pmaster->headents){
if((lback(lp)==curbp->b_linep) && (ComposerTopLine==COMPOSER_TOP_LINE))
n -= entry_line(1000, TRUE); /* never more than 1000 headers */
if(nl-n-1 < curwp->w_ntrows)
if(optimize)
scrolldown(curwp, -1, nl-n-1);
}
else
if(optimize)
scrolldown(curwp, -1, nl-n-1);
if(Pmaster && Pmaster->headents){
/*
* if we're at the top of the page, and the header is closed,
* open it ...
*/
if((lback(lp) == curbp->b_linep)
&& (ComposerTopLine == COMPOSER_TOP_LINE)){
ToggleHeader(1);
movecursor(ComposerTopLine, 0);
}
}
/*
* Decide if we move the dot or not. Calculation done AFTER deciding
* if we display the header because that will change the number of
* lines on the screen.
*/
if (movedot) {
/* Dot gets put at top of window. */
curwp->w_dotp = curwp->w_linep;
curwp->w_doto = 0;
}
else {
/* Requested not to move dot, but we do need to keep in on
* the screen. Verify that it is still in the range of lines
* visable in the window. Loop from the first line to the
* last line, until we reach the end of the buffer or the end
* of the window. If we find the dot, then we don't need
* to move it. */
movedot = TRUE;
for ( tp = curwp->w_linep, i = 0;
tp != curbp->b_linep && i < curwp->w_ntrows;
tp = lforw(tp), ++i) {
if (curwp->w_dotp == tp) {
movedot = FALSE;
break;
}
}
if (movedot) {
/* Dot not found in window. Move to last line of window. */
curwp->w_dotp = lback (tp);
curwp->w_doto = 0;
}
}
return (TRUE);
}
/*
* This command is like "forwpage", but it goes backwards. The "2", like
* above, is the overlap between the two windows. The value is from the ITS
* EMACS manual. Bound to "M-V". We do a hard update for exactly the same
* reason.
*/
backpage(f, n)
int f;
register int n;
{
if (f == FALSE) {
n = curwp->w_ntrows - 2; /* Default scroll. */
if (n <= 0) /* Don't blow up if the */
n = 1; /* window is tiny. */
} else if (n < 0)
return (forwpage(f, -n));
#if CVMVAS
else /* Convert from pages */
n *= curwp->w_ntrows; /* to lines. */
#endif
return (scrollback (n, TRUE));
}
scrollupline (f, n)
int f, n;
{
return (scrollback (1, FALSE));
}
scrolldownline (f, n)
int f, n;
{
return (scrollforw (1, FALSE));
}
/*
* Scroll to a position.
*/
scrollto (f, n)
int f, n;
{
#ifdef _WINDOWS
long scrollLine;
LINE *lp;
int i;
scrollLine = mswin_getscrollto ();
/*
* Starting at the first data line in the buffer, step forward
* 'scrollLine' lines to find the new top line. It is a circular
* list of buffers, so watch for the first line to reappear. if
* it does, we have some sort of internal error, abort scroll
* operation. Also watch for NULL, just in case.
*/
lp = lforw (curbp->b_linep);
for (i = 0; i < scrollLine && lp != curbp->b_linep && lp != NULL; ++i)
lp = lforw(lp);
if (lp == curbp->b_linep || lp == NULL)
return (FALSE); /* Whoops! */
/* Set the new top line for the window and flag a redraw. */
curwp->w_linep = lp;
curwp->w_dotp = lp;
curwp->w_doto = 0;
curwp->w_flag |= WFHARD;
if(Pmaster && Pmaster->headents){
/*
* If we are at the top of the page and header not open, open it.
* If we are not at the top of the page and the header is open,
* close it.
*/
if((lback(lp) == curbp->b_linep)
&& (ComposerTopLine == COMPOSER_TOP_LINE)){
ToggleHeader(1);
movecursor(ComposerTopLine, 0);
}
else if((lback(lp) != curbp->b_linep)
&& (ComposerTopLine != COMPOSER_TOP_LINE)){
ToggleHeader (0);
}
}
#endif
return (TRUE);
}
/*
* Set the mark in the current window to the value of "." in the window. No
* errors are possible. Bound to "M-.". If told to set an already set mark
* unset it.
*/
setmark(f, n)
int f, n;
{
if(!curwp->w_markp){
curwp->w_markp = curwp->w_dotp;
curwp->w_marko = curwp->w_doto;
emlwrite("Mark Set", NULL);
}
else{
/* clear inverse chars between here and dot */
markregion(0);
curwp->w_markp = NULL;
emlwrite("Mark UNset", NULL);
}
#ifdef _WINDOWS
mswin_allowcopycut(curwp->w_markp ? kremove : NULL);
#endif
return (TRUE);
}
/*
* Swap the values of "." and "mark" in the current window. This is pretty
* easy, bacause all of the hard work gets done by the standard routine
* that moves the mark about. The only possible error is "no mark". Bound to
* "C-X C-X".
*/
swapmark(f, n)
int f, n;
{
register LINE *odotp;
register int odoto;
if (curwp->w_markp == NULL) {
if(Pmaster == NULL)
emlwrite("No mark in this window", NULL);
return (FALSE);
}
odotp = curwp->w_dotp;
odoto = curwp->w_doto;
curwp->w_dotp = curwp->w_markp;
curwp->w_doto = curwp->w_marko;
curwp->w_markp = odotp;
curwp->w_marko = odoto;
curwp->w_flag |= WFMOVE;
return (TRUE);
}
/*
* Set the mark in the current window to the value of "." in the window. No
* errors are possible. Bound to "M-.". If told to set an already set mark
* unset it.
*/
setimark(f, n)
int f, n;
{
curwp->w_imarkp = curwp->w_dotp;
curwp->w_imarko = curwp->w_doto;
return(TRUE);
}
/*
* Swap the values of "." and "mark" in the current window. This is pretty
* easy, bacause all of the hard work gets done by the standard routine
* that moves the mark about. The only possible error is "no mark". Bound to
* "C-X C-X".
*/
swapimark(f, n)
int f, n;
{
register LINE *odotp;
register int odoto;
if (curwp->w_imarkp == NULL) {
if(Pmaster == NULL)
emlwrite("Programmer botch! No mark in this window", NULL);
return (FALSE);
}
odotp = curwp->w_dotp;
odoto = curwp->w_doto;
curwp->w_dotp = curwp->w_imarkp;
curwp->w_doto = curwp->w_imarko;
curwp->w_imarkp = odotp;
curwp->w_imarko = odoto;
curwp->w_flag |= WFMOVE;
return (TRUE);
}
#ifdef MOUSE
/*
* Handle a mouse down.
*/
mousepress (f, n)
int f, n;
{
MOUSEPRESS mp;
LINE *lp;
int i;
mouse_get_last (NULL, &mp);
lp = curwp->w_linep;
i = mp.row - ((Pmaster && Pmaster->headents) ? ComposerTopLine : 2);
if (i < 0) {
if (Pmaster) {
/* Clear existing region. */
if (curwp->w_markp)
setmark(0,1);
/* Move to top of document before editing header. */
curwp->w_dotp = curwp->w_linep;
curwp->w_doto = 0;
curwp->w_flag |= WFMOVE;
update (); /* And update. */
return (HeaderEditor (1, 1));
}
}
else {
while(i-- && lp != curbp->b_linep)
lp = lforw(lp);
curgoal = mp.col;
curwp->w_dotp = lp;
curwp->w_doto = getgoal(lp);
curwp->w_flag |= WFMOVE;
if(mp.doubleclick)
setmark(0, 1);
}
return(FALSE);
}
#endif
+420
View File
@@ -0,0 +1,420 @@
#if !defined(lint) && !defined(DOS)
static char rcsid[] = "$Id: bind.c 11330 2000-11-09 21:53:43Z hubert $";
#endif
/*
* Program: Key binding 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-2000 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*/
/* This file is for functions having to do with key bindings,
descriptions, help commands, and command line execution.
written 11-feb-86 by Daniel Lawrence
*/
#include "headers.h"
#ifdef ANSI
int arraylen(char **);
#else
int arraylen();
#endif
/*
* help - help function for pico (UW pared down version of uemacs).
* this function will intentionally garbage with helpful
* tips and then wait for a ' ' to be hit to then update the
* screen.
*/
static char *helptext[] = {
"\tPico Help Text",
" ",
"\tPico is designed to be a simple, easy-to-use text editor with a",
"\tlayout very similar to the pine mailer. The status line at the",
"\ttop of the display shows pico's version, the current file being",
"\tedited and whether or not there are outstanding modifications",
"\tthat have not been saved. The third line from the bottom is used",
"\tto report informational messages and for additional command input.",
"\tThe bottom two lines list the available editing commands.",
" ",
"\tEach character typed is automatically inserted into the buffer",
"\tat the current cursor position. Editing commands and cursor",
"\tmovement (besides arrow keys) are given to pico by typing",
"\tspecial control-key sequences. A caret, '^', is used to denote",
"~\tthe control key, sometimes marked \"CTRL\", so the ~C~T~R~L~-~q key",
"~\tcombination is written as ~^~Q.",
" ",
"\tThe following functions are available in pico (where applicable,",
"\tcorresponding function key commands are in parentheses).",
" ",
"~\t~^~G (~F~1) Display this help text.",
" ",
"~\t~^~F move Forward a character.",
"~\t~^~B move Backward a character.",
"~\t~^~P move to the Previous line.",
"~\t~^~N move to the Next line.",
"~\t~^~A move to the beginning of the current line.",
"~\t~^~E move to the End of the current line.",
"~\t~^~V (~F~8) move forward a page of text.",
"~\t~^~Y (~F~7) move backward a page of text.",
" ",
"~\t~^~W (~F~6) Search for (where is) text, neglecting case.",
"~\t~^~L Refresh the display.",
" ",
"~\t~^~D Delete the character at the cursor position.",
"~\t~^~^ Mark cursor position as beginning of selected text.",
"\t\t Note: Setting mark when already set unselects text.",
"~\t~^~K (~F~9) Cut selected text (displayed in inverse characters).",
"\t\t Note: The selected text's boundary on the cursor side",
"\t\t ends at the left edge of the cursor. So, with ",
"\t\t selected text to the left of the cursor, the ",
"\t\t character under the cursor is not selected.",
"~\t~^~U (~F~1~0) Uncut (paste) last cut text inserting it at the",
"\t\t current cursor position.",
"~\t~^~I Insert a tab at the current cursor position.",
" ",
"~\t~^~J (~F~4) Format (justify) the current paragraph.",
"\t\t Note: paragraphs delimited by blank lines or indentation.",
"~\t~^~T (~F~1~2) To invoke the spelling checker",
"~\t~^~C (~F~1~1) Report current cursor position",
" ",
"~\t~^~R (~F~5) Insert an external file at the current cursor position.",
"~\t~^~O (~F~3) Output the current buffer to a file, saving it.",
"~\t~^~X (~F~2) Exit pico, saving buffer.",
" ",
"\tPine and Pico are trademarks of the University of Washington.",
"\tNo commercial use of these trademarks may be made without prior",
"\twritten permission of the University of Washington.",
" ",
" End of Help.",
" ",
NULL
};
/*
* arraylen - return the number of bytes in an array of char
*/
arraylen(array)
char **array;
{
register int i=0;
while(array[i++] != NULL) ;
return(i);
}
/*
* whelp - display help text for the composer and pico
*/
whelp(f, n)
int f, n;
{
if(term.t_mrow == 0){ /* blank keymenu in effect */
if(km_popped == 0){
/* cause keymenu display */
km_popped = 2;
if(!Pmaster)
sgarbf = TRUE;
return(TRUE);
}
}
if(Pmaster){
VARS_TO_SAVE *saved_state;
saved_state = save_pico_state();
(*Pmaster->helper)(Pmaster->composer_help,
Pmaster->headents
? "Help on the Pine Composer"
: "Help on Signature Editor",
1);
if(saved_state){
restore_pico_state(saved_state);
free_pico_state(saved_state);
}
ttresize();
picosigs(); /* restore any altered handlers */
curwp->w_flag |= WFMODE;
if(km_popped) /* this will unpop us */
curwp->w_flag |= WFHARD;
}
else{
int mrow_was_zero = 0;
/* always want keyhelp showing during help */
if(term.t_mrow == 0){
mrow_was_zero++;
term.t_mrow = 2;
}
pico_help(helptext, "Help for Pico", 1);
/* put it back the way it was */
if(mrow_was_zero)
term.t_mrow = 0;
}
sgarbf = TRUE;
return(FALSE);
}
static KEYMENU menu_scroll[] = {
{NULL, NULL, KS_NONE}, {NULL, NULL, KS_NONE},
{NULL, NULL, KS_NONE}, {NULL, NULL, KS_NONE},
{NULL, NULL, KS_NONE}, {NULL, NULL, KS_NONE},
{"^X", "Exit Help", KS_NONE}, {NULL, NULL, KS_NONE},
{NULL, NULL, KS_NONE}, {NULL, NULL, KS_NONE},
{NULL, NULL, KS_NONE}, {NULL, NULL, KS_NONE}
};
#define PREV_KEY 3
#define NEXT_KEY 9
#define OVERLAP 2 /* displayed page overlap */
/*
* scrollw - takes beginning row and ending row to diplay an array
* of text lines. returns either 0 if scrolling terminated
* normally or the value of a ctrl character typed to end it.
*
* updates -
* 01/11/89 - added stripe call if 1st char is tilde - '~'
*
*/
wscrollw(begrow, endrow, textp, textlen)
int begrow, endrow;
char *textp[];
int textlen;
{
register int loffset = 0;
register int prevoffset = -1;
register int dlines;
register int i;
register int cont;
register int done = 0;
register char *buf;
int c;
dlines = endrow - begrow - 1;
while(!done) {
/*
* diplay a page loop ...
*/
if(prevoffset != loffset){
for(i = 0; i < dlines; i++){
movecursor(i + begrow, 0);
peeol();
if((loffset+i) < textlen){
buf = &(textp[loffset+i][0]);
if(*buf == '~'){
buf++;
wstripe(begrow+i, 0, buf, '~');
}
else{
pputs(buf, 0);
}
}
}
/*
* put up the options prompt
*/
movecursor(begrow + dlines, 0);
cont = (loffset+dlines < textlen);
if(cont){ /* continue ? */
menu_scroll[NEXT_KEY].name = "^V";
menu_scroll[NEXT_KEY].label = "Next Pg";
}
else
menu_scroll[NEXT_KEY].name = NULL;
if(loffset){
menu_scroll[PREV_KEY].name = "^Y";
menu_scroll[PREV_KEY].label = "Prev Pg";
}
else
menu_scroll[PREV_KEY].name = NULL;
wkeyhelp(menu_scroll);
}
(*term.t_flush)();
c = GetKey();
prevoffset = loffset;
switch(c){
case (CTRL|'X') : /* quit */
case F2 :
done = 1;
break;
case (CTRL|'Y') : /* prev page */
case F7 : /* prev page */
if((loffset-dlines-OVERLAP) > 0){
loffset -= (dlines-OVERLAP);
}
else{
if(loffset != 0){
prevoffset = -1;
}
else{
(*term.t_beep)();
}
loffset = 0;
}
break;
case (CTRL|'V') : /* next page */
case F8 :
if(cont){
loffset += (dlines-OVERLAP);
}
else{
(*term.t_beep)();
}
break;
case '\016' : /* prev-line */
case (CTRL|'N') :
if(cont)
loffset++;
else
(*term.t_beep)();
break;
case '\020' : /* prev-line */
case (CTRL|'P') :
if(loffset > 0)
loffset--;
else
(*term.t_beep)();
break;
case '\014' : /* refresh */
case (CTRL|'L') : /* refresh */
modeline(curwp);
update();
prevoffset = -1;
break;
case NODATA :
break;
default :
emlwrite("Unknown Command.", NULL);
(*term.t_beep)();
break;
}
}
return(TRUE);
}
/*
* normalize_cmd - given a char and list of function key to command key
* mappings, return, depending on gmode, the right command.
* The list is an array of (Fkey, command-key) pairs.
* sc is the index in the array that means to ignore fkey
* vs. command key mapping
*
* rules: 1. if c not in table (either fkey or command), let it thru
* 2. if c matches, but in other mode, punt it
*/
normalize_cmd(c, list, sc)
int c, sc;
int list[][2];
{
register int i;
for(i=0; i < 12; i++){
if(c == list[i][(FUNC&c) ? 0 : 1]){ /* in table? */
if(i == sc) /* SPECIAL CASE! */
return(list[i][1]);
if(list[i][1] == NODATA) /* no mapping ! */
return(c);
if(((FUNC&c) == FUNC) ^ ((gmode&MDFKEY) == MDFKEY))
return(BADESC); /* keystroke not allowed! */
else
return(list[i][1]); /* never return func keys */
}
}
#ifdef _WINDOWS
/*
* Menu's get alpha key commands assigned to them. Well, if we are in PF
* key mode then the alpha key commands don't work. So, we flag them with
* a bit (MENU defined in estruct.h) so we can recognize them as different
* from a keyboard press. Here we clear that flag so the command can be
* processed.
*/
c &= ~MENU;
#endif
return(c);
}
/*
* rebind - replace the first function with the second
*/
void
rebindfunc(a, b)
int (*a) PROTO((int, int)), (*b) PROTO((int, int));
{
KEYTAB *kp;
kp = (Pmaster) ? &keytab[0] : &pkeytab[0];
while(kp->k_fp != NULL){ /* go thru whole list, and */
if(kp->k_fp == a)
kp->k_fp = b; /* replace all occurances */
kp++;
}
}
/*
* bindtokey - bind function f to command c
*/
bindtokey(c, f)
int c, (*f) PROTO((int, int));
{
KEYTAB *kp, *ktab = (Pmaster) ? &keytab[0] : &pkeytab[0];
for(kp = ktab; kp->k_fp; kp++)
if(kp->k_code == c){
kp->k_fp = f; /* set to new function */
break;
}
/* not found? create new binding */
if(!kp->k_fp && kp < &ktab[NBINDS]){
kp->k_code = c; /* assign new code and function */
kp->k_fp = f;
(++kp)->k_code = 0; /* and null out next slot */
kp->k_fp = NULL;
}
return(TRUE);
}
+56
View File
@@ -0,0 +1,56 @@
#include <stdio.h>
#include <time.h>
/*
* 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-1996 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*/
main(argc, argv)
int argc;
char **argv;
{
struct tm *t;
FILE *outfile=stdout;
time_t ltime;
#ifdef OS2
char hostname[256];
gethostname(hostname, sizeof hostname - 1);
#endif
if(argc > 1 && (outfile = fopen(argv[1], "w")) == NULL){
fprintf(stderr, "can't create '%s'\n", argv[1]);
exit(1);
}
time(&ltime);
t = localtime(&ltime);
fprintf(outfile,"char datestamp[]=\"%02d-%s-%d\";\n", t->tm_mday,
(t->tm_mon == 0) ? "Jan" :
(t->tm_mon == 1) ? "Feb" :
(t->tm_mon == 2) ? "Mar" :
(t->tm_mon == 3) ? "Apr" :
(t->tm_mon == 4) ? "May" :
(t->tm_mon == 5) ? "Jun" :
(t->tm_mon == 6) ? "Jul" :
(t->tm_mon == 7) ? "Aug" :
(t->tm_mon == 8) ? "Sep" :
(t->tm_mon == 9) ? "Oct" :
(t->tm_mon == 10) ? "Nov" :
(t->tm_mon == 11) ? "Dec" : "UKN",
1900 + t->tm_year);
#ifdef OS2
fprintf(outfile, "char hoststamp[]=\"%s\";\n", hostname);
#else
fprintf(outfile, "char hoststamp[]=\"random-pc\";\n");
#endif
exit(0);
}
+2586
View File
File diff suppressed because it is too large Load Diff
+367
View File
@@ -0,0 +1,367 @@
#if !defined(lint) && !defined(DOS)
static char rcsid[] = "$Id: buffer.c 11688 2001-06-21 17:54:43Z hubert $";
#endif
/*
* Program: Buffer management 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-2001 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*/
/*
* Buffer management.
* Some of the functions are internal,
* and some are actually attached to user
* keys. Like everyone else, they set hints
* for the display system.
*/
#include "headers.h"
#ifdef ANSI
int sgetline(char **, int *, char *, int);
#else
int sgetline();
#endif
/*
* Look through the list of
* buffers. Return TRUE if there
* are any changed buffers. Buffers
* that hold magic internal stuff are
* not considered; who cares if the
* list of buffer names is hacked.
* Return FALSE if no buffers
* have been changed.
*/
anycb()
{
register BUFFER *bp;
bp = bheadp;
while (bp != NULL) {
if ((bp->b_flag&BFTEMP)==0 && (bp->b_flag&BFCHG)!=0)
return (TRUE);
bp = bp->b_bufp;
}
return (FALSE);
}
/*
* Find a buffer, by name. Return a pointer
* to the BUFFER structure associated with it. If
* the named buffer is found, but is a TEMP buffer (like
* the buffer list) conplain. If the buffer is not found
* and the "cflag" is TRUE, create it. The "bflag" is
* the settings for the flags in in buffer.
*/
BUFFER *
bfind(bname, cflag, bflag)
register char *bname;
int cflag, bflag;
{
register BUFFER *bp;
register BUFFER *sb; /* buffer to insert after */
register LINE *lp;
bp = bheadp;
while (bp != NULL) {
if (strcmp(bname, bp->b_bname) == 0) {
if ((bp->b_flag&BFTEMP) != 0) {
mlwrite("Cannot select builtin buffer", NULL);
return (NULL);
}
return (bp);
}
bp = bp->b_bufp;
}
if (cflag != FALSE) {
if ((bp=(BUFFER *)malloc(sizeof(BUFFER))) == NULL)
return (NULL);
if ((lp=lalloc(0)) == NULL) {
free((char *) bp);
return (NULL);
}
/* find the place in the list to insert this buffer */
if (bheadp == NULL || strcmp(bheadp->b_bname, bname) > 0) {
/* insert at the begining */
bp->b_bufp = bheadp;
bheadp = bp;
} else {
sb = bheadp;
while (sb->b_bufp != NULL) {
if (strcmp(sb->b_bufp->b_bname, bname) > 0)
break;
sb = sb->b_bufp;
}
/* and insert it */
bp->b_bufp = sb->b_bufp;
sb->b_bufp = bp;
}
/* and set up the other buffer fields */
bp->b_active = TRUE;
bp->b_dotp = lp;
bp->b_doto = 0;
bp->b_markp = NULL;
bp->b_marko = 0;
bp->b_flag = bflag;
bp->b_mode = gmode;
bp->b_nwnd = 0;
bp->b_linep = lp;
strcpy(bp->b_fname, "");
strcpy(bp->b_bname, bname);
lp->l_fp = lp;
lp->l_bp = lp;
}
return (bp);
}
/*
* This routine blows away all of the text
* in a buffer. If the buffer is marked as changed
* then we ask if it is ok to blow it away; this is
* to save the user the grief of losing text. The
* window chain is nearly always wrong if this gets
* called; the caller must arrange for the updates
* that are required. Return TRUE if everything
* looks good.
*/
bclear(bp)
register BUFFER *bp;
{
register LINE *lp;
register int s = FALSE;
if(Pmaster){
if ((bp->b_flag&BFTEMP) == 0 /* Not scratch buffer. */
&& (bp->b_flag&BFCHG) != 0){ /* Something changed */
emlwrite("buffer lines not freed.", NULL);
return (s);
}
}
else{
if ((bp->b_flag&BFTEMP) == 0 /* Not scratch buffer. */
&& (bp->b_flag&BFCHG) != 0 /* Something changed */
&& (s=mlyesno("Discard changes", -1)) != TRUE){
return (s);
}
}
bp->b_flag &= ~BFCHG; /* Not changed */
while ((lp=lforw(bp->b_linep)) != bp->b_linep)
lfree(lp);
bp->b_dotp = bp->b_linep; /* Fix "." */
bp->b_doto = 0;
bp->b_markp = NULL; /* Invalidate "mark" */
bp->b_marko = 0;
return (TRUE);
}
/*
* packbuf - will pack up the main buffer in the buffer provided
* to be returned to the program that called pico.
* if need be, allocate memory for the new message.
* will also free the memory associated with the editor
* buffer, by calling zotedit.
*/
packbuf(buf, blen, lcrlf)
char **buf;
int *blen;
int lcrlf; /* EOLs are local or CRLF */
{
register int i = 0;
register LINE *lp;
register int retval = 0;
register char *bufp;
register char *eobuf;
if(anycb() != FALSE){
lp = lforw(curbp->b_linep);
do{ /* how many chars? */
i += llength(lp);
/*
* add extra for new lines to be inserted later
*/
i += 2;
lp = lforw(lp);
}
while(lp != curbp->b_linep);
if(i > *blen){ /* new buffer ? */
/*
* don't forget to add one for the null terminator!!!
*/
if((bufp = (char *)malloc((i+1)*sizeof(char))) == NULL){
zotedit(); /* bag it! */
return(COMP_FAILED);
}
free(*buf);
*buf = bufp;
*blen = i;
}
else{
bufp = *buf;
}
eobuf = bufp + *blen;
lp = lforw(curbp->b_linep); /* First line. */
do {
for (i = 0; i < llength(lp); i++){ /* copy into buffer */
if((bufp+1) < eobuf){
*bufp++ = (lp->l_text[i].c & 0xFF);
}
else{
/*
* the idea is to malloc enough space for the new
* buffer...
*/
*bufp = '\0';
zotedit();
return(BUF_CHANGED|COMP_FAILED);
}
}
if(lcrlf){
*bufp++ = '\n'; /* EOLs use local convention */
}
else{
*bufp++ = 0x0D; /* EOLs use net standard */
*bufp++ = 0x0A;
}
lp = lforw(lp);
}
while (lp != curbp->b_linep);
if(lcrlf)
*--bufp = '\0';
else
*bufp = '\0';
retval = BUF_CHANGED;
}
zotedit();
return(retval);
}
/*
* readbuf - reads in a buffer.
*/
void
readbuf(buf)
char **buf;
{
register LINE *lp1;
register LINE *lp2;
register BUFFER *bp;
register WINDOW *wp;
register int i;
register int s;
char *sptr; /* pointer into buffer string */
int nbytes;
char line[NLINE];
CELL ac;
bp = curbp;
bp->b_flag &= ~(BFTEMP|BFCHG);
sptr = *buf;
ac.a = 0;
while((s=sgetline(&sptr,&nbytes,line,NLINE)) == FIOSUC || s == FIOLNG){
if ((lp1=lalloc(nbytes)) == NULL) {
s = FIOERR; /* Keep message on the */
break; /* display. */
}
lp2 = lback(curbp->b_linep);
lp2->l_fp = lp1;
lp1->l_fp = curbp->b_linep;
lp1->l_bp = lp2;
curbp->b_linep->l_bp = lp1;
for (i=0; i<nbytes; ++i){
ac.c = line[i];
lputc(lp1, i, ac);
}
}
for (wp=wheadp; wp!=NULL; wp=wp->w_wndp) {
if (wp->w_bufp == curbp) {
wheadp->w_linep = lforw(curbp->b_linep);
wheadp->w_dotp = lback(curbp->b_linep);
wheadp->w_doto = 0;
wheadp->w_markp = NULL;
wheadp->w_marko = 0;
wheadp->w_flag |= WFHARD;
}
}
strcpy(bp->b_bname, "main");
strcpy(bp->b_fname, "");
bp->b_dotp = bp->b_linep;
bp->b_doto = 0;
}
/*
* sgetline - copy characters from ibuf to obuf, ending at the first
* newline. return with ibuf pointing to first char after
* newline.
*/
sgetline(ibuf, nchars, obuf, blen)
char **ibuf;
int *nchars;
char *obuf;
int blen;
{
register char *len;
register char *cbuf = *ibuf;
register char *bufp = obuf;
register int retval = FIOSUC;
#define CR '\015'
#define LF '\012'
*nchars = 0;
if(*cbuf == '\0'){
retval = FIOEOF;
}
else{
len = obuf + blen;
while (*cbuf != CR && *cbuf != LF && *cbuf != '\0'){
if(bufp < len){
*bufp++ = *cbuf++;
(*nchars)++;
}
else{
*bufp = '\0';
retval = FIOLNG;
break;
}
}
}
*bufp = '\0'; /* end retured line */
*ibuf = (*cbuf == CR) ? ++cbuf : cbuf;
*ibuf = (*cbuf == LF) ? ++cbuf : cbuf;
return(retval);
}
Executable
+74
View File
@@ -0,0 +1,74 @@
#!/sbin/sh
# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
# All Rights Reserved
# THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
# The copyright notice above does not evidence any
# actual or intended publication of such source code.
#ident "@(#)cc.sh 1.8 92/05/26 SMI" /* SVr4.0 1.4 */
# PROPRIETARY NOTICE (Combined)
#
#This source code is unpublished proprietary information
#constituting, or derived under license from AT&T's UNIX(r) System V.
#In addition, portions of such source code were derived from Berkeley
#4.3 BSD under license from the Regents of the University of
#California.
#
#
#
# Copyright Notice
#
#Notice of copyright on this source code product does not indicate
#publication.
#
# (c) 1986,1987,1988,1989 Sun Microsystems, Inc
# (c) 1983,1984,1985,1986,1987,1988,1989 AT&T.
# All rights reserved.
# cc command for BSD compatibility package:
#
# BSD compatibility package header files (/usr/ucbinclude)
# are included before SVr4 default (/usr/include) files but
# after any directories specified on the command line via
# the -I option. Thus, the BSD header files are included
# next to last, and SVr4 header files are searched last.
#
# BSD compatibility package libraries (/usr/ucblib) are
# searched next to third to last. SVr4 default libraries
# (/usr/ccs/lib and /usr/lib) are searched next to last
#
# Because the BSD compatibility package C library does not
# contain all the C library routines of /usr/ccs/lib/libc.a,
# the BSD package C library is named /usr/ucblib/libucb.a
# and is passed explicitly to cc. This ensures that libucb.a
# will be searched first for routines and that
# /usr/ccs/lib/libc.a will be searched afterwards for routines
# not found in /usr/ucblib/libucb.a. Also because sockets is
# provided in libc under BSD, /usr/lib/libsocket and /usr/lib/nsl
# are also included as default libraries.
#
# NOTE: the -Y L, and -Y U, options of cc are not valid
if [ "$CC" ] ; then
$CC "$@"
exit 0
fi
if [ -f /usr/ccs/bin/ucbcc ]
then
# get the directory where ucbcc points to and set the LD_LIBRARY_PATH
# to that directory so as to get the necessary libraries.
cclink=`/usr/bin/ls -ln /usr/ccs/bin/ucbcc | awk '{print $11}'`
ccdir=`/usr/bin/dirname $cclink`
/usr/ccs/bin/ucbcc \
-YP,:$ccdir:/usr/ccs/lib:/usr/lib "$@" \
-lsocket -lnsl -lelf -laio
ret=$?
exit $ret
else
echo "/usr/ucb/cc: language optional software package not installed"
exit 1
fi
+4296
View File
File diff suppressed because it is too large Load Diff
+2572
View File
File diff suppressed because it is too large Load Diff
+165
View File
@@ -0,0 +1,165 @@
/*
* $Id: ebind.h 13654 2004-05-07 21:43:40Z jpf $
*
* Program: Default key bindings
*
*
* 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-2004 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 files describes the key bindings for pico and the pine
* composer. The binds are static, (i.e., no way for the user
* to change them) so as to keep pico/composer as simple to use
* as possible. This, of course, means the number of functions is
* greatly reduced, but, then again, this is seen as very desirable.
*
* There are very limited number of flat ctrl-key bindings left, and
* most of them are slated for yet-to-be implemented functions, like
* invoking an alternate editor in the composer and necessary funcs
* for imlementing attachment handling. We really want to avoid
* going to multiple keystroke functions. -mss
*
*/
/* EBIND: Initial default key to function bindings for
MicroEMACS 3.2
written by Dave G. Conroy
modified by Steve Wilhite, George Jones
greatly modified by Daniel Lawrence
*/
#ifndef EBIND_H
#define EBIND_H
/*
* Command table.
* This table is *roughly* in ASCII order, left to right across the
* characters of the command. This expains the funny location of the
* control-X commands.
*/
KEYTAB keytab[NBINDS] = {
{KEY_UP, backline},
{KEY_DOWN, forwline},
{KEY_RIGHT, forwchar},
{KEY_LEFT, backchar},
{KEY_PGUP, backpage},
{KEY_PGDN, forwpage},
{KEY_HOME, gotobol},
{KEY_END, gotoeol},
{KEY_DEL, forwdel},
#ifdef MOUSE
{KEY_MOUSE, mousepress},
#endif
{CTRL|'A', gotobol},
{CTRL|'B', backchar},
{CTRL|'C', abort_composer},
{CTRL|'D', forwdel},
{CTRL|'E', gotoeol},
{CTRL|'F', forwchar},
{CTRL|'G', whelp},
{CTRL|'H', backdel},
{CTRL|'I', tab},
{CTRL|'J', fillpara},
{CTRL|'K', killregion},
{CTRL|'L', pico_refresh},
{CTRL|'M', newline},
{CTRL|'N', forwline},
{CTRL|'O', suspend_composer},
{CTRL|'P', backline},
{CTRL|'R', insfile},
#ifdef SPELLER
{CTRL|'T', spell},
#endif /* SPELLER */
{CTRL|'U', yank},
{CTRL|'V', forwpage},
{CTRL|'W', forwsearch},
{CTRL|'X', wquit},
{CTRL|'Y', backpage},
#ifdef JOB_CONTROL
{CTRL|'Z', bktoshell},
#endif
{CTRL|'@', forwword},
{CTRL|'^', setmark},
{CTRL|'_', alt_editor},
{0x7F, backdel},
{0, NULL}
};
/*
* Command table.
* This table is *roughly* in ASCII order, left to right across the
* characters of the command. This expains the funny location of the
* control-X commands.
*/
KEYTAB pkeytab[NBINDS] = {
{KEY_UP, backline},
{KEY_DOWN, forwline},
{KEY_RIGHT, forwchar},
{KEY_LEFT, backchar},
{KEY_PGUP, backpage},
{KEY_PGDN, forwpage},
{KEY_HOME, gotobol},
{KEY_END, gotoeol},
{KEY_DEL, forwdel},
#ifdef MOUSE
{KEY_MOUSE, mousepress},
#endif
{CTRL|'A', gotobol},
{CTRL|'B', backchar},
{CTRL|'C', showcpos},
{CTRL|'D', forwdel},
{CTRL|'E', gotoeol},
{CTRL|'F', forwchar},
{CTRL|'G', whelp},
{CTRL|'H', backdel},
{CTRL|'I', tab},
{CTRL|'J', fillpara},
{CTRL|'K', killregion},
{CTRL|'L', pico_refresh},
{CTRL|'M', newline},
{CTRL|'N', forwline},
{CTRL|'O', filewrite},
{CTRL|'P', backline},
{CTRL|'R', insfile},
#ifdef SPELLER
{CTRL|'T', spell},
#endif /* SPELLER */
{CTRL|'U', yank},
{CTRL|'V', forwpage},
{CTRL|'W', forwsearch},
{CTRL|'X', wquit},
{CTRL|'Y', backpage},
#ifdef JOB_CONTROL
{CTRL|'Z', bktoshell},
#endif
{CTRL|'@', forwword},
{CTRL|'^', setmark},
{0x7F, backdel},
{0, NULL}
};
#endif /* EBIND_H */
+181
View File
@@ -0,0 +1,181 @@
/*
* $Id: edef.h 13816 2004-10-14 01:27:01Z hubert $
*
* Program: Global definitions and initializations
*
*
* 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-2004 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*/
/* EDEF: Global variable definitions for
MicroEMACS 3.2
written by Dave G. Conroy
modified by Steve Wilhite, George Jones
greatly modified by Daniel Lawrence
*/
#ifndef EDEF_H
#define EDEF_H
#ifdef maindef
/* for MAIN.C */
/* initialized global definitions */
int fillcol = 72; /* Current fill column */
int userfillcol = -1; /* Fillcol set from cmd line */
char pat[NPAT]; /* Search pattern */
char rpat[NPAT]; /* Replace pattern */
int eolexist = TRUE; /* does clear to EOL exist */
int optimize = FALSE; /* optimize flag(cf line speed) */
int scrollexist = TRUE; /* does insert line exist */
int inschar = TRUE; /* does insert character exist */
int delchar = TRUE; /* does delete character exist */
int sgarbk = TRUE; /* TRUE if keyhelp garbaged */
int sup_keyhelp = FALSE; /* TRUE if keyhelp is suppressed*/
int mline_open = FALSE; /* TRUE if message line is open */
int ComposerTopLine = 2; /* TRUE if message line is open */
int ComposerEditing = FALSE; /* TRUE if message line is open */
int revexist = FALSE; /* does reverse video exist? */
char modecode[] = "WCSEVO"; /* letters to represent modes */
long gmode = MDWRAP; /* global editor mode */
int sgarbf = TRUE; /* TRUE if screen is garbage */
int mpresf = FALSE; /* TRUE if message in last line */
int clexec = FALSE; /* command line execution flag */
char *alt_speller = NULL; /* alt spell checking command */
int preserve_start_stop = FALSE; /* TRUE if pass ^S/^Q to term */
char *glo_quote_str = NULL; /* points to quote string if set*/
/* uninitialized global definitions */
int currow; /* Cursor row */
int curcol; /* Cursor column */
int thisflag; /* Flags, this command */
int lastflag; /* Flags, last command */
int curgoal; /* Goal for C-P, C-N */
char opertree[NLINE+1]; /* operate within this tree */
char browse_dir[NLINE+1]; /* directory of last browse (cwd) */
char glo_quote_str_buf[NLINE+1]; /* Indent string (for justify) */
WINDOW *curwp; /* Current window */
BUFFER *curbp; /* Current buffer */
WINDOW *wheadp; /* Head of list of windows */
BUFFER *bheadp; /* Head of list of buffers */
BUFFER *blistp; /* Buffer for C-X C-B */
BUFFER *bfind PROTO((char *, int, int)); /* Lookup a buffer by name */
LINE *lalloc PROTO((int)); /* Allocate a line */
int km_popped; /* menu popped up */
int panicking; /* we are currently panicking */
#if defined(USE_TERMCAP) || defined(USE_TERMINFO) || defined(VMS)
KBESC_T *kbesc; /* keyboard esc sequence trie */
#endif /* USE_TERMCAP/USE_TERMINFO/VMS */
#else /* maindef */
/* for all the other .C files */
/* initialized global external declarations */
extern int fillcol; /* Fill column */
extern int userfillcol; /* Fillcol set from cmd line */
extern char pat[]; /* Search pattern */
extern char rpat[]; /* Replace pattern */
extern int eolexist; /* does clear to EOL exist? */
extern int optimize; /* optimize flag(cf line speed) */
extern int scrollexist; /* does insert line exist */
extern int inschar; /* does insert character exist */
extern int delchar; /* does delete character exist */
extern int sgarbk;
extern int sup_keyhelp;
extern int mline_open; /* Message line is open */
extern int ComposerTopLine; /* TRUE if message line is open */
extern int ComposerEditing; /* TRUE if message line is open */
extern int timeo; /* how long we wait in GetKey */
extern time_t time_of_last_input; /* Last keyboard activity */
extern int revexist; /* does reverse video exist? */
extern char modecode[]; /* letters to represent modes */
extern KEYTAB keytab[]; /* key bind to functions table */
extern KEYTAB pkeytab[]; /* pico's function table */
extern long gmode; /* global editor mode */
extern int sgarbf; /* State of screen unknown */
extern int mpresf; /* Stuff in message line */
extern int clexec; /* command line execution flag */
extern char *alt_speller; /* alt spell checking command */
extern int preserve_start_stop; /* TRUE if pass ^S/^Q to term */
extern char *glo_quote_str; /* points to quote string if set*/
/* initialized global external declarations */
extern int currow; /* Cursor row */
extern int curcol; /* Cursor column */
extern int thisflag; /* Flags, this command */
extern int lastflag; /* Flags, last command */
extern int curgoal; /* Goal for C-P, C-N */
extern char opertree[]; /* operate within this tree */
extern char browse_dir[]; /* operate within this tree */
extern char glo_quote_str_buf[]; /* Indent string (for justify) */
extern WINDOW *curwp; /* Current window */
extern BUFFER *curbp; /* Current buffer */
extern WINDOW *wheadp; /* Head of list of windows */
extern BUFFER *bheadp; /* Head of list of buffers */
extern BUFFER *blistp; /* Buffer for C-X C-B */
extern BUFFER *bfind PROTO((char *, int, int)); /* Lookup a buffer by name */
extern LINE *lalloc PROTO((int)); /* Allocate a line */
extern int km_popped; /* menu popped up */
extern int panicking; /* we are currently panicking */
/*
* This is a weird one. It has to be defined differently for pico and for
* pine. It seems to need to be defined at startup as opposed to set later.
* It doesn't work to set it later in pico. When pico is used with a
* screen reader it seems to jump to the cursor every time through the
* mswin_charavail() loop in GetKey, and the timeout is this long. So we
* just need to set it higher than we do in pine. If we understood this
* we would probably see that we don't need any timer at all in pico, but
* we don't remember why it is here so we'd better leave it.
*
* This is defined in .../pico/main.c and in .../pine/pine.c.
*/
extern int my_timer_period; /* here so can be set */
#ifdef MOUSE
extern MENUITEM menuitems[]; /* key labels and functions */
extern MENUITEM *mfunc; /* single generic function */
extern mousehandler_t mtrack; /* func used to track the mouse */
#endif /* MOUSE */
#if defined(USE_TERMCAP) || defined(USE_TERMINFO) || defined(VMS)
extern KBESC_T *kbesc; /* keyboard esc sequence trie */
#endif /* USE_TERMCAP/USE_TERMINFO/VMS */
#endif /* maindef */
/* terminal table defined only in TERM.C */
#ifndef termdef
#if defined(VMS) && !defined(__ALPHA)
globalref
#else
extern
#endif /* VMS */
TERM term; /* Terminal information. */
#endif /* termdef */
#endif /* EDEF_H */
+342
View File
@@ -0,0 +1,342 @@
/*
* $Id: efunc.h 13711 2004-06-15 22:22:35Z hubert $
*
* Program: Pine's composer and pico's function declarations
*
*
* 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-2004 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*/
/* EFUNC.H: MicroEMACS function declarations and names
This file list all the C code functions used by MicroEMACS
and the names to use to bind keys to them. To add functions,
declare it here in both the extern function list and the name
binding table.
Update History:
Daniel Lawrence
*/
#ifndef EFUNC_H
#define EFUNC_H
/* External function declarations */
/* attach.c */
extern int AskAttach PROTO((char *, LMLIST **));
extern int SyncAttach PROTO((void));
extern int intag PROTO((char *, int));
extern char *prettysz PROTO((off_t));
extern int AttachError PROTO((void));
extern char *QuoteAttach PROTO((char *));
/* basic.c */
extern int gotobol PROTO((int, int));
extern int backchar PROTO((int, int));
extern int gotoeol PROTO((int, int));
extern int forwchar PROTO((int, int));
extern int gotoline PROTO((int, int));
extern int gotobob PROTO((int, int));
extern int gotoeob PROTO((int, int));
extern int forwline PROTO((int, int));
extern int backline PROTO((int, int));
extern int gotobop PROTO((int, int));
extern int gotoeop PROTO((int, int));
extern int forwpage PROTO((int, int));
extern int backpage PROTO((int, int));
extern int scrollupline PROTO((int, int));
extern int scrolldownline PROTO((int, int));
extern int scrollto PROTO((int, int));
extern int setmark PROTO((int, int));
extern int swapmark PROTO((int, int));
extern int setimark PROTO((int, int));
extern int swapimark PROTO((int, int));
extern int mousepress PROTO((int, int));
/* bind.c */
extern int whelp PROTO((int, int));
extern int wscrollw PROTO((int, int, char **, int));
extern int normal PROTO((int, int (*)[2], int));
extern void rebindfunc PROTO((int (*)(int, int),int (*)(int, int)));
extern int bindtokey PROTO((int c, int (*) PROTO((int, int))));
/* browse.c */
extern int FileBrowse PROTO((char *, int, char *, int, char *, int,
LMLIST **));
extern int ResizeBrowser PROTO((void));
extern void set_browser_title PROTO((char *));
extern void zotlmlist PROTO((LMLIST *));
/* buffer.c */
extern int anycb PROTO((void));
extern struct BUFFER *bfind PROTO((char *, int, int));
extern int bclear PROTO((struct BUFFER *));
extern int packbuf PROTO((char **, int *, int));
extern void readbuf PROTO((char **));
/* composer.c */
extern int InitMailHeader PROTO((struct pico_struct *));
extern int ResizeHeader PROTO((void));
extern int HeaderEditor PROTO((int, int));
extern void PaintHeader PROTO((int, int));
extern void ArrangeHeader PROTO((void));
extern int ToggleHeader PROTO((int));
extern int HeaderLen PROTO((void));
extern int UpdateHeader PROTO((int));
extern int entry_line PROTO((int, int));
extern int call_builder PROTO((struct headerentry *, int *, char **));
extern void call_expander PROTO((void));
extern void ShowPrompt PROTO((void));
extern int packheader PROTO((void));
extern void zotheader PROTO((void));
extern void display_for_send PROTO((void));
extern VARS_TO_SAVE *save_pico_state PROTO((void));
extern void restore_pico_state PROTO((VARS_TO_SAVE *));
extern void free_pico_state PROTO((VARS_TO_SAVE *));
extern void HeaderPaintCursor PROTO((void));
extern void PaintBody PROTO((int));
/* display.c */
extern int vtinit PROTO((void));
extern int vtterminalinfo PROTO((int));
extern void vttidy PROTO((void));
extern void update PROTO((void));
extern void modeline PROTO((struct WINDOW *));
extern void movecursor PROTO((int, int));
extern void clearcursor PROTO((void));
extern void mlerase PROTO((void));
extern int mlyesno PROTO((char *, int));
extern int mlreply PROTO((char *, char *, int, int, EXTRAKEYS *));
extern int mlreplyd PROTO((char *, char *, int, int, EXTRAKEYS *));
extern void emlwrite PROTO((char *, void *));
extern int mlwrite PROTO((char *, void *));
extern void scrolldown PROTO((struct WINDOW *, int, int));
extern void scrollup PROTO((struct WINDOW *, int, int));
extern int doton PROTO((int *, unsigned int *));
extern int resize_pico PROTO((int, int));
extern void zotdisplay PROTO((void));
extern void pputc PROTO((int, int));
extern void pputs PROTO((char *, int));
extern void peeol PROTO((void));
extern CELL *pscr PROTO((int, int));
extern void pclear PROTO((int, int));
extern int pinsert PROTO((CELL));
extern int pdel PROTO((void));
extern void wstripe PROTO((int, int, char *, int));
extern void wkeyhelp PROTO((KEYMENU *));
extern void get_cursor PROTO((int *, int *));
/* file.c */
extern int fileread PROTO((int, int));
extern int insfile PROTO((int, int));
extern int readin PROTO((char *, int, int));
extern int filewrite PROTO((int, int));
extern int filesave PROTO((int, int));
extern int writeout PROTO((char *, int));
extern char *writetmp PROTO((int, char *));
extern int filename PROTO((int, int));
extern int in_oper_tree PROTO((char *));
/* fileio.c */
extern int ffropen PROTO((char *));
extern int ffputline PROTO((CELL *, int));
extern int ffgetline PROTO((char *, int, int *, int));
/* line.c */
extern struct LINE *lalloc PROTO((int));
extern void lfree PROTO((struct LINE *));
extern void lchange PROTO((int));
extern int linsert PROTO((int, int));
extern int geninsert PROTO((LINE **, int *, LINE *, int, int, int, long *));
extern int lnewline PROTO((void));
extern int ldelete PROTO((long, int (*) PROTO((int))));
extern int lisblank PROTO((struct LINE *));
extern void kdelete PROTO((void));
extern int kinsert PROTO((int));
extern int kremove PROTO((int));
extern int ksize PROTO((void));
extern void fdelete PROTO((void));
extern int finsert PROTO((int));
extern int fremove PROTO((int));
/* os.c */
extern int Raw PROTO((int));
extern void StartInverse PROTO((void));
extern void EndInverse PROTO((void));
extern int InverseState PROTO((void));
extern int StartBold PROTO((void));
extern void EndBold PROTO((void));
extern void StartUnderline PROTO((void));
extern void EndUnderline PROTO((void));
extern void xonxoff_proc PROTO((int));
extern void crlf_proc PROTO((int));
extern void intr_proc PROTO((int));
extern void flush_input PROTO((void));
extern void bit_strip_off PROTO((void));
extern void quit_char_off PROTO((void));
extern int ttisslow PROTO((void));
extern int input_ready PROTO((int));
extern int read_one_char PROTO((void));
extern SigType (*posix_signal PROTO((int, SigType (*)())))();
extern int posix_sigunblock PROTO((int));
extern int ttopen PROTO((void));
extern void ttresize PROTO((void));
extern int ttclose PROTO((void));
extern int ttputc PROTO((int));
extern int ttflush PROTO((void));
extern int ttgetc PROTO((int, int (*)(), void (*)()));
extern int simple_ttgetc PROTO((int (*)(), void (*)()));
extern void ttgetwinsz PROTO((int *, int *));
extern int GetKey PROTO((void));
extern int alt_editor PROTO((int, int));
extern void picosigs PROTO((void));
#ifdef JOB_CONTROL
extern int bktoshell PROTO((void));
#endif
extern int fallowc PROTO((int));
extern int fexist PROTO((char *, char *, off_t *));
extern int isdir PROTO((char *, long *, time_t *));
extern int can_access PROTO((char *, int));
extern char *gethomedir PROTO((int *));
extern int homeless PROTO((char *));
extern char *errstr PROTO((int));
extern char *getfnames PROTO((char *, char *, int *, char *));
extern void fioperr PROTO((int, char *));
extern void fixpath PROTO((char *, size_t));
extern char *pfnexpand PROTO((char *, size_t));
extern int compresspath PROTO((char *, char *, int));
extern void tmpname PROTO((char *, char *));
extern char *temp_nam PROTO((char *, char *));
extern char *temp_nam_ext PROTO((char *, char *, char *));
extern void makename PROTO((char *, char *));
extern int copy PROTO((char *, char *));
extern int ffwopen PROTO((char *, int));
extern int ffclose PROTO((void));
extern int ffelbowroom PROTO((void));
extern FILE *P_open PROTO((char *));
extern void P_close PROTO((FILE *));
extern int worthit PROTO((int *));
extern int o_insert PROTO((int));
extern int o_delete PROTO((void));
extern int pico_new_mail PROTO((void));
extern int time_to_check PROTO((void));
extern int sstrcasecmp PROTO((const QSType *, const QSType *));
extern int strucmp PROTO((char *, char *));
extern int struncmp PROTO((char *, char *, int));
extern void chkptinit PROTO((char *, int));
extern void set_collation PROTO((int, int));
extern int (*pcollator)();
extern COLOR_PAIR *new_color_pair PROTO((char *, char *));
extern COLOR_PAIR *pico_get_cur_color PROTO((void));
extern COLOR_PAIR *pico_get_rev_color PROTO((void));
extern COLOR_PAIR *pico_get_normal_color PROTO((void));
extern void free_color_pair PROTO((COLOR_PAIR **));
extern void pico_nfcolor PROTO((char *));
extern void pico_nbcolor PROTO((char *));
extern void pico_rfcolor PROTO((char *));
extern void pico_rbcolor PROTO((char *));
extern int pico_set_fg_color PROTO((char *));
extern int pico_set_bg_color PROTO((char *));
extern COLOR_PAIR *pico_set_colorp PROTO((COLOR_PAIR *, int));
extern COLOR_PAIR *pico_set_colors PROTO((char *, char *, int));
extern int pico_is_good_color PROTO((char *));
extern int pico_is_good_colorpair PROTO((COLOR_PAIR *));
extern void pico_set_nfg_color PROTO((void));
extern void pico_set_nbg_color PROTO((void));
extern void pico_set_normal_color PROTO((void));
extern int pico_usingcolor PROTO((void));
extern char *color_to_asciirgb PROTO((char *));
extern char *colorx PROTO((int));
extern char *color_to_canonical_name PROTO((char *));
extern int pico_count_in_color_table PROTO((void));
/* these color functions aren't needed for Windows */
extern int pico_hascolor PROTO((void));
extern void pico_toggle_color PROTO((int));
extern unsigned pico_get_color_options PROTO((void));
extern void pico_set_color_options PROTO((unsigned));
extern void pico_endcolor PROTO((void));
extern char *pico_get_last_fg_color PROTO((void));
extern char *pico_get_last_bg_color PROTO((void));
#ifdef MOUSE
extern unsigned long pico_mouse PROTO((unsigned, int, int));
#endif
/* pico.c */
extern int pico PROTO((struct pico_struct *));
extern void edinit PROTO((char *));
extern int execute PROTO((int, int, int));
extern int quickexit PROTO((int, int));
extern int abort_composer PROTO((int, int));
extern int suspend_composer PROTO((int, int));
extern int wquit PROTO((int, int));
extern int ctrlg PROTO((int, int));
extern int rdonly PROTO((void));
extern int pico_help PROTO((char **, char *, int));
extern void zotedit PROTO((void));
#ifdef _WINDOWS
int composer_file_drop PROTO((int, int, char *));
int pico_cursor PROTO((int, long));
#endif
/* random.c */
extern int showcpos PROTO((int, int));
extern int tab PROTO((int, int));
extern int newline PROTO((int, int));
extern int forwdel PROTO((int, int));
extern int backdel PROTO((int, int));
extern int killtext PROTO((int, int));
extern int yank PROTO((int, int));
extern COLOR_PAIR *pico_apply_rev_color PROTO((COLOR_PAIR *, int));
/* region.c */
extern int killregion PROTO((int, int));
extern int deleteregion PROTO((int, int));
extern int markregion PROTO((int));
extern void unmarkbuffer PROTO((void));
/* search.c */
extern int forwsearch PROTO((int, int));
extern int readpattern PROTO((char *, int));
extern int forscan PROTO((int *, char *, LINE *, int, int));
extern void chword PROTO((char *, char *));
/* spell.c */
#ifdef SPELLER
extern int spell PROTO((int, int));
#endif
/* window.c */
extern int pico_refresh PROTO((int, int));
extern void redraw_pico_for_callback();
/* word.c */
extern int wrapword PROTO((void));
extern int backword PROTO((int, int));
extern int forwword PROTO((int, int));
extern int fillpara PROTO((int, int));
extern int fillbuf PROTO((int, int));
extern int inword PROTO((void));
extern int quote_match PROTO((char *, LINE *, char *, int));
#endif /* EFUNC_H */
+439
View File
@@ -0,0 +1,439 @@
/*
* $Id: estruct.h 13888 2004-12-01 00:37:37Z hubert $
*
* Program: Struct and preprocessor definitions
*
*
* 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-2004 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*/
/* ESTRUCT: Structure and preprocesser defined for
MicroEMACS 3.6
written by Dave G. Conroy
modified by Steve Wilhite, George Jones
greatly modified by Daniel Lawrence
*/
#ifndef ESTRUCT_H
#define ESTRUCT_H
/* Configuration options */
#define CVMVAS 1 /* arguments to page forward/back in pages */
#define NFWORD 1 /* forward word jumps to begining of word */
#define TYPEAH 0 /* type ahead causes update to be skipped */
#define REVSTA 1 /* Status line appears in reverse video */
/* internal constants */
#define NBINDS 50 /* max # of bound keys */
#ifdef MAXPATHLEN
#define NFILEN MAXPATHLEN /* # of bytes, file name */
#else
#define NFILEN 80 /* # of bytes, file name */
#endif
#define NBUFN 16 /* # of bytes, buffer name */
#define NLINE 256 /* # of bytes, line */
#define NSTRING 256 /* # of bytes, string buffers */
#define NPAT 80 /* # of bytes, pattern */
#define FARAWAY 1000 /* Huge number */
#define NLOCKS 100 /* max # of file locks active */
#define AGRAVE 0x60 /* M- prefix, Grave (LK201) */
#define METACH 0x1B /* M- prefix, Control-[, ESC */
#define CTMECH 0x1C /* C-M- prefix, Control-\ */
#define EXITCH 0x1D /* Exit level, Control-] */
#define CTRLCH 0x1E /* C- prefix, Control-^ */
#define HELPCH 0x1F /* Help key, Control-_ */
#undef CTRL
#define CTRL 0x0100 /* Control flag, or'ed in */
#define META 0x0200 /* Meta flag, or'ed in */
#define CTLX 0x0400 /* ^X flag, or'ed in */
#define SPEC 0x0800 /* special key (arrow's, etc) */
#define FUNC 0x1000 /* special key (function keys) */
#if defined(DOS) || defined(OS2)
#define MENU 0x2000 /* Menu command */
#define ALTD 0x4000 /* ALT key... */
#endif
#define QNORML 0x0000 /* Flag meaning no flag ;) */
#define QFFILE 0x0001 /* Flag buffer for file neme */
#define QDEFLT 0x0002 /* Flag to use default answer */
#define QBOBUF 0x0004 /* Start with cursor at BOL */
#define QNODQT 0x0008 /* Don't accept double quotes */
#undef FALSE
#define FALSE 0 /* False, no, bad, etc. */
#undef TRUE
#define TRUE 1 /* True, yes, good, etc. */
#define ABORT 2 /* Death, ^G, abort, etc. */
#define FIOSUC 0 /* File I/O, success. */
#define FIOFNF 1 /* File I/O, file not found. */
#define FIOEOF 2 /* File I/O, end of file. */
#define FIOERR 3 /* File I/O, error. */
#define FIOLNG 4 /*line longer than allowed len */
#define FIODIR 5 /* File is a directory */
#define FIONWT 6 /* File lacks write permission */
#define FIONRD 7 /* File lacks read permission */
#define FIONEX 8 /* File lacks exec permission */
#define FIOSYM 9 /* File is a symbolic link */
#define FIOPER 10 /* Generic permission denied */
/* for can_access (access) function */
#define EXECUTE_ACCESS 01 /* These five are */
#define WRITE_ACCESS 02 /* for the calls */
#define READ_ACCESS 04 /* to access() */
#define ACCESS_EXISTS 00 /* <etc> */
#define EDIT_ACCESS 06 /* (this is r+w access) */
#define OWNER_ONLY 010 /* open with mode 0600 */
#define CFCPCN 0x0001 /* Last command was C-P, C-N */
#define CFKILL 0x0002 /* Last command was a kill */
#define CFFILL 0x0004 /* Last command was a kill */
#define CFSRCH 0x0008 /* Last command was WhereIs */
#define CFFLBF 0x0010 /* Last cmd was full buf fill */
#define BACKSPACE '\b' /* backspace character */
#define TAB '\t' /* tab character */
#define RETURN '\r' /* carriage return char */
#define LINE_FEED '\n' /* line feed character */
#define FORMFEED '\f' /* form feed (^L) char */
#define COMMA ',' /* comma character */
#define SPACE ' ' /* space character */
#define ESCAPE '\033' /* the escape */
#define BELL '\007' /* the bell */
#define LPAREN '(' /* left parenthesis */
#define RPAREN ')' /* right parenthesis */
#define BSLASH '\\' /* back slash */
#define QUOTE '"' /* double quote char */
#define DEL '\177' /* delete */
/*
* macros to help filter character input
*/
#define LOBIT_CHAR(C) ((C) > 0x1f && (C) < 0x7f)
#define HIBIT_CHAR(C) ((C) > 0x7f && (C) <= 0xff)
#define HIBIT_OK(C) (!(gmode & MDHBTIGN))
#define VALID_KEY(C) (LOBIT_CHAR(C) || (HIBIT_OK(C) && HIBIT_CHAR(C)))
#define ctrl(c) ((c) & 0x1f) /* control character mapping */
#define STDIN_FD 0
#define STDOUT_FD 1
#define STDERR_FD 2
/*
* Placeholders for keymenu tags used in some ports (well, only in the
* windows port for now) to turn on commands in the Menu Bar.
*/
#ifndef KS_OSDATAVAR
#define KS_OSDATAVAR
#define KS_OSDATAGET(X)
#define KS_OSDATASET(X, Y)
#define KS_NONE
#define KS_VIEW
#define KS_EXPUNGE
#define KS_ZOOM
#define KS_SORT
#define KS_HDRMODE
#define KS_MAINMENU
#define KS_FLDRLIST
#define KS_FLDRINDEX
#define KS_COMPOSER
#define KS_PREVPAGE
#define KS_PREVMSG
#define KS_NEXTMSG
#define KS_ADDRBOOK
#define KS_WHEREIS
#define KS_PRINT
#define KS_REPLY
#define KS_FORWARD
#define KS_BOUNCE
#define KS_DELETE
#define KS_UNDELETE
#define KS_FLAG
#define KS_SAVE
#define KS_EXPORT
#define KS_TAKEADDR
#define KS_SELECT
#define KS_APPLY
#define KS_POSTPONE
#define KS_SEND
#define KS_CANCEL
#define KS_ATTACH
#define KS_TOADDRBOOK
#define KS_READFILE
#define KS_JUSTIFY
#define KS_ALTEDITOR
#define KS_GENERALHELP
#define KS_SCREENHELP
#define KS_EXIT
#define KS_NEXTPAGE
#define KS_SAVEFILE
#define KS_CURPOSITION
#define KS_GOTOFLDR
#define KS_JUMPTOMSG
#define KS_RICHHDR
#define KS_EXITMODE
#define KS_REVIEW
#define KS_KEYMENU
#define KS_SELECTCUR
#define KS_UNDO
#define KS_SPELLCHK
#endif
/*
* There is a window structure allocated for every active display window. The
* windows are kept in a big list, in top to bottom screen order, with the
* listhead at "wheadp". Each window contains its own values of dot and mark.
* The flag field contains some bits that are set by commands to guide
* redisplay; although this is a bit of a compromise in terms of decoupling,
* the full blown redisplay is just too expensive to run for every input
* character.
*/
typedef struct WINDOW {
struct WINDOW *w_wndp; /* Next window */
struct BUFFER *w_bufp; /* Buffer displayed in window */
struct LINE *w_linep; /* Top line in the window */
struct LINE *w_dotp; /* Line containing "." */
int w_doto; /* Byte offset for "." */
struct LINE *w_markp; /* Line containing "mark" */
int w_marko; /* Byte offset for "mark" */
struct LINE *w_imarkp; /* INTERNAL Line with "mark" */
int w_imarko; /* INTERNAL "mark" byte offset */
signed char w_toprow; /* Origin 0 top row of window */
signed char w_ntrows; /* # of rows of text in window */
char w_force; /* If NZ, forcing row. */
char w_flag; /* Flags. */
} WINDOW;
#define WFFORCE 0x01 /* Window needs forced reframe */
#define WFMOVE 0x02 /* Movement from line to line */
#define WFEDIT 0x04 /* Editing within a line */
#define WFHARD 0x08 /* Better to a full display */
#define WFMODE 0x10 /* Update mode line. */
/*
* Text is kept in buffers. A buffer header, described below, exists for every
* buffer in the system. The buffers are kept in a big list, so that commands
* that search for a buffer by name can find the buffer header. There is a
* safe store for the dot and mark in the header, but this is only valid if
* the buffer is not being displayed (that is, if "b_nwnd" is 0). The text for
* the buffer is kept in a circularly linked list of lines, with a pointer to
* the header line in "b_linep".
* Buffers may be "Inactive" which means the files accosiated with them
* have not been read in yet. These get read in at "use buffer" time.
*/
typedef struct BUFFER {
struct BUFFER *b_bufp; /* Link to next BUFFER */
struct LINE *b_dotp; /* Link to "." LINE structure */
int b_doto; /* Offset of "." in above LINE */
struct LINE *b_markp; /* The same as the above two, */
int b_marko; /* but for the "mark" */
struct LINE *b_linep; /* Link to the header LINE */
long b_linecnt; /* Lines in buffer (mswin only) */
long b_mode; /* editor mode of this buffer */
char b_active; /* window activated flag */
char b_nwnd; /* Count of windows on buffer */
char b_flag; /* Flags */
char b_fname[NFILEN]; /* File name */
char b_bname[NBUFN]; /* Buffer name */
} BUFFER;
#define BFTEMP 0x01 /* Internal temporary buffer */
#define BFCHG 0x02 /* Changed since last write */
#define BFWRAPOPEN 0x04 /* Wordwrap should open new line */
/*
* The starting position of a region, and the size of the region in
* characters, is kept in a region structure. Used by the region commands.
*/
typedef struct {
struct LINE *r_linep; /* Origin LINE address. */
int r_offset; /* Origin LINE offset. */
long r_size; /* Length in characters. */
} REGION;
/*
* character and attribute pair. The basic building block
* of the editor. The bitfields may have to be changed to a char
* and short if there are problems...
*/
typedef struct CELL {
unsigned int c : 8; /* Character value in cell */
unsigned int a : 8; /* Its attributes */
} CELL;
#define RGBLEN 11
#define MAXCOLORLEN 11 /* longest string a color can be */
typedef struct COLOR_PAIR {
char fg[MAXCOLORLEN+1];
char bg[MAXCOLORLEN+1];
} COLOR_PAIR;
#define COL_BLACK 0
#define COL_RED 1
#define COL_GREEN 2
#define COL_YELLOW 3
#define COL_BLUE 4
#define COL_MAGENTA 5
#define COL_CYAN 6
#define COL_WHITE 7
#define DEFAULT_NORM_FORE COL_BLACK
#define DEFAULT_NORM_BACK COL_CYAN
/* flags for pico_set_color() */
#define PSC_NONE 0x0
#define PSC_NORM 0x1
#define PSC_REV 0x2
#define PSC_RET 0x4 /* return an allocated copy of previous color */
/* flags for color_options */
#define COLOR_ANSI8_OPT 0x01
#define COLOR_ANSI16_OPT 0x02
/* styles for pico_apply_rev_color() */
#define IND_COL_FLIP 0
#define IND_COL_REV 1
#define IND_COL_FG 2
#define IND_COL_FG_NOAMBIG 3
#define IND_COL_BG 4
#define IND_COL_BG_NOAMBIG 5
/*
* All text is kept in circularly linked lists of "LINE" structures. These
* begin at the header line (which is the blank line beyond the end of the
* buffer). This line is pointed to by the "BUFFER". Each line contains a the
* number of bytes in the line (the "used" size), the size of the text array,
* and the text. The end of line is not stored as a byte; it's implied. Future
* additions will include update hints, and a list of marks into the line.
*/
typedef struct LINE {
struct LINE *l_fp; /* Link to the next line */
struct LINE *l_bp; /* Link to the previous line */
int l_size; /* Allocated size */
int l_used; /* Used size */
CELL l_text[1]; /* A bunch of characters. */
} LINE;
#define lforw(lp) ((lp)->l_fp)
#define lback(lp) ((lp)->l_bp)
#define lgetc(lp, n) ((lp)->l_text[(n)])
#define lputc(lp, n, c) ((lp)->l_text[(n)]=(c))
#define llength(lp) ((lp)->l_used)
/*
* The editor communicates with the display using a high level interface. A
* "TERM" structure holds useful variables, and indirect pointers to routines
* that do useful operations. The low level get and put routines are here too.
* This lets a terminal, in addition to having non standard commands, have
* funny get and put character code too. The calls might get changed to
* "termp->t_field" style in the future, to make it possible to run more than
* one terminal type.
*/
typedef struct {
short t_nrow; /* Number of rows - 1. */
short t_ncol; /* Number of columns. */
short t_margin; /* min margin for extended lines*/
short t_scrsiz; /* size of scroll region " */
short t_mrow; /* Number of rows in menu */
int (*t_open)(); /* Open terminal at the start. */
int (*t_terminalinfo)(); /* Set up terminal info */
int (*t_close)(); /* Close terminal at end. */
int (*t_getchar)(); /* Get character from keyboard. */
int (*t_putchar)(); /* Put character to display. */
int (*t_flush)(); /* Flush output buffers. */
int (*t_move)(); /* Move the cursor, origin 0. */
int (*t_eeol)(); /* Erase to end of line. */
int (*t_eeop)(); /* Erase to end of page. */
int (*t_beep)(); /* Beep. */
int (*t_rev)(); /* set reverse video state */
} TERM;
/* structure for the table of initial key bindings */
typedef struct {
short k_code; /* Key code */
int (*k_fp)(); /* Routine to handle it */
} KEYTAB;
/* sturcture used for key menu painting */
typedef struct {
char *name; /* key to display */
char *label; /* function name key envokes */
KS_OSDATAVAR /* port-specific data */
} KEYMENU;
typedef struct {
char *name; /* key to display */
char *label; /* function name key envokes */
int key; /* what to watch for and return */
KS_OSDATAVAR /* port-specific data */
} EXTRAKEYS;
typedef struct lmlist {
char *dir;
char *fname;
char size[32];
struct lmlist *next;
} LMLIST;
typedef struct VIDEO {
short v_flag; /* Flags */
CELL v_text[1]; /* Screen data. */
} VIDEO;
typedef struct _file_io_data {
FILE *fp; /* stdio stream into file */
long flags; /* state flags */
char *name; /* pointer to file name */
} FIOINFO;
#define FIOINFO_READ 0x01
#define FIOINFO_WRITE 0x02
#ifdef MOUSE
/* Test if mouse position (R, C) is in menu item (X) */
#define M_ACTIVE(R, C, X) (((unsigned)(R)) >= (X)->tl.r \
&& ((unsigned)(R)) <= (X)->br.r \
&& ((unsigned)(C)) >= (X)->tl.c \
&& ((unsigned)(C)) < (X)->br.c)
#endif /* MOUSE */
#endif /* ESTRUCT_H */
+1011
View File
File diff suppressed because it is too large Load Diff
+159
View File
@@ -0,0 +1,159 @@
#if !defined(lint) && !defined(DOS)
static char rcsid[] = "$Id: fileio.c 12094 2002-02-12 22:53:53Z hubert $";
#endif
/*
* Program: ASCII file reading 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-2002 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 read and write ASCII files from the disk. All of
* the knowledge about files are here. A better message writing scheme should
* be used.
*/
#include "headers.h"
#if defined(bsd) || defined(lnx)
extern int errno;
#endif
FIOINFO g_pico_fio;
/*
* Open a file for reading.
*/
ffropen(fn)
char *fn;
{
int status;
if ((status = fexist(g_pico_fio.name = fn, "r", (off_t *)NULL)) == FIOSUC){
g_pico_fio.flags = FIOINFO_READ;
if((g_pico_fio.fp = fopen(g_pico_fio.name, "r")) == NULL)
status = FIOFNF;
}
return (status);
}
/*
* Write a line to the already opened file. The "buf" points to the buffer,
* and the "nbuf" is its length, less the free newline. Return the status.
* Check only at the newline.
*/
ffputline(buf, nbuf)
CELL buf[];
int nbuf;
{
register int i;
for (i = 0; i < nbuf; ++i)
if(fputc(buf[i].c&0xFF, g_pico_fio.fp) == EOF)
break;
if(i == nbuf)
fputc('\n', g_pico_fio.fp);
if (ferror(g_pico_fio.fp)) {
emlwrite("\007Write error: %s", errstr(errno));
sleep(5);
return (FIOERR);
}
return (FIOSUC);
}
/*
* Read a line from a file, and store the bytes in the supplied buffer. The
* "nbuf" is the length of the buffer. Complain about long lines and lines
* at the end of the file that don't have a newline present. Check for I/O
* errors too. Return status.
*/
ffgetline(buf, nbuf, charsreturned, msg)
register char buf[];
int nbuf;
int *charsreturned;
int msg;
{
register int c;
register int i;
if(charsreturned)
*charsreturned = 0;
i = 0;
while ((c = fgetc(g_pico_fio.fp)) != EOF && c != '\n') {
/*
* Don't blat the CR should the newline be CRLF and we're
* running on a unix system. NOTE: this takes care of itself
* under DOS since the non-binary open turns newlines into '\n'.
*/
if(c == '\r'){
if((c = fgetc(g_pico_fio.fp)) == EOF || c == '\n')
break;
if (i < nbuf-2) /* Bare CR. Insert it and go on... */
buf[i++] = '\r'; /* else, we're up a creek */
}
if (i >= nbuf-2) {
buf[nbuf - 2] = c; /* store last char read */
buf[nbuf - 1] = 0; /* and terminate it */
if(charsreturned)
*charsreturned = nbuf - 1;
if (msg)
emlwrite("File has long line", NULL);
return (FIOLNG);
}
buf[i++] = c;
}
if (c == EOF) {
if (ferror(g_pico_fio.fp)) {
emlwrite("File read error", NULL);
if(charsreturned)
*charsreturned = i;
return (FIOERR);
}
if (i != 0)
emlwrite("File doesn't end with newline. Adding one.", NULL);
else{
if(charsreturned)
*charsreturned = i;
return (FIOEOF);
}
}
buf[i] = 0;
if(charsreturned)
*charsreturned = i;
return (FIOSUC);
}
+80
View File
@@ -0,0 +1,80 @@
/*======================================================================
$Id: headers.h 9714 1999-01-27 22:14:21Z hubert $
headers.h
The include file to always include that includes a few other things
- includes the most general system files and other pine include files
- declares the global variables
====*/
#ifndef _PICO_HEADERS_INCLUDED
#define _PICO_HEADERS_INCLUDED
/*----------------------------------------------------------------------
Include files
System specific includes and defines are in os.h, the source for which
is os-xxx.h. (Don't edit os.h; edit os-xxx.h instead.)
----*/
#ifdef TERMCAP_WINS
Do not use TERMCAP WINS anymore. This is now set at runtime with
pico -q, pilot -q, or the pine feature called termdef-takes-precedence.
You do not need to do anything special while compiling.
#endif /* TERMCAP_WINS */
#include <stdio.h>
#include "os.h"
/*
* [Re]Define signal functions as needed...
*/
#ifdef POSIX_SIGNALS
/*
* Redefine signal call to our wrapper of POSIX sigaction
*/
#define signal(SIG,ACT) posix_signal(SIG,ACT)
#define our_sigunblock(SIG) posix_sigunblock(SIG)
#else /* !POSIX_SIGNALS */
#ifdef SYSV_SIGNALS
/*
* Redefine signal calls to SYSV style call.
*/
#define signal(SIG,ACT) sigset(SIG,ACT)
#define our_sigunblock(SIG) sigrelse(SIG)
#else /* !SYSV_SIGNALS */
#ifdef WIN32
#define signal(SIG,ACT) mswin_signal(SIG,ACT)
#define our_sigunblock(SIG)
#else /* !WIN32 */
/*
* Good ol' BSD signals.
*/
#define our_sigunblock(SIG)
#endif /* !WIN32 */
#endif /* !SYSV_SIGNALS */
#endif /* !POSIX_SIGNALS */
/* These includes are all ANSI, and OK with all other compilers (so far) */
#include <ctype.h>
#include <errno.h>
#include <setjmp.h>
#ifdef ANSI
#define PROTO(args) args
#else
#define PROTO(args) ()
#endif
#include "estruct.h"
#include "pico.h"
#include "edef.h"
#include "efunc.h"
#endif /* _PICO_HEADERS_INCLUDED */
+783
View File
@@ -0,0 +1,783 @@
#if !defined(lint) && !defined(DOS)
static char rcsid[] = "$Id: line.c 13654 2004-05-07 21:43:40Z jpf $";
#endif
/*
* Program: Line management 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-2004 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*/
/*
* The functions in this file are a general set of line management utilities.
* They are the only routines that touch the text. They also touch the buffer
* and window structures, to make sure that the necessary updating gets done.
* There are routines in this file that handle the kill buffer too. It isn't
* here for any good reason.
*
* Note that this code only updates the dot and mark values in the window list.
* Since all the code acts on the current window, the buffer that we are
* editing must be being displayed, which means that "b_nwnd" is non zero,
* which means that the dot and mark values in the buffer headers are nonsense.
*/
#include "headers.h"
#define NBLOCK 16 /* Line block chunk size */
#define KBLOCK 1024 /* Kill buffer block size */
/*
* Struct to manage the kill and justify buffers
*/
struct pkchunk {
short used; /* # of bytes used in this buffer*/
char bufp[KBLOCK]; /* buffer containing text */
struct pkchunk *next; /* pointer to next chunk */
};
static struct pkbuf {
long total; /* # of bytes used in buffer */
struct pkchunk *first; /* first one of these in the chain */
struct pkchunk *last; /* last one of these in the chain */
} *kbufp, *fbufp;
#ifdef ANSI
void insspace(int, int);
int ldelnewline(void);
void pkbufdel(struct pkbuf **);
void pkchunkdel(struct pkchunk **);
int pkbufinsert(int, struct pkbuf **);
int pkbufremove(int, struct pkbuf *);
#else
void insspace();
int ldelnewline();
void pkbufdel();
void pkchunkdel();
int pkbufinsert();
int pkbufremove();
#endif
/*
* This routine allocates a block of memory large enough to hold a LINE
* containing "used" characters. The block is always rounded up a bit. Return
* a pointer to the new block, or NULL if there isn't any memory left. Print a
* message in the message line if no space.
*/
LINE *
lalloc(used)
register int used;
{
register LINE *lp;
register int size;
if((size = (used+NBLOCK-1) & ~(NBLOCK-1)) > NLINE)
size *= 2;
if (size == 0) /* Assume that an empty */
size = NBLOCK; /* line is for type-in. */
if ((lp = (LINE *) malloc(sizeof(LINE)+(size*sizeof(CELL)))) == NULL) {
emlwrite("Cannot allocate %d bytes", (void *)size);
return (NULL);
}
lp->l_size = size;
lp->l_used = used;
return (lp);
}
/*
* Delete line "lp". Fix all of the links that might point at it (they are
* moved to offset 0 of the next line. Unlink the line from whatever buffer it
* might be in. Release the memory. The buffers are updated too; the magic
* conditions described in the above comments don't hold here.
*/
void
lfree(lp)
register LINE *lp;
{
register BUFFER *bp;
register WINDOW *wp;
wp = wheadp;
while (wp != NULL) {
if (wp->w_linep == lp)
wp->w_linep = lp->l_fp;
if (wp->w_dotp == lp) {
wp->w_dotp = lp->l_fp;
wp->w_doto = 0;
}
if (wp->w_markp == lp) {
wp->w_markp = lp->l_fp;
wp->w_marko = 0;
}
if (wp->w_imarkp == lp) {
wp->w_imarkp = lp->l_fp;
wp->w_imarko = 0;
}
wp = wp->w_wndp;
}
bp = bheadp;
while (bp != NULL) {
if (bp->b_nwnd == 0) {
if (bp->b_dotp == lp) {
bp->b_dotp = lp->l_fp;
bp->b_doto = 0;
}
if (bp->b_markp == lp) {
bp->b_markp = lp->l_fp;
bp->b_marko = 0;
}
}
bp = bp->b_bufp;
}
lp->l_bp->l_fp = lp->l_fp;
lp->l_fp->l_bp = lp->l_bp;
free((char *) lp);
}
/*
* This routine gets called when a character is changed in place in the current
* buffer. It updates all of the required flags in the buffer and window
* system. The flag used is passed as an argument; if the buffer is being
* displayed in more than 1 window we change EDIT t HARD. Set MODE if the
* mode line needs to be updated (the "*" has to be set).
*/
void
lchange(flag)
register int flag;
{
register WINDOW *wp;
if (curbp->b_nwnd != 1) /* Ensure hard. */
flag = WFHARD;
if ((curbp->b_flag&BFCHG) == 0) { /* First change, so */
if(Pmaster == NULL)
flag |= WFMODE; /* update mode lines. */
curbp->b_flag |= BFCHG;
}
wp = wheadp;
while (wp != NULL) {
if (wp->w_bufp == curbp)
wp->w_flag |= flag;
wp = wp->w_wndp;
}
}
/*
* insert spaces forward into text
* default flag and numeric argument
*/
void
insspace(f, n)
int f, n;
{
linsert(n, ' ');
backchar(f, n);
}
/*
* Insert "n" copies of the character "c" at the current location of dot. In
* the easy case all that happens is the text is stored in the line. In the
* hard case, the line has to be reallocated. When the window list is updated,
* take special care; I screwed it up once. You always update dot in the
* current window. You update mark, and a dot in another window, if it is
* greater than the place where you did the insert. Return TRUE if all is
* well, and FALSE on errors.
*/
linsert(n, c)
int n, c;
{
register LINE *dotp;
register int doto;
register WINDOW *wp;
if (curbp->b_mode&MDVIEW) /* don't allow this command if */
return(rdonly()); /* we are in read only mode */
dotp = curwp->w_dotp;
doto = curwp->w_doto;
lchange(WFEDIT);
if(!geninsert(&(curwp->w_dotp), &(curwp->w_doto), curbp->b_linep,
c, (curwp->w_markp) ? 1 : 0, n, &curbp->b_linecnt))
return(FALSE);
wp = wheadp; /* Update windows */
while (wp != NULL) {
if (wp->w_linep == dotp)
wp->w_linep = wp->w_dotp;
if (wp->w_imarkp == dotp) { /* added for internal mark */
wp->w_imarkp = wp->w_dotp;
if (wp->w_imarko > doto)
wp->w_imarko += n;
}
if (wp->w_markp == dotp) {
wp->w_markp = dotp;
if (wp->w_marko > doto)
wp->w_marko += n;
}
wp = wp->w_wndp;
}
return (TRUE);
}
/*
* geninsert - do the actual work of inserting a character into
* the list of lines.
*/
int
geninsert(dotp, doto, linep, c, attb, n, lines)
LINE **dotp, *linep;
int *doto;
int c, attb, n;
long *lines;
{
register LINE *lp1;
register LINE *lp2;
register CELL *cp1;
register CELL *cp2;
CELL ac;
ac.a = attb;
if (*dotp == linep) { /* At the end: special */
if (*doto != 0) {
emlwrite("Programmer botch: geninsert", NULL);
return (FALSE);
}
if ((lp1=lalloc(n)) == NULL) /* Allocate new line */
return (FALSE);
lp2 = (*dotp)->l_bp; /* Previous line */
lp2->l_fp = lp1; /* Link in */
lp1->l_fp = *dotp;
(*dotp)->l_bp = lp1;
lp1->l_bp = lp2;
*doto = n;
*dotp = lp1;
ac.c = ((char)c & 0xff);
cp1 = &(*dotp)->l_text[0];
while(n--)
*cp1++ = ac;
if(lines)
(*lines)++;
return (TRUE);
}
if ((*dotp)->l_used+n > (*dotp)->l_size) { /* Hard: reallocate */
if ((lp1=lalloc((*dotp)->l_used+n)) == NULL)
return (FALSE);
cp1 = &(*dotp)->l_text[0];
cp2 = &lp1->l_text[0];
while (cp1 != &(*dotp)->l_text[*doto])
*cp2++ = *cp1++;
cp2 += n;
while (cp1 != &(*dotp)->l_text[(*dotp)->l_used])
*cp2++ = *cp1++;
(*dotp)->l_bp->l_fp = lp1;
lp1->l_fp = (*dotp)->l_fp;
(*dotp)->l_fp->l_bp = lp1;
lp1->l_bp = (*dotp)->l_bp;
/* global may be keeping track of mark/imark */
if(wheadp){
if (wheadp->w_imarkp == *dotp)
wheadp->w_imarkp = lp1;
if (wheadp->w_markp == *dotp)
wheadp->w_markp = lp1;
}
free((char *) (*dotp));
*dotp = lp1;
} else { /* Easy: in place */
(*dotp)->l_used += n;
cp2 = &(*dotp)->l_text[(*dotp)->l_used];
cp1 = cp2-n;
while (cp1 != &(*dotp)->l_text[*doto])
*--cp2 = *--cp1;
}
ac.c = ((char)c & 0xff);
while(n--) /* add the chars */
(*dotp)->l_text[(*doto)++] = ac;
return(TRUE);
}
/*
* Insert a newline into the buffer at the current location of dot in the
* current window. The funny ass-backwards way it does things is not a botch;
* it just makes the last line in the file not a special case. Return TRUE if
* everything works out and FALSE on error (memory allocation failure). The
* update of dot and mark is a bit easier than in the above case, because the
* split forces more updating.
*/
lnewline()
{
register CELL *cp1;
register CELL *cp2;
register LINE *lp1;
register LINE *lp2;
register int doto;
register WINDOW *wp;
if (curbp->b_mode&MDVIEW) /* don't allow this command if */
return(rdonly()); /* we are in read only mode */
lchange(WFHARD);
lp1 = curwp->w_dotp; /* Get the address and */
doto = curwp->w_doto; /* offset of "." */
if ((lp2=lalloc(doto)) == NULL) /* New first half line */
return (FALSE);
cp1 = &lp1->l_text[0]; /* Shuffle text around */
cp2 = &lp2->l_text[0];
while (cp1 != &lp1->l_text[doto])
*cp2++ = *cp1++;
cp2 = &lp1->l_text[0];
while (cp1 != &lp1->l_text[lp1->l_used])
*cp2++ = *cp1++;
lp1->l_used -= doto;
lp2->l_bp = lp1->l_bp;
lp1->l_bp = lp2;
lp2->l_bp->l_fp = lp2;
lp2->l_fp = lp1;
wp = wheadp; /* Windows */
while (wp != NULL) {
if (wp->w_linep == lp1)
wp->w_linep = lp2;
if (wp->w_dotp == lp1) {
if (wp->w_doto < doto)
wp->w_dotp = lp2;
else
wp->w_doto -= doto;
}
if (wp->w_imarkp == lp1) { /* ADDED for internal mark */
if (wp->w_imarko < doto)
wp->w_imarkp = lp2;
else
wp->w_imarko -= doto;
}
if (wp->w_markp == lp1) {
if (wp->w_marko < doto)
wp->w_markp = lp2;
else
wp->w_marko -= doto;
}
wp = wp->w_wndp;
}
/*
* Keep track of the number of lines in the buffer.
*/
++curbp->b_linecnt;
return (TRUE);
}
/*
* This function deletes "n" bytes, starting at dot. It understands how do deal
* with end of lines, etc. It returns TRUE if all of the characters were
* deleted, and FALSE if they were not (because dot ran into the end of the
* buffer. The "preserve" function is used to save what was deleted.
*/
ldelete(n, preserve)
long n;
int (*preserve) PROTO((int));
{
register CELL *cp1;
register CELL *cp2;
register LINE *dotp;
register int doto;
register int chunk;
register WINDOW *wp;
if (curbp->b_mode&MDVIEW) /* don't allow this command if */
return(rdonly()); /* we are in read only mode */
while (n != 0) {
dotp = curwp->w_dotp;
doto = curwp->w_doto;
if (dotp == curbp->b_linep) /* Hit end of buffer. */
return (FALSE);
chunk = dotp->l_used-doto; /* Size of chunk. */
if (chunk > n)
chunk = n;
if (chunk == 0) { /* End of line, merge. */
lchange(WFHARD);
if (ldelnewline() == FALSE
|| (preserve ? (*preserve)('\n') == FALSE : 0))
return (FALSE);
--n;
continue;
}
lchange(WFEDIT);
cp1 = &dotp->l_text[doto]; /* Scrunch text. */
cp2 = cp1 + chunk;
if (preserve) { /* Kill? */
while (cp1 != cp2) {
if ((*preserve)(cp1->c) == FALSE)
return (FALSE);
++cp1;
}
cp1 = &dotp->l_text[doto];
}
while (cp2 != &dotp->l_text[dotp->l_used])
*cp1++ = *cp2++;
dotp->l_used -= chunk;
wp = wheadp; /* Fix windows */
while (wp != NULL) {
if (wp->w_dotp==dotp && wp->w_doto>=doto) {
wp->w_doto -= chunk;
if (wp->w_doto < doto)
wp->w_doto = doto;
}
if (wp->w_markp==dotp && wp->w_marko>=doto) {
wp->w_marko -= chunk;
if (wp->w_marko < doto)
wp->w_marko = doto;
}
if (wp->w_imarkp==dotp && wp->w_imarko>=doto) {
wp->w_imarko -= chunk;
if (wp->w_imarko < doto)
wp->w_imarko = doto;
}
wp = wp->w_wndp;
}
n -= chunk;
}
#ifdef _WINDOWS
if (preserve == kinsert && ksize() > 0)
mswin_killbuftoclip (kremove);
#endif
return (TRUE);
}
/*
* Delete a newline. Join the current line with the next line. If the next line
* is the magic header line always return TRUE; merging the last line with the
* header line can be thought of as always being a successful operation, even
* if nothing is done, and this makes the kill buffer work "right". Easy cases
* can be done by shuffling data around. Hard cases require that lines be moved
* about in memory. Return FALSE on error and TRUE if all looks ok. Called by
* "ldelete" only.
*/
ldelnewline()
{
register CELL *cp1;
register CELL *cp2;
register LINE *lp1;
register LINE *lp2;
register LINE *lp3;
register WINDOW *wp;
if (curbp->b_mode&MDVIEW) /* don't allow this command if */
return(rdonly()); /* we are in read only mode */
lp1 = curwp->w_dotp;
lp2 = lp1->l_fp;
if (lp2 == curbp->b_linep) { /* At the buffer end. */
if (lp1->l_used == 0) { /* Blank line. */
lfree(lp1);
--curbp->b_linecnt;
}
return (TRUE);
}
if (lp2->l_used <= lp1->l_size-lp1->l_used) {
cp1 = &lp1->l_text[lp1->l_used];
cp2 = &lp2->l_text[0];
while (cp2 != &lp2->l_text[lp2->l_used])
*cp1++ = *cp2++;
wp = wheadp;
while (wp != NULL) {
if (wp->w_linep == lp2)
wp->w_linep = lp1;
if (wp->w_dotp == lp2) {
wp->w_dotp = lp1;
wp->w_doto += lp1->l_used;
}
if (wp->w_markp == lp2) {
wp->w_markp = lp1;
wp->w_marko += lp1->l_used;
}
if (wp->w_imarkp == lp2) {
wp->w_imarkp = lp1;
wp->w_imarko += lp1->l_used;
}
wp = wp->w_wndp;
}
lp1->l_used += lp2->l_used;
lp1->l_fp = lp2->l_fp;
lp2->l_fp->l_bp = lp1;
free((char *) lp2);
--curbp->b_linecnt;
return (TRUE);
}
if ((lp3=lalloc(lp1->l_used+lp2->l_used)) == NULL)
return (FALSE);
cp1 = &lp1->l_text[0];
cp2 = &lp3->l_text[0];
while (cp1 != &lp1->l_text[lp1->l_used])
*cp2++ = *cp1++;
cp1 = &lp2->l_text[0];
while (cp1 != &lp2->l_text[lp2->l_used])
*cp2++ = *cp1++;
lp1->l_bp->l_fp = lp3;
lp3->l_fp = lp2->l_fp;
lp2->l_fp->l_bp = lp3;
lp3->l_bp = lp1->l_bp;
wp = wheadp;
while (wp != NULL) {
if (wp->w_linep==lp1 || wp->w_linep==lp2)
wp->w_linep = lp3;
if (wp->w_dotp == lp1)
wp->w_dotp = lp3;
else if (wp->w_dotp == lp2) {
wp->w_dotp = lp3;
wp->w_doto += lp1->l_used;
}
if (wp->w_markp == lp1)
wp->w_markp = lp3;
else if (wp->w_markp == lp2) {
wp->w_markp = lp3;
wp->w_marko += lp1->l_used;
}
if (wp->w_imarkp == lp1)
wp->w_imarkp = lp3;
else if (wp->w_imarkp == lp2) {
wp->w_imarkp = lp3;
wp->w_imarko += lp1->l_used;
}
wp = wp->w_wndp;
}
free((char *) lp1);
free((char *) lp2);
--curbp->b_linecnt;
return (TRUE);
}
/*
* Tell the caller if the given line is blank or not.
*/
lisblank(line)
LINE *line;
{
int n = 0;
char qstr[NLINE];
n = ((glo_quote_str || (Pmaster && Pmaster->quote_str))
&& quote_match(glo_quote_str ? glo_quote_str : Pmaster->quote_str,
line, qstr, NLINE))
? strlen(qstr) : 0;
for(; n < llength(line); n++)
if(!isspace((unsigned char) lgetc(line, n).c))
return(FALSE);
return(TRUE);
}
/*
* Delete all of the text saved in the kill buffer. Called by commands when a
* new kill context is being created. The kill buffer array is released, just
* in case the buffer has grown to immense size. No errors.
*/
void
kdelete()
{
pkbufdel(&kbufp);
}
void
fdelete()
{
pkbufdel(&fbufp);
}
void
pkbufdel(buf)
struct pkbuf **buf;
{
if (*buf) {
pkchunkdel(&(*buf)->first);
free((char *) *buf);
*buf = NULL;
}
}
void
pkchunkdel(chunk)
struct pkchunk **chunk;
{
if(chunk){
if((*chunk)->next)
pkchunkdel(&(*chunk)->next);
free((char *) *chunk);
*chunk = NULL;
}
}
/*
* Insert a character to the kill buffer, enlarging the buffer if there isn't
* any room. Always grow the buffer in chunks, on the assumption that if you
* put something in the kill buffer you are going to put more stuff there too
* later. Return TRUE if all is well, and FALSE on errors.
*/
kinsert(c)
int c;
{
return(pkbufinsert(c, &kbufp));
}
finsert(c)
int c;
{
return(pkbufinsert(c, &fbufp));
}
pkbufinsert(c, buf)
int c;
struct pkbuf **buf;
{
if(!*buf){
if(*buf = (struct pkbuf *) malloc(sizeof(struct pkbuf)))
memset(*buf, 0, sizeof(struct pkbuf));
else
return(FALSE);
}
if((*buf)->total % KBLOCK == 0){
struct pkchunk *p = (*buf)->last;
if((*buf)->last = (struct pkchunk *) malloc(sizeof(struct pkchunk))){
memset((*buf)->last, 0, sizeof(struct pkchunk));
if(p)
p->next = (*buf)->last;
else
(*buf)->first = (*buf)->last;
}
else
return(FALSE);
}
(*buf)->last->bufp[(*buf)->last->used++] = c;
(*buf)->total++;
return (TRUE);
}
/*
* These functions get characters from the requested buffer. If the
* character index "n" is off the end, it returns "-1". This lets the
* caller just scan along until it gets a "-1" back.
*/
kremove(n)
int n;
{
return(pkbufremove(n, kbufp));
}
fremove(n)
int n;
{
return(pkbufremove(n, fbufp));
}
pkbufremove(n, buf)
int n;
struct pkbuf *buf;
{
if(n >= 0 && buf && n < buf->total){
register struct pkchunk *p = buf->first;
int block = n / KBLOCK;
while(block--)
if(!(p = p->next))
return(-1);
return(p->bufp[n % KBLOCK] & 0xff);
}
else
return(-1);
}
/*
* This function just returns the current size of the kill buffer
*/
ksize()
{
return(kbufp ? (int) kbufp->total : 0);
}
Executable
+707
View File
@@ -0,0 +1,707 @@
#if !defined(lint) && !defined(DOS)
static char rcsid[] = "$Id: main.c 13547 2004-03-26 22:36:45Z hubert $";
#endif
/*
* Program: Main stand-alone Pine Composer 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-2004 by the University of Washington.
*
* The full text of our legal notices is contained in the file called
* CPYRIGHT, included with this distribution.
*
*
* WEEMACS/PICO NOTES:
*
* 08 Jan 92 - removed PINE defines to simplify compiling
*
* 08 Apr 92 - removed PINE stub calls
*
*/
#include "headers.h"
/*
* Useful internal prototypes
*/
#ifdef _WINDOWS
int pico_file_drop PROTO((int, int, char *));
#endif
/*
* this isn't defined in the library, because it's a pine global
* which we use for GetKey's timeout
*/
int timeoutset = 0;
int my_timer_period = (300 * 1000);
/*
* function key mappings
*/
static int fkm[12][2] = {
{ F1, (CTRL|'G')},
{ F2, (CTRL|'X')},
{ F3, (CTRL|'O')},
{ F4, (CTRL|'J')},
{ F5, (CTRL|'R')},
{ F6, (CTRL|'W')},
{ F7, (CTRL|'Y')},
{ F8, (CTRL|'V')},
{ F9, (CTRL|'K')},
{ F10, (CTRL|'U')},
{ F11, (CTRL|'C')},
#ifdef SPELLER
{ F12, (CTRL|'T')}
#else
{ F12, (CTRL|'D')}
#endif
};
char *pico_args PROTO((int, char **, int *, int *, int *, int *));
void pico_args_help PROTO((void));
void pico_vers_help PROTO((void));
void pico_display_args_err PROTO((char *, char **, int));
char args_pico_missing_flag[] = "unknown flag \"%c\"";
char args_pico_missing_arg[] = "missing or empty argument to \"%c\" flag";
char args_pico_missing_num[] = "non numeric argument for \"%c\" flag";
char args_pico_missing_color[] = "missing color for \"%s\" flag";
char *args_pico_args[] = {
"Possible Starting Arguments for Pico editor:",
"",
"\tArgument\t\tMeaning",
"\t -e \t\tComplete - allow file name completion",
"\t -k \t\tCut - let ^K cut from cursor position to end of line",
"\t -a \t\tShowDot - show dot files in file browser",
"\t -j \t\tGoto - allow 'Goto' command in file browser",
"\t -g \t\tShow - show cursor in file browser",
"\t -m \t\tMouse - turn on mouse support",
"\t -x \t\tNoKeyhelp - suppress keyhelp",
"\t -p \t\tPreserveStartStop - preserve \"start\"(^Q) and \"stop\"(^S) characters",
"\t -q \t\tTermdefWins - termcap or terminfo takes precedence over defaults",
"\t -Q <quotestr> \tSet quote string (eg. \"> \") esp. for composing email",
"\t -d \t\tRebind - let delete key delete current character",
"\t -f \t\tKeys - force use of function keys",
"\t -b \t\tReplace - allow search and replace",
"\t -h \t\tHelp - give this list of options",
"\t -r[#cols] \tFill - set fill column to #cols columns, default=72",
"\t -n[#s] \tMail - notify about new mail every #s seconds, default=180",
"\t -s <speller> \tSpeller - specify alternative speller",
"\t -t \t\tShutdown - enable special shutdown mode",
"\t -o <dir>\tOperation - specify the operating directory",
"\t -z \t\tSuspend - allow use of ^Z suspension",
"\t -w \t\tNoWrap - turn off word wrap",
#if defined(DOS) || defined(OS2)
"\t -cnf color \tforeground color",
"\t -cnb color \tbackground color",
"\t -crf color \treverse foreground color",
"\t -crb color \treverse background color",
#endif
"\t +[line#] \tLine - start on line# line, default=1",
"\t -v \t\tView - view file",
"\t -setlocale_ctype\tdo setlocale(LC_CTYPE) if available",
"\t -no_setlocale_collate\tdo not do setlocale(LC_COLLATE)",
"\t -version\tPico version number",
"",
"\t All arguments may be followed by a file name to display.",
"",
NULL
};
/*
* main standalone pico routine
*/
#ifdef _WINDOWS
app_main (argc, argv)
#else
main(argc, argv)
#endif
char *argv[];
{
register int c;
register int f;
register int n;
register BUFFER *bp;
int viewflag = FALSE; /* are we starting in view mode?*/
int starton = 0; /* where's dot to begin with? */
int setlocale_collate = 1;
int setlocale_ctype = 0;
char bname[NBUFN]; /* buffer name of file to read */
char *file_to_edit = NULL;
timeo = 600;
Pmaster = NULL; /* turn OFF composer functionality */
km_popped = 0;
opertree[0] = opertree[NLINE] = '\0';
browse_dir[0] = browse_dir[NLINE] = '\0';
/*
* Read command line flags before initializing, otherwise, we never
* know to init for f_keys...
*/
file_to_edit = pico_args(argc, argv, &starton, &viewflag,
&setlocale_collate, &setlocale_ctype);
set_collation(setlocale_collate, setlocale_ctype);
#if defined(DOS) || defined(OS2)
if(file_to_edit){ /* strip quotes? */
int l;
if(strchr("'\"", file_to_edit[0])
&& (l = strlen(file_to_edit)) > 1
&& file_to_edit[l-1] == file_to_edit[0]){
file_to_edit[l-1] = '\0'; /* blat trailing quote */
file_to_edit++; /* advance past leading quote */
}
}
#endif
if(!vtinit()) /* Displays. */
exit(1);
strcpy(bname, "main"); /* default buffer name */
edinit(bname); /* Buffers, windows. */
update(); /* let the user know we are here */
#ifdef _WINDOWS
mswin_setwindow(NULL, NULL, NULL, NULL, NULL, NULL);
mswin_showwindow();
mswin_showcaret(1); /* turn on for main window */
mswin_allowpaste(MSWIN_PASTE_FULL);
mswin_setclosetext("Use the ^X command to exit Pico.");
mswin_setscrollcallback (pico_scroll_callback);
#endif
#if defined(USE_TERMCAP) || defined(USE_TERMINFO) || defined(VMS)
if(kbesc == NULL){ /* will arrow keys work ? */
(*term.t_putchar)('\007');
emlwrite("Warning: keypad keys may non-functional", NULL);
}
#endif /* USE_TERMCAP/USE_TERMINFO/VMS */
if(file_to_edit){ /* Any file to edit? */
makename(bname, file_to_edit); /* set up a buffer for this file */
bp = curbp; /* read in first file */
makename(bname, file_to_edit);
strcpy(bp->b_bname, bname);
if(strlen(file_to_edit) >= NFILEN){
char buf[128];
sprintf(buf, "Filename \"%.10s...\" too long", file_to_edit);
emlwrite(buf, NULL);
file_to_edit = NULL;
}
else{
strcpy(bp->b_fname, file_to_edit);
if ((gmode&MDTREE) && !in_oper_tree(file_to_edit) ||
readin(file_to_edit, (viewflag==FALSE), TRUE) == ABORT) {
if ((gmode&MDTREE) && !in_oper_tree(file_to_edit))
emlwrite("Can't read file from outside of %s", opertree);
file_to_edit = NULL;
}
}
if(!file_to_edit){
strcpy(bp->b_bname, "main");
strcpy(bp->b_fname, "");
}
bp->b_dotp = bp->b_linep;
bp->b_doto = 0;
if (viewflag) /* set the view mode */
bp->b_mode |= MDVIEW;
}
/* setup to process commands */
lastflag = 0; /* Fake last flags. */
curbp->b_mode |= gmode; /* and set default modes*/
curwp->w_flag |= WFMODE; /* and force an update */
if(timeoutset)
emlwrite("Checking for new mail every %D seconds", (void *)timeo);
forwline(0, starton - 1); /* move dot to specified line */
while(1){
if(km_popped){
km_popped--;
if(km_popped == 0) /* cause bottom three lines to be repainted */
curwp->w_flag |= WFHARD;
}
if(km_popped){ /* temporarily change to cause menu to be painted */
term.t_mrow = 2;
curwp->w_ntrows -= 2;
curwp->w_flag |= WFMODE;
movecursor(term.t_nrow-2, 0); /* clear status line, too */
peeol();
}
update(); /* Fix up the screen */
if(km_popped){
term.t_mrow = 0;
curwp->w_ntrows += 2;
}
#ifdef MOUSE
#ifdef EX_MOUSE
/* New mouse function for real mouse text seletion. */
register_mfunc(mouse_in_pico, 2, 0, term.t_nrow - (term.t_mrow + 1),
term.t_ncol);
#else
mouse_in_content(KEY_MOUSE, -1, -1, 0, 0);
register_mfunc(mouse_in_content, 2, 0, term.t_nrow - (term.t_mrow + 1),
term.t_ncol);
#endif
#endif
#ifdef _WINDOWS
mswin_setdndcallback (pico_file_drop);
mswin_mousetrackcallback(pico_cursor);
#endif
c = GetKey();
#ifdef MOUSE
#ifdef EX_MOUSE
clear_mfunc(mouse_in_pico);
#else
clear_mfunc(mouse_in_content);
#endif
#endif
#ifdef _WINDOWS
mswin_cleardndcallback ();
mswin_mousetrackcallback(NULL);
#endif
if(timeoutset && (c == NODATA || time_to_check())){
if(pico_new_mail())
emlwrite("You may possibly have new mail.", NULL);
}
if(km_popped)
switch(c){
case NODATA:
case (CTRL|'L'):
km_popped++;
break;
default:
/* clear bottom three lines */
mlerase();
break;
}
if(c == NODATA)
continue;
if(mpresf){ /* erase message line? */
if(mpresf++ > MESSDELAY)
mlerase();
}
f = FALSE;
n = 1;
#ifdef MOUSE
clear_mfunc(mouse_in_content);
#endif
/* Do it. */
execute(normalize_cmd(c, fkm, 1), f, n);
}
}
/*
* Parse the command line args.
*
* Args ac
* av
* starton -- place to return starton value
* viewflag -- place to return viewflag value
*
* Result: command arguments parsed
* possible printing of help for command line
* various global flags set
* returns the name of any file to open, else NULL
*/
char *
pico_args(ac, av, starton, viewflag, setlocale_collate, setlocale_ctype)
int ac;
char **av;
int *starton;
int *viewflag;
int *setlocale_collate;
int *setlocale_ctype;
{
int c, usage = 0;
char *str;
char tmp_1k_buf[1000]; /* tmp buf to contain err msgs */
Loop:
/* while more arguments with leading - or + */
while(--ac > 0 && (**++av == '-' || **av == '+')){
if(**av == '+'){
if(*++*av)
str = *av;
else if(--ac)
str = *++av;
else{
sprintf(tmp_1k_buf, args_pico_missing_arg, '+');
pico_display_args_err(tmp_1k_buf, NULL, 1);
usage++;
goto Loop;
}
if(!isdigit((unsigned char)str[0])){
sprintf(tmp_1k_buf, args_pico_missing_num, '+');
pico_display_args_err(tmp_1k_buf, NULL, 1);
usage++;
}
if(starton)
*starton = atoi(str);
goto Loop;
}
/* while more chars in this argument */
else while(*++*av){
if(strcmp(*av, "version") == 0){
pico_vers_help();
}
else if(strcmp(*av, "setlocale_ctype") == 0){
*setlocale_ctype = 1;
goto Loop;
}
else if(strcmp(*av, "no_setlocale_collate") == 0){
*setlocale_collate = 0;
goto Loop;
}
#if defined(DOS) || defined(OS2)
else if(strcmp(*av, "cnf") == 0
|| strcmp(*av, "cnb") == 0
|| strcmp(*av, "crf") == 0
|| strcmp(*av, "crb") == 0){
char *cmd = *av; /* save it to use below */
if(--ac){
str = *++av;
if(cmd[1] == 'n'){
if(cmd[2] == 'f')
pico_nfcolor(str);
else if(cmd[2] == 'b')
pico_nbcolor(str);
}
else if(cmd[1] == 'r'){
if(cmd[2] == 'f')
pico_rfcolor(str);
else if(cmd[2] == 'b')
pico_rbcolor(str);
}
}
else{
sprintf(tmp_1k_buf, args_pico_missing_color, cmd);
pico_display_args_err(tmp_1k_buf, NULL, 1);
usage++;
}
goto Loop;
}
#endif
/*
* Single char options.
*/
switch(c = **av){
/*
* These don't take arguments.
*/
case 'a':
gmode ^= MDDOTSOK; /* show dot files */
break;
case 'b':
gmode ^= MDREPLACE; /* -b for replace string in where is command */
break;
case 'd': /* -d for rebind delete key */
bindtokey(0x7f, forwdel);
break;
case 'e': /* file name completion */
gmode ^= MDCMPLT;
break;
case 'f': /* -f for function key use */
gmode ^= MDFKEY;
break;
case 'g': /* show-cursor in file browser */
gmode ^= MDSHOCUR;
break;
case 'h':
usage++;
break;
case 'j': /* allow "Goto" in file browser */
gmode ^= MDGOTO;
break;
case 'k': /* kill from dot */
gmode ^= MDDTKILL;
break;
case 'm': /* turn on mouse support */
gmode ^= MDMOUSE;
break;
case 'p':
preserve_start_stop = 1;
break;
case 'q': /* -q for termcap takes precedence */
gmode ^= MDTCAPWINS;
break;
case 't': /* special shutdown mode */
gmode ^= MDTOOL;
rebindfunc(wquit, quickexit);
break;
case 'v': /* -v for View File */
case 'V':
*viewflag = !*viewflag;
break; /* break back to inner-while */
case 'w': /* -w turn off word wrap */
gmode ^= MDWRAP;
break;
case 'x': /* suppress keyhelp */
sup_keyhelp = !sup_keyhelp;
break;
case 'z': /* -z to suspend */
gmode ^= MDSSPD;
break;
/*
* These do take arguments.
*/
case 'r': /* set fill column */
case 'n': /* -n for new mail notification */
case 's' : /* speller */
case 'o' : /* operating tree */
case 'Q' : /* Quote string */
if(*++*av)
str = *av;
else if(--ac)
str = *++av;
else{
if(c == 'r')
str= "72";
else if(c == 'n')
str = "180";
else{
sprintf(tmp_1k_buf, args_pico_missing_arg, c);
pico_display_args_err(tmp_1k_buf, NULL, 1);
usage++;
goto Loop;
}
}
switch(c){
case 's':
alt_speller = str;
break;
case 'o':
strncpy(opertree, str, NLINE);
gmode ^= MDTREE;
break;
case 'Q':
strncpy(glo_quote_str_buf, str, NLINE);
glo_quote_str = glo_quote_str_buf;
break;
/* numeric args */
case 'r':
case 'n':
if(!isdigit((unsigned char)str[0])){
sprintf(tmp_1k_buf, args_pico_missing_num, c);
pico_display_args_err(tmp_1k_buf, NULL, 1);
usage++;
}
if(c == 'r'){
if((userfillcol = atoi(str)) < 1)
userfillcol = 72;
}
else{
timeoutset = 1;
timeo = 180;
if((timeo = atoi(str)) < 30)
timeo = 180;
}
break;
}
goto Loop;
default: /* huh? */
sprintf(tmp_1k_buf, args_pico_missing_flag, c);
pico_display_args_err(tmp_1k_buf, NULL, 1);
usage++;
break;
}
}
}
if(usage)
pico_args_help();
/* return the first filename for editing */
if(ac > 0)
return(*av);
else
return(NULL);
}
#ifdef _WINDOWS
/*
*
*/
int
pico_file_drop(x, y, filename)
int x, y;
char *filename;
{
/*
* if current buffer is unchanged
* *or* "new buffer" and no current text
*/
if(((curwp->w_bufp->b_flag & BFCHG) == 0)
|| (curwp->w_bufp->b_fname[0] == '\0'
&& curwp->w_bufp->b_linep == lforw(curwp->w_bufp->b_linep)
&& curwp->w_doto == 0)){
register BUFFER *bp = curwp->w_bufp;
char bname[NBUFN];
makename(bname, filename);
strcpy(bp->b_bname, bname);
strcpy(bp->b_fname, filename);
bp->b_flag &= ~BFCHG; /* turn off change bit */
if (readin(filename, 1, 1) == ABORT) {
strcpy(bp->b_bname, "");
strcpy(bp->b_fname, "");
}
bp->b_dotp = bp->b_linep;
bp->b_doto = 0;
}
else{
ifile(filename);
curwp->w_flag |= WFHARD;
update();
emlwrite("Inserted dropped file \"%s\"", filename);
}
curwp->w_flag |= WFHARD;
update(); /* restore cursor */
return(1);
}
#endif
/*----------------------------------------------------------------------
print a few lines of help for command line arguments
Args: none
Result: prints help messages
----------------------------------------------------------------------*/
void
pico_args_help()
{
/** print out possible starting arguments... **/
pico_display_args_err(NULL, args_pico_args, 0);
exit(1);
}
void
pico_vers_help()
{
char v0[100];
char *v[2];
sprintf(v0, "Pico %.50s", version);
v[0] = v0;
v[1] = NULL;
pico_display_args_err(NULL, v, 0);
exit(1);
}
/*----------------------------------------------------------------------
write argument error to the display...
Args: none
Result: prints help messages
----------------------------------------------------------------------*/
void
pico_display_args_err(s, a, err)
char *s;
char **a;
int err;
{
char errstr[256], *errp;
FILE *fp = err ? stderr : stdout;
#ifdef _WINDOWS
char tmp_20k_buf[20480];
#endif
if(err && s)
sprintf(errp = errstr, "Argument Error: %.200s", s);
else
errp = s;
#ifdef _WINDOWS
if(errp)
mswin_messagebox(errp, err);
if(a && *a){
strcpy(tmp_20k_buf, *a++);
while(a && *a){
strcat(tmp_20k_buf, "\n");
strcat(tmp_20k_buf, *a++);
}
mswin_messagebox(tmp_20k_buf, err);
}
#else
if(errp)
fprintf(fp, "%s\n", errp);
while(a && *a)
fprintf(fp, "%s\n", *a++);
#endif
}
+94
View File
@@ -0,0 +1,94 @@
## $Id: makefile.3b1 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Convergent Technologies made for AT&T 3b1 and 7300 computers
# version of the PINE composer library and stand-alone editor pico.
#
# Port Contributor: Robert Lewis <robertle@sco.com>
#
include $(MAKEINC)/Makepre.h
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O2
PROFILE= # -pg
DEBUG= # -g -DDEBUG
STDCFLAGS= -Dct -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= :
LIBS= $(EXTRALDFLAGS) -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(LD) $(LDFLAGS) -s libpico.a $(SHAREDLIB) -o pico
# $(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(LD) $(LDFLAGS) -s libpico.a $(SHAREDLIB) -o pilot
# $(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-3b1.h
$(RM) os.h
$(LN) osdep/os-3b1.h os.h
pico_os.c: osdep/os-3b1.c
$(RM) pico_os.c
$(LN) osdep/os-3b1.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-3b1.c: osdep/header osdep/unix osdep/read.sel osdep/raw.io \
osdep/spell.unx osdep/term.cap \
osdep/os-3b1.ic
cd osdep; $(MAKE) includer os-3b1.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.a32 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for AIX 3.2 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -D_ALL_SOURCE -Da32 -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= :
LIBS= $(EXTRALDFLAGS) -lcurses -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-a32.h
$(RM) os.h
$(LN) osdep/os-a32.h os.h
pico_os.c: osdep/os-a32.c
$(RM) pico_os.c
$(LN) osdep/os-a32.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-a32.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-a32.ic
cd osdep; $(MAKE) includer os-a32.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.a41 13476 2004-02-24 22:11:23Z jpf $
#
# 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.
#
#
# Makefile for AIX 4.1 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -D_ALL_SOURCE -Da41 -DJOB_CONTROL -DPOSIX -DMOUSE -qro -qroconst
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= :
LIBS= $(EXTRALDFLAGS) -lcurses -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-a41.h
$(RM) os.h
$(LN) osdep/os-a41.h os.h
pico_os.c: osdep/os-a41.c
$(RM) pico_os.c
$(LN) osdep/os-a41.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-a41.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.inf \
osdep/os-a41.ic
cd osdep; $(MAKE) includer os-a41.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.aix 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for AIX 370 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -I/usr/include -Daix -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-aix.h
$(RM) os.h
$(LN) osdep/os-aix.h os.h
pico_os.c: osdep/os-aix.c
$(RM) pico_os.c
$(LN) osdep/os-aix.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-aix.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/os-aix.ic
cd osdep; $(MAKE) includer os-aix.c; cd ..
+89
View File
@@ -0,0 +1,89 @@
## $Id: makefile.att 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for ?? version of the PINE composer library and
# stand-alone editor pico.
# Port Contributor: Robert Lewis <robertle@sco.com>
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= # -g -DDEBUG
STDCFLAGS= -Dsv3 -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= :
LIBS= $(EXTRALDFLAGS) -ltermcap -lc -lc_s
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-att.h
$(RM) os.h
$(LN) osdep/os-att.h os.h
pico_os.c: osdep/os-att.c
$(RM) pico_os.c
$(LN) osdep/os-att.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-att.c: osdep/header osdep/unix osdep/read.sel osdep/raw.io \
osdep/spell.unx osdep/term.cap \
osdep/os-att.ic
cd osdep; $(MAKE) includer os-att.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.aux 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for A/UX version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dconst= -DAUX -DJOB_CONTROL -D_POSIX_SOURCE -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= -ru
RANLIB= /bin/true
LIBS= $(EXTRALDFLAGS) -ltermcap -lposix
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-aux.h
$(RM) os.h
$(LN) osdep/os-aux.h os.h
pico_os.c: osdep/os-aux.c
$(RM) pico_os.c
$(LN) osdep/os-aux.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-aux.c: osdep/header osdep/unix osdep/read.sel osdep/raw.io \
osdep/spell.unx osdep/term.cap \
osdep/os-aux.ic
cd osdep; $(MAKE) includer os-aux.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.bs2 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for BSDI V2-V4 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -DBSDI -DBSDI2 -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-bs2.h
$(RM) os.h
$(LN) osdep/os-bs2.h os.h
pico_os.c: osdep/os-bs2.c
$(RM) pico_os.c
$(LN) osdep/os-bs2.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-bs2.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-bs2.ic
cd osdep; $(MAKE) includer os-bs2.c; cd ..
+89
View File
@@ -0,0 +1,89 @@
# $Id: makefile.bsd 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for BSD 4.3 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dconst= -Dbsd -DJOB_CONTROL
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-bsd.h
$(RM) os.h
$(LN) osdep/os-bsd.h os.h
pico_os.c: osdep/os-bsd.c
$(RM) pico_os.c
$(LN) osdep/os-bsd.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-bsd.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/getcwd \
osdep/os-bsd.ic
cd osdep; $(MAKE) includer os-bsd.c; cd ..
+90
View File
@@ -0,0 +1,90 @@
# $Id: makefile.bsf 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for FreeBSD shared-lib version of the PINE composer library and
# stand-alone editor pico.
#
# Port Contributor: Josh Gilliam <soil@quick.net>
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -DDEBUG # -g
STDCFLAGS= -DBSDI -DBSDI2 -DPOSIX -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-bsf.h
$(RM) os.h
$(LN) osdep/os-bsf.h os.h
pico_os.c: osdep/os-bsf.c
$(RM) pico_os.c
$(LN) osdep/os-bsf.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-bsf.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-bsf.ic
cd osdep; $(MAKE) includer os-bsf.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.bsi 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for BSDI V1 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -DBSDI -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-bsi.h
$(RM) os.h
$(LN) osdep/os-bsi.h os.h
pico_os.c: osdep/os-bsi.c
$(RM) pico_os.c
$(LN) osdep/os-bsi.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-bsi.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/os-bsi.ic
cd osdep; $(MAKE) includer os-bsi.c; cd ..
+102
View File
@@ -0,0 +1,102 @@
# $Id: makefile.bso 11894 2001-10-23 22:18:36Z hubert $
#
# 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-1999 by the University of Washington.
#
# The full text of our legal notices is contained in the file called
# CPYRIGHT, included with this distribution.
#
#
# Makefile for OpenBSD shared-lib version of the PINE composer library and
# stand-alone editor pico.
#
# Port Contributor: Marco S Hyman <marc@snafu.org>
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -DDEBUG # -g
STDCFLAGS= -DBSDI -DBSDI2 -DPOSIX -DJOB_CONTROL -DMOUSE
CFLAGS+= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
SOFILES= ${OFILES:.o=.so}
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
# Need this for the shared library rule to work correctly
.SUFFIXES: .o .so
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o -L. -lpico $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o -L. -lpico $(LIBS) -o pilot
.c.so: ; $(CC) -fpic -DPIC -c $(CFLAGS) ${@:.so=.c} -o $@
.c.o: ; $(CC) -c $(CFLAGS) $*.c
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
libpico.so.1.3: $(SOFILES)
ld -Bshareable -x -o libpico.so.1.3 $(SOFILES)
clean:
rm -f *.a *.so.1.3 *.o *.so *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-bso.h
$(RM) os.h
$(LN) osdep/os-bso.h os.h
pico_os.c: osdep/os-bso.c
$(RM) pico_os.c
$(LN) osdep/os-bso.c pico_os.c
$(SOFILES) $(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-bso.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-bso.ic
cd osdep; $(MAKE) includer os-bso.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.cvx 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Convex version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -cxdb -DDEBUG
STDCFLAGS= -Dconst= -Dcvx -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot .XCdb/*
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-cvx.h
$(RM) os.h
$(LN) osdep/os-cvx.h os.h
pico_os.c: osdep/os-cvx.c
$(RM) pico_os.c
$(LN) osdep/os-cvx.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-cvx.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-cvx.ic
cd osdep; $(MAKE) includer os-cvx.c; cd ..
+90
View File
@@ -0,0 +1,90 @@
# $Id: makefile.cyg 12623 2002-11-15 16:34:35Z hubert $
#
# 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.
#
#
# Makefile for Cygwin version of the PINE composer library and
# stand-alone editor pico.
#
# Port Contributor: Eduardo Chappa <chappa@math.washington.edu>
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -DCYGWIN -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALIBES) -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico.exe pilot.exe
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-cyg.h
$(RM) os.h
$(LN) osdep/os-cyg.h os.h
pico_os.c: osdep/os-cyg.c
$(RM) pico_os.c
$(LN) osdep/os-cyg.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-cyg.c: osdep/header osdep/unix osdep/read.sel osdep/raw.io \
osdep/spell.unx osdep/term.cap \
osdep/os-cyg.ic
cd osdep; $(MAKE) includer os-cyg.c; cd ..
+91
View File
@@ -0,0 +1,91 @@
# $Id: makefile.d-g 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for DG/UX version of the PINE composer library and
# stand-alone editor pico.
#
# [Port courtesy of Jeff Ferguson <jef@zeus.agfx.com>]
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dsv4 -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
LIBS= $(EXTRALDFLAGS) -l`case \`uname -r\` in R4.11*) echo "nsl"\
;; *) echo "nsl_s";;esac` -lgen -lcurses
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sv4.h
$(RM) os.h
$(LN) osdep/os-sv4.h os.h
pico_os.c: osdep/os-sv4.c
$(RM) pico_os.c
$(LN) osdep/os-sv4.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sv4.c: osdep/header osdep/unix osdep/read.pol osdep/raw.ios \
osdep/spell.unx osdep/term.inf \
osdep/os-sv4.ic
cd osdep; $(MAKE) includer os-sv4.c; cd ..
+95
View File
@@ -0,0 +1,95 @@
# $Id: makefile.dpx 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Bull DPX/2 B.O.S version of the PINE composer library and
# stand-alone editor pico.
#
# [Port courtesy of David Brownlee <david@mono.org> ]
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
#for GNU C
#CC= gcc
#STDCFLAGS= -Ddpx -DJOB_CONTROL -DPOSIX -ansi -DMOUSE
#otherwise
STDCFLAGS= -Dconst= -Ddpx -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
LIBS= $(EXTRALDFLAGS) -lcurses
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-dpx.h
$(RM) os.h
$(LN) osdep/os-dpx.h os.h
pico_os.c: osdep/os-dpx.c
$(RM) pico_os.c
$(LN) osdep/os-dpx.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-dpx.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-dpx.ic
cd osdep; $(MAKE) includer os-dpx.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.dyn 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Dynix version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dconst= -Ddyn -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-dyn.h
$(RM) os.h
$(LN) osdep/os-dyn.h os.h
pico_os.c: osdep/os-dyn.c
$(RM) pico_os.c
$(LN) osdep/os-dyn.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-dyn.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap osdep/getcwd \
osdep/os-dyn.ic
cd osdep; $(MAKE) includer os-dyn.c; cd ..
+91
View File
@@ -0,0 +1,91 @@
# $Id: makefile.epx 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for EP/IX version of the PINE composer library and
# stand-alone editor pico.
#
# [Port courtesy of Ed Greshko <Edward.M.Greshko@cdc.com> - hubert, 960313]
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dsv4 -DJOB_CONTROL -DPOSIX -DMOUSE -systype svr4
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS) \
-Olimit 800
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
LIBS= $(EXTRALDFLAGS) -ltermlib
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sv4.h
$(RM) os.h
$(LN) osdep/os-sv4.h os.h
pico_os.c: osdep/os-sv4.c
$(RM) pico_os.c
$(LN) osdep/os-sv4.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sv4.c: osdep/header osdep/unix osdep/read.pol osdep/raw.ios \
osdep/spell.unx osdep/term.inf \
osdep/os-sv4.ic
cd osdep; $(MAKE) includer os-sv4.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.ga4 13483 2004-02-25 22:33:10Z jpf $
#
# 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.
#
#
# Makefile for AIX 4.1 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -D_ALL_SOURCE -Da41 -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= :
LIBS= $(EXTRALDFLAGS) -lcurses -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-a41.h
$(RM) os.h
$(LN) osdep/os-a41.h os.h
pico_os.c: osdep/os-a41.c
$(RM) pico_os.c
$(LN) osdep/os-a41.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-a41.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.inf \
osdep/os-a41.ic
cd osdep; $(MAKE) includer os-a41.c; cd ..
+89
View File
@@ -0,0 +1,89 @@
# $Id: makefile.gen 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for a generic version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -DGEN -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermlib
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-gen.h
$(RM) os.h
$(LN) osdep/os-gen.h os.h
pico_os.c: osdep/os-gen.c
$(RM) pico_os.c
$(LN) osdep/os-gen.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
# The dependencies here will be slightly different for each port.
osdep/os-gen.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-gen.ic
cd osdep; $(MAKE) includer os-gen.c; cd ..
+89
View File
@@ -0,0 +1,89 @@
# $Id: makefile.gh9 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for HP/UX 9.x version of the PINE composer library and
# stand-alone editor pico. (using gcc)
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
CC= gcc
STDCFLAGS= -Dhpp -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= :
LIBS= $(EXTRALDFLAGS) -ltermcap -lV3
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $& $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-hpp.h
$(RM) os.h
$(LN) osdep/os-hpp.h os.h
pico_os.c: osdep/os-hpp.c
$(RM) pico_os.c
$(LN) osdep/os-hpp.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-hpp.c: osdep/header osdep/unix osdep/read.sel osdep/raw.io \
osdep/spell.unx osdep/term.cap \
osdep/os-hpp.ic
cd osdep; $(MAKE) includer os-hpp.c; cd ..
+94
View File
@@ -0,0 +1,94 @@
# $Id: makefile.go5 11894 2001-10-23 22:18:36Z hubert $
#
# 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-2001 by the University of Washington.
#
# The full text of our legal notices is contained in the file called
# CPYRIGHT, included with this distribution.
#
#
# Makefile for Open Server 5 with gcc version of the PINE composer library and
# stand-alone editor pico.
#
# Port courtesy of Tim Rice <tim@multitalents.net>.
#
RM= rm -f
LN= ln -s
MAKE= make
SHELL= /bin/sh
OPTIMIZE= # -O3
PROFILE= # -pg
DEBUG= # -g -DDEBUG
STDCFLAGS= -Dsco -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
# When USE_TERMINFO is defined link with library tinfo.
LIBS= $(EXTRALDFLAGS) -ltinfo -lc
# When USE_TERMCAP is defined link with library termcap.
#LIBS= $(EXTRALIBES) -ltermcap -lc -lc_s -lx
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sc5.h
$(RM) os.h
$(LN) osdep/os-sc5.h os.h
pico_os.c: osdep/os-sc5.c
$(RM) pico_os.c
$(LN) osdep/os-sc5.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sc5.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.inf \
osdep/os-sc5.ic
cd osdep; $(MAKE) includer os-sc5.c; cd ..
+99
View File
@@ -0,0 +1,99 @@
# $Id: makefile.gso 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Sun Solaris version of the PINE composer library and
# stand-alone editor pico. (using gcc)
#
# [Port courtesy of Marc Unangst <mju@mudos.ann-arbor.mi.us> - mss, 921020]
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
CC= gcc
LDCC= gcc
# LDCC= /usr/bin/cc
# If you don't have /usr/bin/cc (our Solaris 2.2 doesn't seem to have it,
# it only has /usr/ucb/cc) then change LDCC to the following line and
# give that a try. This is still using the Solaris compiler but
# leaving out the UCB compatibility includes and libraries.
# LDCC= cc5.sol
STDCFLAGS= -Dsv4 -DPOSIX -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
LIBS= $(EXTRALDFLAGS) -ltermlib
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $& $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-gso.h
$(RM) os.h
$(LN) osdep/os-gso.h os.h
pico_os.c: osdep/os-sv4.c
$(RM) pico_os.c
$(LN) osdep/os-sv4.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sv4.c: osdep/header osdep/unix osdep/read.pol osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-sv4.ic
cd osdep; $(MAKE) includer os-sv4.c; cd ..
+89
View File
@@ -0,0 +1,89 @@
# $Id: makefile.gsu 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for SunOS 4.1 version of the PINE composer library and
# stand-alone editor pico. (using gcc)
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
CC= gcc
STDCFLAGS= -Dsun -Dgsu -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc -ldl
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-gsu.h
$(RM) os.h
$(LN) osdep/os-gsu.h os.h
pico_os.c: osdep/os-sun.c
$(RM) pico_os.c
$(LN) osdep/os-sun.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sun.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/os-sun.ic
cd osdep; $(MAKE) -f makefile.dl includer os-sun.c; cd ..
+89
View File
@@ -0,0 +1,89 @@
# $Id: makefile.gul 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for RISC Ultrix 4.1 version of the PINE composer library and
# stand-alone editor pico. (using gcc)
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
CC= gcc
STDCFLAGS= -Dult -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-ult.h
$(RM) os.h
$(LN) osdep/os-ult.h os.h
pico_os.c: osdep/os-ult.c
$(RM) pico_os.c
$(LN) osdep/os-ult.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-ult.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/os-ult.ic
cd osdep; $(MAKE) includer os-ult.c; cd ..
+90
View File
@@ -0,0 +1,90 @@
# $Id: makefile.hpp 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for HP/UX version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dconst= -Aa -D_HPUX_SOURCE -Dhpp -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= :
LIBS= $(EXTRALDFLAGS) -ltermcap -lV3
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(PURIFY) $(PURIFYOPTIONS) $(CC) $(CFLAGS) main.o \
libpico.a $(LIBS) -o pico
pilot: pilot.o
$(PURIFY) $(PURIFYOPTIONS) $(CC) $(CFLAGS) pilot.o \
libpico.a $(LIBS) -o pilot
libpico.a: $& $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-hpp.h
$(RM) os.h
$(LN) osdep/os-hpp.h os.h
pico_os.c: osdep/os-hpp.c
$(RM) pico_os.c
$(LN) osdep/os-hpp.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-hpp.c: osdep/header osdep/unix osdep/read.sel osdep/raw.io \
osdep/spell.unx osdep/term.cap \
osdep/os-hpp.ic
cd osdep; $(MAKE) includer os-hpp.c; cd ..
+89
View File
@@ -0,0 +1,89 @@
# $Id: makefile.isc 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for ISC Unix version of the PINE composer library and
# stand-alone editor pico.
# Contributed by Andy Brager <andyb@wndrsvr.la.ca.us>
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -I/usr/include -Disc -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= echo
LIBS= $(EXTRALDFLAGS) -ltermcap -lc -lcposix -linet
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-isc.h
$(RM) os.h
$(LN) osdep/os-isc.h os.h
pico_os.c: osdep/os-isc.c
$(RM) pico_os.c
$(LN) osdep/os-isc.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-isc.c: osdep/header osdep/unix osdep/read.sel osdep/raw.io \
osdep/spell.unx osdep/term.cap osdep/truncate \
osdep/os-isc.ic
cd osdep; $(MAKE) includer os-isc.c; cd ..
+94
View File
@@ -0,0 +1,94 @@
# $Id: makefile.lnx 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Linux version of the PINE composer library and
# stand-alone editor pico.
#
# NOTE: We are told that it may be advantageous to use the -q flag
# when running pico or pilot on a Linux console, and to turn on the
# feature "termdef-takes-precedence" when running pine. That
# feature doesn't show up in the Config screen, you need to turn
# it on in the pine.conf file or by editing the .pinerc file.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dlnx -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -lncurses
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-lnx.h
$(RM) os.h
$(LN) osdep/os-lnx.h os.h
pico_os.c: osdep/os-lnx.c
$(RM) pico_os.c
$(LN) osdep/os-lnx.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-lnx.c: osdep/header osdep/unix osdep/read.sel osdep/raw.io \
osdep/spell.unx osdep/term.inf \
osdep/os-lnx.ic
cd osdep; $(MAKE) includer os-lnx.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.lyn 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Lynxos version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dbsd -Dlyn -DJOB_CONTROL
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-lyn.h
$(RM) os.h
$(LN) osdep/os-lyn.h os.h
pico_os.c: osdep/os-lyn.c
$(RM) pico_os.c
$(LN) osdep/os-lyn.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-lyn.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap osdep/getcwd \
osdep/os-lyn.ic
cd osdep; $(MAKE) includer os-lyn.c; cd ..
+89
View File
@@ -0,0 +1,89 @@
# $Id: makefile.mct 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Machten version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dmct -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-mct.h
$(RM) os.h
$(LN) osdep/os-mct.h os.h
pico_os.c: osdep/os-nxt.c
$(RM) pico_os.c
$(LN) osdep/os-nxt.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-nxt.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/getcwd \
osdep/os-nxt.ic
cd osdep; $(MAKE) includer os-nxt.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.mnt 11894 2001-10-23 22:18:36Z hubert $
#
# 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-1999 by the University of Washington.
#
# The full text of our legal notices is contained in the file called
# CPYRIGHT, included with this distribution.
#
#
# Makefile for MiNT version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dmnt -DJOB_CONTROL -DPOSIX
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-mnt.h
$(RM) os.h
$(LN) osdep/os-mnt.h os.h
pico_os.c: osdep/os-mnt.c
$(RM) pico_os.c
$(LN) osdep/os-mnt.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-mnt.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/os-mnt.ic
cd osdep; $(MAKE) includer os-mnt.c; cd ..
+116
View File
@@ -0,0 +1,116 @@
# $Id: makefile.msc 7883 1998-02-28 00:10:21Z hubert $
#
# 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.
#
#
#
# Makefile for MS-DOS version of the PINE composer library and
# stand-alone editor pico.
#
# MSC version of makefile
#
CC=cl
RM=del
CP=copy
#includes mouse support
MOUSE= -DMOUSE
#includes symbol info for debugging
DEBUG= #-Zi -Od
!IF DEFINED(PCTCP)
NET= -DPCTCP
!ELSE
NET=
!ENDIF
#in general, no debugging and optimize for size
CFLAGS= -Os $(DEBUG) -WX -AL -Gt4 -Gy $(NET) -DJOB_CONTROL -DDOS $(MOUSE)
# switches for library building
LIBER=lib
LIBARGS=/NOL -+
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
CFILES= attach.c basic.c bind.c browse.c \
buffer.c composer.c display.c file.c fileio.c \
line.c pico_os.c pico.c random.c region.c \
search.c window.c word.c
OFILES= attach.obj basic.obj bind.obj browse.obj \
buffer.obj composer.obj display.obj file.obj fileio.obj \
line.obj pico_os.obj pico.obj random.obj region.obj \
search.obj window.obj word.obj
all: blddate.exe pico.exe
.c.obj:
$(CC) -c $(CFLAGS) $*.c
$(LIBER) libpico $(LIBARGS) $*;
$(OFILES): $(HFILES)
pico.o: ebind.h
#
# dependencies for the Unix versions of pico and libpico.a
#
os.h: osdep\os-dos.h
$(RM) os.h
$(CP) osdep\os-dos.h os.h
pico_os.c: osdep\os-dos.c
$(RM) pico_os.c
$(CP) osdep\os-dos.c pico_os.c
osdep\os-dos.c: osdep\header osdep\dos osdep\dosgen osdep\term.dos
cd osdep
$(MAKE) -f makefile.dos includer.exe os-dos.c
cd ..
pico_os.o: osdep\dos_gen.h
libpico.lib: $(OFILES)
# del libpico.lib
# $(LIBER) libpico +ansi+attach+basic+bind+browse;
# $(LIBER) libpico +buffer+composer+display+file+fileio;
# $(LIBER) libpico +line+ibmpc+osdep+pico+random+region;
# $(LIBER) libpico +search+spell+window+word;
blddate.exe: blddate.c
$(CC) blddate.c
main.obj: main.c $(HFILES)
$(CC) /c $(CFLAGS) main.c
pico.exe: libpico.lib main.obj
link /I /NOI /NOE /stack:32768 main.obj,pico.exe,nul,libpico.lib;
# link /CO /I /NOI /NOE /stack:32768 main.obj,pico.exe,nul,libpico.lib;
#clean:
# $(RM) *.lib
# $(RM) *.obj
# $(RM) pico_os.c
# $(RM) os.h
#
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.neb 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for NetBSD version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dneb -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-neb.h
$(RM) os.h
$(LN) osdep/os-neb.h os.h
pico_os.c: osdep/os-neb.c
$(RM) pico_os.c
$(LN) osdep/os-neb.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-neb.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-neb.ic
cd osdep; $(MAKE) includer os-neb.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.nto 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for a QNX Neutrino version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -DNTO -DJOB_CONTROL
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -lncurses
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-nto.h
$(RM) os.h
$(LN) osdep/os-nto.h os.h
pico_os.c: osdep/os-nto.c
$(RM) pico_os.c
$(LN) osdep/os-nto.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-nto.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-nto.ic
cd osdep; $(MAKE) includer os-nto.c; cd ..
+89
View File
@@ -0,0 +1,89 @@
# $Id: makefile.nxt 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for NeXT version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dnxt -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-nxt.h
$(RM) os.h
$(LN) osdep/os-nxt.h os.h
pico_os.c: osdep/os-nxt.c
$(RM) pico_os.c
$(LN) osdep/os-nxt.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-nxt.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/getcwd \
osdep/os-nxt.ic
cd osdep; $(MAKE) includer os-nxt.c; cd ..
+134
View File
@@ -0,0 +1,134 @@
# $Id: makefile.os2 7883 1998-02-28 00:10:21Z hubert $
#
# 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.
#
#
# Makefile for OS/2 version of the PINE composer library and
# stand-alone editor pico.
#
# Common macros
CC= gcc
CP= cp
MAKE= make
MV= mv
RM= rm -f
OS= os2
# emx OMF format build
# Used to build .dlls with data exports
DEBUG=
ZOMF= -Zomf
O= .obj
A= .lib
E= .exe
D= .dll
AR= emxomfar r
ZLIB= -Zcrtdll
ZOPT= -O3 -fno-strength-reduce -mprobe
ZDEF= -DOS2 -DOMF
.SUFFIXES: .c .obj .exe
# emx AOUT format build
# Useful for debugging with gdb
#DEBUG= -g
#ZOMF=
#O= .o
#A= .a
#D= .dll
#E= .exe
#AR= ar rus
#ZLIB= -Zcrtdll
#ZOPT= -O3 -fno-strength-reduce -mprobe
#ZDEF= -DOS2
#.SUFFIXES: .c .o .exe
.c$O: ; $(CC) $(ZOMF) $(CFLAGS) -c $<
#includes symbol for debugging
#for normal build
MOUSE= -DMOUSE
DASHO= $(ZOPT) $(DEBUG)
CFLAGS= $(ZDEF) -Dbsd -DFASTVIO -DHELPFILE -DJOB_CONTROL -DANSI $(MOUSE) $(DASHO)
LDFLAGS= $(ZOMF) $(ZLIB) $(DEBUG)
ARCHIVE= picolib$A
# switches for library building
LIBS=
OFILES= attach$O basic$O bind$O browse$O buffer$O \
composer$O display$O file$O fileio$O line$O pico_os$O \
pico$O random$O region$O search$O \
window$O word$O
CFILES= attach.c basic.c bind.c browse.c buffer.c \
composer.c display.c file.c fileio.c line.c pico_os.c \
pico.c random.c region.c search.c \
window.c word.c
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and pico.lib
#
all: blddate$E pico$E pilot$E
$(ARCHIVE): $(OFILES) picolib.def
$(CC) -Zdll -o picolib$D $(OFILES) picolib.def $(LDFLAGS)
emximp -o picolib$A picolib.def
pico$E: main.c $(ARCHIVE)
$(CC) $(CFLAGS) main.c -L. -lpicolib $(LIBS) -o pico$E $(LDFLAGS)
pilot$E: pilot.c $(ARCHIVE) osdep.h
$(CC) $(CFLAGS) pilot.c -L. -lpicolib $(LIBS) -o pilot$E $(LDFLAGS)
blddate$E: blddate.c
$(CC) $(CFLAGS) blddate.c -o blddate$E $(LDFLAGS) -lsocket
$(OFILES): osdep.h $(HFILES)
pico.o: ebind.h
clean:
rm -f *$E *$A *$D *$O *~ *.bak osdep.c osdep.h pico pilot
os.h: osdep/os-os2.h
$(RM) os.h
$(CP) osdep/os-os2.h os.h
pico_os.c: osdep/os-os2.c
$(RM) pico_os.c
$(CP) osdep/os-os2.c pico_os.c
osdep/os-os2.c: \
osdep/header osdep/os2 osdep/term.dos osdep/spell.os2 \
osdep/os-os2.ic
( cd osdep && $(MAKE) -f makefile.os2 includer.exe os-os2.c )
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.osf 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for OSF/1 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dosf -D_BSD -DPOSIX -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -lcurses -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-osf.h
$(RM) os.h
$(LN) osdep/os-osf.h os.h
pico_os.c: osdep/os-osf.c
$(RM) pico_os.c
$(LN) osdep/os-osf.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-osf.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-osf.ic
cd osdep; $(MAKE) includer os-osf.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.osx 12485 2002-09-20 18:23:11Z hubert $
#
# 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.
#
#
# Makefile for BSD 4.3 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dbsd -DJOB_CONTROL
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -lncurses
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-osx.h
$(RM) os.h
$(LN) osdep/os-osx.h os.h
pico_os.c: osdep/os-osx.c
$(RM) pico_os.c
$(LN) osdep/os-osx.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-osx.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/os-osx.ic
cd osdep; $(MAKE) includer os-osx.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.pt1 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Sequent Dynix/PTX 1.4 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dptx -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
LIBS= $(EXTRALDFLAGS) -ltermlib -linet
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-pt1.h
$(RM) os.h
$(LN) osdep/os-pt1.h os.h
pico_os.c: osdep/os-pt1.c
$(RM) pico_os.c
$(LN) osdep/os-pt1.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-pt1.c: osdep/header osdep/unix osdep/read.pol osdep/raw.io \
osdep/spell.unx osdep/term.inf \
osdep/os-pt1.ic
cd osdep; $(MAKE) includer os-pt1.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.ptx 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Sequent Dynix/PTX version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dptx -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
LIBS= $(EXTRALDFLAGS) -ltermlib -linet
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $& $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-ptx.h
$(RM) os.h
$(LN) osdep/os-ptx.h os.h
pico_os.c: osdep/os-ptx.c
$(RM) pico_os.c
$(LN) osdep/os-ptx.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-ptx.c: osdep/header osdep/unix osdep/read.pol osdep/raw.io \
osdep/spell.unx osdep/term.inf \
osdep/os-ptx.ic
cd osdep; $(MAKE) includer os-ptx.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.s40 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for SunOS 4.0 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dconst= -Ds40 -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-s40.h
$(RM) os.h
$(LN) osdep/os-s40.h os.h
pico_os.c: osdep/os-s40.c
$(RM) pico_os.c
$(LN) osdep/os-s40.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-s40.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/os-s40.ic
cd osdep; $(MAKE) -f makefile.dl includer os-s40.c; cd ..
+94
View File
@@ -0,0 +1,94 @@
# $Id: makefile.sc5 13443 2004-01-30 19:43:25Z jpf $
#
# 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.
#
#
# Makefile for SCO 3.2v5.0.x version of the PINE composer library and
# stand-alone editor pico.
#
# Port courtesy of J. Kean Johnston <jkj@sco.COM>, 970319
#
RM= rm -f
LN= ln -s
MAKE= make
SHELL= /bin/sh
OPTIMIZE= -O3
PROFILE= # -pg
DEBUG= # -g -DDEBUG
STDCFLAGS= -belf -Dsco -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
# When USE_TERMINFO is defined link with library tinfo.
LIBS= $(EXTRALDFLAGS) -ltinfo -lc
# When USE_TERMCAP is defined link with library termcap.
#LIBS= $(EXTRALIBES) -ltermcap -lc -lc_s -lx
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sc5.h
$(RM) os.h
$(LN) osdep/os-sc5.h os.h
pico_os.c: osdep/os-sc5.c
$(RM) pico_os.c
$(LN) osdep/os-sc5.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sc5.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.inf \
osdep/os-sc5.ic
cd osdep; $(MAKE) includer os-sc5.c; cd ..
+93
View File
@@ -0,0 +1,93 @@
# $Id: makefile.sco 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for SCO 3.2vx version of the PINE composer library and
# stand-alone editor pico.
#
# Port courtesy of Robert Lewis <robertle@sco.COM>, 921217
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dsco -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
# When USE_TERMINFO is defined link with library tinfo.
LIBS= $(EXTRALDFLAGS) -lc -lc_s -lx -lm -ltinfo
# When USE_TERMCAP is defined link with library termcap.
#LIBS= $(EXTRALIBES) -lc -lc_s -lx -lm -ltermcap
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sco.h
$(RM) os.h
$(LN) osdep/os-sco.h os.h
pico_os.c: osdep/os-sco.c
$(RM) pico_os.c
$(LN) osdep/os-sco.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sco.c: osdep/header osdep/unix osdep/read.sel osdep/raw.io \
osdep/spell.unx osdep/term.inf osdep/truncate osdep/fsync.non \
osdep/os-sco.ic
cd osdep; $(MAKE) includer os-sco.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.sgi 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for SGI IRIX 4.0.1 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dsgi -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= /bin/true
LIBS= $(EXTRALDFLAGS) -ltermcap -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sgi.h
$(RM) os.h
$(LN) osdep/os-sgi.h os.h
pico_os.c: osdep/os-sgi.c
$(RM) pico_os.c
$(LN) osdep/os-sgi.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sgi.c: osdep/header osdep/unix osdep/read.sel osdep/raw.ios \
osdep/spell.unx osdep/term.inf \
osdep/os-sgi.ic
cd osdep; $(MAKE) includer os-sgi.c; cd ..
+90
View File
@@ -0,0 +1,90 @@
# $Id: makefile.soc 13589 2004-04-08 16:49:39Z hubert $
#
# 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.
#
#
# Makefile for Sun Solaris version of the PINE composer library and
# stand-alone editor pico.
#
# [Port courtesy of Marc Unangst <mju@mudos.ann-arbor.mi.us> - mss, 921020]
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dconst= -Dsv4 -DPOSIX -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
LIBS= $(EXTRALDFLAGS) -ltermlib
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $& $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sol.h
$(RM) os.h
$(LN) osdep/os-sol.h os.h
pico_os.c: osdep/os-sv4.c
$(RM) pico_os.c
$(LN) osdep/os-sv4.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sv4.c: osdep/header osdep/unix osdep/read.pol osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-sv4.ic
cd osdep; $(MAKE) includer os-sv4.c; cd ..
+97
View File
@@ -0,0 +1,97 @@
# $Id: makefile.sol 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for Sun Solaris version of the PINE composer library and
# stand-alone editor pico.
#
# [Port courtesy of Marc Unangst <mju@mudos.ann-arbor.mi.us> - mss, 921020]
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
# LDCC= /usr/bin/cc
# If you don't have /usr/bin/cc (our Solaris 2.2 doesn't seem to have it,
# it only has /usr/ucb/cc) then change LDCC to the following line and
# give that a try. This is still using the Solaris compiler but
# leaving out the UCB compatibility includes and libraries.
LDCC= ./cc5.sol
STDCFLAGS= -Dconst= -Dsv4 -DPOSIX -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
LIBS= $(EXTRALDFLAGS) -ltermlib
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(LDCC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(LDCC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $& $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sol.h
$(RM) os.h
$(LN) osdep/os-sol.h os.h
pico_os.c: osdep/os-sv4.c
$(RM) pico_os.c
$(LN) osdep/os-sv4.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sv4.c: osdep/header osdep/unix osdep/read.pol osdep/raw.ios \
osdep/spell.unx osdep/term.cap \
osdep/os-sv4.ic
cd osdep; $(MAKE) includer os-sv4.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.sun 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for SunOS 4.1 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dconst= -Dsun -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc -ldl
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sun.h
$(RM) os.h
$(LN) osdep/os-sun.h os.h
pico_os.c: osdep/os-sun.c
$(RM) pico_os.c
$(LN) osdep/os-sun.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sun.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/os-sun.ic
cd osdep; $(MAKE) -f makefile.dl includer os-sun.c; cd ..
+90
View File
@@ -0,0 +1,90 @@
# $Id: makefile.sv4 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for System V R4 version of the PINE composer library and
# stand-alone editor pico.
#
# [Port courtesy of Marc Unangst <mju@mudos.ann-arbor.mi.us> - mss, 921020]
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dsv4 -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
LIBS= $(EXTRALDFLAGS) -ltermlib
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sv4.h
$(RM) os.h
$(LN) osdep/os-sv4.h os.h
pico_os.c: osdep/os-sv4.c
$(RM) pico_os.c
$(LN) osdep/os-sv4.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sv4.c: osdep/header osdep/unix osdep/read.pol osdep/raw.ios \
osdep/spell.unx osdep/term.inf \
osdep/os-sv4.ic
cd osdep; $(MAKE) includer os-sv4.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.ult 12448 2002-09-09 22:13:57Z hubert $
#
# 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.
#
#
# Makefile for RISC Ultrix 4.1 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dconst= -Dult -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pico.exe pilot pilot.exe
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-ult.h
$(RM) os.h
$(LN) osdep/os-ult.h os.h
pico_os.c: osdep/os-ult.c
$(RM) pico_os.c
$(LN) osdep/os-ult.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-ult.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/os-ult.ic
cd osdep; $(MAKE) includer os-ult.c; cd ..
+90
View File
@@ -0,0 +1,90 @@
# $Id: makefile.uw2 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for UnixWare 2.x version of the PINE composer library and
# stand-alone editor pico.
#
# [Port courtesy of Tim Rice <tim@trruw.metro.net> - hubert, 960311]
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dsv4 -DJOB_CONTROL -DPOSIX -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= true
LIBS= $(EXTRALDFLAGS) -ltermlib
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-sv4.h
$(RM) os.h
$(LN) osdep/os-sv4.h os.h
pico_os.c: osdep/os-sv4.c
$(RM) pico_os.c
$(LN) osdep/os-sv4.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-sv4.c: osdep/header osdep/unix osdep/read.pol osdep/raw.ios \
osdep/spell.unx osdep/term.inf \
osdep/os-sv4.ic
cd osdep; $(MAKE) includer os-sv4.c; cd ..
+88
View File
@@ -0,0 +1,88 @@
# $Id: makefile.vul 11894 2001-10-23 22:18:36Z hubert $
#
# 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.
#
#
# Makefile for VAX Ultrix 4.1 version of the PINE composer library and
# stand-alone editor pico.
#
RM= rm -f
LN= ln -s
MAKE= make
OPTIMIZE= # -O
PROFILE= # -pg
DEBUG= -g -DDEBUG
STDCFLAGS= -Dconst= -Dult -DJOB_CONTROL -DMOUSE
CFLAGS= $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
# switches for library building
LIBCMD= ar
LIBARGS= ru
RANLIB= ranlib
LIBS= $(EXTRALDFLAGS) -ltermcap -lc
OFILES= attach.o basic.o bind.o browse.o buffer.o \
composer.o display.o file.o fileio.o line.o pico_os.o \
pico.o random.o region.o search.o \
window.o word.o
HFILES= headers.h estruct.h edef.h efunc.h pico.h os.h
#
# dependencies for the Unix versions of pico and libpico.a
#
all: pico pilot
pico pilot: libpico.a
pico: main.o
$(CC) $(CFLAGS) main.o libpico.a $(LIBS) -o pico
pilot: pilot.o
$(CC) $(CFLAGS) pilot.o libpico.a $(LIBS) -o pilot
libpico.a: $(OFILES)
$(LIBCMD) $(LIBARGS) libpico.a $(OFILES)
$(RANLIB) libpico.a
clean:
rm -f *.a *.o *~ pico_os.c os.h pico pilot
cd osdep; $(MAKE) clean; cd ..
os.h: osdep/os-ult.h
$(RM) os.h
$(LN) osdep/os-ult.h os.h
pico_os.c: osdep/os-ult.c
$(RM) pico_os.c
$(LN) osdep/os-ult.c pico_os.c
$(OFILES) main.o pilot.o: $(HFILES)
pico.o: ebind.h
osdep/os-ult.c: osdep/header osdep/unix osdep/read.sel osdep/raw.brk \
osdep/spell.unx osdep/term.cap \
osdep/os-ult.ic
cd osdep; $(MAKE) includer os-ult.c; cd ..
+1003
View File
File diff suppressed because it is too large Load Diff
+1301
View File
File diff suppressed because it is too large Load Diff
+107
View File
@@ -0,0 +1,107 @@
#line 2 "msmenu.h"
/*
* $Id: msmenu.h 7883 1998-02-28 00:10:21Z hubert $
*
* Program: Menu item definitions - Microsoft Windows 3.1
*
*
* Thomas Unger
* Networks and Distributed Computing
* Computing and Communications
* University of Washington
* Administration Builiding, AG-44
* Seattle, Washington, 98195, USA
* Internet: tunger@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.
*/
#ifndef MSMENU_H
#define MSMENU_H
/*
* var in pine's key structure we'll use
*/
#define KS_OSDATAVAR short menuitem;
#define KS_OSDATAGET(X) ((X)->menuitem)
#define KS_OSDATASET(X, Y) ((X)->menuitem = (Y))
/*
* Menu key definitions.
* Should be same values as in resouce.h
*/
#define KS_NONE 0
#define KS_RANGESTART 150
#define KS_VIEW 150
#define KS_EXPUNGE 151
#define KS_ZOOM 152
#define KS_SORT 153
#define KS_HDRMODE 154
#define KS_MAINMENU 155
#define KS_FLDRLIST 156
#define KS_FLDRINDEX 157
#define KS_COMPOSER 158
#define KS_PREVPAGE 159
#define KS_PREVMSG 160
#define KS_NEXTMSG 161
#define KS_ADDRBOOK 162
#define KS_WHEREIS 163
#define KS_PRINT 164
#define KS_REPLY 165
#define KS_FORWARD 166
#define KS_BOUNCE 167
#define KS_DELETE 168
#define KS_UNDELETE 169
#define KS_FLAG 170
#define KS_SAVE 171
#define KS_EXPORT 172
#define KS_TAKEADDR 173
#define KS_SELECT 174
#define KS_APPLY 175
#define KS_POSTPONE 176
#define KS_SEND 177
#define KS_CANCEL 178
#define KS_ATTACH 179
#define KS_TOADDRBOOK 180
#define KS_READFILE 181
#define KS_JUSTIFY 182
#define KS_ALTEDITOR 183
#define KS_GENERALHELP 184
#define KS_SCREENHELP 185
#define KS_EXIT 186
#define KS_NEXTPAGE 187
#define KS_SAVEFILE 188
#define KS_CURPOSITION 189
#define KS_GOTOFLDR 190
#define KS_JUMPTOMSG 191
#define KS_RICHHDR 192
#define KS_EXITMODE 193
#define KS_REVIEW 194
#define KS_KEYMENU 195
#define KS_SELECTCUR 196
#define KS_UNDO 197
#define KS_SPELLCHK 198
#define KS_RANGEEND 198
#define KS_COUNT ((KS_RANGEEND - KS_RANGESTART) + 1)
#define MENU_DEFAULT 300 /* Default menu for application. */
#define MENU_COMPOSER 301 /* Menu for pine's composer. */
#endif /* MSMENU_H */
+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 */

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