home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-04 | 140.5 KB | 5,565 lines |
- diff -c gopher+/Makefile.config.dist:3.7 gopher+/Makefile.config.dist:3.8
- *** gopher+/Makefile.config.dist:3.7 Fri Nov 5 01:49:46 1993
- --- gopher+/Makefile.config.dist Fri Nov 5 01:49:46 1993
- ***************
- *** 5,12 ****
-
- #********************************************************************
- # lindner
- ! # 3.7
- ! # 1993/09/22 04:32:32
- # /export/mudhoney/GopherSrc/CVS/gopher+/Makefile.config.dist,v
- # Exp
- #
- --- 5,12 ----
-
- #********************************************************************
- # lindner
- ! # 3.8
- ! # 1993/11/03 15:02:26
- # /export/mudhoney/GopherSrc/CVS/gopher+/Makefile.config.dist,v
- # Exp
- #
- ***************
- *** 20,25 ****
- --- 20,28 ----
- #*********************************************************************
- # Revision History:
- # Makefile.config.dist,v
- + # Revision 3.8 1993/11/03 15:02:26 lindner
- + # pl10
- + #
- # Revision 3.7 1993/09/22 04:32:32 lindner
- # Doc fixes
- #
- ***************
- *** 95,101 ****
- #
- # Add -DUSG for System V
- # -DBSD for BSD
- ! # -DPOSIXWAIT if you have waitpid() instead of wait3()
-
- GSYSTYPE=
-
- --- 98,104 ----
- #
- # Add -DUSG for System V
- # -DBSD for BSD
- ! # -DNO_WAITPID if you have wait3 instead of waitpid()
-
- GSYSTYPE=
-
- ***************
- *** 201,208 ****
- # " " UMAXLIBS if compiling under UMAX,
- # " " SCOLIBS if compiling under SCO Unix.
- # " " AUXLIBS if compiling under A/UX
- #
- - #
- # Note: SCOLIBS needs -lintl if using gcc to compile in order to find strftime
- #
- #UMAXLIBS = -lresolv
- --- 204,211 ----
- # " " UMAXLIBS if compiling under UMAX,
- # " " SCOLIBS if compiling under SCO Unix.
- # " " AUXLIBS if compiling under A/UX
- + # " " INTERACTIVELIBS if compiling under Interactive
- #
- # Note: SCOLIBS needs -lintl if using gcc to compile in order to find strftime
- #
- #UMAXLIBS = -lresolv
- ***************
- *** 212,217 ****
- --- 215,221 ----
- #SCOLIBS = -lsocket -lintl
- #SVR4LIBS = -lsocket -lnsl
- #AUXLIBS = -lmalloc
- + #INTERACTIVELIBS= -linet
-
- OTHERLIBS = $(HPLIBS) $(UMAXLIBS) $(SEQLIBS) $(PTXLIBS) $(SCOLIBS) \
- $(SVR4LIBS) $(AUXLIBS)
- diff -c gopher+/README:3.2 gopher+/README:3.3
- *** gopher+/README:3.2 Fri Nov 5 01:49:47 1993
- --- gopher+/README Fri Nov 5 01:49:47 1993
- ***************
- *** 1,6 ****
- ! README,v 3.2 1993/10/20 03:35:03 lindner Exp
-
- ! This is the University of Minnesota's Internet Gopher distribution for
- UNIX machines. Here's a breakdown by directory:
-
- doc: The documentation for all parts of the distribution.
- --- 1,6 ----
- ! README,v 3.3 1993/11/04 02:12:58 lindner Exp
-
- ! This is the University of Minnesota's Internet Gopher+ distribution for
- UNIX machines. Here's a breakdown by directory:
-
- doc: The documentation for all parts of the distribution.
- ***************
- *** 13,18 ****
- --- 13,22 ----
-
- gopherd: The Internet Gopher+ data/directory/index/sound Server.
-
- + gophfilt: A Gopher "filter" program.
- +
- + test: A regression testing package, include sample data.
- +
- Please look in the directory "doc" for more information about installing
- the various portions of the Internet Gopher. Specifically refer to
- the file INSTALL.
- ***************
- *** 32,37 ****
- --- 36,42 ----
- (For UI cloning)
-
- WAIS Brewster and co. at Thinking Machines
- + (er, now WAIS Inc.)
- (For our UNIX generic indexing stuff)
-
- and all of our users for their great suggestions and patches!
- diff -c gopher+/conf.h:3.12 gopher+/conf.h:3.13
- *** gopher+/conf.h:3.12 Fri Nov 5 01:49:47 1993
- --- gopher+/conf.h Fri Nov 5 01:49:47 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.12
- ! * 1993/10/13 16:46:51
- * /export/mudhoney/GopherSrc/CVS/gopher+/conf.h,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.13
- ! * 1993/11/03 03:36:35
- * /export/mudhoney/GopherSrc/CVS/gopher+/conf.h,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * conf.h,v
- + * Revision 3.13 1993/11/03 03:36:35 lindner
- + * Mod for variable records
- + *
- * Revision 3.12 1993/10/13 16:46:51 lindner
- * Updates for %s on defaults, vms mods
- *
- ***************
- *** 110,115 ****
- --- 113,129 ----
-
-
- #if defined(VMS)
- + /*
- + * VMS systems use VARIABLE length records for text files and
- + * FIXED 512 records for binary files that are saved or cached.
- + * Comment this out if you want to use stream_LF format instead.
- + * The Bookmark (sys$login:gopherrc.) and configuration
- + * (GopherP_Dir:gopher.rc and GopherP_Dir:gopherremote.rc, see
- + * below) files are stream_LF regardless of how this program
- + * logical is set.
- + */
- + #define VMSRecords /* */
- +
- /*
- * The "builtin" pager is the default VMS utility for displaying text.
- * Alternatively, define "TPU" for invoking callable TPU. Its /READ_ONLY
- diff -c gopher+/patchlevel.h:3.10 gopher+/patchlevel.h:3.11
- *** gopher+/patchlevel.h:3.10 Fri Nov 5 01:49:48 1993
- --- gopher+/patchlevel.h Fri Nov 5 01:49:48 1993
- ***************
- *** 5,8 ****
- #define GOPHER_MAJOR_VERSION "2"
- #define GOPHER_MINOR_VERSION "0"
-
- ! #define PATCHLEVEL 9
- --- 5,8 ----
- #define GOPHER_MAJOR_VERSION "2"
- #define GOPHER_MINOR_VERSION "0"
-
- ! #define PATCHLEVEL 10
- diff -c gopher+/doc/client.changes:3.15 gopher+/doc/client.changes:3.16
- *** gopher+/doc/client.changes:3.15 Fri Nov 5 01:49:49 1993
- --- gopher+/doc/client.changes Fri Nov 5 01:49:49 1993
- ***************
- *** 1,4 ****
- ! client.changes,v 3.15 1993/10/20 04:03:10 lindner Exp
-
- Gopher+2.0 patchlevel 9
- -----------------------
- --- 1,31 ----
- ! client.changes,v 3.16 1993/11/05 07:39:33 lindner Exp
- !
- ! Gopher+2.0 patchlevel 10
- ! ------------------------
- !
- ! * Fix for segmentation fault when saving or downloading
- !
- ! * Fix for osf curses line drawing characters
- !
- ! * Fix for people trying to download the help file
- !
- ! * Move screen refresh stuff to CURwgetch()
- !
- ! * Add optional client logging
- !
- ! * Cleanup on a SIGHUP signal
- !
- ! * Use $HOME instead of password routines to read .gopherrc
- !
- ! * Allow saving to variable length record VMS files (see conf.h)
- !
- ! * Add Movie (;) and Info (i) type support
- !
- ! * Add q to exit out of pager for completeness
- !
- ! * Now possible to print via builtin pager.
- !
- !
-
- Gopher+2.0 patchlevel 9
- -----------------------
- diff -c gopher+/doc/server.changes:3.16 gopher+/doc/server.changes:3.17
- *** gopher+/doc/server.changes:3.16 Fri Nov 5 01:49:49 1993
- --- gopher+/doc/server.changes Fri Nov 5 01:49:50 1993
- ***************
- *** 1,4 ****
- ! server.changes,v 3.16 1993/10/20 04:03:13 lindner Exp
-
- Gopher+2.0 patchlevel 9
- -----------------------
- --- 1,24 ----
- ! server.changes,v 3.17 1993/11/05 07:39:35 lindner Exp
- !
- ! Gopher+2.0 patchlevel 10
- ! ------------------------
- !
- ! * Speedup gopher0 requests for WAIS searches.
- !
- ! * Added HTML alternate views for gopher+ directories.
- !
- ! * Plug many, many memory leaks.
- !
- ! * Test shell scripts for exec bit, i.e. you can now have shell scripts
- ! on your server and not have them executed.
- !
- ! * Allow Type=1? etc.. in .link files to make a link to an ASK item.
- !
- ! * Added Domain_pat= line to check for a regexp domains
- !
- ! * Allow multiple Domain= and Domain_pat= lines in .link files to be
- ! boolean or'ed
- !
-
- Gopher+2.0 patchlevel 9
- -----------------------
- diff -c gopher+/gopher/CURcurses.c:3.27 gopher+/gopher/CURcurses.c:3.31
- *** gopher+/gopher/CURcurses.c:3.27 Fri Nov 5 01:49:51 1993
- --- gopher+/gopher/CURcurses.c Fri Nov 5 01:49:51 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.27
- ! * 1993/10/07 05:10:12
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/CURcurses.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.31
- ! * 1993/11/04 02:06:50
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/CURcurses.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,32 ----
- *********************************************************************
- * Revision History:
- * CURcurses.c,v
- + * Revision 3.31 1993/11/04 02:06:50 lindner
- + * Add Ben's AIS hack
- + *
- + * Revision 3.30 1993/10/26 18:24:31 lindner
- + * Make sure we cleanup before exiting
- + *
- + * Revision 3.29 1993/10/26 18:12:56 lindner
- + * Fixes for Input routines, screen redrawing, ASK fixes
- + *
- + * Revision 3.28 1993/10/22 20:22:12 lindner
- + * Range checks for lots of things
- + *
- * Revision 3.27 1993/10/07 05:10:12 lindner
- * Make TrimmedTitle[] (twice) a larger array (256 elements). Makes
- * 132-column terminals and huge xterm windows happier.
- ***************
- *** 388,411 ****
- /*
- * Centerline, uses curses routines to center a line.
- */
- ! void CURcenterline(cur, theline, yval)
- CursesObj *cur;
- char *theline;
- ! int yval;
- {
- char TrimmedLine[256];
-
- ! /** Make sure theline fits on the screen **/
- ! if (strlen(theline) > COLS) {
- ! strncpy(TrimmedLine, theline, COLS);
- ! TrimmedLine[COLS-3] = '.';
- ! TrimmedLine[COLS-2] = '.';
- ! TrimmedLine[COLS-1] = '.';
- ! TrimmedLine[COLS] = '\0';
- ! mvaddstr(yval, 0, TrimmedLine);
- }
- ! else
- ! mvaddstr(yval, (COLS - strlen(theline))/2, theline);
- }
-
-
- --- 400,433 ----
- /*
- * Centerline, uses curses routines to center a line.
- */
- ! void CURcenterline(cur, win, theline, yval, windowidth, bright)
- CursesObj *cur;
- + WINDOW *win;
- char *theline;
- ! int yval, windowidth;
- ! boolean bright;
- {
- char TrimmedLine[256];
-
- ! strcpy(TrimmedLine, theline);
- !
- ! /** Make sure theline fits in the window **/
- ! if (strlen(theline) > windowidth) {
- ! TrimmedLine[windowidth-3] = '.';
- ! TrimmedLine[windowidth-2] = '.';
- ! TrimmedLine[windowidth-1] = '.';
- ! TrimmedLine[windowidth] = '\0';
- }
- !
- ! wmove(win, yval, (windowidth - strlen(TrimmedLine))/2);
- !
- ! if (bright)
- ! wstandout(win);
- !
- ! waddstr(win, TrimmedLine);
- !
- ! if (bright)
- ! wstandend(win);
- }
-
-
- ***************
- *** 573,644 ****
- {
- int a, b, c;
-
- ! c = wgetch(window);
- !
- ! /** Nasty, but get's the job done..
- ! an error on input usually means that the connection was closed..
- ! **/
-
- ! if (c == -1)
- ! exit(-1);
-
- ! if (c == 27) { /* handle escape sequence */
- ! b = wgetch(window);
- ! if (b == '[' || b == 'O')
- ! a = wgetch(window);
- ! else
- ! a = b;
- !
- ! switch (a) {
- ! case 'A': c = KEY_UP; break;
- ! case 'B': c = KEY_DOWN; break;
- ! case 'C': c = KEY_RIGHT; break;
- ! case 'D': c = KEY_LEFT; break;
-
- ! case 'M': /* vt100 enter */
- ! if (b == 'O')
- ! c = KEY_ENTER;
- break;
-
- ! case 'Q': /* vt100 Help */
- ! if (b == 'O')
- ! c = KEY_HELP;
- ! break;
-
- ! case '2':
- ! if (b == '[')
- ! b = wgetch(window);
- ! switch(b) {
- ! case '8': /* vt200 Help */
- ! if (wgetch(window) == '~')
- ! c = KEY_HELP;
- break;
- ! case '9': /* vt200 Do */
- ! if (wgetch(window) == '~')
- ! c = KEY_ENTER;
- break;
- ! }
-
- ! case '5': /* vt 200 prev. screen */
- ! if (b == '[' && wgetch(window) == '~')
- ! c = KEY_PPAGE;
- ! break;
- ! case '6': /* vt 200 next screen */
- ! if (b == '[' && wgetch(window) == '~')
- ! c = KEY_NPAGE;
- ! break;
- ! }
- ! }
- !
- ! /* The many forms of the return key... */
- ! if ((c == KEY_ENTER)|| (c=='\r'))
- ! c = '\n'; /** SYSV curses Gack! **/
- !
- ! /* The many forms of backspace */
- ! if (c == '\010' || c == '\177' || c == KEY_BACKSPACE)
- ! return('\b');
-
- ! return(c);
- }
-
- int
- --- 595,685 ----
- {
- int a, b, c;
-
- ! while (1) {
-
- ! c = wgetch(window);
-
- ! switch (c) {
-
- ! case -1: /* error usually means connection was closed.. */
- ! CleanupandExit(-1);
- break;
-
- ! case 12: /* ^L */
- ! case 18: /* ^R */
- ! case 23: /* ^W */
- ! /* redraw the screen */
- ! #ifdef VMS
- ! clearok(curscr, TRUE);
- ! wrefresh(window);
- ! #else
- ! wrefresh(curscr);
- ! #endif
- ! /* don't return yet, get another keystroke */
- ! break;
-
- ! case 27: /* handle escape sequence */
- ! b = wgetch(window);
- ! if (b == '[' || b == 'O')
- ! a = wgetch(window);
- ! else
- ! a = b;
- !
- ! switch (a) {
- ! case 'A': c = KEY_UP; break;
- ! case 'B': c = KEY_DOWN; break;
- ! case 'C': c = KEY_RIGHT; break;
- ! case 'D': c = KEY_LEFT; break;
- !
- ! case 'M': /* vt100 enter */
- ! if (b == 'O')
- ! c = KEY_ENTER;
- break;
- !
- ! case 'Q': /* vt100 Help */
- ! if (b == 'O')
- ! c = KEY_HELP;
- break;
- !
- ! case '2':
- ! if (b == '[')
- ! b = wgetch(window);
- ! switch(b) {
- ! case '8': /* vt200 Help */
- ! if (wgetch(window) == '~')
- ! c = KEY_HELP;
- ! break;
- ! case '9': /* vt200 Do */
- ! if (wgetch(window) == '~')
- ! c = KEY_ENTER;
- ! break;
- ! }
-
- ! case '5': /* vt 200 prev. screen */
- ! if (b == '[' && wgetch(window) == '~')
- ! c = KEY_PPAGE;
- ! break;
- ! case '6': /* vt 200 next screen */
- ! if (b == '[' && wgetch(window) == '~')
- ! c = KEY_NPAGE;
- ! break;
- ! }
- ! /* fall through to default to reassign certain keys */
-
- ! default:
- ! /* The many forms of the return key... */
- ! if ((c == KEY_ENTER)|| (c=='\r'))
- ! c = '\n'; /** SYSV curses Gack! **/
- !
- ! /* The many forms of backspace */
- ! if (c == '\010' || c == '\177' || c == KEY_BACKSPACE)
- ! return('\b');
- !
- ! return(c);
- ! break;
- !
- ! } /* switch(c) */
- ! } /* while(1) */
- }
-
- int
- ***************
- *** 797,805 ****
- #ifdef SYSVCURSES
- beep();
- #else
- ! CURcenterline(cur,CURgetBell(cur),1);
- ! /* tputs(CURgetBell(cur),1,CURoutchar); */
- ! /* fflush(stdout); */
- #endif
- }
-
- --- 838,846 ----
- #ifdef SYSVCURSES
- beep();
- #else
- ! /* CURcenterline(cur, stdscr, CURgetBell(cur), 1, COLS, FALSE); */
- ! tputs(CURgetBell(cur), 1, CURoutchar);
- ! fflush(stdout);
- #endif
- }
-
- ***************
- *** 874,887 ****
- messheight++;
- }
-
- ! if (messlength > COLS)
- ! messlength = COLS -4;
- ! if (strlen(Wintitle) > messlength)
- ! winwidth = strlen(Wintitle) + 2;
- ! winwidth = messlength + 6;
-
- ! if (winwidth < 30)
- ! winwidth = 30;
-
- tempwin = newwin(6+messheight, winwidth, (LINES-(6+messheight))/2,
- (COLS-winwidth) /2);
- --- 915,927 ----
- messheight++;
- }
-
- ! if ((i=strlen(Wintitle)) > messlength)
- ! winwidth = i + 4;
- ! else
- ! winwidth = messlength + 6;
-
- ! if (winwidth > (i = COLS-2))
- ! winwidth = i;
-
- tempwin = newwin(6+messheight, winwidth, (LINES-(6+messheight))/2,
- (COLS-winwidth) /2);
- ***************
- *** 905,920 ****
-
-
-
- ! /** Add the window title **/
- ! if (Wintitle != NULL) {
- ! wmove(tempwin, 0,(winwidth - strlen(Wintitle))/2);
- ! wstandout(tempwin);
- ! waddstr(tempwin, Wintitle);
- ! wstandend(tempwin);
- ! }
-
- /** Add the keyboard labels **/
- ! wmove(tempwin, 3+messheight, winwidth - 29);
- CURbutton(cur, tempwin, "Cancel: ^G", FALSE);
- waddch(tempwin, ' ');
- CURbutton(cur, tempwin, "OK: Enter", FALSE);
- --- 945,956 ----
-
-
-
- ! /** Add the window title, centered **/
- ! if (Wintitle != NULL)
- ! CURcenterline(cur, tempwin, Wintitle, 0, winwidth, TRUE);
-
- /** Add the keyboard labels **/
- ! wmove(tempwin, 3+messheight, winwidth - 28);
- CURbutton(cur, tempwin, "Cancel: ^G", FALSE);
- waddch(tempwin, ' ');
- CURbutton(cur, tempwin, "OK: Enter", FALSE);
- ***************
- *** 981,987 ****
- int maxpromptwidth =0;
- int currentfield = 0;
- int maxlength = COLS-7;
- - char TrimmedTitle[256];
- Requestitem *curitem;
- int ch;
-
- --- 1017,1022 ----
- ***************
- *** 1004,1009 ****
- --- 1039,1049 ----
- return(-1);
- }
-
- + if (numprompts > (LINES-6)) {
- + CursesErrorMsg("Sorry, this form cannot fit on the screen");
- + return(-1);
- + }
- +
- /** If only one prompt, offer entire window for reply **/
- if (numprompts == 1 && items[0]->thing == CUR_PROMPT) {
- tempwin = newwin(8, COLS-2, (LINES-4)/2,1);
- ***************
- *** 1018,1041 ****
- }
-
- /*** Add the window title, centered ***/
- ! if (Wintitle != NULL) {
- ! /** Trim window title to fit in the window **/
- ! if (strlen(Wintitle) > COLS-2) {
- ! strncpy(TrimmedTitle, Wintitle, COLS-2);
- ! TrimmedTitle[COLS-5] = '.';
- ! TrimmedTitle[COLS-4] = '.';
- ! TrimmedTitle[COLS-3] = '.';
- ! TrimmedTitle[COLS-2] = '\0';
- ! }
- ! else
- ! strcpy(TrimmedTitle, Wintitle);
- !
- ! /** Put the title, bold **/
- ! wmove(tempwin, 0,(COLS -2 - strlen(TrimmedTitle))/2);
- ! wstandout(tempwin);
- ! waddstr(tempwin, TrimmedTitle);
- ! wstandend(tempwin);
- ! }
-
- /** Add the prompts and typing area **/
- if (numprompts == 1 && items[0]->thing == CUR_PROMPT) {
- --- 1058,1065 ----
- }
-
- /*** Add the window title, centered ***/
- ! if (Wintitle != NULL)
- ! CURcenterline(cur, tempwin, Wintitle, 0, COLS-2, TRUE);
-
- /** Add the prompts and typing area **/
- if (numprompts == 1 && items[0]->thing == CUR_PROMPT) {
- ***************
- *** 1050,1056 ****
- wmove(tempwin, 4, 3);
- wstandout(tempwin);
- waddstr(tempwin, items[0]->stowage);
- ! for (j=strlen(items[0]->stowage)+3; j< COLS-6; j++) {
- waddch(tempwin, ' ');
- }
- wstandend(tempwin);
- --- 1074,1080 ----
- wmove(tempwin, 4, 3);
- wstandout(tempwin);
- waddstr(tempwin, items[0]->stowage);
- ! for (j=strlen(items[0]->stowage)+3; j< COLS-4; j++) {
- waddch(tempwin, ' ');
- }
- wstandend(tempwin);
- ***************
- *** 1087,1093 ****
- waddstr(tempwin, items[i]->stowage);
-
- for (j=strlen(items[i]->stowage)+maxpromptwidth+4;
- ! j< COLS-6; j++) {
- waddch(tempwin, ' ');
- }
- wstandend(tempwin);
- --- 1111,1117 ----
- waddstr(tempwin, items[i]->stowage);
-
- for (j=strlen(items[i]->stowage)+maxpromptwidth+4;
- ! j< COLS-4; j++) {
- waddch(tempwin, ' ');
- }
- wstandend(tempwin);
- ***************
- *** 1097,1104 ****
- --- 1121,1133 ----
-
- /** Add the labels, centered **/
- if (numprompts > 1 || items[0]->thing != CUR_PROMPT) {
- + #ifndef AIS_HACK
- wmove(tempwin, 3+numprompts, (COLS-63)/2);
- CURbutton(cur, tempwin, "Switch Fields: TAB", FALSE);
- + #else
- + wmove(tempwin, 3+numprompts, (COLS-70)/2);
- + CURbutton(cur, tempwin, "Switch Fields: TAB or PA1", FALSE);
- + #endif
- waddch(tempwin, ' ');
- }
- else
- ***************
- *** 1156,1161 ****
- --- 1185,1191 ----
- items[currentfield]->choices,
- "Select an item",
- items[currentfield]->chooseitem);
- + touchwin(tempwin);
- if (tempx != -1)
- choice = tempx;
- }
- ***************
- *** 1188,1195 ****
- /*** Move to another field ***/
- do {
- currentfield = (currentfield +1) % numprompts;
- ! } while (items[currentfield]->stowage == NULL ||
- ! items[currentfield]->thing == CUR_LABEL);
- break;
-
- case KEY_UP:
- --- 1218,1224 ----
- /*** Move to another field ***/
- do {
- currentfield = (currentfield +1) % numprompts;
- ! } while (items[currentfield]->thing == CUR_LABEL);
- break;
-
- case KEY_UP:
- ***************
- *** 1197,1204 ****
- currentfield--;
- if (currentfield <0)
- currentfield = numprompts-1;
- ! } while (items[currentfield]->stowage == NULL ||
- ! items[currentfield]->thing == CUR_LABEL);
-
- break;
-
- --- 1226,1232 ----
- currentfield--;
- if (currentfield <0)
- currentfield = numprompts-1;
- ! } while (items[currentfield]->thing == CUR_LABEL);
-
- break;
-
- ***************
- *** 1235,1241 ****
- char *prompt;
- int default_choice;
- {
- ! int numchoices=0, i, maxchoicewidth=0;
- WINDOW *tempwin;
-
- while (choices[numchoices++] != NULL)
- --- 1263,1269 ----
- char *prompt;
- int default_choice;
- {
- ! int numchoices=0, maxchoicewidth=24, winwidth, i;
- WINDOW *tempwin;
-
- while (choices[numchoices++] != NULL)
- ***************
- *** 1248,1271 ****
- return(-1);
-
- if ((i=strlen(prompt)) > maxchoicewidth)
- ! maxchoicewidth = i;
-
- ! if ((i=strlen(Wintitle)) > maxchoicewidth)
- ! maxchoicewidth = i;
-
-
- ! tempwin = newwin(8+numchoices, maxchoicewidth + 10,
- ! (LINES-(6+numchoices))/2, (COLS-(maxchoicewidth+10))/2);
-
- ! CURbox(cur, tempwin, 8+numchoices, 10 + maxchoicewidth);
-
- ! /*** Add the window title ***/
- ! if (Wintitle != NULL) {
- ! wmove(tempwin, 0,(maxchoicewidth+10 -2 - strlen(Wintitle))/2);
- ! wstandout(tempwin);
- ! waddstr(tempwin, Wintitle);
- ! wstandend(tempwin);
- ! }
-
- /*** Add the choices to the screen ***/
-
- --- 1276,1299 ----
- return(-1);
-
- if ((i=strlen(prompt)) > maxchoicewidth)
- ! winwidth = i + 10;
- ! else
- ! winwidth = maxchoicewidth + 10;
-
- ! if ((i=strlen(Wintitle)+8) > winwidth)
- ! winwidth = i;
-
- + if (winwidth > (i = COLS-2))
- + winwidth = i;
-
- ! tempwin = newwin(8+numchoices, winwidth,
- ! (LINES-(8+numchoices))/2, (COLS-winwidth)/2);
-
- ! CURbox(cur, tempwin, 8+numchoices, winwidth);
-
- ! /*** Add the window title, centered ***/
- ! if (Wintitle != NULL)
- ! CURcenterline(cur, tempwin, Wintitle, 0, winwidth, TRUE);
-
- /*** Add the choices to the screen ***/
-
- diff -c gopher+/gopher/CURcurses.h:3.8 gopher+/gopher/CURcurses.h:3.9
- *** gopher+/gopher/CURcurses.h:3.8 Fri Nov 5 01:49:52 1993
- --- gopher+/gopher/CURcurses.h Fri Nov 5 01:49:52 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.8
- ! * 1993/09/26 09:19:21
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/CURcurses.h,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.9
- ! * 1993/11/02 06:21:30
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/CURcurses.h,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * CURcurses.h,v
- + * Revision 3.9 1993/11/02 06:21:30 lindner
- + * Fix for osf curses
- + *
- * Revision 3.8 1993/09/26 09:19:21 lindner
- * Add bold #defines
- *
- ***************
- *** 107,113 ****
- * Definitions for character graphics
- */
-
- ! #if defined(SYSVCURSES) && !defined(ultrix) && !defined(hpux) && !defined(_AUX_SOURCE)
- # define BOX_UL ('l'|A_ALTCHARSET)
- # define BOX_UR 'k'|A_ALTCHARSET
- # define BOX_LL 'm'|A_ALTCHARSET
- --- 110,116 ----
- * Definitions for character graphics
- */
-
- ! #if defined(SYSVCURSES) && !defined(ultrix) && !defined(hpux) && !defined(_AUX_SOURCE) && !defined(__osf__)
- # define BOX_UL ('l'|A_ALTCHARSET)
- # define BOX_UR 'k'|A_ALTCHARSET
- # define BOX_LL 'm'|A_ALTCHARSET
- diff -c gopher+/gopher/cso.c:3.6 gopher+/gopher/cso.c:3.7
- *** gopher+/gopher/cso.c:3.6 Fri Nov 5 01:49:53 1993
- --- gopher+/gopher/cso.c Fri Nov 5 01:49:53 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.6
- ! * 1993/10/11 04:44:09
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/cso.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.7
- ! * 1993/10/22 20:21:02
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/cso.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * cso.c,v
- + * Revision 3.7 1993/10/22 20:21:02 lindner
- + * misc fixes
- + *
- * Revision 3.6 1993/10/11 04:44:09 lindner
- * Add early searching.. tag for CSO, better ui
- *
- ***************
- *** 60,66 ****
- int sockfd, len, numfields=0;
- char *Fields[50];
- char *Responses[50];
- ! char query[512], tmpquery[256];
- int i;
-
- Draw_Status("Fetching Fields...");
- --- 63,69 ----
- int sockfd, len, numfields=0;
- char *Fields[50];
- char *Responses[50];
- ! char query[512];
- int i;
-
- Draw_Status("Fetching Fields...");
- ***************
- *** 138,153 ****
-
- for (i=0; i<numfields; i++) {
- if (*Responses[i] != '\0') {
- ! cp = strrchr(Responses[i], ' ');
- ! while (cp != NULL) {
- ! sprintf(tmpquery, "%s=%s ", Fields[i], cp+1);
- ! strcat(query, tmpquery);
- ! *cp = '\0';
- ! cp = strrchr(Responses[i], ' ');
- ! }
- !
- ! sprintf(tmpquery, "%s=%s ", Fields[i], Responses[i]);
- ! strcat(query, tmpquery);
- }
- }
- if (strlen(query) > 6)
- --- 141,159 ----
-
- for (i=0; i<numfields; i++) {
- if (*Responses[i] != '\0') {
- ! cp = Responses[i];
- ! do {
- ! len = strcspn(cp, " ");
- ! if (len != 0) {
- ! strcat(query, Fields[i]);
- ! strcat(query, "=");
- ! strncat(query, cp, len);
- ! strcat(query, " ");
- ! }
- ! cp = strchr(cp, ' ');
- ! if (cp != NULL)
- ! cp++;
- ! } while (cp != NULL);
- }
- }
- if (strlen(query) > 6)
- diff -c gopher+/gopher/download.c:3.12 gopher+/gopher/download.c:3.13
- *** gopher+/gopher/download.c:3.12 Fri Nov 5 01:49:53 1993
- --- gopher+/gopher/download.c Fri Nov 5 01:49:53 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.12
- ! * 1993/10/07 05:11:00
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/download.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.13
- ! * 1993/10/26 18:44:12
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/download.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * download.c,v
- + * Revision 3.13 1993/10/26 18:44:12 lindner
- + * Fix for people trying to download the help file
- + *
- * Revision 3.12 1993/10/07 05:11:00 lindner
- * Fixed spawned process error checking on Unix, add third arg to Save_File
- *
- ***************
- *** 152,161 ****
-
- /*** Get a reasonable tmp file name ***/
- cp = GSgetPath(gs);
- ! if ((cp = strrchr(cp,'/')) != NULL)
- ! strcpy(tmpfilename, cp+1);
- ! else
- strcpy(tmpfilename,GSgetTitle(gs));
-
- #ifdef VMS
- VMSfile(tmpfilename);
- --- 155,169 ----
-
- /*** Get a reasonable tmp file name ***/
- cp = GSgetPath(gs);
- ! if (cp != NULL) {
- ! if ((cp = strrchr(cp,'/')) != NULL)
- ! strcpy(tmpfilename, cp+1);
- ! else
- ! strcpy(tmpfilename,GSgetTitle(gs));
- ! } else {
- strcpy(tmpfilename,GSgetTitle(gs));
- + }
- +
-
- #ifdef VMS
- VMSfile(tmpfilename);
- diff -c gopher+/gopher/gopher.c:3.54 gopher+/gopher/gopher.c:3.61
- *** gopher+/gopher/gopher.c:3.54 Fri Nov 5 01:49:54 1993
- --- gopher+/gopher/gopher.c Fri Nov 5 01:49:54 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.54
- ! * 1993/10/20 03:24:55
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.61
- ! * 1993/11/03 03:55:12
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/gopher.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,41 ----
- *********************************************************************
- * Revision History:
- * gopher.c,v
- + * Revision 3.61 1993/11/03 03:55:12 lindner
- + * More stable file caching, subject line chopping in Gripe
- + *
- + * Revision 3.60 1993/11/02 21:17:36 lindner
- + * Better client side logging code
- + *
- + * Revision 3.59 1993/10/27 18:52:14 lindner
- + * Simplify VMS fixed/variable file code
- + *
- + * Revision 3.58 1993/10/26 18:45:09 lindner
- + * Move screen refresh stuff to CURwgetch()
- + *
- + * Revision 3.57 1993/10/26 18:01:01 lindner
- + * Allow saving to variable length record VMS files, remove Interrupted msg
- + *
- + * Revision 3.56 1993/10/22 20:24:14 lindner
- + * Fixes for VMS tempnam() (Fote)
- + *
- + * Revision 3.55 1993/10/22 20:06:37 lindner
- + * Add optional client logging
- + *
- * Revision 3.54 1993/10/20 03:24:55 lindner
- * Cleanup on a SIGHUP signal
- *
- ***************
- *** 364,370 ****
- int i;
- FILE *f;
- #ifdef VMS
- ! char MailAddress[512], tmpfilename[512];
- #endif
-
- GSgetginfo(gs);
- --- 385,391 ----
- int i;
- FILE *f;
- #ifdef VMS
- ! char MailAddress[512], *tmpfilename;
- #endif
-
- GSgetginfo(gs);
- ***************
- *** 401,413 ****
- }
-
- #ifdef VMS
- ! if (strchr(email, '@') && !strchr(email, '\"'))
- sprintf(MailAddress, MAIL_ADRS, email);
- else
- strcpy(MailAddress, email);
-
- ! strcpy(tmpfilename, cp = tempnam(NULL, NULL));
- ! free(cp);
-
- if ((f = fopen(tmpfilename, "w")) == NULL) {
- CursesErrorMsg("Cannot send mail...");
- --- 422,433 ----
- }
-
- #ifdef VMS
- ! if ((strchr(email, '@') != NULL) && (strchr(email, '\"') == NULL))
- sprintf(MailAddress, MAIL_ADRS, email);
- else
- strcpy(MailAddress, email);
-
- ! tmpfilename = tempnam(NULL,NULL);
-
- if ((f = fopen(tmpfilename, "w")) == NULL) {
- CursesErrorMsg("Cannot send mail...");
- ***************
- *** 414,420 ****
- return;
- }
-
- ! sprintf(mailcmd, "%s/subject=\"%s\" %s %s",
- MAIL_COMMAND, gripemess[0], tmpfilename, MailAddress);
- free(gripemess[0]);
- for (i=1; i< 10; i++) {
- --- 434,440 ----
- return;
- }
-
- ! sprintf(mailcmd, "%s/subject=\"%.70s\" %s %s",
- MAIL_COMMAND, gripemess[0], tmpfilename, MailAddress);
- free(gripemess[0]);
- for (i=1; i< 10; i++) {
- ***************
- *** 427,432 ****
- --- 447,453 ----
- printf("Mailing gripe to %s...", MailAddress);
- system(mailcmd);
- unlink(tmpfilename);
- + free(tmpfilename);
- CURenter(CursesScreen);
- #else
- sprintf(mailcmd, "%s %s", MAIL_COMMAND, email);
- ***************
- *** 437,443 ****
- return;
- }
-
- ! fprintf(f, "Subject: %s\n\n", gripemess[0]);
- free(gripemess[0]);
- for (i=1; i< 10; i++) {
- fprintf(f, "%s\n", gripemess[i]);
- --- 458,464 ----
- return;
- }
-
- ! fprintf(f, "Subject: %.70s\n\n", gripemess[0]);
- free(gripemess[0]);
- for (i=1; i< 10; i++) {
- fprintf(f, "%s\n", gripemess[i]);
- ***************
- *** 579,590 ****
- showfile(ZeGopher)
- GopherObj *ZeGopher;
- {
- - #ifdef VMS
- - /** Need char array for GSsetLocalFile() to be reliable on VMS **/
- - char tmpfilename[512], *cp;
- - #else
- char *tmpfilename = NULL;
- - #endif
- FILE *tmpfile;
- char inputline[512];
- char outputline[512];
- --- 600,606 ----
- ***************
- *** 628,642 ****
- } else {
- /** Open a temporary file **/
- #ifdef VMS
- ! strcpy(tmpfilename, cp=tempnam(NULL,NULL));
- ! free(cp);
- #else
- tmpfilename = tempnam("/tmp","gopher");
- #endif
-
- ! if ((tmpfile = fopen(tmpfilename, "w")) == NULL)
- fprintf(stderr, "Couldn't make a tmp file!\n"),
- CleanupandExit(-1);
- GSsetLocalFile(ZeGopher, tmpfilename);
- } /* | */
-
- --- 644,676 ----
- } else {
- /** Open a temporary file **/
- #ifdef VMS
- ! tmpfilename = tempnam(NULL,NULL);
- #else
- tmpfilename = tempnam("/tmp","gopher");
- #endif
-
- ! #if defined(VMS) && defined(VMSRecords)
- ! if (GSgetType(ZeGopher) == A_FILE ||
- ! GSgetType(ZeGopher) == A_MIME ||
- ! GSgetType(ZeGopher) == A_CSO)
- ! /*** Use VARIABLE length records for text on VMS ***/
- ! tmpfile = fopen_VAR(tmpfilename, "w");
- ! else
- ! /*** Use FIXED 512 records for binaries on VMS ***/
- ! tmpfile = fopen_FIX(tmpfilename, "w");
- !
- ! if (tmpfile == NULL) {
- ! #else
- ! if ((tmpfile = fopen(tmpfilename, "w")) == NULL) {
- ! #endif
- ! CURexit(CursesScreen);
- fprintf(stderr, "Couldn't make a tmp file!\n"),
- CleanupandExit(-1);
- + }
- + if (GSgetLocalFile(ZeGopher) != NULL &&
- + GSgetLocalView(ZeGopher) != NULL &&
- + strcmp(GSgetLocalView(ZeGopher), view) != 0)
- + unlink(GSgetLocalFile(ZeGopher));
- GSsetLocalFile(ZeGopher, tmpfilename);
- } /* | */
-
- ***************
- *** 659,665 ****
- return;
- }
- } /* Forkoff */
- -
- #endif
-
- Debug("showfile: view=%s ",view);
- --- 693,698 ----
- ***************
- *** 684,692 ****
- --- 717,728 ----
-
- } /* GopehrPluss || LocalFile = NULL */
-
- + logrequest("ARRIVED AT", ZeGopher);
-
- if (!WritePipe && GS2FileSucceeded)
- GSdisplay(ZeGopher);
- + if (!GS2FileSucceeded)
- + unlink(tmpfilename);
-
- /* if (!ForkOff) {
- printf("\nPress <RETURN> to continue: ");
- ***************
- *** 696,704 ****
- CURenter(CursesScreen);
- }*/
-
- ! #ifndef VMS
- if (tmpfilename!=NULL) free(tmpfilename);
- - #endif
-
- if (ForkOff)
- exit(-1);
- --- 732,739 ----
- CURenter(CursesScreen);
- }*/
-
- !
- if (tmpfilename!=NULL) free(tmpfilename);
-
- if (ForkOff)
- exit(-1);
- ***************
- *** 836,843 ****
- if (ChangedDefs)
- RCtoFile(GlobalRC);
-
- - /* RCdestroy(GlobalRC);*/
- -
- do {
- if (CurrentDir != NULL && CurrentDir != RCgetBookmarkDir(GlobalRC))
- GDdestroy(CurrentDir);
- --- 871,876 ----
- ***************
- *** 849,855 ****
- if (gd != NULL)
- GDdestroy(gd);
- }
- !
- #ifdef VMS
- DidCleanup = TRUE;
- #endif
- --- 882,888 ----
- if (gd != NULL)
- GDdestroy(gd);
- }
- ! logrequest("EXIT", NULL);
- #ifdef VMS
- DidCleanup = TRUE;
- #endif
- ***************
- *** 1397,1408 ****
- while (bDone == FALSE)
- {
- /* Set up a longjmp for control-cs **/
- - #ifdef VMS
- setjmp(Jmpenv);
- - #else
- - if (setjmp(Jmpenv))
- - CursesErrorMsg("Interrupted...");
- - #endif
-
- GetMenu(CurrentDir, &TypedChar, Garbled);
-
- --- 1430,1436 ----
- ***************
- *** 1417,1432 ****
- ; /** Don't do anything if we failed, I guess **/
- break;
-
- - case '\014': /* ^L */
- - #ifdef VMS
- - case '\022': /* ^R */
- - case '\027': /* ^W */
- - CURexit(CursesScreen);
- - CURenter(CursesScreen);
- - #endif
- - /*** Redraw the screen ***/
- - break;
- -
- case '\0':
- /*** What the heck? ***/
- CursesErrorMsg("Strange Error occurred!");
- --- 1445,1450 ----
- ***************
- *** 1440,1445 ****
- --- 1458,1465 ----
- {
- GopherDirObj *tempGdir;
-
- + logrequest("PREVIOUS DIRECTORY", NULL);
- +
- /*** Don't highlight texts which aren't search hits ***/
- Searchstring = NULL;
-
- ***************
- *** 1532,1537 ****
- --- 1552,1559 ----
-
- case 'v': /** View bookmark list **/
- {
- + logrequest("VIEW BOOKMARKS", NULL);
- +
- if (RCgetBookmarkDir(GlobalRC) == NULL) {
- CursesErrorMsg("No bookmarks are defined");
- break;
- ***************
- *** 1569,1574 ****
- --- 1591,1598 ----
- }
- }
-
- + logrequest("ADD BOOKMARK", tmpgs);
- +
- GSdestroy(tmpgs);
-
- break;
- ***************
- *** 1617,1623 ****
- ChangedDefs = TRUE;
- }
- }
- ! free(tmpgs);
- break;
- }
-
- --- 1641,1649 ----
- ChangedDefs = TRUE;
- }
- }
- ! logrequest("ADD BOOKMARK", tmpgs);
- !
- ! GSdestroy(tmpgs);
- break;
- }
-
- ***************
- *** 1625,1630 ****
- --- 1651,1658 ----
- {
- GopherDirObj *tempgd;
-
- + logrequest("DELETE BOOKMARK", GDgetEntry(CurrentDir, GDgetCurrentItem(CurrentDir)-1));
- +
- tempgd=GDdeleteGS(CurrentDir,(GDgetCurrentItem(CurrentDir)-1));
-
- if (CurrentDir == RCgetBookmarkDir(GlobalRC))
- ***************
- *** 1829,1834 ****
- --- 1857,1865 ----
- else
- GDfromNet(NewDir, sockfd, twirl);
-
- + logrequest("ARRIVED AT", ZeGopher);
- +
- +
- if (GDgetNumitems(NewDir) <= 0) {
- CursesErrorMsg("Nothing available.");
- failed = 1;
- ***************
- *** 1877,1887 ****
- --- 1908,1923 ----
- /** Decide what to do with it.. **/
-
- Debug("process_request type=%c\n",GSgetType(ZeGopher));
- + logrequest("GOING TO", ZeGopher);
-
- switch(GSgetType(ZeGopher)) {
- case -1:
- break;
-
- + case A_INFO:
- + /** Do nothing **/
- + break;
- +
- case A_FILE:
- Draw_Status("Receiving Information...");
- refresh();
- ***************
- *** 1989,2000 ****
- char *banner;
- GopherStruct *ZeGopher;
- {
- - #ifdef VMS
- - /** Need char array for GSsetLocalFile() to be reliable on VMS **/
- - char tmpfilename[512], *cp;
- - #else
- char *tmpfilename;
- - #endif
- FILE *tmpfile;
- Blockobj *bl;
- int i,j, views;
- --- 2025,2031 ----
- ***************
- *** 2007,2028 ****
- GSgetginfo(ZeGopher);
-
- #ifdef VMS
- ! strcpy(tmpfilename, cp=tempnam(NULL,NULL));
- ! free(cp);
- ! Gopenfile = tmpfilename;
- #else
- Gopenfile = tmpfilename = tempnam("/tmp", "gopher");
- #endif
- GSsetLocalFile(infogs, tmpfilename);
- GSsetLocalView(infogs, "text/plain");
- ! if ((tmpfile = fopen(tmpfilename, "w")) == NULL)
- fprintf(stderr, "Couldn't make a tmp file!\n"),
- CleanupandExit(-1);
-
- - #ifndef VMS
- free(tmpfilename);
- - #endif
- -
-
- GStoLink(ZeGopher, fileno(tmpfile));
-
- --- 2038,2056 ----
- GSgetginfo(ZeGopher);
-
- #ifdef VMS
- ! Gopenfile = tmpfilename = tempnam(NULL,NULL);
- #else
- Gopenfile = tmpfilename = tempnam("/tmp", "gopher");
- #endif
- GSsetLocalFile(infogs, tmpfilename);
- GSsetLocalView(infogs, "text/plain");
- ! if ((tmpfile = fopen(tmpfilename, "w")) == NULL) {
- ! CURexit(CursesScreen);
- fprintf(stderr, "Couldn't make a tmp file!\n"),
- CleanupandExit(-1);
- + }
-
- free(tmpfilename);
-
- GStoLink(ZeGopher, fileno(tmpfile));
-
- diff -c gopher+/gopher/gopherrc.c:3.18 gopher+/gopher/gopherrc.c:3.21
- *** gopher+/gopher/gopherrc.c:3.18 Fri Nov 5 01:49:56 1993
- --- gopher+/gopher/gopherrc.c Fri Nov 5 01:49:56 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.18
- ! * 1993/10/11 16:57:40
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/gopherrc.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.21
- ! * 1993/11/05 07:26:11
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/gopherrc.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,29 ----
- *********************************************************************
- * Revision History:
- * gopherrc.c,v
- + * Revision 3.21 1993/11/05 07:26:11 lindner
- + * fix for Solaris
- + *
- + * Revision 3.20 1993/11/02 06:45:14 lindner
- + * Use /home/mudhoney/lindner instead of password routines to read gopherrc
- + *
- + * Revision 3.19 1993/10/22 20:25:51 lindner
- + * Fix for VMS logicals in RCfromENV() (Fote)
- + *
- * Revision 3.18 1993/10/11 16:57:40 lindner
- * Fote's mods for appending %s in display command handling, application/html becomes text/html
- *
- ***************
- *** 120,134 ****
-
- #include <stdio.h>
-
- - #ifndef VMS
- - #include <fcntl.h>
- - #include <pwd.h>
- - #endif
- -
- #ifdef VMS
- #include <unixlib.h>
- #define MAXPATHLEN FILENAME_MAX
- #include <file.h>
- #endif
-
- #ifndef MAXPATHLEN
- --- 129,141 ----
-
- #include <stdio.h>
-
- #ifdef VMS
- #include <unixlib.h>
- #define MAXPATHLEN FILENAME_MAX
- #include <file.h>
- + #else
- + #include <sys/file.h>
- + #include <sys/fcntl.h>
- #endif
-
- #ifndef MAXPATHLEN
- ***************
- *** 395,409 ****
- char rcfilename[MAXPATHLEN];
- int rcfile;
- #ifndef VMS
- ! struct passwd *pwdentry;
- ! pwdentry = getpwuid(geteuid());
- !
- ! if (pwdentry == NULL)
- return(-1);
-
- /** First, let's find out if there is a bookmark file **/
-
- ! strcpy(rcfilename,pwdentry->pw_dir); /* Home directory */
- strcat(rcfilename,"/.gopherrc");
-
- #else
- --- 402,416 ----
- char rcfilename[MAXPATHLEN];
- int rcfile;
- #ifndef VMS
- ! char *home;
- !
- ! home = getenv("HOME");
- ! if (home == NULL)
- return(-1);
-
- /** First, let's find out if there is a bookmark file **/
-
- ! strcpy(rcfilename,home); /* Home directory */
- strcat(rcfilename,"/.gopherrc");
-
- #else
- ***************
- *** 481,493 ****
- strcpy(PrinterP, Printer);
- }
- else {
- ! if(RCprintCommand(GlobalRC,"Text","",Printer))
- ! Printer[strlen(Printer)-1] = '\0';
- else
- strcpy(Printer, PRINTER_COMMAND);
-
- ! if(RCprintCommand(GlobalRC,"Text/plain","",PrinterP))
- ! Printer[strlen(Printer)-1] = '\0';
- else
- strcpy(PrinterP, PRINTER_COMMAND);
- }
- --- 488,504 ----
- strcpy(PrinterP, Printer);
- }
- else {
- ! if(RCprintCommand(GlobalRC,"Text","",Printer)) {
- ! if (Printer[strlen(Printer)-1] == ' ')
- ! Printer[strlen(Printer)-1] = '\0';
- ! }
- else
- strcpy(Printer, PRINTER_COMMAND);
-
- ! if(RCprintCommand(GlobalRC,"Text/plain","",PrinterP)) {
- ! if (PrinterP[strlen(PrinterP)-1] = ' ')
- ! PrinterP[strlen(PrinterP)-1] = '\0';
- ! }
- else
- strcpy(PrinterP, PRINTER_COMMAND);
- }
- ***************
- *** 500,519 ****
- RCMAfromLine(rc->commands, tmpstr);
- }
- else if (PrinterFlag) {
- ! if(RCdisplayCommand(GlobalRC,"Text","",Pager))
- ! Pager[strlen(Pager)-1] = '\0';
- else
- strcpy(Pager, PAGER_COMMAND);
-
- ! sprintf(tmpstr, "Text,%s %%s,%s %%s", Pager, Printer);
- RCMAfromLine(rc->commands, tmpstr);
-
- ! if(RCdisplayCommand(GlobalRC,"Text/plain","",PagerP))
- ! PagerP[strlen(PagerP)-1] = '\0';
- else
- strcpy(PagerP, PAGER_COMMAND);
-
- ! sprintf(tmpstr, "Text/plain,%s %%s,%s %%s", PagerP, Printer);
- RCMAfromLine(rc->commands, tmpstr);
- }
-
- --- 511,540 ----
- RCMAfromLine(rc->commands, tmpstr);
- }
- else if (PrinterFlag) {
- ! if (RCdisplayCommand(GlobalRC,"Text","",Pager)) {
- ! if (Pager[strlen(Pager)-1] == ' ')
- ! Pager[strlen(Pager)-1] = '\0';
- ! }
- else
- strcpy(Pager, PAGER_COMMAND);
-
- ! if (strncasecmp(Pager, "builtin", 7) == 0)
- ! sprintf(tmpstr, "Text,%s,%s %%s", Pager, Printer);
- ! else
- ! sprintf(tmpstr, "Text,%s %%s,%s %%s", Pager, Printer);
- RCMAfromLine(rc->commands, tmpstr);
-
- ! if(RCdisplayCommand(GlobalRC,"Text/plain","",PagerP)) {
- ! if (PagerP[strlen(PagerP)-1] == ' ')
- ! PagerP[strlen(PagerP)-1] = '\0';
- ! }
- else
- strcpy(PagerP, PAGER_COMMAND);
-
- ! if (strncasecmp(PagerP, "builtin", 7) == 0)
- ! sprintf(tmpstr, "Text/plain,%s,%s %%s", PagerP, PrinterP);
- ! else
- ! sprintf(tmpstr, "Text/plain,%s %%s,%s %%s", PagerP, PrinterP);
- RCMAfromLine(rc->commands, tmpstr);
- }
-
- ***************
- *** 548,558 ****
- {
- int rcfile;
- #ifndef VMS
- ! struct passwd *pwdentry;
-
- ! pwdentry = getpwuid(geteuid());
- !
- ! if (pwdentry == NULL)
- return;
- #endif
- rcfile = rcopen(O_RDONLY);
- --- 569,578 ----
- {
- int rcfile;
- #ifndef VMS
- ! char *home;
- ! home = getenv("HOME");
-
- ! if (home == NULL)
- return;
- #endif
- rcfile = rcopen(O_RDONLY);
- ***************
- *** 643,653 ****
- char rcfilename[512];
- char oldrcfilename[512];
- #ifndef VMS
- ! struct passwd *pwdentry;
-
- ! pwdentry = getpwuid(geteuid());
-
- ! if (pwdentry == NULL)
- return;
- #endif /* not VMS */
-
- --- 663,673 ----
- char rcfilename[512];
- char oldrcfilename[512];
- #ifndef VMS
- ! char *home;
-
- ! home = getenv("HOME");
-
- ! if (home == NULL)
- return;
- #endif /* not VMS */
-
- ***************
- *** 658,666 ****
- /** First, let's find out if there is a rc file **/
-
- #ifndef VMS
- ! strcpy(rcfilename,pwdentry->pw_dir); /* Home directory */
- strcat(rcfilename,"/.gopherrc");
- ! strcpy(oldrcfilename,pwdentry->pw_dir);
- strcat(oldrcfilename,"/.gopherrc~");
-
- rcfile = open(rcfilename, O_RDONLY);
- --- 678,686 ----
- /** First, let's find out if there is a rc file **/
-
- #ifndef VMS
- ! strcpy(rcfilename,home); /* Home directory */
- strcat(rcfilename,"/.gopherrc");
- ! strcpy(oldrcfilename,home);
- strcat(oldrcfilename,"/.gopherrc~");
-
- rcfile = open(rcfilename, O_RDONLY);
- diff -c gopher+/gopher/html2.c:3.7 gopher+/gopher/html2.c:3.8
- *** gopher+/gopher/html2.c:3.7 Fri Nov 5 01:49:57 1993
- --- gopher+/gopher/html2.c Fri Nov 5 01:49:57 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.7
- ! * 1993/10/11 17:03:46
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/html2.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.8
- ! * 1993/10/22 20:27:10
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/html2.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * html2.c,v
- + * Revision 3.8 1993/10/22 20:27:10 lindner
- + * Fix for trailing blanks on HTML viewer (Fote)
- + *
- * Revision 3.7 1993/10/11 17:03:46 lindner
- * application/html-->text/html, and simplified test for absence of a display command (Fote)
- *
- ***************
- *** 424,430 ****
- return;
- }
- else
- ! HTMLcmd[strlen(HTMLcmd)-1] = '\0';
-
- if (strncmp(GSgetPath(ZeGopher), "GET /", 5) == 0) {
- sprintf(command, "%s \"http://%s:%d/%s\"", HTMLcmd,
- --- 427,434 ----
- return;
- }
- else
- ! if (HTMLcmd[strlen(HTMLcmd)-1] == ' ')
- ! HTMLcmd[strlen(HTMLcmd)-1] = '\0';
-
- if (strncmp(GSgetPath(ZeGopher), "GET /", 5) == 0) {
- sprintf(command, "%s \"http://%s:%d/%s\"", HTMLcmd,
- diff -c gopher+/gopher/manager.c:3.12 gopher+/gopher/manager.c:3.15
- *** gopher+/gopher/manager.c:3.12 Fri Nov 5 01:49:57 1993
- --- gopher+/gopher/manager.c Fri Nov 5 01:49:57 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.12
- ! * 1993/09/08 01:22:30
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/manager.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.15
- ! * 1993/10/26 18:43:20
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/manager.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,29 ----
- *********************************************************************
- * Revision History:
- * manager.c,v
- + * Revision 3.15 1993/10/26 18:43:20 lindner
- + * Fix for multiply defined cases
- + *
- + * Revision 3.14 1993/10/22 20:30:34 lindner
- + * Fixes for menu drawing (Beckett)
- + *
- + * Revision 3.13 1993/10/22 20:05:20 lindner
- + * Add Movie (;) and Info (i) type support
- + *
- * Revision 3.12 1993/09/08 01:22:30 lindner
- * Add support for HTML and MIME on the menu displays
- *
- ***************
- *** 95,104 ****
- {
- char line[80];
-
- - standout();
- sprintf(line, "Internet Gopher Information Client %s.%s pl%d", GOPHER_MAJOR_VERSION, GOPHER_MINOR_VERSION, PATCHLEVEL);
- ! CURcenterline(CursesScreen,line, 0);
- ! standend();
- }
-
-
- --- 104,111 ----
- {
- char line[80];
-
- sprintf(line, "Internet Gopher Information Client %s.%s pl%d", GOPHER_MAJOR_VERSION, GOPHER_MINOR_VERSION, PATCHLEVEL);
- ! CURcenterline(CursesScreen, stdscr, line, 0, COLS, TRUE);
- }
-
-
- ***************
- *** 110,117 ****
- Draw_Status(textline)
- char *textline;
- {
- - move(LINES-1, 0);
- - clrtoeol();
- mvaddstr(LINES-1, 0, "Press ");
- standout();
- addstr("?");
- --- 117,122 ----
- ***************
- *** 125,135 ****
- addstr(" to Quit");
-
- #ifndef AUTOEXITONU
- ! addstr(", ");
- ! standout();
- ! addstr("u");
- ! standend();
- ! addstr(" to go up a menu");
- #endif
- clrtoeol();
-
- --- 130,142 ----
- addstr(" to Quit");
-
- #ifndef AUTOEXITONU
- ! if (iLevel != 0) {
- ! addstr(", ");
- ! standout();
- ! addstr("u");
- ! standend();
- ! addstr(" to go up a menu");
- ! }
- #endif
- clrtoeol();
-
- ***************
- *** 158,163 ****
- --- 165,173 ----
- size = VIgetSize(GSgetView(gs, 0));
- }
-
- + if (GSisAsk(gs))
- + max -= 5;
- +
- switch(type)
- {
- case A_DIRECTORY:
- ***************
- *** 171,182 ****
- max -=4;
- break;
- case A_CSO:
- - case A_TN3270:
- case A_TELNET:
- case A_UNIXBIN:
- case A_MACHEX:
- max -=6;
- break;
- case A_PCBIN:
- max -=9;
- break;
- --- 181,196 ----
- max -=4;
- break;
- case A_CSO:
- case A_TELNET:
- case A_UNIXBIN:
- case A_MACHEX:
- max -=6;
- break;
- + case A_TN3270:
- + case A_MIME:
- + case A_HTML:
- + max -= 7;
- + break;
- case A_PCBIN:
- max -=9;
- break;
- ***************
- *** 184,198 ****
- case A_IMAGE:
- max -= 10;
- break;
- ! case A_MIME:
- ! max -= 9;
- ! break;
- ! case A_HTML:
- ! max -= 9;
- ! break;
- }
- -
-
- if((m = strlen(d)) <= max)
- printw(" %s", d);
- else {
- --- 198,210 ----
- case A_IMAGE:
- max -= 10;
- break;
- ! case A_MOVIE:
- ! max -= 10;
- }
-
- + if (d==NULL)
- + d = "error";
- +
- if((m = strlen(d)) <= max)
- printw(" %s", d);
- else {
- ***************
- *** 253,259 ****
- case A_HTML:
- addstr(" <HTML>");
- break;
- !
- }
-
- if (GSisAsk(gs))
- --- 265,273 ----
- case A_HTML:
- addstr(" <HTML>");
- break;
- ! case A_MOVIE:
- ! addstr(" <Movie>");
- ! break;
- }
-
- if (GSisAsk(gs))
- ***************
- *** 342,348 ****
- if (nOldPage != nNewPage) {
- Display_Dir_Page(gophersdir,
- iNewLine, nNewPage, nMaxPages, iPageLen, iLastPageLen);
- ! CURcenterline(CursesScreen,GDgetTitle(gophersdir), 2); /*** Draw the title ***/
- }
-
-
- --- 356,363 ----
- if (nOldPage != nNewPage) {
- Display_Dir_Page(gophersdir,
- iNewLine, nNewPage, nMaxPages, iPageLen, iLastPageLen);
- ! /*** Draw the title ***/
- ! CURcenterline(CursesScreen, stdscr, GDgetTitle(gophersdir), 2, COLS, FALSE);
- }
-
-
- ***************
- *** 391,397 ****
- if (redisplay == TRUE) {
-
- /*** Draw the title ***/
- ! CURcenterline(CursesScreen,GDgetTitle(gd), 2);
-
- /* Move to the last line that we were sitting on */
- iItem = scline(iItem, iNewItem, gd);
- --- 406,412 ----
- if (redisplay == TRUE) {
-
- /*** Draw the title ***/
- ! CURcenterline(CursesScreen, stdscr, GDgetTitle(gd), 2, COLS, FALSE);
-
- /* Move to the last line that we were sitting on */
- iItem = scline(iItem, iNewItem, gd);
- diff -c gopher+/gopher/ourutils.c:3.40 gopher+/gopher/ourutils.c:3.46
- *** gopher+/gopher/ourutils.c:3.40 Fri Nov 5 01:49:58 1993
- --- gopher+/gopher/ourutils.c Fri Nov 5 01:49:58 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.40
- ! * 1993/10/11 17:20:43
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.46
- ! * 1993/11/03 03:50:01
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopher/ourutils.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,38 ----
- *********************************************************************
- * Revision History:
- * ourutils.c,v
- + * Revision 3.46 1993/11/03 03:50:01 lindner
- + * More fixes for VMSrecords
- + *
- + * Revision 3.45 1993/11/02 21:17:44 lindner
- + * Better client side logging code
- + *
- + * Revision 3.44 1993/10/27 18:52:17 lindner
- + * Simplify VMS fixed/variable file code
- + *
- + * Revision 3.43 1993/10/26 18:22:43 lindner
- + * Mucho changes for VMS variable length records
- + *
- + * Revision 3.42 1993/10/22 20:33:17 lindner
- + * Fixed bad code in Save_file() for choosing view (Fote)
- + *
- + * Revision 3.41 1993/10/22 20:06:46 lindner
- + * Add optional client logging
- + *
- * Revision 3.40 1993/10/11 17:20:43 lindner
- * Fix for data/time stripping, vms multidot files, no case comparision for builtin
- *
- ***************
- *** 298,309 ****
- #ifdef VMS
- /* encase any address with '@' in double-quotes and add transport */
- /* if the user hasn't done it (based on code from Earl Fogel) */
- ! if (strchr(SaveName, '@') && !strchr(SaveName, '\"'))
- sprintf(MailAddress, MAIL_ADRS, SaveName);
- else
- strcpy(MailAddress, SaveName);
-
- ! sprintf(command, "%s/subject=\"%s\" %s %s",
- MAIL_COMMAND, Realname, Filename, MailAddress);
-
- CURexit(CursesScreen);
- --- 316,327 ----
- #ifdef VMS
- /* encase any address with '@' in double-quotes and add transport */
- /* if the user hasn't done it (based on code from Earl Fogel) */
- ! if ((strchr(SaveName, '@') != NULL) && (strchr(SaveName, '\"') == NULL))
- sprintf(MailAddress, MAIL_ADRS, SaveName);
- else
- strcpy(MailAddress, SaveName);
-
- ! sprintf(command, "%s/subject=\"%.70s\" %s %s",
- MAIL_COMMAND, Realname, Filename, MailAddress);
-
- CURexit(CursesScreen);
- ***************
- *** 322,328 ****
- return;
- }
-
- ! fprintf(mailit, "Subject: %s\n\n", Realname);
-
- while (readline(fileno(infile), buf, sizeof(buf))) {
- twirl();
- --- 340,346 ----
- return;
- }
-
- ! fprintf(mailit, "Subject: %.70s\n\n", Realname);
-
- while (readline(fileno(infile), buf, sizeof(buf))) {
- twirl();
- ***************
- *** 491,497 ****
- items[Asknum]->thing = CUR_CHOICE;
- items[Asknum]->chooseitem = 0;
-
- ! items[Asknum]->choices = (char**) malloc(sizeof(char*)*20);
-
- /*** add list of choices to struct **/
- while ((cp = strchr(defaultval, '\t')) != NULL) {
- --- 509,515 ----
- items[Asknum]->thing = CUR_CHOICE;
- items[Asknum]->chooseitem = 0;
-
- ! items[Asknum]->choices = (char**) malloc(sizeof(char*)*100);
-
- /*** add list of choices to struct **/
- while ((cp = strchr(defaultval, '\t')) != NULL) {
- ***************
- *** 722,729 ****
- --- 740,754 ----
- }
- else {
-
- + #if defined(VMS) && defined(VMSRecords)
- + while((numread = readrecvbuf(sockfd, buf, 512)) > 0) {
- + if (numread < 512)
- + for (i = numread; i < 512; i++) buf[i] = 0;
- + if (fwrite(buf, 512, 1, f) == 0) {
- + #else
- while ((numread = readrecvbuf(sockfd, buf, sizeof buf)) > 0) {
- if (fwrite(buf, numread, 1, f) == 0) {
- + #endif
- CursesErrorMsg("Problems Writing");
- closenet(sockfd);
- return(FALSE);
- ***************
- *** 940,945 ****
- --- 965,971 ----
- char *cp;
- char buf[1024];
- boolean Openpipe = FALSE;
- + boolean GS2FileSucceeded = TRUE;
- FILE *f;
-
- switch (GSgetType(gs)) {
- ***************
- *** 951,966 ****
- CursesErrorMsg("Sorry, can't save that item to a file!");
- return;
- }
- - if (saveto == NULL)
- - return;
-
- - if (view == NULL)
- - view = Choose_View(gs);
- -
- - if (view == NULL || view == "")
- - return;
- }
-
- /*** Get the Title ***/
- strcpy(Title, GSgetTitle(gs));
-
- --- 977,991 ----
- CursesErrorMsg("Sorry, can't save that item to a file!");
- return;
- }
-
- }
-
- + if (view == NULL)
- + view = Choose_View(gs);
- +
- + if (view == NULL || view == "")
- + return;
- +
- /*** Get the Title ***/
- strcpy(Title, GSgetTitle(gs));
-
- ***************
- *** 1031,1040 ****
- --- 1056,1074 ----
- }
- #endif
-
- + #if defined(VMS) && defined(VMSRecords)
- + if (GSisText(gs, view))
- + /*** Save ASCII files as VARIABLE length records for VMS ***/
- + f = fopen_VAR(saveto, "w+");
- + else
- + /*** Save binary files as FIXED 512 records for VMS ***/
- + f = fopen_FIX(saveto, "w+");
- + #else
- if (Openpipe)
- f = popen(saveto, "w+");
- else
- f = fopen(saveto, "w+");
- + #endif
-
- if (f == NULL) {
- char tempstr[128];
- ***************
- *** 1074,1084 ****
- } else {
- /** We don't have the file yet, let's get it... **/
-
- ! GStoFile(gs, f, view, twirl); /* false if fails */
- if (Openpipe)
- pclose(f);
- else
- fclose(f);
- }
- }
-
- --- 1108,1122 ----
- } else {
- /** We don't have the file yet, let's get it... **/
-
- ! GS2FileSucceeded = GStoFile(gs, f, view, twirl); /* false if fails */
- !
- if (Openpipe)
- pclose(f);
- else
- fclose(f);
- +
- + if (!GS2FileSucceeded)
- + unlink(saveto);
- }
- }
-
- ***************
- *** 1153,1162 ****
- --- 1191,1204 ----
- }
- #endif
-
- + #if defined(VMS) && defined(VMSRecords)
- + f = fopen_VAR(saveto, "w+");
- + #else
- if (Openpipe)
- f = popen(saveto, "w+");
- else
- f = fopen(saveto, "w+");
- + #endif
-
- if (f == NULL) {
- char tempstr[128];
- ***************
- *** 1413,1464 ****
-
-
- /*
- - ** This mini pager is intended for people worried about shell escapes from
- - ** more or less or whatever
- - */
- -
- -
- - /*Ourpager(filename)
- - char *filename;
- - {
- - FILE *InFile;
- - int i;
- - char inputline[512], *cp;
- - int Done = FALSE;
- - char ZeTypedChar;
- -
- - if ((InFile = fopen(filename, "r")) == NULL)
- - return;
- -
- - while (Done == FALSE) {
- - tputs(CURgetCLS(CursesScreen),1,outchar);
- -
- - for (i=0 ; i < LINES-1; i++) {
- - cp = fgets(inputline, 512, InFile);
- - ZapCRLF(inputline);
- - puts(inputline);
- - }
- -
- - printf("----Press <ENTER> for next page, q to exit------");
- -
- - cbreak();
- - ZeTypedChar = getchar();
- -
- - if ((ZeTypedChar == 'q') || (cp == NULL)) {
- - printf("\n");
- - Done = TRUE;
- - }
- - }
- -
- - cbreak();
- - fclose(InFile);
- - }
- - */
- -
- -
- -
- -
- - /*
- * This displays a single line message using CUR routines
- */
-
- --- 1455,1460 ----
- ***************
- *** 1493,1498 ****
- --- 1489,1520 ----
- CursesMsg(Message, "Gopher Error");
- }
-
- +
- +
- + #ifdef CLIENT_LOGGER
- + #include <syslog.h>
- + #endif
- +
- + logrequest(msg, gs)
- + char *msg;
- + GopherObj *gs;
- + {
- + #ifdef CLIENT_LOGGER
- + static boolean inited = FALSE;
- + char *url = "";
- +
- + if (inited == FALSE) {
- + openlog("gopher", (LOG_PID), LOG_DAEMON);
- + setlogmask(LOG_UPTO(LOG_INFO));
- + inited = TRUE;
- + }
- + if (gs != NULL)
- + url = GSgetURL(gs);
- +
- + syslog(LOG_INFO, "%s %s", msg, url);
- +
- + #endif
- + }
-
-
-
- diff -c gopher+/gopher/pager.c:3.6 gopher+/gopher/pager.c:3.8
- *** gopher+/gopher/pager.c:3.6 Fri Nov 5 01:49:59 1993
- --- gopher+/gopher/pager.c Fri Nov 5 01:50:00 1993
- ***************
- *** 22,28 ****
- static int currentpage = 0;
-
-
- ! char *PagerHelp[8] =
- {"u, ^G, left : exit pager",
- "space, down : Move to the next page",
- "b, up : Move to the previous page",
- --- 22,28 ----
- static int currentpage = 0;
-
-
- ! char *PagerHelp[9] =
- {"u, ^G, left : exit pager",
- "space, down : Move to the next page",
- "b, up : Move to the previous page",
- ***************
- *** 29,34 ****
- --- 29,35 ----
- "/ : Search for text",
- "m : mail current document",
- "s : save current document",
- + "p : print current document",
- "D : download current document",
- NULL
- };
- ***************
- *** 254,260 ****
- --- 255,266 ----
- cp = fgets(theline, COLS+1, thefile);
- if (cp == NULL)
- break;
- + #if defined(VMS) && defined(VMSRecords)
- + *bytecount = ftell(thefile);
- + #else
- *bytecount += strlen(theline);
- + #endif
- +
- ZapCRLF(theline);
- /** Bold the terms... **/
-
- ***************
- *** 293,299 ****
- --- 299,309 ----
- if (cp == NULL)
- break;
-
- + #if defined(VMS) && defined(VMSRecords)
- + *bytecount = ftell(thefile);
- + #else
- *bytecount += strlen(theline);
- + #endif
-
- if (strcasestr(cp, search) != NULL)
- return(TRUE);
- ***************
- *** 311,316 ****
- --- 321,328 ----
- int ch;
- FILE *thefile;
- char *theline, *cp;
- + char *Dialogmess[3];
- + char command[MAXSTR];
- boolean done = FALSE;
- int bytecount = 0;
- int totalbytes = 0;
- ***************
- *** 321,327 ****
- PagerInitGlobals();
-
- /*** Initialize an array for the screen ... ***/
- ! theline = (char *) malloc(COLS+1);
- *theline = '\0';
-
- stat(GSgetLocalFile(gs), &buf);
- --- 333,339 ----
- PagerInitGlobals();
-
- /*** Initialize an array for the screen ... ***/
- ! theline = (char *) malloc(sizeof(char)*(COLS+1));
- *theline = '\0';
-
- stat(GSgetLocalFile(gs), &buf);
- ***************
- *** 352,359 ****
- --- 364,375 ----
- ch = CURgetch(cur);
-
- switch (ch) {
- + #ifdef VMS
- + case '\032': /* ^Z */
- + #endif
- case KEY_LEFT:
- case 'u':
- + case 'q':
- case '\007':
- done = TRUE;
- break;
- ***************
- *** 387,420 ****
- case KEY_HELP:
- case '?':
- CURDialog(cur, "Pager Help", PagerHelp);
-
- ! case '\014': /* ^L */
- #ifdef VMS
- ! case '\022': /* ^R */
- ! case '\027': /* ^W */
- ! CURexit(CursesScreen);
- ! CURenter(CursesScreen);
- #endif
- ! wclear(stdscr);
- ! PagerTitles(cur, gs, totalbytes);
- ! PagerSeekPage(thefile, currentpage-1, &bytecount);
- ! PagerNextPage(thefile, theline, &bytecount);
- !
- ! break;
-
- ! case 'p':
-
- break;
-
- case 's':
- ! if (!SecureMode || NoShellMode)
- Save_file(gs, NULL, GSgetLocalView(gs));
- else
- CursesErrorMsg("Sorry, you are not allowed to save files");
-
- ! PagerSeekPage(thefile, currentpage-1, &bytecount);
- ! PagerNextPage(thefile, theline, &bytecount);
- !
- break;
-
- case 'D':
- --- 403,453 ----
- case KEY_HELP:
- case '?':
- CURDialog(cur, "Pager Help", PagerHelp);
- + touchwin(stdscr);
- + break;
-
- ! case 'p':
- ! if (SecureMode || NoShellMode) {
- ! CursesErrorMsg("Sorry, you are not allowed to print files");
- ! touchwin(stdscr);
- ! break;
- ! }
- ! if (!RCprintCommand(GlobalRC, GSgetLocalView(gs),
- ! GSgetLocalFile(gs), command) ||
- ! !strncasecmp(command, "- none -", 8) ||
- ! strlen(command) == 0) {
- ! CursesErrorMsg("Sorry, no method to print this document");
- ! touchwin(stdscr);
- ! break;
- ! }
- ! Dialogmess[0] = strdup("The filename is:");
- ! Dialogmess[1] = strdup(GSgetLocalFile(gs));
- ! Dialogmess[2] = NULL;
- !
- ! if (CURDialog(cur, "Print current document", Dialogmess) != -1) {
- #ifdef VMS
- ! if (!system(command))
- ! #else
- ! if (system(command))
- #endif
- ! CursesErrorMsg("Encountered printing problem, sorry...");
- ! }
-
- ! free(Dialogmess[0]);
- ! free(Dialogmess[1]);
-
- + touchwin(stdscr);
- + clearok(curscr, TRUE);
- +
- break;
-
- case 's':
- ! if (!(SecureMode || NoShellMode))
- Save_file(gs, NULL, GSgetLocalView(gs));
- else
- CursesErrorMsg("Sorry, you are not allowed to save files");
-
- ! touchwin(stdscr);
- break;
-
- case 'D':
- ***************
- *** 438,443 ****
- --- 471,477 ----
- /** Search ... ***/
- if (CURGetOneOption(CursesScreen, "",
- "Search text for:", slashstring)<0) {
- + touchwin(stdscr);
- break;
- }
-
- diff -c gopher+/gopherd/NeXTindex.c:3.7 gopher+/gopherd/NeXTindex.c:3.8
- *** gopher+/gopherd/NeXTindex.c:3.7 Fri Nov 5 01:50:02 1993
- --- gopher+/gopherd/NeXTindex.c Fri Nov 5 01:50:02 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.7
- ! * 1993/09/22 05:40:40
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/NeXTindex.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.8
- ! * 1993/11/02 06:02:38
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/NeXTindex.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * NeXTindex.c,v
- + * Revision 3.8 1993/11/02 06:02:38 lindner
- + * HTML Mods
- + *
- * Revision 3.7 1993/09/22 05:40:40 lindner
- * Remove extra fixfile() call
- *
- ***************
- *** 158,164 ****
- if (plusdirs)
- GDplustoNet(gd, sockfd, NULL);
- else
- ! GDtoNet(gd, sockfd);
-
- }
- else {
- --- 161,167 ----
- if (plusdirs)
- GDplustoNet(gd, sockfd, NULL);
- else
- ! GDtoNet(gd, sockfd, GSFORM_G0);
-
- }
- else {
- diff -c gopher+/gopherd/Waisindex.c:3.11 gopher+/gopherd/Waisindex.c:3.12
- *** gopher+/gopherd/Waisindex.c:3.11 Fri Nov 5 01:50:02 1993
- --- gopher+/gopherd/Waisindex.c Fri Nov 5 01:50:02 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.11
- ! * 1993/09/30 16:56:49
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/Waisindex.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.12
- ! * 1993/11/02 06:02:39
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/Waisindex.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * Waisindex.c,v
- + * Revision 3.12 1993/11/02 06:02:39 lindner
- + * HTML Mods
- + *
- * Revision 3.11 1993/09/30 16:56:49 lindner
- * Fix for WAIS and $ requests
- *
- ***************
- *** 397,403 ****
- if (plusdirs)
- GSplustoNet(gs, sockfd, NULL);
- else
- ! GStoNet(gs,sockfd);
- }
-
- Debug("WaisIndexQuery ReturnLine=%s\r\n", ReturnLine);
- --- 400,406 ----
- if (plusdirs)
- GSplustoNet(gs, sockfd, NULL);
- else
- ! GStoNet(gs,sockfd, GSFORM_G0);
- }
-
- Debug("WaisIndexQuery ReturnLine=%s\r\n", ReturnLine);
- diff -c gopher+/gopherd/authenticate.c:3.10 gopher+/gopherd/authenticate.c:3.11
- *** gopher+/gopherd/authenticate.c:3.10 Fri Nov 5 01:50:03 1993
- --- gopher+/gopherd/authenticate.c Fri Nov 5 01:50:03 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.10
- ! * 1993/09/18 03:28:05
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/authenticate.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.11
- ! * 1993/11/02 05:55:48
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/authenticate.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * authenticate.c,v
- + * Revision 3.11 1993/11/02 05:55:48 lindner
- + * Fix for interactive unix
- + *
- * Revision 3.10 1993/09/18 03:28:05 lindner
- * Fix for Abort() fcn declaration
- *
- ***************
- *** 47,53 ****
-
- #include "String.h"
- #include <stdio.h>
- - #include <sys/types.h>
-
- #include "gopherd.h"
- #include "tix.h"
- --- 50,55 ----
- diff -c gopher+/gopherd/command.c:3.8 gopher+/gopherd/command.c:3.9
- *** gopher+/gopherd/command.c:3.8 Fri Nov 5 01:50:03 1993
- --- gopher+/gopherd/command.c Fri Nov 5 01:50:03 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.8
- ! * 1993/10/04 06:49:20
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/command.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.9
- ! * 1993/11/02 05:53:40
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/command.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * command.c,v
- + * Revision 3.9 1993/11/02 05:53:40 lindner
- + * more docs
- + *
- * Revision 3.8 1993/10/04 06:49:20 lindner
- * ASK data stored in core, for a while..
- *
- ***************
- *** 69,75 ****
- temp->ticket = STRnew();
-
- CMDsetGplus(temp, FALSE);
- !
- return(temp);
- }
-
- --- 72,78 ----
- temp->ticket = STRnew();
-
- CMDsetGplus(temp, FALSE);
- !
- return(temp);
- }
-
- ***************
- *** 164,170 ****
- CMDsetSearch(cmd, NULL);
- }
-
- ! /** Get the extra data if it exists... **/
- if (field3 != NULL)
- extradata = field3;
- else if (CMDgetSearch(cmd) == NULL && field2 != NULL)
- --- 167,175 ----
- CMDsetSearch(cmd, NULL);
- }
-
- ! /** Get the extra data (from an ask block etc.) if we've got
- ! an extra data flag... **/
- !
- if (field3 != NULL)
- extradata = field3;
- else if (CMDgetSearch(cmd) == NULL && field2 != NULL)
- ***************
- *** 173,178 ****
- --- 178,185 ----
- if (extradata != NULL) {
- CMDgetXtra(cmd, sockfd, atoi(extradata));
- }
- +
- + /** Test to see if we've got Gplus behaviour */
-
- if (CMDgetCommand(cmd) != NULL && *CMDgetCommand(cmd) != '\0')
- CMDsetGplus(cmd, TRUE);
- diff -c gopher+/gopherd/ext.c:3.11 gopher+/gopherd/ext.c:3.12
- *** gopher+/gopherd/ext.c:3.11 Fri Nov 5 01:50:04 1993
- --- gopher+/gopherd/ext.c Fri Nov 5 01:50:04 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.11
- ! * 1993/10/20 03:17:25
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/ext.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.12
- ! * 1993/10/27 20:35:24
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/ext.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * ext.c,v
- + * Revision 3.12 1993/10/27 20:35:24 lindner
- + * Plug memory leak
- + *
- * Revision 3.11 1993/10/20 03:17:25 lindner
- * Fixed erratic problems with extension adding. Note that the problems
- * with directories not working with Gopher0 clients is due to a missing
- ***************
- *** 195,201 ****
-
- if (x == 0) {
- /** Found an exact match **/
- ! strcpy(cp, dp->d_name);
- return(tmpfile);
- }
- }
- --- 198,205 ----
-
- if (x == 0) {
- /** Found an exact match **/
- ! strcpy(cp, dp->d_name);
- ! closedir(ZeDir);
- return(tmpfile);
- }
- }
- diff -c gopher+/gopherd/gopherd.c:3.58 gopher+/gopherd/gopherd.c:3.62
- *** gopher+/gopherd/gopherd.c:3.58 Fri Nov 5 01:50:05 1993
- --- gopher+/gopherd/gopherd.c Fri Nov 5 01:50:05 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.58
- ! * 1993/10/20 03:22:59
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherd.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.62
- ! * 1993/11/03 03:35:25
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherd.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,32 ----
- *********************************************************************
- * Revision History:
- * gopherd.c,v
- + * Revision 3.62 1993/11/03 03:35:25 lindner
- + * Add headlines to the top level HTML page
- + *
- + * Revision 3.61 1993/11/02 06:08:11 lindner
- + * Strip extensions off of files with multiple views
- + *
- + * Revision 3.60 1993/11/02 05:58:12 lindner
- + * WAIS index speedups, mondo HTML mods
- + *
- + * Revision 3.59 1993/10/28 22:08:17 lindner
- + * memory leak fixes, fix for -u problem
- + *
- * Revision 3.58 1993/10/20 03:22:59 lindner
- * none
- *
- ***************
- *** 479,486 ****
- optarg);
- errflag++;
- } else {
- - struct passwd *pw;
- -
- if (getuid() != 0)
- printf("Need to be root to use -u\n"), exit(-1);
-
- --- 491,496 ----
- ***************
- *** 955,965 ****
- if (!view && strlen(CMDgetSelstr(cmd)) == 0)
- view = "application/gopher-menu";
-
- ! /*** Try to speed things up for gopher0 requests.. ***/
- if (!view && CMDisGplus(cmd) == FALSE) {
- struct stat statbuf;
- ;
- ! if (*CMDgetSelstr(cmd) == '0')
- if (!rstat(CMDgetFile(cmd), &statbuf))
- view = "text/plain";
- else if (*CMDgetSelstr(cmd) == '1')
- --- 965,987 ----
- if (!view && strlen(CMDgetSelstr(cmd)) == 0)
- view = "application/gopher-menu";
-
- !
- ! /*** If the selector string begins with h, it's a html version of
- ! a gopher directory ***/
- !
- ! if (!view && *CMDgetSelstr(cmd) == 'h') {
- ! *CMDgetSelstr(cmd) = '1';
- ! view = "text/html";
- ! }
- !
- ! /*** Try to speed things up for gopher0 requests, avoid reading
- ! big directories.. ***/
- !
- if (!view && CMDisGplus(cmd) == FALSE) {
- struct stat statbuf;
- ;
- ! if (*CMDgetSelstr(cmd) == '0' ||
- ! *CMDgetSelstr(cmd) == 'R')
- if (!rstat(CMDgetFile(cmd), &statbuf))
- view = "text/plain";
- else if (*CMDgetSelstr(cmd) == '1')
- ***************
- *** 1016,1021 ****
- --- 1038,1044 ----
- }
- /** We should have a view by now **/
- }
- + GDdestroy(gd);
- }
- }
-
- ***************
- *** 1049,1057 ****
- break;
-
- case 'h':
- ! /*** A raw html file ***/
- ! /*** Turn off html'ing and just dump the file ***/
- ! UsingHTML = FALSE;
-
- case '0':
- case '9':
- --- 1072,1080 ----
- break;
-
- case 'h':
- ! /** It might be a directory..., or an HTML file on disk **/
- ! ;
- ! break;
-
- case '0':
- case '9':
- ***************
- *** 1277,1282 ****
- --- 1300,1308 ----
- }
- }
-
- + /** Free data ***/
- + CMDdestroy(cmd);
- +
- return(0);
- }
-
- ***************
- *** 1307,1312 ****
- --- 1333,1339 ----
- *Selstr = '1';
- strcpy(Selstr +1, newpath);
- GSsetPath(gs, Selstr);
- + GSsetTTL(gs, GDCgetCachetime(Config));
- return;
- default:
-
- ***************
- *** 1391,1396 ****
- --- 1418,1424 ----
- case A_DIRECTORY:
- GSaddView(gs, "application/gopher-menu", lang, size);
- GSaddView(gs, "application/gopher+-menu", lang, size);
- + GSaddView(gs, "text/html", lang, size);
- break;
- case A_MACHEX:
- GSaddView(gs, "application/mac-binhex40", lang, size);
- ***************
- *** 1418,1424 ****
- GSaddView(gs, "image/gif", lang, size);
- break;
- case A_HTML:
- ! GSaddView(gs, "application/HTML", lang, size);
- break;
- case A_TN3270:
- GSaddView(gs, "application/tn3270", lang, 0);
- --- 1446,1452 ----
- GSaddView(gs, "image/gif", lang, size);
- break;
- case A_HTML:
- ! GSaddView(gs, "text/html", lang, size);
- break;
- case A_TN3270:
- GSaddView(gs, "application/tn3270", lang, 0);
- ***************
- *** 1530,1536 ****
- StrArray *Linkfiles;
- int i, cachefd;
-
- - Linkfiles = STAnew(10);
-
- Debug("GDfromUFS:%s\r\n",pathname)
- Debug("GDfromUFS:Config=%d\r\n",Config)
- --- 1558,1563 ----
- ***************
- *** 1566,1580 ****
- chroot()ing and using relative paths */
- if ((ZeDir = uopendir(".")) == NULL) {
- char tmpstr[256];
- ! getwd(tmpstr);
- ! printf("Current Dir is %s\n", tmpstr);
- ! fflush(stdout);
- ! perror("SOL dude");
- sprintf(tmpstr, "Cannot access directory '%s'", pathname);
- Abortoutput(sockfd, tmpstr);
- return(NULL);
- }
-
- for (dp = readdir(ZeDir); dp != NULL; dp = readdir(ZeDir)) {
- #ifdef CAPFILES
- char capfile[MAXPATHLEN];
- --- 1593,1606 ----
- chroot()ing and using relative paths */
- if ((ZeDir = uopendir(".")) == NULL) {
- char tmpstr[256];
- !
- sprintf(tmpstr, "Cannot access directory '%s'", pathname);
- Abortoutput(sockfd, tmpstr);
- return(NULL);
- }
-
- + Linkfiles = STAnew(10);
- +
- for (dp = readdir(ZeDir); dp != NULL; dp = readdir(ZeDir)) {
- #ifdef CAPFILES
- char capfile[MAXPATHLEN];
- ***************
- *** 1688,1693 ****
- --- 1714,1720 ----
- Pathp[strlen(Prefix)+strlen(newpath)-strlen(EXgetExt(ext))]= '\0';
- GSsetPath(gs, Pathp);
- GSsetType(gs, EXgetObjtype(ext));
- +
- /*** Strip extension off of title***/
- filename[strlen(filename)-strlen(EXgetExt(ext))]= '\0';
-
- ***************
- *** 1701,1706 ****
- --- 1728,1734 ----
- }
- gs = GDgetEntry(gd, num);
- AddItem = FALSE;
- + GSsetTitle(gs, filename);
- }
-
- /** Oh say can we hack, by the dawns early day :-) **/
- ***************
- *** 1794,1799 ****
- --- 1822,1828 ----
- closedir(ZeDir);
-
- GDsort(gd);
- + STAdestroy(Linkfiles);
-
- return(gd);
-
- ***************
- *** 1866,1872 ****
-
- GSsendHeader(sockfd, -1);
- writestring(sockfd, "+INFO ");
- ! GStoNet(gs,sockfd);
- sprintf(tmpstr, "+ADMIN:\r\n Admin: %s <%s>\r\n", GDCgetAdmin(Config),
- GDCgetAdminEmail(Config));
- writestring(sockfd, tmpstr);
- --- 1895,1901 ----
-
- GSsendHeader(sockfd, -1);
- writestring(sockfd, "+INFO ");
- ! GStoNet(gs,sockfd, GSFORM_G0);
- sprintf(tmpstr, "+ADMIN:\r\n Admin: %s <%s>\r\n", GDCgetAdmin(Config),
- GDCgetAdminEmail(Config));
- writestring(sockfd, tmpstr);
- ***************
- *** 1912,1917 ****
- --- 1941,1951 ----
- break;
-
- }
- + if (gs)
- + GSdestroy(gs);
- + if (gd)
- + GDdestroy(gd);
- +
- writestring(sockfd, ".\r\n");
- }
-
- ***************
- *** 1936,1941 ****
- --- 1970,1976 ----
- {
- GopherDirObj *gd;
- boolean attrlist = FALSE;
- + boolean HTMLit = FALSE;
- boolean Recurse = FALSE;
- char *filtereddata[16], **filtered=filtereddata;
- int i=0;
- ***************
- *** 1963,1971 ****
- if (view != NULL) {
- if (strncmp(view, "application/gopher+-menu",24) == 0)
- attrlist = TRUE;
- ! if (strncmp(view, "Directory+/recursive", 20)==0)
- Recurse = TRUE;
- ! if (strncmp(view, "Directory/recursive", 19)==0)
- Recurse = TRUE;
- }
- if (Recurse)
- --- 1998,2010 ----
- if (view != NULL) {
- if (strncmp(view, "application/gopher+-menu",24) == 0)
- attrlist = TRUE;
- ! else if (strncmp(view, "text/html", 9) == 0) {
- ! attrlist = TRUE;
- ! HTMLit = TRUE;
- ! }
- ! else if (strncmp(view, "Directory+/recursive", 20)==0)
- Recurse = TRUE;
- ! else if (strncmp(view, "Directory/recursive", 19)==0)
- Recurse = TRUE;
- }
- if (Recurse)
- ***************
- *** 2005,2011 ****
- }
-
-
- ! if (GDCgetCaching(Config)) {
-
- if (!attrlist &&
- Cachetimedout(".cache", GDCgetCachetime(Config),
- --- 2044,2050 ----
- }
-
-
- ! if (GDCgetCaching(Config) && !HTMLit) {
-
- if (!attrlist &&
- Cachetimedout(".cache", GDCgetCachetime(Config),
- ***************
- *** 2039,2049 ****
- }
-
- rchdir("/");
- !
- ! if (attrlist)
- GDplustoNet(gd, sockfd,filtered);
- else
- ! GDtoNet(gd, sockfd);
-
-
- /*
- --- 2078,2098 ----
- }
-
- rchdir("/");
- !
- ! if (HTMLit) {
- ! if (strcmp(pathname, "/") == 0) {
- ! writestring(sockfd, "<H1>");
- ! writestring(sockfd, GDCgetSite(Config));
- ! writestring(sockfd, "</H1>\r\n<H2>");
- ! writestring(sockfd, GDCgetOrg(Config));
- ! writestring(sockfd, "</H2>");
- ! }
- ! GDtoNet(gd, sockfd, GSFORM_HTML);
- ! }
- ! else if (attrlist)
- GDplustoNet(gd, sockfd,filtered);
- else
- ! GDtoNet(gd, sockfd, GSFORM_G0);
-
-
- /*
- ***************
- *** 2060,2066 ****
-
- if (cachefd >= 0) {
- Debug("Caching directory... into %s\n",cachefile);
- ! GDtoNet(gd, cachefd);
- close(cachefd);
- }
-
- --- 2109,2115 ----
-
- if (cachefd >= 0) {
- Debug("Caching directory... into %s\n",cachefile);
- ! GDtoNet(gd, cachefd, GSFORM_G0);
- close(cachefd);
- }
-
- ***************
- *** 2108,2113 ****
- --- 2157,2164 ----
- } while (Recurse);
-
- writestring(sockfd, ".\r\n");
- + GDdestroy(gd);
- + STRdestroy(pushstring);
-
- }
-
- diff -c gopher+/gopherd/gopherd.conf:3.15 gopher+/gopherd/gopherd.conf:3.16
- *** gopher+/gopherd/gopherd.conf:3.15 Fri Nov 5 01:50:08 1993
- --- gopher+/gopherd/gopherd.conf Fri Nov 5 01:50:08 1993
- ***************
- *** 1,5 ****
- #
- ! # gopherd.conf,v 3.15 1993/10/20 03:22:52 lindner Exp
- #
-
- #
- --- 1,5 ----
- #
- ! # gopherd.conf,v 3.16 1993/11/02 06:03:32 lindner Exp
- #
-
- #
- ***************
- *** 105,112 ****
- #
- # Movies
- #
- ! viewext: .mov 9 9 video/quicktime
- ! viewext: .mpg 9 9 video/mpeg
-
- #
- # Binary files, these need changing for the encoding method
- --- 105,112 ----
- #
- # Movies
- #
- ! viewext: .mov ; 9 video/quicktime
- ! viewext: .mpg ; 9 video/mpeg
-
- #
- # Binary files, these need changing for the encoding method
- diff -c gopher+/gopherd/gopherdconf.c:3.13 gopher+/gopherd/gopherdconf.c:3.14
- *** gopher+/gopherd/gopherdconf.c:3.13 Fri Nov 5 01:50:08 1993
- --- gopher+/gopherd/gopherdconf.c Fri Nov 5 01:50:09 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.13
- ! * 1993/10/20 03:18:17
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherdconf.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.14
- ! * 1993/10/27 20:36:59
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherdconf.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * gopherdconf.c,v
- + * Revision 3.14 1993/10/27 20:36:59 lindner
- + * Plug memory leak
- + *
- * Revision 3.13 1993/10/20 03:18:17 lindner
- * Code for ignore_patt:
- *
- ***************
- *** 498,505 ****
- *extin = ext;
- return(TRUE);
- }
- ! else
- return(FALSE);
-
- }
-
- --- 501,510 ----
- *extin = ext;
- return(TRUE);
- }
- ! else {
- ! EXdestroy(ext);
- return(FALSE);
- + }
-
- }
-
- diff -c gopher+/gopherd/index.c:3.14 gopher+/gopherd/index.c:3.15
- *** gopher+/gopherd/index.c:3.14 Fri Nov 5 01:50:09 1993
- --- gopher+/gopherd/index.c Fri Nov 5 01:50:09 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.14
- ! * 1993/09/30 16:57:05
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.15
- ! * 1993/11/02 06:01:43
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/index.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * index.c,v
- + * Revision 3.15 1993/11/02 06:01:43 lindner
- + * HTML mods
- + *
- * Revision 3.14 1993/09/30 16:57:05 lindner
- * Fix for WAIS and $ requests
- *
- ***************
- *** 352,358 ****
- if (UsingHTML)
- GDtoNetHTML(gd, sockfd);
- else {
- ! GDtoNet(gd, sockfd);
- }
-
- pclose(moocow);
- --- 355,361 ----
- if (UsingHTML)
- GDtoNetHTML(gd, sockfd);
- else {
- ! GDtoNet(gd, sockfd, GSFORM_G0);
- }
-
- pclose(moocow);
- ***************
- *** 391,397 ****
- if (UsingHTML)
- GDtoNetHTML(gd, sockfd);
- else {
- ! GDtoNet(gd, sockfd);
- }
-
- pclose(Searchprocess);
- --- 394,400 ----
- if (UsingHTML)
- GDtoNetHTML(gd, sockfd);
- else {
- ! GDtoNet(gd, sockfd, GSFORM_G0);
- }
-
- pclose(Searchprocess);
- diff -c gopher+/gopherd/serverutil.c:3.17 gopher+/gopherd/serverutil.c:3.18
- *** gopher+/gopherd/serverutil.c:3.17 Fri Nov 5 01:50:10 1993
- --- gopher+/gopherd/serverutil.c Fri Nov 5 01:50:10 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.17
- ! * 1993/10/11 04:40:54
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.18
- ! * 1993/11/05 07:25:44
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/serverutil.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * serverutil.c,v
- + * Revision 3.18 1993/11/05 07:25:44 lindner
- + * futzing with stdarg lines
- + *
- * Revision 3.17 1993/10/11 04:40:54 lindner
- * Changes to allow logging via daemon.info syslogd facility
- *
- ***************
- *** 81,97 ****
- #include "serverutil.h"
- #include "Debug.h"
-
- - #ifdef __STDC__
- - #include <stdarg.h>
- - #else
- - #include <varargs.h>
- - #endif
- -
- #ifndef NOSYSLOG
- #include <syslog.h>
- #else
- #define syslog(a,b) fprintf(stderr, "%s\n", (b))
- #define openlog(a,b,c) fprintf(stderr, "%s\n", (a))
- #endif
-
- /*
- --- 84,101 ----
- #include "serverutil.h"
- #include "Debug.h"
-
- #ifndef NOSYSLOG
- #include <syslog.h>
- #else
- #define syslog(a,b) fprintf(stderr, "%s\n", (b))
- #define openlog(a,b,c) fprintf(stderr, "%s\n", (a))
- + #endif
- +
- +
- + #ifdef __STDC__
- + #include <stdarg.h>
- + #else
- + #include <varargs.h>
- #endif
-
- /*
- diff -c gopher+/gopherd/special.c:3.14 gopher+/gopherd/special.c:3.15
- *** gopher+/gopherd/special.c:3.14 Fri Nov 5 01:50:10 1993
- --- gopher+/gopherd/special.c Fri Nov 5 01:50:10 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.14
- ! * 1993/08/19 20:52:30
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.15
- ! * 1993/11/03 03:32:52
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/special.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * special.c,v
- + * Revision 3.15 1993/11/03 03:32:52 lindner
- + * Test shell scripts for exec bit
- + *
- * Revision 3.14 1993/08/19 20:52:30 lindner
- * Mitra comments
- *
- ***************
- *** 137,143 ****
- }
-
- /* Script? */
- ! if (isshellscript(s)) {
- s[strlen(s)-1] = '\0';
- if (dochroot)
- sprintf(buf, "\"%s\" %s", pathname, (EXECargs == NULL) ? "" : EXECargs);
- --- 140,146 ----
- }
-
- /* Script? */
- ! if (isshellscript(s) && isexec(fileno(fp))) {
- s[strlen(s)-1] = '\0';
- if (dochroot)
- sprintf(buf, "\"%s\" %s", pathname, (EXECargs == NULL) ? "" : EXECargs);
- ***************
- *** 205,215 ****
- return(NULL);
- }
-
- int
- isshellscript(s)
- char *s;
- {
- ! if (! strncmp(s, "#!/", 3))
- return 1;
- else
- return 0;
- --- 208,242 ----
- return(NULL);
- }
-
- +
- + /*
- + * Is this a shell script?
- + */
- +
- int
- isshellscript(s)
- char *s;
- {
- ! if (! strncmp(s, "#!", 2))
- ! return 1;
- ! else
- ! return 0;
- ! }
- !
- ! /*
- ! * Are the exec bits set?
- ! */
- !
- ! int
- ! isexec(fd)
- ! int fd;
- ! {
- ! STATSTR sb;
- !
- ! if (fstat(fd, &sb) == -1)
- ! return 0;
- !
- ! if (sb.st_mode & S_IXUSR)
- return 1;
- else
- return 0;
- diff -c gopher+/gopherd/waisgopher.c:3.14 gopher+/gopherd/waisgopher.c:3.15
- *** gopher+/gopherd/waisgopher.c:3.14 Fri Nov 5 01:50:11 1993
- --- gopher+/gopherd/waisgopher.c Fri Nov 5 01:50:11 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.14
- ! * 1993/10/04 06:40:19
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/waisgopher.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.15
- ! * 1993/11/02 06:02:41
- * /export/mudhoney/GopherSrc/CVS/gopher+/gopherd/waisgopher.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * waisgopher.c,v
- + * Revision 3.15 1993/11/02 06:02:41 lindner
- + * HTML Mods
- + *
- * Revision 3.14 1993/10/04 06:40:19 lindner
- * casting error
- *
- ***************
- *** 521,527 ****
- }
-
- if (view == NULL)
- ! GDtoNet(gd, sockfd);
- else {
- if (isgplus)
- GSsendHeader(sockfd, -1);
- --- 524,530 ----
- }
-
- if (view == NULL)
- ! GDtoNet(gd, sockfd, GSFORM_G0);
- else {
- if (isgplus)
- GSsendHeader(sockfd, -1);
- ***************
- *** 529,535 ****
- if (strcasecmp(view, "application/gopher+-menu")==0)
- GDplustoNet(gd, sockfd, NULL);
- else
- ! GDtoNet(gd, sockfd);
- }
-
- writestring(sockfd, ".\r\n");
- --- 532,538 ----
- if (strcasecmp(view, "application/gopher+-menu")==0)
- GDplustoNet(gd, sockfd, NULL);
- else
- ! GDtoNet(gd, sockfd, GSFORM_G0);
- }
-
- writestring(sockfd, ".\r\n");
- diff -c gopher+/gophfilt/gophfilt.c:1.1 gopher+/gophfilt/gophfilt.c:1.2
- *** gopher+/gophfilt/gophfilt.c:1.1 Fri Nov 5 01:50:13 1993
- --- gopher+/gophfilt/gophfilt.c Fri Nov 5 01:50:13 1993
- ***************
- *** 9,15 ****
- */
-
- #include <stdio.h>
- ! #include <stdlib.h>
- #include <signal.h>
- #include "GSgopherobj.h"
- #include "conf.h"
- --- 9,15 ----
- */
-
- #include <stdio.h>
- ! #include "Stdlib.h"
- #include <signal.h>
- #include "GSgopherobj.h"
- #include "conf.h"
- ***************
- *** 18,24 ****
-
- int DEBUG = 0;
-
- ! void *timeout();
-
- /*** for getopt processing ***/
- extern char *optarg;
- --- 18,24 ----
-
- int DEBUG = 0;
-
- ! SIGRETTYPE timeout();
-
- /*** for getopt processing ***/
- extern char *optarg;
- ***************
- *** 135,141 ****
-
- /* Set an alarm in case we get nothing */
-
- ! (void *)signal(SIGALRM, timeout);
- (void)alarm(timer);
-
- switch (GSgetType(Oneshot)) {
- --- 135,141 ----
-
- /* Set an alarm in case we get nothing */
-
- ! (void)signal(SIGALRM, timeout);
- (void)alarm(timer);
-
- switch (GSgetType(Oneshot)) {
- ***************
- *** 180,186 ****
- /*SUBTTL timeout() - Alarm expired while awaiting data */
- /*
- */
- ! void *timeout()
- {
- exit(-7);
- }
- --- 180,186 ----
- /*SUBTTL timeout() - Alarm expired while awaiting data */
- /*
- */
- ! SIGRETTYPE timeout()
- {
- exit(-7);
- }
- diff -c gopher+/object/BLblock.c:3.7 gopher+/object/BLblock.c:3.8
- *** gopher+/object/BLblock.c:3.7 Fri Nov 5 01:50:15 1993
- --- gopher+/object/BLblock.c Fri Nov 5 01:50:15 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.7
- ! * 1993/07/29 19:59:23
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/BLblock.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.8
- ! * 1993/11/02 06:13:36
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/BLblock.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * BLblock.c,v
- + * Revision 3.8 1993/11/02 06:13:36 lindner
- + * Fix for HTML mods
- + *
- * Revision 3.7 1993/07/29 19:59:23 lindner
- * Removed extraneous variables
- *
- ***************
- *** 295,301 ****
-
- case BDATA_GREF:
- writestring(fd, " ");
- ! GStoNet(bl->data.gs,fd);
- break;
-
- case BDATA_TEXT:
- --- 298,304 ----
-
- case BDATA_GREF:
- writestring(fd, " ");
- ! GStoNet(bl->data.gs,fd, GSFORM_G0);
- break;
-
- case BDATA_TEXT:
- diff -c gopher+/object/GDgopherdir.c:3.13 gopher+/object/GDgopherdir.c:3.14
- *** gopher+/object/GDgopherdir.c:3.13 Fri Nov 5 01:50:15 1993
- --- gopher+/object/GDgopherdir.c Fri Nov 5 01:50:15 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.13
- ! * 1993/08/23 20:56:34
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/GDgopherdir.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.14
- ! * 1993/11/02 06:15:15
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/GDgopherdir.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * GDgopherdir.c,v
- + * Revision 3.14 1993/11/02 06:15:15 lindner
- + * HTML additions
- + *
- * Revision 3.13 1993/08/23 20:56:34 lindner
- * Fix for empty directory in g+ client
- *
- ***************
- *** 212,227 ****
-
-
- void
- ! GDtoNet(gd, sockfd)
- GopherDirObj *gd;
- int sockfd;
- {
- int i;
- Debug("GDplustoNet\n",0);
- for (i=0; i< GDgetNumitems(gd); i++) {
- ! GStoNet(GDgetEntry(gd, i), sockfd);
- }
-
- }
-
-
- --- 215,239 ----
-
-
- void
- ! GDtoNet(gd, sockfd, fmt)
- GopherDirObj *gd;
- int sockfd;
- + GSformat fmt;
- {
- int i;
- Debug("GDplustoNet\n",0);
- +
- + if (fmt == GSFORM_HTML) {
- + writestring(sockfd, "<DL COMPACT>\r\n");
- + }
- +
- for (i=0; i< GDgetNumitems(gd); i++) {
- ! GStoNet(GDgetEntry(gd, i), sockfd,fmt);
- }
-
- + if (fmt == GSFORM_HTML) {
- + writestring(sockfd, "</DL>\r\n");
- + }
- }
-
-
- ***************
- *** 418,423 ****
- --- 430,436 ----
-
- if (result == HARDERROR)
- break;
- +
- if (result == SOFTERROR)
- continue;
-
- ***************
- *** 450,457 ****
- }
-
- /*** Search for a specific gopher item ***/
- - /* Allow text to end in .Z - gd will never have a .Z item in it due to fix
- - in gopherd/gopherd */
- int
- GDSearch(gd, text)
- GopherDirObj *gd;
- --- 463,468 ----
- ***************
- *** 458,464 ****
- char *text; /* Note first char is G0 type and is ignored*/
- {
- int i;
- - int WasCtrlZ = 0;
- GopherObj *gs;
- int len;
-
- --- 469,474 ----
- ***************
- *** 471,494 ****
- return(-1);
-
- len = strlen(text);
- - if (len >2) {
- - WasCtrlZ = (strcmp(text+strlen(text)-2,".Z") == 0);
- - if (WasCtrlZ)
- - text[strlen(text)-2] = '\0';
- - }
-
- for (i=0; i< GDgetNumitems(gd); i++) {
- gs = GDgetEntry(gd, i);
-
- if (len >1 && strcmp(text+1, GSgetPath(gs)+1) == 0) {
- - if (WasCtrlZ)
- - text[strlen(text)-2] = '.';
- Debug("Matched\n",0);
- return(i);
- }
- }
- - if (WasCtrlZ)
- - text[strlen(text)-2] = '.';
- Debug("GDsearch: No Match\n",0);
- return(-1);
- }
- --- 481,495 ----
- diff -c gopher+/object/GSgopherobj.c:3.20 gopher+/object/GSgopherobj.c:3.27
- *** gopher+/object/GSgopherobj.c:3.20 Fri Nov 5 01:50:16 1993
- --- gopher+/object/GSgopherobj.c Fri Nov 5 01:50:16 1993
- ***************
- *** 220,225 ****
- --- 220,226 ----
- STRinit(gs->Localfile);
- STRinit(gs->Localview);
-
- + gs->ttl = -1;
- gs->iPort = 0;
- GSsetNum(gs, 0);
- GSsetWeight(gs, 0);
- ***************
- *** 279,284 ****
- --- 280,296 ----
- return(URLget(gs->url));
- }
-
- + char *
- + GSgetURLhtml(gs)
- + GopherObj *gs;
- + {
- + if (gs->url == NULL) {
- + gs->url = URLnew();
- + URLfromGS(gs->url, gs);
- + }
- + URLmakeHTML(gs->url);
- + return(URLget(gs->url));
- + }
-
- void
- GSsetstringAsk(gs,ask)
- ***************
- *** 436,444 ****
- */
-
- void
- ! GStoNet(gs, sockfd)
- GopherObj *gs;
- ! int sockfd;
- {
- static char buf[1024];
-
- --- 448,457 ----
- */
-
- void
- ! GStoNet(gs, sockfd, fmt)
- GopherObj *gs;
- ! int sockfd;
- ! GSformat fmt;
- {
- static char buf[1024];
-
- ***************
- *** 447,469 ****
- if (buf[0] == '\0') /* For example a .names with no Type */
- buf[0] = '3';
-
- ! sprintf(buf + 1, "%s\t%s\t%s\t%d",
- ! GSgetTitle(gs),
- ! GSgetPath(gs),
- ! GSgetHost(gs),
- ! GSgetPort(gs));
-
- ! if (GSisAsk(gs))
- ! strcat(buf, "\t?\r\n");
- ! else if (GSisGplus(gs))
- ! strcat(buf, "\t+\r\n");
- ! else
- ! strcat(buf, "\r\n");
- !
- ! writestring(sockfd, buf);
- !
- ! Debug("GStoNet:%s", buf);
- !
- }
-
-
- --- 460,505 ----
- if (buf[0] == '\0') /* For example a .names with no Type */
- buf[0] = '3';
-
- ! if (fmt == GSFORM_G0) {
- ! sprintf(buf + 1, "%s\t%s\t%s\t%d",
- ! GSgetTitle(gs),
- ! GSgetPath(gs),
- ! GSgetHost(gs),
- ! GSgetPort(gs));
- !
- ! if (GSisAsk(gs))
- ! strcat(buf, "\t?\r\n");
- ! else if (GSisGplus(gs))
- ! strcat(buf, "\t+\r\n");
- ! else
- ! strcat(buf, "\r\n");
- !
- ! writestring(sockfd, buf);
- ! Debug("GStoNet:%s", buf);
- ! }
- ! else if (fmt == GSFORM_GPLUS) {
- ! ;
- ! }
- ! else if (fmt == GSFORM_HTML) {
- ! if (GSgetType(gs) == A_INFO) {
- ! writestring(sockfd, "<DD>");
- ! writestring(sockfd, GSgetTitle(gs));
- ! return;
- ! }
- ! sprintf(buf, "<DT><A HREF=\"%s\">%s</A>\r\n",
- ! GSgetURLhtml(gs),
- ! GSgetTitle(gs));
- ! writestring(sockfd, buf);
-
- ! if (GSisGplus(gs)) {
- ! ;
- ! }
- ! if (GSgetWeight(gs) != 0) {
- ! sprintf(buf, "<DD>Score: %d\r\n", GSgetWeight(gs));
- ! writestring(buf);
- ! }
- ! }
- !
- }
-
-
- ***************
- *** 500,506 ****
-
- /** Send out the old style INFO stuff **/
- writestring(sockfd, "+INFO: ");
- ! GStoNet(gs,sockfd);
-
-
- /** Only write out "interesting" URLs **/
- --- 536,542 ----
-
- /** Send out the old style INFO stuff **/
- writestring(sockfd, "+INFO: ");
- ! GStoNet(gs,sockfd, GSFORM_G0);
-
-
- /** Only write out "interesting" URLs **/
- ***************
- *** 522,527 ****
- --- 558,568 ----
- writestring(sockfd, GSgetAdmin(gs));
- writestring(sockfd, "\r\n Mod-Date: ");
- writestring(sockfd, GSgetModDate(gs));
- + if (GSgetTTL(gs) > -1) {
- + writestring(sockfd, "\r\n TTL: ");
- + sprintf(tmpstr, "%d", GSgetTTL(gs));
- + writestring(sockfd, tmpstr);
- + }
- writestring(sockfd, "\r\n");
- }
- if (GSgetNumViews(gs) > 0 && sendviews) {
- ***************
- *** 638,645 ****
-
- if (strncasecmp(cp, "Admin: ",7)==0)
- GSsetAdmin(gs, cp+7);
- ! if (strncasecmp(cp, "Mod-Date: ", 10)==0)
- GSsetModDate(gs, cp+10);
- }
- } else if (strcasecmp(BLgetName(bl), "URL")==0) {
- char *cp;
- --- 679,688 ----
-
- if (strncasecmp(cp, "Admin: ",7)==0)
- GSsetAdmin(gs, cp+7);
- ! else if (strncasecmp(cp, "Mod-Date: ", 10)==0)
- GSsetModDate(gs, cp+10);
- + else if (strncasecmp(cp, "TTL: ", 5) == 0)
- + GSsetTTL(gs, atoi(cp+5));
- }
- } else if (strcasecmp(BLgetName(bl), "URL")==0) {
- char *cp;
- ***************
- *** 796,801 ****
- --- 839,846 ----
- case A_TN3270:
- case A_MIME:
- case A_IMAGE:
- + case A_INFO:
- + case A_MOVIE:
- break;
- case A_EOI:
- if (foo[1] == '\r' && foo[2] == '\n')
- ***************
- *** 860,865 ****
- --- 905,912 ----
- GSsetGplus(dest, GSisGplus(orig));
- GSsetAsk(dest, GSisAsk(orig));
-
- + GSsetTTL(dest, GSgetTTL(orig));
- +
- GSsetLocalFile(dest, GSgetLocalFile(orig));
- GSsetLocalView(dest, GSgetLocalView(orig));
- GSpluscpy(dest, orig);
- ***************
- *** 1194,1199 ****
- --- 1241,1248 ----
- char buf[1024];
- int bytesread;
- boolean BadDomain = FALSE; /** For use with the Domain= line **/
- + boolean DidDomain = FALSE; /** Needed to make Domain= lines
- + into logical or's **/
-
- Debug("GSfromLink...\n",0);
- while ((bytesread = readline(fd, buf, sizeof(buf)))>0) {
- ***************
- *** 1214,1219 ****
- --- 1263,1270 ----
- GSsetType(gs, buf[5]);
- if (buf[6] == '+')
- GSsetGplus(gs, TRUE);
- + if (buf[6] == '?')
- + GSsetAsk(gs, TRUE);
- doneflags |= G_TYPE;
- }
-
- ***************
- *** 1269,1275 ****
- /** Check to see if the peer matches the domain **/
- int peerlen = strlen(peer);
- int domainlen = strlen(buf+7);
- !
- if (domainlen > peerlen) {
- BadDomain = TRUE;
- } else if (strncasecmp(buf+7, peer + peerlen - domainlen, domainlen)== 0) {
- --- 1320,1329 ----
- /** Check to see if the peer matches the domain **/
- int peerlen = strlen(peer);
- int domainlen = strlen(buf+7);
- !
- ! if (DidDomain == TRUE && BadDomain == FALSE)
- ! break;
- !
- if (domainlen > peerlen) {
- BadDomain = TRUE;
- } else if (strncasecmp(buf+7, peer + peerlen - domainlen, domainlen)== 0) {
- ***************
- *** 1277,1284 ****
- --- 1331,1356 ----
- BadDomain = FALSE;
- } else
- BadDomain = TRUE;
- +
- + DidDomain = TRUE;
- }
- + else if (strncmp(buf, "Domain_pat=", 11) ==0 && peer != NULL) {
- + if (DidDomain == TRUE && BadDomain == FALSE)
- + break;
-
- + /** Check for domain using regexps **/
- + if (re_comp(buf+11) != NULL)
- + break;
- + if (re_exec(peer) == 1)
- + BadDomain = FALSE;
- + else
- + BadDomain = TRUE;
- +
- + DidDomain = TRUE;
- + }
- + else if (strncmp(buf, "TTL=", 4) == 0) {
- + GSsetTTL(gs, atoi(buf+4));
- + }
- else
- break; /*** Unknown name/item ***/
- }
- ***************
- *** 1329,1335 ****
- sprintf(portnum, "%d", GSgetPort(gs));
- writestring(fd, portnum);
- writestring(fd, "\n");
- ! if (GSisGplus(gs) && GSgplusInited(gs)) {
- writestring(fd, "Admin=");
- writestring(fd, GSgetAdmin(gs));
- writestring(fd, "\nModDate=");
- --- 1401,1407 ----
- sprintf(portnum, "%d", GSgetPort(gs));
- writestring(fd, portnum);
- writestring(fd, "\n");
- ! /* if (GSisGplus(gs) && GSgplusInited(gs)) {
- writestring(fd, "Admin=");
- writestring(fd, GSgetAdmin(gs));
- writestring(fd, "\nModDate=");
- ***************
- *** 1336,1341 ****
- --- 1408,1414 ----
- writestring(fd, GSgetModDate(gs));
- writestring(fd, "\n");
- }
- + */
- }
-
-
- ***************
- *** 1345,1350 ****
- --- 1418,1426 ----
- char *view;
- {
- char viewstowage[64], *cp;
- +
- + if (view == NULL)
- + return(FALSE);
-
- strcpy(viewstowage, view);
- if ((cp=strchr(viewstowage, ' '))!=NULL) {
- diff -c gopher+/object/GSgopherobj.h:3.9 gopher+/object/GSgopherobj.h:3.11
- *** gopher+/object/GSgopherobj.h:3.9 Fri Nov 5 01:50:17 1993
- --- gopher+/object/GSgopherobj.h Fri Nov 5 01:50:17 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.9
- ! * 1993/09/18 04:44:43
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/GSgopherobj.h,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.11
- ! * 1993/11/02 06:15:27
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/GSgopherobj.h,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,26 ----
- *********************************************************************
- * Revision History:
- * GSgopherobj.h,v
- + * Revision 3.11 1993/11/02 06:15:27 lindner
- + * HTML additions
- + *
- + * Revision 3.10 1993/10/22 20:03:32 lindner
- + * Add Movie (;) and Info (i) type support
- + *
- * Revision 3.9 1993/09/18 04:44:43 lindner
- * Additions to fix caching of Multiple view items
- *
- ***************
- *** 81,91 ****
- --- 87,106 ----
- #define A_TN3270 'T'
- #define A_MIME 'M'
- #define A_IMAGE 'I'
- + #define A_INFO 'i'
- + #define A_MOVIE ';'
- #define A_EOI '.'
-
- typedef struct g_struct GopherObj;
- #include "BLblock.h"
-
- + /*** Formats for GStoNet() ***/
- + #define GSFORM_G0 0
- + #define GSFORM_GPLUS 1
- + #define GSFORM_HTML 2
- +
- + typedef int GSformat;
- +
- /*** Our gopher+ attributes structure ***/
-
- struct gplus_struct
- ***************
- *** 118,123 ****
- --- 133,139 ----
- int iPort; /* Port number on host */
- int Itemnum; /* The number of the item in the directory*/
- int weight; /* The weight, expressed as a # from 0-1000 */
- + int ttl; /* The Time-To-Live, how long the item is good */
-
- String *Localfile; /* The local file of the item */
- String *Localview; /* The view of the local file of the item */
- ***************
- *** 125,131 ****
- boolean isgplus; /* Item can be queried gopher+ style */
- boolean isask; /* Item contains an ASK block */
- GplusObj *gplus; /* Gopher + attributes */
- ! Url *url;
- };
-
-
- --- 141,147 ----
- boolean isgplus; /* Item can be queried gopher+ style */
- boolean isask; /* Item contains an ASK block */
- GplusObj *gplus; /* Gopher + attributes */
- ! Url *url; /* The Unix^H^H^Hniversal Resource Locator */
- };
-
-
- ***************
- *** 152,157 ****
- --- 168,176 ----
- #define GSgetWeight(a) ((a)->weight)
- #define GSsetWeight(a,b) ((a)->weight=(b))
-
- + #define GSgetTTL(a) ((a)->ttl)
- + #define GSsetTTL(a,b) ((a)->ttl=(b))
- +
- #define GSgetLocalFile(a) ((STRget((a)->Localfile)))
- #define GSsetLocalFile(a,b) ((STRset((a)->Localfile, (b))))
-
- ***************
- *** 172,184 ****
- #define GSgetModDate(a) (STRget((a)->gplus->ModDate))
-
- /* some compilers can't grok this... */
- - /*#define GSgetVIA(a) (((a)->gplus == NULL) ? NULL : ((a)->gplus->Views))*/
- #define GSgetNumViews(a) (VIAgetTop((a)->gplus->Views))
- #define GSgetView(a,b) (VIAgetEntry((a)->gplus->Views,(b)))
-
- /* Some of the code has been known to do a->gplus->OtherBlocks
- when gplus is NULL, leads to obscure errors :-)
- -
- Of course lots of compilers can't grok this... sigh... */
- #define GSgetOtherBlocks(a) (((a)->gplus->OtherBlocks))
-
- --- 191,201 ----
- diff -c gopher+/object/Regex.h:3.1 gopher+/object/Regex.h:3.2
- *** gopher+/object/Regex.h:3.1 Fri Nov 5 01:50:18 1993
- --- gopher+/object/Regex.h Fri Nov 5 01:50:18 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.1
- ! * 1993/10/19 20:48:26
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/Regex.h,v
- * $Status: $
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.2
- ! * 1993/10/27 18:50:38
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/Regex.h,v
- * $Status: $
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * Regex.h,v
- + * Revision 3.2 1993/10/27 18:50:38 lindner
- + * Support for more sysv platforms
- + *
- * Revision 3.1 1993/10/19 20:48:26 lindner
- * Portable versions of Regular expression routines for System V and BSD..
- *
- ***************
- *** 22,28 ****
- *********************************************************************/
-
-
- ! #if defined(USG) || defined(__svr4__) || defined(_AUX_SOURCE)
-
- # include "Malloc.h" /** For NULL **/
-
- --- 25,31 ----
- *********************************************************************/
-
-
- ! #if defined(USG) || defined(__svr4__) || defined(_AUX_SOURCE) || defined(hpux) || defined(irix) || defined(SYSVREGEX)
-
- # include "Malloc.h" /** For NULL **/
-
- diff -c gopher+/object/STRstring.c:3.4 gopher+/object/STRstring.c:3.6
- *** gopher+/object/STRstring.c:3.4 Fri Nov 5 01:50:18 1993
- --- gopher+/object/STRstring.c Fri Nov 5 01:50:18 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.4
- ! * 1993/10/19 20:46:00
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/STRstring.c,v
- * $Status: $
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.6
- ! * 1993/10/27 18:53:23
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/STRstring.c,v
- * $Status: $
- *
- ***************
- *** 15,20 ****
- --- 15,26 ----
- *********************************************************************
- * Revision History:
- * STRstring.c,v
- + * Revision 3.6 1993/10/27 18:53:23 lindner
- + * don't forget \0
- + *
- + * Revision 3.5 1993/10/22 20:15:52 lindner
- + * Remove superfulous declaration of len (Fote)
- + *
- * Revision 3.4 1993/10/19 20:46:00 lindner
- * Better, tighter STRstring stuff (Fote)
- *
- ***************
- *** 47,53 ****
- char *in;
- {
- register String *temp;
- - register int len;
-
- temp = (String *) malloc(sizeof(String));
- temp->data = NULL;
- --- 53,58 ----
- ***************
- *** 55,62 ****
- if (in == NULL)
- return(temp);
-
- - len = strlen(in) + 1;
- -
- STRset(temp, in);
- return(temp);
- }
- --- 60,65 ----
- ***************
- *** 133,150 ****
- if (*str == '\0')
- len = 1;
- else
- ! len = strlen(str);
-
- /* Uninitialized data... */
-
- if (st->data == NULL) {
- ! st->data = (char *) malloc(sizeof(char*) * len+1);
- st->len = len;
- }
-
- /** Something's already there... **/
-
- ! else if (STRlen(st) < len) {
- char *temp;
-
- temp = (char *) realloc(st->data, len);
- --- 136,153 ----
- if (*str == '\0')
- len = 1;
- else
- ! len = strlen(str)+1; /** Don't forget the '\0' **/
-
- /* Uninitialized data... */
-
- if (st->data == NULL) {
- ! st->data = (char *) malloc(sizeof(char*) * len);
- st->len = len;
- }
-
- /** Something's already there... **/
-
- ! else if (STRsize(st) < len) {
- char *temp;
-
- temp = (char *) realloc(st->data, len);
- diff -c gopher+/object/STRstring.h:3.2 gopher+/object/STRstring.h:3.3
- *** gopher+/object/STRstring.h:3.2 Fri Nov 5 01:50:19 1993
- --- gopher+/object/STRstring.h Fri Nov 5 01:50:19 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.2
- ! * 1993/06/22 05:48:03
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/STRstring.h,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.3
- ! * 1993/10/27 18:53:44
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/STRstring.h,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * STRstring.h,v
- + * Revision 3.3 1993/10/27 18:53:44 lindner
- + * Add STRsize()
- + *
- * Revision 3.2 1993/06/22 05:48:03 lindner
- * Mods for VMS
- *
- ***************
- *** 54,61 ****
- void STRinit(/* String* */);
- void STRset(/* String*, char* */);
- void STRdestroy(/* String* */);
- ! #define STRget(s) ((s)->data)
- ! #define STRlen(s) ((s)->len)
- String* STRcat();
- int STRcmp();
-
- --- 57,65 ----
- void STRinit(/* String* */);
- void STRset(/* String*, char* */);
- void STRdestroy(/* String* */);
- ! #define STRget(s) ((s)->data)
- ! #define STRlen(s) ((s)->len)
- ! #define STRsize(s) ((s)->len)
- String* STRcat();
- int STRcmp();
-
- diff -c gopher+/object/Wait.h:3.3 gopher+/object/Wait.h:3.4
- *** gopher+/object/Wait.h:3.3 Fri Nov 5 01:50:19 1993
- --- gopher+/object/Wait.h Fri Nov 5 01:50:19 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.3
- ! * 1993/07/20 23:19:41
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/Wait.h,v
- * $Status: $
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.4
- ! * 1993/11/02 06:16:58
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/Wait.h,v
- * $Status: $
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * Wait.h,v
- + * Revision 3.4 1993/11/02 06:16:58 lindner
- + * Fix for epix
- + *
- * Revision 3.3 1993/07/20 23:19:41 lindner
- * Use waitpid, not wait3
- *
- ***************
- *** 41,47 ****
-
- /** These don't know what waitpid() is.. Naughty! **/
-
- ! #if defined(NeXT)
- typedef union wait Portawait;
- # define waitpid(a,b,c) wait3(b,c,NULL)
-
- --- 44,50 ----
-
- /** These don't know what waitpid() is.. Naughty! **/
-
- ! #if defined(NeXT) || defined(SYSTYPE_BSD43) || defined(NO_WAITPID)
- typedef union wait Portawait;
- # define waitpid(a,b,c) wait3(b,c,NULL)
-
- diff -c gopher+/object/compatible.c:3.6 gopher+/object/compatible.c:3.7
- *** gopher+/object/compatible.c:3.6 Fri Nov 5 01:50:19 1993
- --- gopher+/object/compatible.c Fri Nov 5 01:50:20 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.6
- ! * 1993/09/03 03:26:39
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/compatible.c,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.7
- ! * 1993/10/27 18:51:10
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/compatible.c,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,23 ----
- *********************************************************************
- * Revision History:
- * compatible.c,v
- + * Revision 3.7 1993/10/27 18:51:10 lindner
- + * Updates for VMS files/records
- + *
- * Revision 3.6 1993/09/03 03:26:39 lindner
- * Better VMS tempnam() implementation
- *
- ***************
- *** 106,116 ****
- char *dir;
- char *pfx;
- {
- - #ifndef VMS
- char space[512];
- char *newspace;
-
- if (dir == NULL) {
- dir = "/usr/tmp";
- } else if (*dir == '\0') {
- dir = "/usr/tmp";
- --- 109,133 ----
- char *dir;
- char *pfx;
- {
- char space[512];
- char *newspace;
-
- + #ifdef VMS
- if (dir == NULL) {
- + dir = "sys$scratch:";
- + } else if (*dir == '\0') {
- + dir = "sys$scratch:";
- + }
- +
- + if (pfx == NULL) {
- + pfx = "gopher.$";
- + } else if (*pfx == '\0') {
- + pfx = "gopher.$";
- + }
- +
- + sprintf(space, "%s%s%d%d", dir, pfx, getpid(), cnt);
- + #else
- + if (dir == NULL) {
- dir = "/usr/tmp";
- } else if (*dir == '\0') {
- dir = "/usr/tmp";
- ***************
- *** 121,126 ****
- --- 138,144 ----
- }
-
- sprintf(space, "%s/%s%d.%d", dir, pfx, getpid(), cnt);
- + #endif
- cnt++;
-
- newspace = (char *)malloc(strlen(space) + 1);
- ***************
- *** 128,151 ****
- strcpy(newspace, space);
- }
- return newspace;
- - #else
- - char *tmpname, *cp;
- - register int len;
- - char tmpfilename[L_tmpnam];
- -
- - (void) tmpnam(tmpfilename);
- - if (dir != NULL) {
- - while ((cp=strrchr(dir, ' ')) != 0)
- - *cp = '\0';
- - }
- - len = (dir == NULL) ? 12 : strlen(dir) +
- - (pfx == NULL) ? 8 : strlen(pfx) + strlen(tmpfilename);
- - tmpname = (char *) malloc(sizeof(char)*len+1);
- - sprintf(tmpname, "%s%s%s",
- - (dir == NULL) ? "sys$scratch:" : dir,
- - (pfx == NULL) ? "gopher.$" : pfx, tmpfilename);
- - return(tmpname);
- - #endif
- }
- #endif
-
- --- 146,151 ----
- ***************
- *** 315,320 ****
- --- 315,332 ----
- #undef open
- #endif
-
- + FILE *fopen_VAR ( name, mode )
- + char *name, *mode;
- + {
- + return fopen ( name, mode, "rfm=var","rat=cr","mbc=32" );
- + }
- +
- + FILE *fopen_FIX ( name, mode )
- + char *name, *mode;
- + {
- + return fopen ( name, mode, "rfm=fix","mrs=512","mbc=32" );
- + }
- +
- FILE *fopen_VMSopt ( name, mode )
- char *name, *mode;
- {
- ***************
- *** 328,333 ****
- --- 340,346 ----
- {
- return open ( name, flags, mode, "mbc=32");
- }
- +
- #endif
-
-
- diff -c gopher+/object/compatible.h:3.12 gopher+/object/compatible.h:3.14
- *** gopher+/object/compatible.h:3.12 Fri Nov 5 01:50:20 1993
- --- gopher+/object/compatible.h Fri Nov 5 01:50:20 1993
- ***************
- *** 1,7 ****
- /********************************************************************
- * lindner
- ! * 3.12
- ! * 1993/09/28 19:23:56
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/compatible.h,v
- * Exp
- *
- --- 1,7 ----
- /********************************************************************
- * lindner
- ! * 3.14
- ! * 1993/11/05 07:24:15
- * /export/mudhoney/GopherSrc/CVS/gopher+/object/compatible.h,v
- * Exp
- *
- ***************
- *** 15,20 ****
- --- 15,26 ----
- *********************************************************************
- * Revision History:
- * compatible.h,v
- + * Revision 3.14 1993/11/05 07:24:15 lindner
- + * Fixes for NeXTs
- + *
- + * Revision 3.13 1993/10/27 18:51:12 lindner
- + * Updates for VMS files/records
- + *
- * Revision 3.12 1993/09/28 19:23:56 lindner
- * update for VMS getwd()
- *
- ***************
- *** 196,201 ****
- --- 202,210 ----
- # define closenet close
- # endif
-
- + FILE *fopen_VAR();
- + FILE *fopen_FIX();
- +
- #else
- /* non-VMS systems don't need a special netclose either */
- # define closenet close
- ***************
- *** 215,221 ****
- #ifdef NeXT
-
- typedef int pid_t;
- !
- #endif
-
- /********* Systems that can't set proctitles *******/
- --- 224,230 ----
- #ifdef NeXT
-
- typedef int pid_t;
- ! #define ANSI_LIKE /** freeWAIS bastards! **/
- #endif
-
- /********* Systems that can't set proctitles *******/
- ***************
- *** 223,225 ****
- --- 232,237 ----
- # undef SETPROCTITLE
- #endif
-
- + #if defined(NeXT) || defined(NO_NEWSTATDOTH)
- + #define S_IXUSR S_IEXEC
- + #endif
- diff -c gopher+/object/url.c:3.2 gopher+/object/url.c:3.3
- *** gopher+/object/url.c:3.2 Fri Nov 5 01:50:21 1993
- --- gopher+/object/url.c Fri Nov 5 01:50:21 1993
- ***************
- *** 1,3 ****
- --- 1,26 ----
- + /********************************************************************
- + * lindner
- + * 3.3
- + * 1993/11/02 06:14:09
- + * /export/mudhoney/GopherSrc/CVS/gopher+/object/url.c,v
- + * Exp
- + *
- + * Paul Lindner, University of Minnesota CIS.
- + *
- + * Copyright 1991, 1992 by the Regents of the University of Minnesota
- + * see the file "Copyright" in the distribution for conditions of use.
- + *********************************************************************
- + * MODULE: url.c
- + * Simplified method of getting urls..
- + *********************************************************************
- + * Revision History:
- + * url.c,v
- + * Revision 3.3 1993/11/02 06:14:09 lindner
- + * Add url html hack
- + *
- + *
- + *********************************************************************/
- +
- #include "url.h"
- #include "GSgopherobj.h"
- #include "Malloc.h"
- ***************
- *** 74,79 ****
- --- 97,144 ----
-
- URLset(url, u);
- }
- +
- +
- + /*
- + * Hack gopher directories into an HTML type...
- + */
- +
- + void
- + URLmakeHTML(url)
- + Url *url;
- + {
- + char *cp = URLget(url);
- + char *host;
- +
- + if (cp == NULL)
- + return;
- +
- + if (strncmp(cp, "gopher://", 9) != 0)
- + return;
- +
- + /** find the type character **/
- + cp = strchr(cp+10, '/');
- +
- + if (cp ==NULL)
- + return;
- +
- + host = cp+10;
- +
- + /** Test link for current host **/
- + /* if (strcasecmp(host, hostname) != 0)
- + return;*/
- +
- + cp ++;
- + /** cp is now pointed at the type character **/
- +
- + if (*cp == '1' && *(cp+1) == '1') {
- + /** It's a directory **/
- + *cp = 'h';
- + *(cp+1) = 'h';
- + }
- + }
- +
- +
-
- /*
- * Get the transport of the specified URL
- diff -c gopher+/object/url.h:3.1 gopher+/object/url.h:3.2
- *** gopher+/object/url.h:3.1 Fri Nov 5 01:50:21 1993
- --- gopher+/object/url.h Fri Nov 5 01:50:21 1993
- ***************
- *** 1,6 ****
- ! /*
- *
- ! */
-
- #ifndef URL_H
- #define URL_H
- --- 1,25 ----
- ! /********************************************************************
- ! * lindner
- ! * 3.2
- ! * 1993/11/02 06:14:11
- ! * /export/mudhoney/GopherSrc/CVS/gopher+/object/url.h,v
- ! * Exp
- *
- ! * Paul Lindner, University of Minnesota CIS.
- ! *
- ! * Copyright 1991, 1992 by the Regents of the University of Minnesota
- ! * see the file "Copyright" in the distribution for conditions of use.
- ! *********************************************************************
- ! * MODULE: url.h
- ! * Simplified method of getting urls..
- ! *********************************************************************
- ! * Revision History:
- ! * url.h,v
- ! * Revision 3.2 1993/11/02 06:14:11 lindner
- ! * Add url html hack
- ! *
- ! *
- ! *********************************************************************/
-
- #ifndef URL_H
- #define URL_H
- ***************
- *** 19,28 ****
- Url *URLnew();
- void URLdestroy();
- void URLfromGS();
- char *URLgetTransport();
- char *URLgetHost();
- char *URLgetPort();
- -
- -
-
- #endif /* URL_H */
- --- 38,46 ----
- Url *URLnew();
- void URLdestroy();
- void URLfromGS();
- + void URLmakeHTML();
- char *URLgetTransport();
- char *URLgetHost();
- char *URLgetPort();
-
- #endif /* URL_H */
- diff -c /dev/null gopher+/test/Makefile:1.1
- *** /dev/null Fri Nov 5 01:50:22 1993
- --- gopher+/test/Makefile Fri Nov 5 01:50:22 1993
- ***************
- *** 0 ****
- --- 1,39 ----
- + include ../Makefile.config
- +
- + GFILT = ../gophfilt/gophfilt -h localhost -s 9999 -p
- +
- + test-nonroot:
- + @echo "Building test.conf file"
- + @-rm -f test.conf
- + @cat <test.raw >test.conf
- + @echo "auxconf: /auxconf `pwd`/otheradmin.conf" >>test.conf
- + @echo "Starting test gopher server on port 9999"
- + ../gopherd/gopherd -C -o test.conf -c `pwd`/data 9999
- + @sleep 5
- +
- + -@rm -f ./results/root ./results/root-long \
- + ./results/links ./results/links-long
- + $(GFILT) "" -t 1 >./results/root
- + $(GFILT) "" -i '$$' -t 1 >./results/root-long
- + $(GFILT) "" -i '!' -t 1 >./results/root-info
- +
- + $(GFILT) "1/links" -t 1 >./results/links
- + $(GFILT) "1/links" -i '$$' -t 1 >./results/links-long
- + $(GFILT) "1/links" -i '!' -t 1 >./results/links-info
- +
- + $(GFILT) "1/auxconf" -t 1 >./results/aux
- + $(GFILT) "1/auxconf" -i '$$' -t 1 >./results/aux-long
- + $(GFILT) "1/auxconf" -i '!' -t 1 >./results/aux-info
- +
- + $(GFILT) "1/views" -t 1 >./results/views
- + $(GFILT) "1/views" -i '$$' -t 1 >./results/views-long
- + $(GFILT) "1/views" -i '!' -t 1 >./results/views-info
- + $(GFILT) "0/views/t-shirt" -t 0 >./results/views-txt
- +
- + $(GFILT) "0/decode-n-scripts/C-Programming" -t 0 >./results/views-txt
- +
- +
- +
- + all: test-nonroot
- +
- +
- diff -c /dev/null gopher+/test/otheradmin.conf:1.1
- *** /dev/null Fri Nov 5 01:50:22 1993
- --- gopher+/test/otheradmin.conf Fri Nov 5 01:50:22 1993
- ***************
- *** 0 ****
- --- 1,2 ----
- + Admin: Another Administrator
- + AdminEmail: fred@localhost
- diff -c /dev/null gopher+/test/test.raw:1.1
- *** /dev/null Fri Nov 5 01:50:22 1993
- --- gopher+/test/test.raw Fri Nov 5 01:50:22 1993
- ***************
- *** 0 ****
- --- 1,225 ----
- + #
- + # test.raw,v 1.1 1993/11/04 01:51:59 lindner Exp
- + #
- +
- + #
- + # An example gopherd.conf file
- + #
- +
- + #
- + # Hostalias line,
- + #
- + # format is:
- + #
- + # "hostalias: <hostname alias>"
- + hostalias: localhost
- +
- + #
- + # Cachetime line
- + #
- + # Format is "cachetime: <time in seconds>"
- + #
- +
- + Cachetime: 0
- +
- + #
- + # Administrator line,
- + #
- + # format is:
- + # "Admin:" <any text thing, usually a name/phone fax,etc>
- + #
- + # "AdminEmail:" <RFC-822 Email address>
- +
- + Admin: Test Administrator
- + AdminEmail: gopher@localhost
- +
- + #
- + # Site
- + #
- + #Site: the name of the site
- + #Org: organization or group owning the site
- + #Loc: city, state, country
- + #Geog: latitude longitude
- + #Language: default language of items on the server
- + #TZ: timezone as gmt-offset
- +
- + Site: Gopher Testing Labs
- + Org: Gopher International Ltd.
- + Loc: Minneapolis, MN, USA
- + Geog: 44 58 48 N 93 15 49 W
- + Language: En_US
- +
- + decoder: .Z /usr/ucb/zcat
- + decoder: .z /usr/gnu/bin/zcat
- + decoder: .gz /usr/gnu/bin/zcat
- + decoder: .adpcm /usr/openwin/bin/adpcm_dec
- +
- + #TZ: -6
- + #
- + # Map filename extensions to gopher-types
- + #
- + # Format is
- + # "viewext: <extension> <gophertype> <pfx> <gopher+type> [ISO langauge]
- + #
- +
- + # Different Languages
- + #
- + # The following will probably be text/plain soon
- + #
- + viewext: .txt.spanish 0 0 Text/plain Es_ES
- + viewext: .txt.german 0 0 Text/plain De_DE
- + viewext: .txt.french 0 0 Text/plain Fr_FR
- +
- + viewext: .hqx 4 0 application/mac-binhex40
- +
- + viewext: .moo 8 0 terminal/moo
- +
- + #
- + # Telnet file formats
- + #
- + viewext: .telnet 8 0 terminal/telnet
- + viewext: .tn3270 T 0 terminal/tn3270
- +
- + #
- + # Graphics file formats
- + #
- + viewext: .gif I 9 image/gif
- + viewext: .jpg I 9 image/JPEG
- +
- + #
- + # These are not IANA approved
- + #
- + viewext: .tiff I 9 image/TIFF
- + viewext: .pcx I 9 image/pcx
- + viewext: .pict I 9 image/PICT
- + viewext: .ppm I 9 image/ppm
- + viewext: .pgm I 9 image/pgm
- + viewext: .pbm I 9 image/pgm
- + #
- + # Sounds
- + #
- + viewext: .au s s audio/basic
- + viewext: .snd s s audio/basic
- + viewext: .wav s s audio/microsoft-wave
- +
- + #
- + # Movies
- + #
- + viewext: .mov ; 9 video/quicktime
- + viewext: .mpg ; 9 video/mpeg
- +
- + #
- + # Binary files, these need changing for the encoding method
- + # plus they'll probably become application/octet-stream
- + # or some such nonsense...
- + #
- + viewext: .zip 5 9 application/zip
- + viewext: .arj 5 9 application/x-arj
- +
- + viewext: .tar.Z 9 9 file/tar.Z
- + viewext: .tar 9 9 file/tar
- + viewext: .zoo 5 9 file/Zoo
- + viewext: .arc 5 9 file/Arc
- + viewext: .lzh 5 9 file/Lharc
- + viewext: .lha 5 9 file/Lharc-amiga-disk
- + viewext: .dms 5 9 file/Diskmasher
- + viewext: .exe 5 9 file/PCEXE
- + viewext: .bck 9 9 file/vmsbackup
- + viewext: .sav 9 9 file/vmssave
- +
- + viewext: .ps 0 0 application/postscript
- + viewext: .tex 0 0 Text/x-tex
- + viewext: .dvi 0 9 Text/x-dvi
- + viewext: .troff 0 0 Text/x-troff
- +
- + #
- + # These are defined by IANA..
- + #
- + viewext: .rtf 0 0 application/rtf
- + viewext: .word 0 0 application/MSWord
- + viewext: .mw 0 0 application/MacWriteII
- + viewext: .wp 0 0 application/dca-rft
- + viewext: .rch 0 0 Text/richtext
- + viewext: .wri 9 9 application/Microsoft-write
- +
- +
- + #
- + # This most certainly isn't :-) ..... yet
- + #
- + viewext: .smell 9 9 smell/funky
- +
- + #
- + #
- + viewext: .mindex 7 mindex: application/gopher-menu
- + viewext: .src 7 waissrc: Directory
- + viewext: .html h 0 text/html
- +
- +
- +
- + #
- + # These are for the experimental gview
- + #
- + viewext: .gview 1 1 Directory+/gview
- + blockext: .spot GVIEWSPOT
- +
- + #
- + # Map files to certain blocks
- + #
- +
- + blockext: .abstract ABSTRACT
- + blockext: .ask ASK
- +
- + #
- + # Find out what a file is by looking at the contents
- + # (Not implemented yet...)
- + #
- + #magic 0 GIF 9 I Gif
- + #magic 0 snd s s audio/basic
- +
- + #
- + # Note that mail spool files are still done by the server
- + #
- +
- + #
- + # Trash we never want to see (Note that it checks from the end)
- + # so you can ignore anything with a certain extension.
- + # (like emacs backup files)
- + #
- + ignore: lost+found
- + ignore: lib
- + ignore: bin
- + ignore: etc
- + ignore: dev
- + ignore: ~
- + ignore: .cache
- + ignore: .cache+
- +
- + ignore: CVS
- +
- + #
- + # ignore_patt uses regular expressions to ignore files. See the man page
- + # for ed(1)
- + #
- +
- + ignore_patt: ^core$
- + ignore_patt: ^usr$
- + ignore_patt: ^tmp$
- +
- + #
- + # BummerMsg is a message that is displayed when there isn't proper
- + # access..
- + #
- + BummerMsg: Sorry Dude, we don't allow off-site access to this server
- +
- + #
- + # Note that the default "default" entry is free access
- + # Also note that the values you put for an entry modify the "default" values
- + #
- + #access: default !browse,!read,search
- + #access: default !ftp
- +
- + #
- + # The secureusers: specifies a ticket file to use for ADMIT1 authentication
- + #
- + #secureusers: /usr/local/etc/gopherusers
- +
- diff -c /dev/null gopher+/test/data/.names:1.1
- *** /dev/null Fri Nov 5 01:50:23 1993
- --- gopher+/test/data/.names Fri Nov 5 01:50:23 1993
- ***************
- *** 0 ****
- --- 1,8 ----
- + Path=./links
- + Name=Dot Link file tests..
- + #
- + Path=./auxconf
- + Name=Alternate Configuration File tests
- + #
- + Path=./ftp-horrors
- + Name=Hall of FTP Horrors
- diff -c /dev/null gopher+/test/data/About:1.1
- *** /dev/null Fri Nov 5 01:50:23 1993
- --- gopher+/test/data/About Fri Nov 5 01:50:23 1993
- ***************
- *** 0 ****
- --- 1,3 ----
- + This is a test Gopher Server... It is meant to illustrate and test
- + the various features of the Unix Gopher Server.
- +
- diff -c /dev/null gopher+/test/data/decode-n-scripts/shell-script:1.1
- *** /dev/null Fri Nov 5 01:50:25 1993
- --- gopher+/test/data/decode-n-scripts/shell-script Fri Nov 5 01:50:26 1993
- ***************
- *** 0 ****
- --- 1,4 ----
- + #!/bin/sh
- +
- + echo "This is a test of a shell script"
- + echo "You could put all sorts of cool stuff here"
- diff -c /dev/null gopher+/test/data/decode-n-scripts/shell-script.abstract:1.1
- *** /dev/null Fri Nov 5 01:50:26 1993
- --- gopher+/test/data/decode-n-scripts/shell-script.abstract Fri Nov 5 01:50:26 1993
- ***************
- *** 0 ****
- --- 1,5 ----
- + This is an example of a shell script. All you need to do to execute a shell
- + script is put it on the server. Fairly simple really..
- +
- + To get a different type for your script you can use the extension processing
- + capabilities of gopherd.conf or use a .names file.
- diff -c /dev/null gopher+/test/data/decode-n-scripts/shell-script.tar:1.1
- *** /dev/null Fri Nov 5 01:50:26 1993
- --- gopher+/test/data/decode-n-scripts/shell-script.tar Fri Nov 5 01:50:26 1993
- ***************
- *** 0 ****
- --- 1,2 ----
- + #!/bin/sh
- + tar cf - .
- diff -c /dev/null gopher+/test/data/ftp-horrors/.Links:1.1
- *** /dev/null Fri Nov 5 01:50:27 1993
- --- gopher+/test/data/ftp-horrors/.Links Fri Nov 5 01:50:27 1993
- ***************
- *** 0 ****
- --- 1,23 ----
- + Name=Boombox
- + Type=1
- + Path=ftp:boombox.micro.umn.edu@/pub/
- + Host=+
- + Port=+
- + #
- + Name=Multinet VMS
- + Type=1
- + Path=ftp:vx.cis.umn.edu@/
- + Host=+
- + Port=+
- + #
- + Name=Macintosh FTP Server
- + Type=1
- + Path=ftp:ftp.asante.com@/
- + Host=+
- + Port=+
- + #
- + Name=Novell FTP Server
- + Type=1
- + Path=ftp:novell.macc.wisc.edu@/
- + Host=+
- + Port=+
- diff -c /dev/null gopher+/test/data/links/.Links:1.1
- *** /dev/null Fri Nov 5 01:50:27 1993
- --- gopher+/test/data/links/.Links Fri Nov 5 01:50:27 1993
- ***************
- *** 0 ****
- --- 1,28 ----
- + Type=8
- + Name=UofMN Lumina System (telnet) #100
- + Host=pubinfo.ais.umn.edu
- + Port=23
- + Numb=100
- + Path=
- + #
- + Type=T
- + Name=UofMN Lumina System (tn3270) #200
- + Host=pubinfo.ais.umn.edu
- + Port=23
- + Numb=200
- + Path=
- + #
- + Path=
- + Type=2
- + Name=Phone Book at the UofMN
- + Host=x500.tc.umn.edu
- + Port=105
- + Abstract=Search for phone numbers at the University of Minnesota
- + #
- + Name=List of All Gopher Servers
- + Type=1
- + Host=gopher.tc.umn.edu
- + Port=70
- + Path=1/Other Gopher and Information Servers
- + Abstract=List of all gopher servers from the University of Minnesota #-10
- + Numb=-10
- diff -c /dev/null gopher+/test/data/views/t-shirt:1.1
- *** /dev/null Fri Nov 5 01:50:28 1993
- --- gopher+/test/data/views/t-shirt Fri Nov 5 01:50:28 1993
- ***************
- *** 0 ****
- --- 1,30 ----
- + $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
- + $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
- + $$$$$$$$$$$$$$$$$""$$"$$$$$ $$$$$$$$$$$$$$$$$$$$$
- + $$$$$$$$$$"" "" o " """" o "$$$$$$$$$$$$$$$$$$
- + $$$$$$$$$" $$o$$$ o oooooo$ $"$$$$$$$$$$$$$$$$$
- + $$$$$$$o $$" "" o o " "$$$$$$$
- + $$$$$$$" $oo$" $ $" $o oo$" oo$$$$$$$
- + $$$$$$$$ "$""o$ "" o " " o""" "$$$$$$$$
- + $$$$$$$$$ o ooo$$$oooo o oooo"" $$ o o o o$$$$$$$
- + $$$$$$$$$$$$$"" "$$$$o o" """$ $ """$$ $ ""$$$
- + $$$$$$$$""" "o oo "" ""o " oo"o $ o $ ooo$$$
- + $$$$$$$ o" "o"" ""ooo" ""o""o"oo$$$$$$$$$ooo$$$$
- + $$$$$$ oo"o$$$$$$o$o $"o" o $ o" $$$$$$$$$$$$$$$
- + $$$$$$"oo " $$$" $ o " o$ " $"o$$$$$$$$$$$$$$
- + $$$$$$$$ o $o" " o$ o"o " o $" $$$$$$$$$$$$$$$
- + $$$$$$$$" o$ ""$o o "$"$oo o $$$$$$$$$$$$$$$
- + $$$$$$$$ $$$$$o ""$ " $$ o$$$$$$$$$$$$$
- + $$$$$$$o $$$$$$o " " "" o o $$$$"$$$$$$$$$
- + $$$$$$$$ $$$$$$$$o o"" " $"o"$$$$$$$$
- + $$$$$$$$$ $$$$$$$o o" " o"" $o $$$$$$$
- + $$$$$$$$$$o""$$$$$ o" o" "oo $$$$$$$
- + $$$$$$$$$$$oo "$$$$" $ "o $"""o" " $$$$$$$$$
- + $$$$$$$$$$$$$$oo$""$o o ""oo o ""ooo $"o$$$$$$
- + $$$$$$$$$$$$$$$$$$o o o$" o"o$$ " oo$$$$$$
- + $$$$$$$$$$$$$$$$$$" o$$oo$$$$""o$$ "$o$"$$$$$$$$$
- + $$$$$$$$$$$$$$$$ooo$$$$$$$$o$o$$" o"ooo$$$$$$$$$$
- + $$$$$$$$$$$$$$$$$$""$$$$$$$$$"$$ $$$$$$$$$$$$$$$
- + $$$$$$$$$$$$$$$$$$$" o"""$""ooo$$$$$$$$$$$$$$$$$
- + $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
- + $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
- diff -c /dev/null gopher+/test/data/views/t-shirt.abstract:1.1
- *** /dev/null Fri Nov 5 01:50:28 1993
- --- gopher+/test/data/views/t-shirt.abstract Fri Nov 5 01:50:29 1993
- ***************
- *** 0 ****
- --- 1,3 ----
- + This is a really low-res picture of the Internet Gopher World
- + Tour T-Shirt.
- +
- diff -c /dev/null gopher+/test/good-results/aux:1.1
- *** /dev/null Fri Nov 5 01:50:30 1993
- --- gopher+/test/good-results/aux Fri Nov 5 01:50:30 1993
- ***************
- *** 0 ****
- --- 1 ----
- + 0testfile 0/auxconf/testfile localhost 9999 +
- diff -c /dev/null gopher+/test/good-results/aux-info:1.1
- *** /dev/null Fri Nov 5 01:50:30 1993
- --- gopher+/test/good-results/aux-info Fri Nov 5 01:50:31 1993
- ***************
- *** 0 ****
- --- 1,10 ----
- + +-1
- + +INFO: 1Alternate Configuration File tests 1/auxconf localhost 9999 +
- + +ADMIN:
- + Admin: Another Administrator <fred@localhost>
- + Mod-Date: Tue Oct 26 19:19:25 1993 <19931026191925>
- + TTL: 0
- + +VIEWS:
- + application/gopher-menu En_US: <.5k>
- + application/gopher+-menu En_US: <.5k>
- + text/html En_US: <.5k>
- diff -c /dev/null gopher+/test/good-results/aux-long:1.1
- *** /dev/null Fri Nov 5 01:50:31 1993
- --- gopher+/test/good-results/aux-long Fri Nov 5 01:50:31 1993
- ***************
- *** 0 ****
- --- 1,7 ----
- + +-1
- + +INFO: 0testfile 0/auxconf/testfile localhost 9999 +
- + +ADMIN:
- + Admin: Another Administrator <fred@localhost>
- + Mod-Date: Tue Oct 26 19:19:25 1993 <19931026191925>
- + +VIEWS:
- + Text/plain En_US: <.0k>
- diff -c /dev/null gopher+/test/good-results/links:1.1
- *** /dev/null Fri Nov 5 01:50:31 1993
- --- gopher+/test/good-results/links Fri Nov 5 01:50:31 1993
- ***************
- *** 0 ****
- --- 1,4 ----
- + 8UofMN Lumina System (telnet) #100 pubinfo.ais.umn.edu 23
- + TUofMN Lumina System (tn3270) #200 pubinfo.ais.umn.edu 23
- + 2Phone Book at the UofMN x500.tc.umn.edu 105
- + 1List of All Gopher Servers 1/Other Gopher and Information Servers gopher.tc.umn.edu 70
- diff -c /dev/null gopher+/test/good-results/links-info:1.1
- *** /dev/null Fri Nov 5 01:50:31 1993
- --- gopher+/test/good-results/links-info Fri Nov 5 01:50:31 1993
- ***************
- *** 0 ****
- --- 1,10 ----
- + +-1
- + +INFO: 1Dot Link file tests.. 1/links localhost 9999 +
- + +ADMIN:
- + Admin: Test Administrator <gopher@localhost>
- + Mod-Date: Tue Oct 26 18:44:48 1993 <19931026184448>
- + TTL: 0
- + +VIEWS:
- + application/gopher-menu En_US: <.5k>
- + application/gopher+-menu En_US: <.5k>
- + text/html En_US: <.5k>
- diff -c /dev/null gopher+/test/good-results/links-long:1.1
- *** /dev/null Fri Nov 5 01:50:31 1993
- --- gopher+/test/good-results/links-long Fri Nov 5 01:50:31 1993
- ***************
- *** 0 ****
- --- 1,9 ----
- + +-1
- + +INFO: 8UofMN Lumina System (telnet) #100 pubinfo.ais.umn.edu 23
- + +INFO: TUofMN Lumina System (tn3270) #200 pubinfo.ais.umn.edu 23
- + +INFO: 2Phone Book at the UofMN x500.tc.umn.edu 105
- + +ABSTRACT:
- + Search for phone numbers at the University of Minnesota
- + +INFO: 1List of All Gopher Servers 1/Other Gopher and Information Servers gopher.tc.umn.edu 70
- + +ABSTRACT:
- + List of all gopher servers from the University of Minnesota #-10
- diff -c /dev/null gopher+/test/good-results/root:1.1
- *** /dev/null Fri Nov 5 01:50:32 1993
- --- gopher+/test/good-results/root Fri Nov 5 01:50:32 1993
- ***************
- *** 0 ****
- --- 1,6 ----
- + 0About 0/About localhost 9999 +
- + 1Alternate Configuration File tests 1/auxconf localhost 9999 +
- + 1Dot Link file tests.. 1/links localhost 9999 +
- + 1Hall of FTP Horrors 1/ftp-horrors localhost 9999 +
- + 1decode-n-scripts 1/decode-n-scripts localhost 9999 +
- + 1views 1/views localhost 9999 +
- diff -c /dev/null gopher+/test/good-results/root-info:1.1
- *** /dev/null Fri Nov 5 01:50:32 1993
- --- gopher+/test/good-results/root-info Fri Nov 5 01:50:32 1993
- ***************
- *** 0 ****
- --- 1,16 ----
- + +-1
- + +INFO 1Gopher Testing Labs localhost 9999 +
- + +ADMIN:
- + Admin: Test Administrator <gopher@localhost>
- + Site: Gopher Testing Labs
- + Org: Gopher International Ltd.
- + Loc: Minneapolis, MN, USA
- + Geog: 44 58 48 N 93 15 49 W
- + Version: U of Minnesota Unix 2.0 pl10
- + +VERONICA:
- + treewalk: yes
- + +VIEWS:
- + application/gopher-menu: <0k>
- + application/gopher+-menu: <0k>
- + Directory/recursive: <0k>
- + Directory+/recursive: <0k>
- diff -c /dev/null gopher+/test/good-results/root-long:1.1
- *** /dev/null Fri Nov 5 01:50:32 1993
- --- gopher+/test/good-results/root-long Fri Nov 5 01:50:32 1993
- ***************
- *** 0 ****
- --- 1,52 ----
- + +-1
- + +INFO: 0About 0/About localhost 9999 +
- + +ADMIN:
- + Admin: Test Administrator <gopher@localhost>
- + Mod-Date: Wed Oct 27 15:20:10 1993 <19931027152010>
- + +VIEWS:
- + Text/plain En_US: <.1k>
- + +INFO: 1Alternate Configuration File tests 1/auxconf localhost 9999 +
- + +ADMIN:
- + Admin: Test Administrator <gopher@localhost>
- + Mod-Date: Tue Oct 26 19:19:25 1993 <19931026191925>
- + TTL: 0
- + +VIEWS:
- + application/gopher-menu En_US: <.5k>
- + application/gopher+-menu En_US: <.5k>
- + text/html En_US: <.5k>
- + +INFO: 1Dot Link file tests.. 1/links localhost 9999 +
- + +ADMIN:
- + Admin: Test Administrator <gopher@localhost>
- + Mod-Date: Tue Oct 26 18:44:48 1993 <19931026184448>
- + TTL: 0
- + +VIEWS:
- + application/gopher-menu En_US: <.5k>
- + application/gopher+-menu En_US: <.5k>
- + text/html En_US: <.5k>
- + +INFO: 1Hall of FTP Horrors 1/ftp-horrors localhost 9999 +
- + +ADMIN:
- + Admin: Test Administrator <gopher@localhost>
- + Mod-Date: Tue Nov 2 13:33:27 1993 <19931102133327>
- + TTL: 0
- + +VIEWS:
- + application/gopher-menu En_US: <.5k>
- + application/gopher+-menu En_US: <.5k>
- + text/html En_US: <.5k>
- + +INFO: 1decode-n-scripts 1/decode-n-scripts localhost 9999 +
- + +ADMIN:
- + Admin: Test Administrator <gopher@localhost>
- + Mod-Date: Thu Oct 28 17:01:07 1993 <19931028170107>
- + TTL: 0
- + +VIEWS:
- + application/gopher-menu En_US: <.5k>
- + application/gopher+-menu En_US: <.5k>
- + text/html En_US: <.5k>
- + +INFO: 1views 1/views localhost 9999 +
- + +ADMIN:
- + Admin: Test Administrator <gopher@localhost>
- + Mod-Date: Wed Oct 27 15:32:37 1993 <19931027153237>
- + TTL: 0
- + +VIEWS:
- + application/gopher-menu En_US: <.5k>
- + application/gopher+-menu En_US: <.5k>
- + text/html En_US: <.5k>
- diff -c /dev/null gopher+/test/good-results/views:1.1
- *** /dev/null Fri Nov 5 01:50:32 1993
- --- gopher+/test/good-results/views Fri Nov 5 01:50:32 1993
- ***************
- *** 0 ****
- --- 1 ----
- + 0t-shirt 0/views/t-shirt localhost 9999 +
- diff -c /dev/null gopher+/test/good-results/views-info:1.1
- *** /dev/null Fri Nov 5 01:50:33 1993
- --- gopher+/test/good-results/views-info Fri Nov 5 01:50:33 1993
- ***************
- *** 0 ****
- --- 1,10 ----
- + +-1
- + +INFO: 1views 1/views localhost 9999 +
- + +ADMIN:
- + Admin: Test Administrator <gopher@localhost>
- + Mod-Date: Wed Oct 27 15:32:37 1993 <19931027153237>
- + TTL: 0
- + +VIEWS:
- + application/gopher-menu En_US: <.5k>
- + application/gopher+-menu En_US: <.5k>
- + text/html En_US: <.5k>
- diff -c /dev/null gopher+/test/good-results/views-long:1.1
- *** /dev/null Fri Nov 5 01:50:33 1993
- --- gopher+/test/good-results/views-long Fri Nov 5 01:50:33 1993
- ***************
- *** 0 ****
- --- 1,12 ----
- + +-1
- + +INFO: 0t-shirt 0/views/t-shirt localhost 9999 +
- + +ADMIN:
- + Admin: Test Administrator <gopher@localhost>
- + Mod-Date: Wed Oct 27 15:23:12 1993 <19931027152312>
- + +VIEWS:
- + Text/plain En_US: <1k>
- + image/gif En_US: <.8k>
- + +ABSTRACT:
- + This is a really low-res picture of the Internet Gopher World
- + Tour T-Shirt.
- +
- diff -c /dev/null gopher+/test/good-results/views-txt:1.1
- *** /dev/null Fri Nov 5 01:50:33 1993
- --- gopher+/test/good-results/views-txt Fri Nov 5 01:50:33 1993
- ***************
- *** 0 ****
- --- 1,26 ----
- + How to program in "C"
- + ---------------------
- + 1] Use lots of global variables.
- + 2] Give them cryptic names such as: X27, a_gcl, or Horace.
- + 3] Put everything in one large .h file.
- + 4] Implement the entire project at once.
- + 5] Use macros and #defines to emulate Pascal.
- + 6] Assume the compiler takes care of all the little details you didn't
- + quite understand.
- +
- + "It's 5:50 a.m., Do you know where your stack pointer is?"
- +
- + How to debug a "C" program.
- + ---------------------------
- + 1] If at all possible, don't, let someone else do it.
- + 2] Change majors.
- + 3] Insert/remove blank lines at random spots, re-compile, and excecute.
- + 4] Throw holy water on the terminal.
- + 5] Dial 911 and scream.
- + 6] There is rumour that "printf" is usefull, but this is probably
- + unfounded.
- + 7] Port everything to CP/M.
- + 8] If it still doesn't work, re-write it in assembler. This won't fix
- + the bug, but it will make sure no one else finds it and makes you
- + look bad.
- +
-