diff -cb INSTALL- INSTALL *** INSTALL- Sat Mar 4 02:54:20 1995 --- INSTALL Wed Feb 12 11:53:19 1997 *************** *** 5,11 **** Optional: - jpegsrc (ftp.isri.unlv.edu:/pub/mirror/jpegsrc) ! If you want chimera to be able to handle JPEG inline images - ghostscript and ghostview (aeneas.mit.edu:/pub/gnu) If you want to be able to view downloaded postscript or have inline postscript images. --- 5,13 ---- Optional: - jpegsrc (ftp.isri.unlv.edu:/pub/mirror/jpegsrc) ! If you want chimera to be able to handle JPEG inline images. ! (If you have the djpeg executable, look no further -- ! that's the one.) - ghostscript and ghostview (aeneas.mit.edu:/pub/gnu) If you want to be able to view downloaded postscript or have inline postscript images. diff -cb Imakefile- Imakefile diff -cb lib/help.html- lib/help.html *** lib/help.html- Fri Mar 31 20:47:52 1995 --- lib/help.html Wed Feb 12 11:53:19 1997 *************** *** 1,18 **** ! Chimera Help !

Chimera Help

Program Info

This is Chimera 1.65, written by John Kilburg (john@cs.unlv.edu) and others (see the README file in the chimera distribution for more info). ! Check out the chimera home page ! for more information.

Bug Reports

If you think you have discovered a bug, please send email to bug-chimera@cs.unlv.edu with a description of the bug, the machine/OS that you are using, the version of chimera that you are using, and --- 1,25 ---- ! Chimera Help ! !

Chimera Help

Program Info

+

This is Chimera 1.65, written by John Kilburg (john@cs.unlv.edu) and others (see the README file in the chimera distribution for more info). ! Check out the chimera home page ! for more information. Patchlevel 1.65p1 has been collected by ! Gerhard Niklasch based on an earlier collection by and many contributions ! from Jim Rees, see the announcement page which also lists the contributors.

Bug Reports

+

If you think you have discovered a bug, please send email to bug-chimera@cs.unlv.edu with a description of the bug, the machine/OS that you are using, the version of chimera that you are using, and *************** *** 20,25 **** --- 27,33 ----

Mouse Button Usage

+

If you click on an anchor with the first mouse button then the document will be loaded and displayed (if possible). If the second mouse button is used then Chimera will ask for a filename and save *************** *** 27,37 **** --- 35,47 ----

Quit

+

Clicking on this button causes Chimera to stop execution. It is important that you use this button instead of, say, control-c.

Open

+

This command tells Chimera to display a requester for a document URL. The cursor automatically warps to the text entry field so move movement is not required after the button is pressed. A click *************** *** 44,72 **** an external program to deal with the document.

- You can also edit the URL display field which is located between the main document window and the document title display.

Home

When the home button is pressed the document that was first displayed is displayed. This is the same as pressing Back until the first document is visible.

Back

Clicking on this button causes Chimera to ``back up'' to the previous document. This button will be deactivated if only one document is available.

Source

Clicking on this button causes Chimera to display the HTML source of the currently displayed document.

Reload

Clicking on this button causes Chimera to reload the current document. This is useful for a when the original document has changed (you are currently working on a project, for example) and you need to refresh --- 54,95 ---- an external program to deal with the document.

You can also edit the URL display field which is located between the main document window and the document title display. +

+ In both cases, you can use the shortcut some.website.com + to access the URL http://some.website.com/. (This shortcut + expansion is applied whenever the string you typed in contains neither + a colon nor a slash, so you can still access relative URLs like + otherdoc.html by typing ./otherdoc.html; the + shortcut expansion feature can be turned off entirely by setting the + X resource Chimera*openButtonShortcut to False or + off). +

Home

+

When the home button is pressed the document that was first displayed is displayed. This is the same as pressing Back until the first document is visible.

Back

+

Clicking on this button causes Chimera to ``back up'' to the previous document. This button will be deactivated if only one document is available.

Source

+

Clicking on this button causes Chimera to display the HTML source of the currently displayed document.

Reload

+

Clicking on this button causes Chimera to reload the current document. This is useful for a when the original document has changed (you are currently working on a project, for example) and you need to refresh *************** *** 74,89 **** --- 97,115 ----

File

+

When this button is pressed a popup window appears which can be used to tell chimera to save or print the currently displayed document.

Help

+

Clicking on this button causes Chimera to display the document you are reading now.

Bookmark

+

When you click on this button a list of bookmarks pops up. To view a document which has a bookmark just double click on the bookmark. Along the button of the bookmark list window is a row of four buttons: *************** *** 95,100 **** --- 121,127 ----

Search

+

When the search button is pressed a requester appears which allows you to enter a string for Chimera to find. If the string is found then the document position is changed so that the string is *************** *** 104,109 **** --- 131,137 ----

Cancel

+

The cancel button can be used to stop the loading of the currently loading document. Note that cancel doesn't work while chimera tries to make a connection to a remote host. It only works once the *************** *** 125,138 **** s - search m - bookmark

Uniform Resource Locators (URLs)

Chimera uses URLs to locate information. Although a discussion of URLs is beyond the scope of this document, here are a couple of examples: ! ftp://ftp.cs.unlv.edu/pub/chimera - Retrieve a listing of the directory /pub/chimera on the anonymous --- 153,169 ---- s - search m - bookmark +

+ Also, cursor up and down keys can be used for scrolling.

Uniform Resource Locators (URLs)

+

Chimera uses URLs to locate information. Although a discussion of URLs is beyond the scope of this document, here are a couple of examples: !

  
  ftp://ftp.cs.unlv.edu/pub/chimera - Retrieve a listing of the directory
                                      /pub/chimera on the anonymous
***************
*** 142,153 ****
  
  http://www.unlv.edu/chimera/      - Retrieve and display the chimera home
                                      page.
! 

Environment variables

- Chimera uses the following environment variables

--- 173,183 ----
  
  http://www.unlv.edu/chimera/      - Retrieve and display the chimera home
                                      page.
! 

Environment variables

Chimera uses the following environment variables

***************
*** 191,197 ****
  
  

X Resources

! Here is a list of Chimera-specific X resources:
  convertFiles           A colon separated list of files that describe the
--- 221,230 ----
  
  

X Resources

!

! Here is a list of Chimera-specific X resources. Default values can be ! found in Chimera's app-defaults file and in the Common.tmpl file in the ! source tree.

  convertFiles           A colon separated list of files that describe the
***************
*** 210,215 ****
--- 243,262 ----
  showTitle              Boolean variable used to specify whether or not
                         the title should be displayed on the screen.
  
+ anchorDisplay          Boolean variable used to specify whether or not the
+                        URL contents of hyperlink anchors should be displayed
+                        on the fly as the mouse moves over them.
+ 
+ openButtonShortcut     Boolean variable used to specify whether user input
+                        in the URL field or Open Document box should be assumed
+                        to refer to a WWW site if it contains neither a slash
+                        nor a colon.
+ 
+ localIndexFiles        A colon separated list of files which Chimera should
+                        try to display in this order when pointed at a directory
+                        via a file:... URL.  When empty or when nothing matches,
+                        a directory listing will be generated.
+ 
  button1Box             A comma separated list of buttons to appear on the
                         first button row.  Possible button names are quit,
                         open, home, back, source, reload, file, help,
***************
*** 306,311 ****
                         is 0.0 (gamma correction turned off).
  
! More information ! --- 353,358 ---- is 0.0 (gamma correction turned off).
!
More information
! diff -cb lib/home.html- lib/home.html *** lib/home.html- Sun Mar 12 02:01:31 1995 --- lib/home.html Wed Feb 12 11:53:20 1997 *************** *** 1,34 **** ! Chimera !

Chimera

Welcome to the World-Wide Web (WWW) ! Chimera is a WWW browser which allows you to access many different types of information from around the world. When you see an underlined item just click on it to see more information about that item. -

-

!
  • Chimera Home Page !
  • ISRI Home Page !
  • UNLV Home Page !
  • W3O Home Page !
  • NCSA Home Page !
  • The Web at Nexor !
  • BSDI Home Page
  • - Hint: when you see something interesting, add a bookmark for it so that you can easily retrieve the information again.

    - John Kilburg, john@cs.unlv.edu ! --- 1,32 ---- ! Chimera ! !

    Chimera

    +

    Welcome to the World-Wide Web (WWW) ! Chimera is a WWW browser which allows you to access many different types of information from around the world. When you see an underlined item just click on it to see more information about that item.

    !
  • Chimera Home Page !
  • ISRI Home Page !
  • UNLV Home Page !
  • W3O Home Page !
  • NCSA Home Page !
  • The Web at Nexor !
  • BSDI Home Page
  • Hint: when you see something interesting, add a bookmark for it so that you can easily retrieve the information again.

    John Kilburg, john@cs.unlv.edu ! diff -cb libhtmlw/HTML.c- libhtmlw/HTML.c *** libhtmlw/HTML.c- Sat Mar 25 01:43:21 1995 --- libhtmlw/HTML.c Mon May 1 16:10:25 1995 *************** *** 693,700 **** static void setScrollBar (sb, topPosition, totalLength, currentLength) Widget sb; ! Position topPosition; ! Dimension totalLength, currentLength; { float top = (float) topPosition / (float) (totalLength); float shown = (float) currentLength / (float) (totalLength); --- 693,700 ---- static void setScrollBar (sb, topPosition, totalLength, currentLength) Widget sb; ! int topPosition; ! int totalLength, currentLength; { float top = (float) topPosition / (float) (totalLength); float shown = (float) currentLength / (float) (totalLength); *************** *** 949,955 **** float scrollDir = (int) call_data < 0 ? -0.3 : 0.3; HTMLWidget hw = (HTMLWidget) client_data; int value, maxv; ! Dimension totalLength, currentLength; if (w == hw->html.vbar) { --- 949,955 ---- float scrollDir = (int) call_data < 0 ? -0.3 : 0.3; HTMLWidget hw = (HTMLWidget) client_data; int value, maxv; ! int totalLength, currentLength; if (w == hw->html.vbar) { diff -cb libhtmlw/HTML.h- libhtmlw/HTML.h *** libhtmlw/HTML.h- Sat Mar 4 02:54:22 1995 --- libhtmlw/HTML.h Wed Feb 12 11:53:21 1997 *************** *** 309,314 **** --- 309,318 ---- #define M_SELECT 42 #define M_OPTION 43 #define M_TEXTAREA 44 + #define M_TABLE 45 + #define M_TABLE_ITEM 46 + #define M_TABLE_HEADER 47 + #define M_TABLE_ROW 48 /* syntax of Mark types */ #define MT_TITLE "title" *************** *** 355,360 **** --- 359,368 ---- #define MT_SELECT "select" #define MT_OPTION "option" #define MT_TEXTAREA "textarea" + #define MT_TABLE "table" + #define MT_TABLE_ITEM "td" + #define MT_TABLE_HEADER "th" + #define MT_TABLE_ROW "tr" /* anchor tags */ diff -cb libhtmlw/HTMLamp.h- libhtmlw/HTMLamp.h *** libhtmlw/HTMLamp.h- Sat Mar 4 02:54:21 1995 --- libhtmlw/HTMLamp.h Wed Feb 12 11:53:21 1997 *************** *** 67,72 **** --- 67,104 ---- {"AMP", '&'}, {"quot", '\"'}, {"QUOT", '\"'}, + {"nbsp", '\240'}, + {"iexcl", '\241'}, + {"cent", '\242'}, + {"pound", '\243'}, + {"curren", '\244'}, + {"yen", '\245'}, + {"brvbar", '\246'}, + {"sect", '\247'}, + {"uml", '\250'}, + {"copy", '\251'}, + {"ordf", '\252'}, + {"laquo", '\253'}, + {"not", '\254'}, + {"shy", '\255'}, + {"reg", '\256'}, + {"hibar", '\257'}, + {"deg", '\260'}, + {"plusmn", '\261'}, + {"sup2", '\262'}, + {"sup3", '\263'}, + {"acute", '\264'}, + {"micro", '\265'}, + {"para", '\266'}, + {"middot", '\267'}, + {"cedil", '\270'}, + {"sup1", '\271'}, + {"ordm", '\272'}, + {"raquo", '\273'}, + {"frac14", '\274'}, + {"frac12", '\275'}, + {"frac34", '\276'}, + {"iquest", '\277'}, {"Agrave", '\300'}, {"Aacute", '\301'}, {"Acirc", '\302'}, *************** *** 90,98 **** {"Ocirc", '\324'}, {"Otilde", '\325'}, {"Ouml", '\326'}, ! ! {"?", '\327'}, /* ? */ ! {"Oslash", '\330'}, {"Ugrave", '\331'}, {"Uacute", '\332'}, --- 122,128 ---- {"Ocirc", '\324'}, {"Otilde", '\325'}, {"Ouml", '\326'}, ! {"times", '\327'}, {"Oslash", '\330'}, {"Ugrave", '\331'}, {"Uacute", '\332'}, *************** *** 124,132 **** {"ocirc", '\364'}, {"otilde", '\365'}, {"ouml", '\366'}, ! ! {"?", '\367'}, /* ? */ ! {"oslash", '\370'}, {"ugrave", '\371'}, {"uacute", '\372'}, --- 154,160 ---- {"ocirc", '\364'}, {"otilde", '\365'}, {"ouml", '\366'}, ! {"divide", '\367'}, {"oslash", '\370'}, {"ugrave", '\371'}, {"uacute", '\372'}, diff -cb libhtmlw/HTMLformat.c- libhtmlw/HTMLformat.c *** libhtmlw/HTMLformat.c- Mon Mar 27 05:30:18 1995 --- libhtmlw/HTMLformat.c Wed Feb 5 19:59:13 1997 *************** *** 76,81 **** --- 76,82 ---- #define INDENT_SPACES 2 #define IMAGE_BORDER 2 + #define TABLEITEMWIDTH 60 #define D_NONE 0 #define D_TITLE 1 *************** *** 176,181 **** --- 177,185 ---- static struct mark_up *Last; static FormInfo *CurrentForm; static SelectInfo *CurrentSelect; + static int TableEntry; + static int tableItemWidth; + static int TableY; /* * Turned out we were taking WAY too much time mallocing and freeing *************** *** 3241,3246 **** --- 3245,3251 ---- * Just insert the image for now */ case M_IMAGE: + if (!mark->is_end) ImagePlace (hw, mptr, x, y, Width); break; /* *************** *** 3773,3778 **** --- 3778,3811 ---- { BulletPlace (hw, x, y); } + } + break; + case M_TABLE: + TableEntry = 0; + break; + case M_TABLE_ROW: + TableEntry = 0; + ConditionalLineFeed (hw, x, y, 1); + break; + case M_TABLE_HEADER: + case M_TABLE_ITEM: + /* what we really should do is parse the whole table, then lay it out, then + render it. there's a limit to what we can do on the fly. */ + if (!mark->is_end) + { + char *tptr; + if (TableEntry) { + int loc; + loc = TextIndent + tableItemWidth * TableEntry; + if (*x < loc) + *x = loc; + *y = TableY; + } else + TableY = *y; + tptr = ParseMarkTag(mark->start, MT_TABLE_ITEM, "WIDTH"); + if (!tptr || sscanf(tptr, "%d", &tableItemWidth) != 1) + tableItemWidth = TABLEITEMWIDTH; + TableEntry++; } break; /* diff -cb libhtmlw/HTMLimages.c- libhtmlw/HTMLimages.c *** libhtmlw/HTMLimages.c- Fri Mar 24 05:20:28 1995 --- libhtmlw/HTMLimages.c Wed Feb 12 11:53:37 1997 *************** *** 166,175 **** static int have_colors = 0; int NumCells; match = XAllocColor (dsp, colormap, colr); if (match == 0) { - NumCells = DisplayCells (dsp, DefaultScreen (dsp)); if (!have_colors) { for (i = 0; i < NumCells; i++) --- 166,183 ---- static int have_colors = 0; int NumCells; + NumCells = XDisplayCells(dsp, DefaultScreen(dsp)); + if (NumCells <= 2) + { + colr->pixel = (colr->red + colr->green + colr->blue > 98304) ? + WhitePixel(dsp, DefaultScreen(dsp)) : BlackPixel(dsp, DefaultScreen(dsp)) ; + XQueryColor(dsp, colormap, colr); + return; + } + match = XAllocColor (dsp, colormap, colr); if (match == 0) { if (!have_colors) { for (i = 0; i < NumCells; i++) *************** *** 298,303 **** --- 306,312 ---- { int linepad, shiftnum; int shiftstart, shiftstop, shiftinc; + int bitsperpixel, scanline_pad; int bytesperline; int temp; int w, h; *************** *** 308,314 **** unsigned long c; int rshift, gshift, bshift; ! switch (depth) { case 6: case 8: --- 317,326 ---- unsigned long c; int rshift, gshift, bshift; ! bitsperpixel = _XGetBitsPerPixel(dsp, depth); ! scanline_pad = _XGetScanlinePad(dsp, depth); ! ! switch (bitsperpixel) { case 6: case 8: *************** *** 327,341 **** { shiftstart = 0; shiftstop = 8; ! shiftinc = depth; } else { ! shiftstart = 8 - depth; ! shiftstop = -depth; ! shiftinc = -depth; } ! linepad = 8 - (width % 8); bit_data = (unsigned char *) XtMalloc (((width + linepad) * height) + 1); bitp = bit_data; --- 339,353 ---- { shiftstart = 0; shiftstop = 8; ! shiftinc = bitsperpixel; } else { ! shiftstart = 8 - bitsperpixel; ! shiftstop = -bitsperpixel; ! shiftinc = -bitsperpixel; } ! linepad = scanline_pad - (width % scanline_pad); bit_data = (unsigned char *) XtMalloc (((width + linepad) * height) + 1); bitp = bit_data; *************** *** 367,377 **** } } } ! bytesperline = (width + linepad) * depth / 8; newimage = XCreateImage (dsp, DefaultVisual (dsp, DefaultScreen (dsp)), depth, ZPixmap, 0, (char *) bit_data, ! (width + linepad), height, 8, bytesperline); break; /* * WARNING: This depth 16 code is donated code for 16 bit --- 379,390 ---- } } } ! bytesperline = (width + linepad) * bitsperpixel / 8; newimage = XCreateImage (dsp, DefaultVisual (dsp, DefaultScreen (dsp)), depth, ZPixmap, 0, (char *) bit_data, ! (width + linepad), height, scanline_pad, ! bytesperline); break; /* * WARNING: This depth 16 code is donated code for 16 bit diff -cb libhtmlw/HTMLparse.c- libhtmlw/HTMLparse.c *** libhtmlw/HTMLparse.c- Mon Mar 27 02:30:36 1995 --- libhtmlw/HTMLparse.c Wed Feb 12 12:41:02 1997 *************** *** 261,267 **** /* ! * parse an amperstand escape, and return the appropriate character, or * '\0' on error. * we should really only use caseless_equal_prefix for unterminated, and use * caseless_equal otherwise, but since there are so many escapes, and I --- 261,267 ---- /* ! * parse an ampersand escape, and return the appropriate character, or * '\0' on error. * we should really only use caseless_equal_prefix for unterminated, and use * caseless_equal otherwise, but since there are so many escapes, and I *************** *** 557,563 **** /* * Get the mark text between '<' and '>'. From the text, determine * its type, and fill in a mark_up structure to return. Also returns ! * endp pointing to the ttrailing '>' in the original string. */ struct mark_up * get_mark (start, endp) --- 557,571 ---- /* * Get the mark text between '<' and '>'. From the text, determine * its type, and fill in a mark_up structure to return. Also returns ! * endp pointing to the trailing '>' in the original string. ! * Comment declarations (starting with "" ! * inside an SGML comment (delimited by "--" fore and aft and not con- ! * taining a "--"). Thus spake the spec. Unfortunately, few JavaScript ! * applets obey it, whence the following drastic logic. Define SGML_COMMENTS ! * to get SGML compliant parsing, otherwise a comment starting as in violation of the specs. Ask Jim Rees for examples ! * from the Real World requiring this perverted logic. Oh and everything ! * looking like a is a comment, too. ;) -- GN 06Feb97 */ struct mark_up * get_mark (start, endp) *************** *** 568,573 **** --- 576,582 ---- char *text; char tchar; struct mark_up *mark; + int is_comment; if (start == NULL) { *************** *** 587,596 **** --- 596,678 ---- * Grab the mark text */ ptr = start; + if (*ptr == '!') + { /* this is an SGML declaration */ + ptr++; + is_comment = 0; + #ifdef SGML_COMMENTS + while ((is_comment || (*ptr != '>')) && (*ptr != '\0')) + { /* keep track of '--' bracketed comments */ + if ((*ptr == '-') && (*++ptr == '-')) + { + is_comment = 1 - is_comment; + } + ptr++; + /* + * Theoretically, an SGML Comment Declaration contains ONLY zero or more + * '--' delimited comments, but we aren't picky about finding other stuff + * between comments + */ + } + #else + if ((*ptr == '-') && (*++ptr == '-')) + { /* Joe Dummie's HTML comment */ + ptr++; + is_comment = 2; + while (((is_comment > 0) || (*ptr != '>')) && (*ptr != '\0')) + { + if ((is_comment > 0) && (*ptr == '-')) + { /* countdown... */ + is_comment--; + } + else if (*ptr != '-') /* ('----->' will be acceptable) */ + { /* ...or stay at zero, or revert */ + is_comment = 2; + } + ptr++; + } + } + else + { while ((*ptr != '>') && (*ptr != '\0')) + { /* SGML non-comment declaration */ + ptr++; + } + } + #endif + } + else if ((caseless_equal_prefix(ptr, "script", 6)) + && isspace(*(ptr += 6))) + { /* this is a script el't. Treat as comment */ + ptr++; + is_comment = 1; + while ((is_comment || (*ptr != '>')) && (*ptr != '\0')) + { + if ((*ptr == '<') && (*++ptr == '/') + && (caseless_equal_prefix(++ptr, "script", 6))) + { + ptr += 6; + if (*ptr == '>') + break; + else if (isspace(*ptr)) { + is_comment = 0; ptr++; } + } + else + { + ptr++; + } + } + } + else + { /* ordinary SGML tag */ + while ((*ptr != '>') && (*ptr != '\0')) + { + ptr++; + } + } *endp = ptr; if (*ptr != '>') *************** *** 610,616 **** text = XtNewString(start); *ptr = tchar; clean_text (text); ! /* * No longer needed because the parsing code is now smarter * clean_white_space(text); --- 692,698 ---- text = XtNewString(start); *ptr = tchar; clean_text (text); ! /* * No longer needed because the parsing code is now smarter * clean_white_space(text); *************** *** 1121,1126 **** --- 1203,1224 ---- else if (caseless_equal (str, MT_FORM)) { type = M_FORM; + } + else if (caseless_equal (str, MT_TABLE)) + { + type = M_TABLE; + } + else if (caseless_equal (str, MT_TABLE_ITEM)) + { + type = M_TABLE_ITEM; + } + else if (caseless_equal (str, MT_TABLE_HEADER)) + { + type = M_TABLE_HEADER; + } + else if (caseless_equal (str, MT_TABLE_ROW)) + { + type = M_TABLE_ROW; } else { diff -cb libhtmlw/HTMLwidgets.c- libhtmlw/HTMLwidgets.c *** libhtmlw/HTMLwidgets.c- Sat Apr 1 22:19:05 1995 --- libhtmlw/HTMLwidgets.c Wed Feb 12 11:53:38 1997 *************** *** 435,444 **** } break; case W_HIDDEN: - cbdata.attribute_values[cnt] = wptr->value; - break; case W_PUSHBUTTON: ! cbdata.attribute_values[cnt] = NULL; break; default: cbdata.attribute_values[cnt] = NULL; --- 435,442 ---- } break; case W_HIDDEN: case W_PUSHBUTTON: ! cbdata.attribute_values[cnt] = wptr->value; break; default: cbdata.attribute_values[cnt] = NULL; diff -cb options.h.dist- options.h.dist *** options.h.dist- Fri Mar 31 20:47:43 1995 --- options.h.dist Wed Feb 12 11:53:38 1997 *************** *** 7,13 **** */ #define PRINT_COMMAND "lpr -h -P%s" /* command to pipe to print */ ! #define USER_AGENT "Chimera/1.65" /* User-Agent field for HTTP */ #define EMAIL_COMMAND "mail %s" /* pipe to command for mail */ #define PATH CUTILDIR /* default program PATH */ /*#define CHILD_STDERR "/dev/null"*/ /* stderr for children --- 7,13 ---- */ #define PRINT_COMMAND "lpr -h -P%s" /* command to pipe to print */ ! #define USER_AGENT "Chimera/1.65p1" /* User-Agent field for HTTP */ #define EMAIL_COMMAND "mail %s" /* pipe to command for mail */ #define PATH CUTILDIR /* default program PATH */ /*#define CHILD_STDERR "/dev/null"*/ /* stderr for children diff -cb src/Chimera.ad- src/Chimera.ad *** src/Chimera.ad- Tue Mar 28 21:14:53 1995 --- src/Chimera.ad Wed Feb 12 11:53:38 1997 *************** *** 1,11 **** ! !.allProxy: http://www.somewhere.org:8000/ ! *ftpProxy: http://www.somewhere.org:8000/ !.httpProxy: http://www.somewhere.org:8000/ !.gopherProxy: http://www.somewhere.org:8000/ !.waisProxy: http://www.somewhere.org:8000/ !.newsProxy: http://www.somewhere.org:8000/ !.nntpProxy: http://www.somewhere.org:8000/ !.urnProxy: http://www.somewhere.org:8000/ *background: moccasin *showGrip: false --- 1,55 ---- ! ! All of the Proxy resources default to null strings unless set explicitly: !.httpProxy: http://www.somewhere.org:8000/ !.gopherProxy: http://www.somewhere.org:8000/ + !.ftpProxy: http://www.somewhere.org:8000/ + ! FTP proxying may be needed to pass a firewall, but FTP should almost _never_ + ! go through a proxy _cache_ -- cached FTP proxying tends to _increase_ network + ! load, as well as eating tremendous amounts of disk space on the proxy !.waisProxy: http://www.somewhere.org:8000/ !.newsProxy: http://www.somewhere.org:8000/ !.nntpProxy: http://www.somewhere.org:8000/ + !.email: !.urnProxy: http://www.somewhere.org:8000/ + ! Don't forget to disable proxying inside your local domain and, in the absence + ! of firewalls, all your friendly neighbor domains. Also turn off proxying for + ! services on the local net which need to identify the client host + !.noProxy: my.own.domain,another.domain + !.allProxy: http://www.somewhere.org:8000/ + + ! Resources whose default values are taken from Common.tmpl at compile time: + !.convertFiles: (CONVERT_FILES) + !.homeURL: (HOME_URL) + !.helpURL: (HELP_URL) + !.mimeTypeFiles: (MIME_TYPE_FILES) + !.mailCapFiles: (MAIL_CAPS) + !.protocolFiles: (PROTOCOL_FILES) + !.cacheInfoFiles: (CACHE_INFO_FILES) + !.path: (PATH at compile time, not in Common.tmpl) + + !Resources which have their fallback values hardwired into src/main.c: + !.showURL: True + !.showTitle: True + !.anchorDisplay: False + !.button2Box: + !.openButtonShortcut: True + !.printerName: lp + !.keyTrans: defaultTranslations, see src/main.c + !.cacheOff: False + !.cacheDir: /tmp + !.cacheTTL: 14400 + !.cacheSize: 4000000 + !.cacheClean: True + !.cacheIgnoreExpires: False + !.bookmarkFile: ~/.chimera_bookmark + ! Set the following to empty to always get local directory listings. Set it + ! to Welcome.html:welcome.html:index.html to emulate a CERN httpd. + !.localIndexFiles: index.html + !.button1Box: BUTTON_LIST, see src/main.c + !.statusUpdate: 10 + !.inPort: 0 + !.languageDB: + !.maxColors: 256 + !.gammaCorrect: 0 *background: moccasin *showGrip: false *************** *** 40,45 **** --- 84,91 ---- *html.activeAnchorBG: moccasin *html.anchorUnderlines: 1 *html.visitedAnchorUnderlines: 1 + !Setting the following to false may significantly speed up things on slow + !ancient hardware *html.dashedVisitedAnchorUnderlines: true *html.autoSize: true *************** *** 96,102 **** *StrReq*ScrollingText.width: 300 *filename*title: Enter filename *filename.strreqMessage: Enter filename ! *url*title: Enter URL *url.strreqMessage: Enter URL *search.title: Enter search *search.strreqMessage: Enter search --- 142,148 ---- *StrReq*ScrollingText.width: 300 *filename*title: Enter filename *filename.strreqMessage: Enter filename ! *url*title: Enter URL or website *url.strreqMessage: Enter URL *search.title: Enter search *search.strreqMessage: Enter search diff -cb src/Imakefile- src/Imakefile *** src/Imakefile- Mon Mar 27 05:24:33 1995 --- src/Imakefile Wed Feb 12 12:14:54 1997 *************** *** 27,33 **** LOCAL_DEPLIBS = ../common/libcommon.a ../mxw/libmxw.a \ ../libhtmlw/libhtmlw.a \ ! ../xloadimage/libxloadimage.a $(COMPATLIB) AllTarget(chimera) --- 27,33 ---- LOCAL_DEPLIBS = ../common/libcommon.a ../mxw/libmxw.a \ ../libhtmlw/libhtmlw.a \ ! ../xloadimage/libxloadimage.a $(DEPCOMPAT) AllTarget(chimera) diff -cb src/cache.c- src/cache.c *** src/cache.c- Wed Mar 29 04:55:32 1995 --- src/cache.c Thu Jan 23 18:32:13 1997 *************** *** 196,202 **** { FILE *fp; char buffer[BUFSIZ]; ! char path[MAXPATHLEN + 1], domain[BUFSIZ]; int max, ttl, clean; CacheInfo *ci, *ti; DIR *dp; --- 196,203 ---- { FILE *fp; char buffer[BUFSIZ]; ! char domain[BUFSIZ]; ! char *path; int max, ttl, clean; CacheInfo *ci, *ti; DIR *dp; *************** *** 208,216 **** --- 209,219 ---- { if (buffer[0] == '#' || buffer[0] == '\n') continue; + path = alloc_mem(sizeof(char) * (MAXPATHLEN +1)); if (sscanf(buffer, "%s %s %d %d %d", path, domain, &max, &ttl, &clean) == 5) { + path = FixFilename(path); if ((dp = opendir(path)) != NULL) { ci = (CacheInfo *)alloc_mem(sizeof(CacheInfo)); *************** *** 364,369 **** --- 367,375 ---- default_cache.clist = NULL; default_cache.next = NULL; + if (!cache_list) { + cache_list = &default_cache; + } ScanCacheDirectories(); return; *************** *** 428,433 **** --- 434,442 ---- ci = FindCacheInfo(up->hostname); if (ci == NULL) return(0); + if (ci->cleanup == 2) + return(1); /* lie */ + filename = urlToCacheName(ci, up); if (stat(filename, &s) == -1) return(0); *************** *** 477,483 **** FILE *fp; char *u; char *filename; ! int size = 0; CacheInfo *ci; MIMEField *mf; time_t now, expires; --- 486,492 ---- FILE *fp; char *u; char *filename; ! off_t size = 0; CacheInfo *ci; MIMEField *mf; time_t now, expires; *************** *** 593,601 **** --- 602,613 ---- ci = ci->next; if (ti->dir) free_mem(ti->dir); if (ti->domain) free_mem(ti->domain); + if (ti != &default_cache) free_mem((char *)ti); } + if (cache_list == &default_cache) return; + c = default_cache.clist; while (c) { *************** *** 634,639 **** --- 646,658 ---- ci = FindCacheInfo(up->hostname); if (ci == NULL) return(NULL); + + if (ci->cleanup == 2) { + sprintf(buffer, "%s: on stop list\n", up->hostname); + d = BuildDocument(buffer, strlen(buffer), "text/html", 1, 0); + d->status = DS_ERROR; + return(d); + } filename = urlToCacheName(ci, up); diff -cb src/convert.c- src/convert.c *** src/convert.c- Wed Mar 29 03:53:30 1995 --- src/convert.c Wed Feb 12 11:53:43 1997 *************** *** 43,49 **** }; /* ! * ReadConvertDB * * Reads in the convert entries in a list of files separated by colons. * For example, --- 43,49 ---- }; /* ! * ReadConvertFiles * * Reads in the convert entries in a list of files separated by colons. * For example, diff -cb src/ftp.c- src/ftp.c *** src/ftp.c- Wed Mar 29 04:46:06 1995 --- src/ftp.c Thu Jul 27 18:40:33 1995 *************** *** 102,108 **** r = alloc_mem(strlen(msg) + strlen(ftpmsg) + 1); sprintf (r, msg, ftpmsg); - free_mem(msg); free_mem(ftpmsg); d = BuildDocument(r, strlen(r), "text/html", 0, 0); d->status = DS_ERROR; --- 102,107 ---- diff -cb src/gopher.c- src/gopher.c *** src/gopher.c- Sat Apr 1 22:18:03 1995 --- src/gopher.c Tue Apr 4 07:59:19 1995 *************** *** 10,15 **** --- 10,16 ---- #include #include + #include #ifdef HAVE_STRING_H #include diff -cb src/http.c- src/http.c *** src/http.c- Wed Mar 29 02:08:51 1995 --- src/http.c Thu Dec 5 13:31:38 1996 *************** *** 40,46 **** Document *d; int error_code; { ! if (error_code <= 200 && error_code < 300) { if (error_code == 204) d->status = DS_NOTHING; else d->status = DS_OK; --- 40,46 ---- Document *d; int error_code; { ! if (error_code >= 200 && error_code < 300) { if (error_code == 204) d->status = DS_NOTHING; else d->status = DS_OK; *************** *** 170,176 **** t = ReadBuffer(s, &tlen, 8, 8); if (t == NULL) return(NULL); ! if (strncmp(t, "HTTP/1.0", 8) != 0) { char *x; int xlen; --- 170,176 ---- t = ReadBuffer(s, &tlen, 8, 8); if (t == NULL) return(NULL); ! if (strncmp(t, "HTTP/1.", 7) != 0) { char *x; int xlen; diff -cb src/local.c- src/local.c *** src/local.c- Wed Mar 29 03:50:44 1995 --- src/local.c Wed Feb 12 13:28:40 1997 *************** *** 52,57 **** --- 52,111 ---- #include "net.h" #include "stringdb.h" + static char **ilist; + + /* + * ReadIndexFilenames + * + * Convert colon-delimited string into array of strings, delimited by a + * NULL pointer. Memory allocated here stays allocated until Chimera exits. + */ + void + ReadIndexFilenames(filelist) + char *filelist; + { + int sl, colons; + char *filenames, *cp, *cp2; + + if (filelist == NULL) + { + ilist = (char **)alloc_mem(sizeof(char *)); + *ilist = (char *)NULL; + return; + } + sl = strlen(filelist); + if (sl == 0) + { + ilist = (char **)alloc_mem(sizeof(char *)); + *ilist = (char *)NULL; + return; + } + filenames = (char *)alloc_mem(sl * sizeof(char)); + colons = 2; /* count final delimiters */ + for (cp=filelist,cp2=filenames; *cp != '\0'; cp++,cp2++) + { + if ((*cp2 = *cp) == ':') + { + colons++; + *cp2 = '\0'; + } + } + *cp2 = '\0'; + ilist = (char **)alloc_mem(colons * sizeof(char *)); + ilist[0] = filenames; + colons = 1; + for (cp=filelist,cp2=filenames; *cp != '\0'; cp++,cp2++) + { + if (*cp == ':') + { + ilist[colons] = cp2 + 1; + colons++; + } + } + ilist[colons] = (char *)NULL; + return; + } + /* * LoadFile * *************** *** 110,117 **** * navigate the local filesystem. */ static Document * ! LoadDir(filename) char *filename; { Document *d; DIR *dp; --- 164,172 ---- * navigate the local filesystem. */ static Document * ! LoadDir(filename, mtlist) char *filename; + MIMEType *mtlist; { Document *d; DIR *dp; *************** *** 122,132 **** int count, size; int i; char *f; ! static char *format = "

  • %s \n"; ! static char *rformat = "
  • %s \n"; char *header = GetFromStringDB("localheader"); char *useformat = (filename[strlen(filename) - 1] == '/')? rformat: format; char **sa; dp = opendir(filename); if (dp == NULL) --- 177,213 ---- int count, size; int i; char *f; ! static char *format = "
  • %s \n"; ! static char *rformat = "
  • %s \n"; char *header = GetFromStringDB("localheader"); char *useformat = (filename[strlen(filename) - 1] == '/')? rformat: format; + char *useshtfmt = (filename[strlen(filename) - 1] == '/')? "%s%s": "%s/%s"; char **sa; + char **lifn; + struct stat s; + + /* First see if there is a welcome or index file. If you don't like this + * behavior, set X resource localIndexFiles to an empty string. + */ + for (lifn = ilist; *lifn; lifn++) + { + if (strlen(*lifn) == 0) + continue; + f = (char *) alloc_mem(strlen(filename) + strlen(*lifn) + 2); + sprintf(f, useshtfmt, filename, *lifn); + i = stat(f, &s); + if (i >= 0 && !S_ISDIR(s.st_mode)) + { + d = LoadFile(f, (int) s.st_size, mtlist); + free_mem(f); + return(d); + } + else + { + free_mem(f); + continue; + } + } dp = opendir(filename); if (dp == NULL) *************** *** 226,232 **** return(BuildDocument(msg, strlen(msg), "text/html", 1, 0)); } ! if (S_ISDIR(s.st_mode)) d = LoadDir(filename); else d = LoadFile(filename, (int) s.st_size, mtlist); d->cache = 0; --- 307,313 ---- return(BuildDocument(msg, strlen(msg), "text/html", 1, 0)); } ! if (S_ISDIR(s.st_mode)) d = LoadDir(filename, mtlist); else d = LoadFile(filename, (int) s.st_size, mtlist); d->cache = 0; diff -cb src/local.h- src/local.h *** src/local.h- Mon Mar 6 01:09:42 1995 --- src/local.h Wed Feb 12 11:53:44 1997 *************** *** 6,11 **** --- 6,12 ---- * See copyright.h for details. */ + void ReadIndexFilenames _ArgProto((char *)); Document *file _ArgProto((URLParts *, MIMEType *)); Document *telnet _ArgProto((URLParts *, MIMEType *)); Document *tn3270 _ArgProto((URLParts *, MIMEType *)); diff -cb src/main.c- src/main.c *** src/main.c- Fri Mar 31 20:45:19 1995 --- src/main.c Wed Feb 12 12:48:59 1997 *************** *** 121,126 **** --- 121,128 ---- offset(showURL), XtRImmediate, (XtPointer)True }, { "showTitle", XtCBoolean, XtRBoolean, sizeof(Boolean), offset(showTitle), XtRImmediate, (XtPointer)True }, + { "anchorDisplay", XtCBoolean, XtRBoolean, sizeof(Boolean), + offset(anchorDisplay), XtRImmediate, (XtPointer)False }, { "button1Box", "BoxList", XtRString, sizeof(char *), offset(button1Box), XtRString, (XtPointer)BUTTON_LIST }, { "button2Box", "BoxList", XtRString, sizeof(char *), *************** *** 183,188 **** --- 185,194 ---- offset(cacheIgnoreExpires), XtRImmediate, (XtPointer)False }, { "gammaCorrect", "GammaCorrect", XtRFloat, sizeof(float), offset(gamma), XtRImmediate, (XtPointer)0 }, + { "openButtonShortcut", XtCBoolean, XtRBoolean, sizeof(Boolean), + offset(openButtonShortcut), XtRImmediate, (XtPointer)True }, + { "localIndexFiles", "LocalIndexFiles", XtRString, sizeof(char *), + offset(localIndexFiles), XtRString, (XtPointer)"index.html" }, }; static XtActionsRec actionsList[] = *************** *** 236,242 **** * be cleaned. */ signal(SIGINT, sigigh_handler); - signal(SIGQUIT, sigigh_handler); signal(SIGHUP, sigigh_handler); signal(SIGTERM, sigigh_handler); signal(SIGPIPE, SIG_IGN); --- 242,247 ---- *************** *** 320,325 **** --- 325,331 ---- root.mclist = ReadMailCapFiles(root.mailCapFiles); root.mtlist = ReadMIMETypeFiles(root.mimeTypeFiles); root.plist = ReadProtocolFiles(root.protocolFiles); + ReadIndexFilenames(root.localIndexFiles); AddLanguage(root.languageDB); *************** *** 918,927 **** } /* ! * Convert needs to be called in case there is a transfer or content ! * encoding. */ ! if (d->ptext == NULL) { /* * This frightens me. I know it is bad but I can't think of anything --- 924,933 ---- } /* ! * Convert needs to be called in case there is a content transfer or content ! * encoding. But not for downloads, says Roman. */ ! if (d->ptext == NULL && ! download) { /* * This frightens me. I know it is bad but I can't think of anything *************** *** 949,955 **** if (d->status == DS_OK && (download || (d->content == NULL && d->pcontent == NULL))) { ! CreateStrReq("filename", root.savestr, False, SaveOCallback, SaveDCallback, (XtPointer)d); } else if ((d->content != NULL && strcasecmp(d->content, "text/html") == 0) || --- 955,980 ---- if (d->status == DS_OK && (download || (d->content == NULL && d->pcontent == NULL))) { ! ! /* Let's offer to save the downloaded file under the same name. ! Roman Czyborra, 1995-04-13 */ ! ! char *filename=NULL, *basename; int length; ! ! if (d->up) if (filename= d->up->filename) if (length = strlen(filename)) ! { ! if (filename[length-1]=='/') ! { ! filename[length-1]='\0'; ! } ! if (basename = strrchr (filename, '/')) ! { ! filename = basename + 1; ! } ! } ! if (! filename) filename=""; ! ! CreateStrReq("filename", filename, False, SaveOCallback, SaveDCallback, (XtPointer)d); } else if ((d->content != NULL && strcasecmp(d->content, "text/html") == 0) || *************** *** 979,985 **** else { DestroyDocument(d); ! d = NULL; } } else --- 1004,1010 ---- else { DestroyDocument(d); ! return; } } else *************** *** 1066,1071 **** --- 1091,1113 ---- return; } + /* rwmcm */ + /* + * AnchorURLDisplay + * + * Called when the mouse moves over an anchor + */ + void + AnchorURLDisplay(w, c) + Widget w; + char *c; + { + Arg args[5]; + + XtSetArg(args[0], XtNlabel, c); + XtSetValues(root.anchordisplay,args,1); + } + /* * OpenDocument * *************** *** 1089,1097 **** else { if (root.loadstr) free_mem(root.loadstr); root.loadstr = alloc_string(url); ! up = ParseURL(url); if (up != NULL) { d = LoadDoc(up, 0, 0); --- 1131,1150 ---- else { if (root.loadstr) free_mem(root.loadstr); + /* + * short cut -- if user types in "foo.com" turn that into "http://foo.com/" + * this means you must type "./foo.com" if opening a relative URL by that + * name. Colons and slashes disable this, so you can open mailto:foo@bar + * or news:alt.gourmand if you have mailto or news helper scripts + * You can disable this by setting X resource openButtonShortcut False. + */ + if (root.openButtonShortcut && !strchr(url, ':') && !strchr(url, '/')) { + root.loadstr = alloc_mem(strlen(url) + 9); + sprintf(root.loadstr, "http://%s/", url); + } else root.loadstr = alloc_string(url); ! up = ParseURL(root.loadstr); if (up != NULL) { d = LoadDoc(up, 0, 0); *************** *** 1698,1704 **** } /* ! * sigiqh_handler */ static void sigigh_handler() --- 1751,1757 ---- } /* ! * sigigh_handler */ static void sigigh_handler() *************** *** 1711,1723 **** /* * Quit * ! * Called when the user clicks on the quit button */ void Quit(w, cldata, cbdata) Widget w; XtPointer cldata, cbdata; { if (root.dlist && root.dlist->doc) DestroyDocument(root.dlist->doc); if (!root.cacheOff) CleanCache(); --- 1764,1783 ---- /* * Quit * ! * Called when the user clicks on the quit button, or when handling a signal ! * asking us to terminate cleanly. Prevent re-entrant use of the signal ! * handler, but allow SIGTERM to cause termination in case something is going ! * seriously wrong during the cleanup phase. */ void Quit(w, cldata, cbdata) Widget w; XtPointer cldata, cbdata; { + signal(SIGINT, SIG_IGN); + signal(SIGHUP, SIG_IGN); + signal(SIGTERM, SIG_DFL); + if (root.dlist && root.dlist->doc) DestroyDocument(root.dlist->doc); if (!root.cacheOff) CleanCache(); diff -cb src/stringdb.c- src/stringdb.c *** src/stringdb.c- Wed Mar 22 05:21:10 1995 --- src/stringdb.c Wed Feb 12 11:53:45 1997 *************** *** 77,83 **** } /* ! * GetFromStringDB * * Returns a value from a name */ --- 77,83 ---- } /* ! * NGetFromStringDB * * Returns a value from a name */ diff -cb src/url.c- src/url.c *** src/url.c- Sun Mar 26 04:26:06 1995 --- src/url.c Mon Feb 3 14:08:20 1997 *************** *** 27,33 **** /* * EscapeURL * ! * Puts escape codes in URLs. NOT complete. */ char * EscapeURL(url, s2p) --- 27,35 ---- /* * EscapeURL * ! * Puts escape codes in URLs. (More complete than it used to be; ! * GN Jan 1997. We escape all that isn't alphanumeric, "safe" or "extra" ! * as spec'd in RFCs 1738, 1808 and 2068.) */ char * EscapeURL(url, s2p) *************** *** 49,55 **** { *n = '+'; } ! else if (isalnum(*cp) || strchr("$-_.'(),+!*", *cp) || (*cp=='+' && !s2p)) { *n = *cp; } --- 51,57 ---- { *n = '+'; } ! else if (isalnum(*cp) || strchr("$-_.!*'(),", *cp) || (*cp=='+' && !s2p)) { *n = *cp; } diff -cb src/widget.c- src/widget.c *** src/widget.c- Thu Mar 23 03:29:21 1995 --- src/widget.c Thu Jul 27 18:32:56 1995 *************** *** 218,229 **** --- 218,247 ---- } /* + * rwmcm: Sixth pane, the URL anchor display + */ + if (r->anchorDisplay) + { + XtSetArg(args[0], XtNjustify, XtJustifyLeft); + XtSetArg(args[1], XtNlabel, " "); + XtSetArg(args[2], XtNskipAdjust, True); + r->anchordisplay=XtCreateManagedWidget("anchordisplay", + labelWidgetClass, paned, + args, 3); + } + + /* * Fifth pane, the HTML viewing area */ r->w = XtCreateManagedWidget("html", htmlWidgetClass, paned, NULL, ZERO); XtAddCallback(r->w, WbNanchorCallback, Anchor, r); + if (r->anchorDisplay) + { + XtSetArg(args[0], WbNpointerMotionCallback, AnchorURLDisplay); + XtSetValues(r->w, args, 1); + } /* * Set some callbacks for the HTML widget. diff -cb src/widget.h- src/widget.h *** src/widget.h- Fri Mar 31 20:45:22 1995 --- src/widget.h Wed Feb 12 12:33:16 1997 *************** *** 50,55 **** --- 50,56 ---- char *printerName; /* default printer */ Boolean showURL; /* switch for the display of the current URL */ Boolean showTitle; /* switch for the display of the current title */ + Boolean anchorDisplay; /* display URL of current hyperlink */ int statusUpdate; /* frequency of download status update */ int inPort; /* the port that chimera listens on for data */ char *httpProxy; *************** *** 65,70 **** --- 66,73 ---- float gamma; int maxColors; /* maximum colors per inline image */ Boolean cacheIgnoreExpires; + Boolean openButtonShortcut; /* enable foo.com -> http://foo.com/ shortcut */ + char *localIndexFiles; /* look for index.html etc. in local directories */ /* * Private data *************** *** 89,94 **** --- 92,98 ---- Widget search; Widget cancel; Widget quit; + Widget anchordisplay; /* rwmcm */ char *savestr; char *loadstr; char *printstr; *************** *** 117,122 **** --- 121,127 ---- void Quit(); void OpenDocument(); void Anchor(); + void AnchorURLDisplay(); void Home(); void Back(); void Help();