home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / infosrvr / src / diffs / wwwlibr2.dif < prev   
Encoding:
Text File  |  1993-11-16  |  38.1 KB  |  1,348 lines

  1. *** ../../../../2.13/WWW/Library/Implementation/CommonMakefile    Mon Oct 11 14:46:29 1993
  2. --- CommonMakefile    Tue Nov 16 15:48:57 1993
  3. ***************
  4. *** 45,51 ****
  5.   
  6.   WC = $(WWW)/Library
  7.   CMN = $(WWW)/Library/Implementation/
  8.   # Where shall we put the objects and built library?
  9.   
  10.   LOB = $(WTMP)/Library/$(WWW_MACH)
  11. --- 45,51 ----
  12.   
  13.   WC = $(WWW)/Library
  14.   CMN = $(WWW)/Library/Implementation/
  15. ! VMS = $(CMN)vms
  16.   # Where shall we put the objects and built library?
  17.   
  18.   LOB = $(WTMP)/Library/$(WWW_MACH)
  19. ***************
  20. *** 121,127 ****
  21.   SOURCES = $(CFILES) $(HFILES) $(CMN)Version.make \
  22.       $(CMN)CommonMakefile $(CMN)Makefile \
  23.       $(WWW)/README.txt $(WWW)/Copyright.txt $(WWW)/BUILD $(WWW)/Makefile
  24. ! SPECIFIC = $(WWW)/All/*/Makefile.include $(WWW)/All/Implementation/Makefile*
  25.   
  26.   
  27.   #    Library
  28. --- 121,133 ----
  29.   SOURCES = $(CFILES) $(HFILES) $(CMN)Version.make \
  30.       $(CMN)CommonMakefile $(CMN)Makefile \
  31.       $(WWW)/README.txt $(WWW)/Copyright.txt $(WWW)/BUILD $(WWW)/Makefile
  32. ! SPECIFIC = $(WWW)/All/*/Makefile.include $(WWW)/All/Implementation/Makefile* \
  33. !     $(VMS)/descrip.mms $(VMS)/build_multinet.com \
  34. !     $(VMS)/COPYING.LIB $(VMS)/setup.com $(VMS)/multinet.opt \
  35. !     $(VMS)/patchlevel.h $(VMS)/ufc-crypt.h \
  36. !     $(VMS)/crypt.c $(VMS)/crypt_util.c \
  37. !     $(VMS)/getline.c $(VMS)/getpass.c \
  38. !     $(VMS)/HTVMSUtils.h $(VMS)/HTVMSUtils.c
  39.   
  40.   
  41.   #    Library
  42. ***************
  43. *** 178,184 ****
  44.   
  45.   /pub/www/src/WWWLibrary_$(VC).tar.Z : $(SOURCES)
  46.       tar cf /pub/www/src/WWWLibrary_$(VC).tar \
  47. !         $(SOURCES)  $(SPECIFIC) $(WC)/*/Makefile $(WC)/vms/descrip.mms
  48.       compress /pub/www/src/WWWLibrary_$(VC).tar
  49.   
  50.   
  51. --- 184,190 ----
  52.   
  53.   /pub/www/src/WWWLibrary_$(VC).tar.Z : $(SOURCES)
  54.       tar cf /pub/www/src/WWWLibrary_$(VC).tar \
  55. !         $(SOURCES)  $(SPECIFIC) $(WC)/*/Makefile
  56.       compress /pub/www/src/WWWLibrary_$(VC).tar
  57.   
  58.   
  59. ***************
  60. *** 242,248 ****
  61.   $(LOB)/HTStyle.o : $(OE) $(CMN)HTStyle.c $(CMN)HTUtils.h
  62.       $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTStyle.c
  63.   
  64. ! $(LOB)/HTAtom.o : $(OE) $(CMN)HTAtom.c $(CMN)HTUtils.h
  65.       $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAtom.c
  66.   
  67.   $(LOB)/HTChunk.o : $(OE) $(CMN)HTChunk.c $(CMN)HTUtils.h
  68. --- 248,254 ----
  69.   $(LOB)/HTStyle.o : $(OE) $(CMN)HTStyle.c $(CMN)HTUtils.h
  70.       $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTStyle.c
  71.   
  72. ! $(LOB)/HTAtom.o : $(OE) $(CMN)HTAtom.c $(CMN)HTUtils.h $(CMN)HTList.h
  73.       $(CC) -c -o $@ $(CFLAGS2) $(CMN)HTAtom.c
  74.   
  75.   $(LOB)/HTChunk.o : $(OE) $(CMN)HTChunk.c $(CMN)HTUtils.h
  76. *** ../../../../2.13/WWW/Library/Implementation/HTAABrow.c    Wed Nov  3 16:20:18 1993
  77. --- HTAABrow.c    Mon Nov 15 16:11:29 1993
  78. ***************
  79. *** 622,628 ****
  80.           outofmem(__FILE__, "compose_auth_string");
  81.   #ifdef PUBKEY
  82.       HTPK_encrypt(cleartext, ciphertext, server->public_key);
  83. !     HTUU_encode(ciphertext, strlen(ciphertext), result);
  84.   #endif
  85.       free(cleartext);
  86.       free(ciphertext);
  87. --- 622,628 ----
  88.           outofmem(__FILE__, "compose_auth_string");
  89.   #ifdef PUBKEY
  90.       HTPK_encrypt(cleartext, ciphertext, server->public_key);
  91. !     HTUU_encode((unsigned char *)ciphertext, strlen(ciphertext), result);
  92.   #endif
  93.       free(cleartext);
  94.       free(ciphertext);
  95. ***************
  96. *** 630,636 ****
  97.       else { /* scheme == HTAA_BASIC */
  98.       if (!(result = (char*)malloc(4 * ((len+2)/3) + 1)))
  99.           outofmem(__FILE__, "compose_auth_string");
  100. !     HTUU_encode(cleartext, strlen(cleartext), result);
  101.       free(cleartext);
  102.       }
  103.       return result;
  104. --- 630,636 ----
  105.       else { /* scheme == HTAA_BASIC */
  106.       if (!(result = (char*)malloc(4 * ((len+2)/3) + 1)))
  107.           outofmem(__FILE__, "compose_auth_string");
  108. !     HTUU_encode((unsigned char *)cleartext, strlen(cleartext), result);
  109.       free(cleartext);
  110.       }
  111.       return result;
  112. *** ../../../../2.13/WWW/Library/Implementation/HTAAProt.c    Wed Nov  3 16:20:19 1993
  113. --- HTAAProt.c    Mon Nov 15 16:11:30 1993
  114. ***************
  115. *** 4,14 ****
  116. --- 4,17 ----
  117.   **
  118.   ** AUTHORS:
  119.   **    AL    Ari Luotonen    luotonen@dxcern.cern.ch
  120. + **    MD    Mark Donszelmann    duns@vxdeop.cern.ch
  121.   **
  122.   ** HISTORY:
  123.   **    20 Oct 93  AL    Now finds uid/gid for nobody/nogroup by name
  124.   **            (doesn't use default 65534 right away).
  125.   **            Also understands negative uids/gids.
  126. + **    14 Nov 93  MD    Added VMS compatibility
  127. + **
  128.   ** BUGS:
  129.   **
  130.   **
  131. ***************
  132. *** 15,22 ****
  133. --- 18,27 ----
  134.   */
  135.   
  136.   #include <string.h>
  137. + #ifndef VMS
  138.   #include <pwd.h>    /* Unix password file routine: getpwnam()    */
  139.   #include <grp.h>    /* Unix group file routine: getgrnam()        */
  140. + #endif /* not VMS */
  141.   
  142.   #include "HTUtils.h"
  143.   #include "HTAAUtil.h"
  144. ***************
  145. *** 64,69 ****
  146. --- 69,112 ----
  147.   }
  148.   
  149.   
  150. + #ifdef VMS
  151. + /* PUBLIC                            HTAA_getUidName()
  152. + **        GET THE USER ID NAME (VMS ONLY)
  153. + ** ON ENTRY:
  154. + **    No arguments.
  155. + **
  156. + ** ON EXIT:
  157. + **    returns    the user name 
  158. + **        Default is "" (nobody).
  159. + */
  160. + PUBLIC char * HTAA_getUidName NOARGS
  161. + {
  162. +     if (current_prot && current_prot->uid_name 
  163. +                   && (0 != strcmp(current_prot->uid_name,"nobody")) )
  164. +        return(current_prot->uid_name);
  165. +     else
  166. +        return("");
  167. + }
  168. + /* PUBLIC                            HTAA_getFileName
  169. + **        GET THE FILENAME (VMS ONLY)
  170. + ** ON ENTRY:
  171. + **    No arguments.
  172. + **
  173. + ** ON EXIT:
  174. + **    returns    the filename
  175. + */
  176. + PUBLIC char * HTAA_getFileName NOARGS
  177. + {
  178. +     if (current_prot && current_prot->filename)
  179. +        return(current_prot->filename);
  180. +     else
  181. +        return("");
  182. + }
  183. + #else /* not VMS */
  184.   /* PUBLIC                            HTAA_getUid()
  185.   **        GET THE USER ID TO CHANGE THE PROCESS UID TO
  186.   ** ON ENTRY:
  187. ***************
  188. *** 115,120 ****
  189. --- 158,164 ----
  190.   }
  191.   
  192.   
  193.   /* PUBLIC                            HTAA_getGid()
  194.   **        GET THE GROUP ID TO CHANGE THE PROCESS GID TO
  195.   ** ON ENTRY:
  196. ***************
  197. *** 163,168 ****
  198. --- 207,215 ----
  199.       */
  200.       return 65534;    /* nogroup */
  201.   }
  202. + #endif /* not VMS */
  203.   
  204.   
  205.   
  206. *** ../../../../2.13/WWW/Library/Implementation/HTAAProt.h    Tue Oct  5 11:04:40 1993
  207. --- HTAAProt.h    Mon Nov 15 16:17:38 1993
  208. ***************
  209. *** 167,172 ****
  210. --- 167,173 ----
  211.   
  212.    */
  213.   
  214. + #ifndef VMS
  215.   /* PUBLIC                                                       HTAA_getUid()
  216.   **              GET THE USER ID TO CHANGE THE PROCESS UID TO
  217.   ** ON ENTRY:
  218. ***************
  219. *** 189,194 ****
  220. --- 190,224 ----
  221.   **              Default is 65534 (nogroup).
  222.   */
  223.   PUBLIC int HTAA_getGid NOPARAMS;
  224. + #endif /* not VMS */
  225. + /*
  226. +    For VMS:
  227. +    
  228. +  */
  229. + #ifdef VMS
  230. + /* PUBLIC                                                       HTAA_getUidName()
  231. + **              GET THE USER ID NAME (VMS ONLY)
  232. + ** ON ENTRY:
  233. + **      No arguments.
  234. + **
  235. + ** ON EXIT:
  236. + **      returns the user name
  237. + **              Default is "" (nobody).
  238. + */
  239. + PUBLIC char * HTAA_getUidName NOPARAMS;
  240. + /* PUBLIC                                                       HTAA_getFileName
  241. + **              GET THE FILENAME (VMS ONLY)
  242. + ** ON ENTRY:
  243. + **      No arguments.
  244. + **
  245. + ** ON EXIT:
  246. + **      returns the filename
  247. + */
  248. + PUBLIC char * HTAA_getFileName NOPARAMS;
  249. + #endif /* VMS */
  250.   /*
  251.   
  252.    */
  253. *** ../../../../2.13/WWW/Library/Implementation/HTAAServ.c    Wed Nov  3 16:20:20 1993
  254. --- HTAAServ.c    Thu Nov 11 11:23:30 1993
  255. ***************
  256. *** 114,123 ****
  257.         case HTAA_DOTDOT:
  258.       return "Forbidden -- URL containing /../ disallowed";
  259.       break;
  260. !     /*
  261. !     ** It ought to, using an executable script (TBL)
  262. !     ** What do you mean, Tim?? (AL)
  263. !     */
  264.   
  265.       /* 404 cases */
  266.         case HTAA_NOT_FOUND:
  267. --- 114,122 ----
  268.         case HTAA_DOTDOT:
  269.       return "Forbidden -- URL containing /../ disallowed";
  270.       break;
  271. !       case HTAA_HTBIN:
  272. !     return "Forbidden -- /htbin feature not enabled on this server";
  273. !     break;
  274.   
  275.       /* 404 cases */
  276.         case HTAA_NOT_FOUND:
  277. ***************
  278. *** 173,178 ****
  279. --- 172,180 ----
  280.         case HTAA_DOTDOT:
  281.       return "SLASH-DOT-DOT";
  282.       break;
  283. +       case HTAA_HTBIN:
  284. +     return "HTBIN-OFF";
  285. +     break;
  286.   
  287.       /* 404 cases */
  288.         case HTAA_NOT_FOUND:
  289. ***************
  290. *** 432,438 ****
  291.       char *local_copy = NULL;
  292.       HTAAMethod method = HTAAMethod_enum(method_name);
  293.       HTAAScheme scheme = HTAAScheme_enum(scheme_name);
  294. !     
  295.       /*
  296.       ** Translate into absolute pathname, and
  297.       ** check for "protect" and "defprot" rules.
  298. --- 434,442 ----
  299.       char *local_copy = NULL;
  300.       HTAAMethod method = HTAAMethod_enum(method_name);
  301.       HTAAScheme scheme = HTAAScheme_enum(scheme_name);
  302. !     HTAAFailReason = HTAA_OK;
  303.       /*
  304.       ** Translate into absolute pathname, and
  305.       ** check for "protect" and "defprot" rules.
  306. ***************
  307. *** 458,472 ****
  308.                                           /* a /htbin call to set up */
  309.                                           /* protections.           */
  310.       if (0 == strncmp(local_copy, "/htbin/", 7)) {
  311. -         char *end = strchr(local_copy+7, '/');
  312. -         if (end)
  313. -         *end = (char)0;
  314.           if (!HTBinDir)
  315. !         StrAllocCopy(HTBinDir, HTBINDIR);
  316. !         FREE(pathname);
  317. !         pathname = (char*)malloc(strlen(HTBinDir)+strlen(local_copy)-4);
  318. !         strcpy(pathname, HTBinDir);
  319. !         strcat(pathname, local_copy+6);
  320.       }
  321.   
  322.       if (!pathname) {        /* Forbidden by rule */
  323. --- 462,478 ----
  324.                                           /* a /htbin call to set up */
  325.                                           /* protections.           */
  326.       if (0 == strncmp(local_copy, "/htbin/", 7)) {
  327.           if (!HTBinDir)
  328. !         HTAAFailReason = HTAA_HTBIN;
  329. !         else {
  330. !         char *end = strchr(local_copy+7, '/');
  331. !         if (end)
  332. !             *end = (char)0;
  333. !         FREE(pathname);
  334. !         pathname=(char*)malloc(strlen(HTBinDir)+strlen(local_copy)+1);
  335. !         strcpy(pathname, HTBinDir);
  336. !         strcat(pathname, local_copy+6);
  337. !         }
  338.       }
  339.   
  340.       if (!pathname) {        /* Forbidden by rule */
  341. ***************
  342. *** 474,482 ****
  343.                      "HTAA_checkAuthorization: Forbidden by rule\n");
  344.           HTAAFailReason = HTAA_BY_RULE;
  345.       }
  346. !     else {    /* pathname != NULL */
  347.           char *access = HTParse(pathname, "", PARSE_ACCESS);
  348. !         if (!*access  ||  0 == strcmp(access, "file")) { /*Local file, do AA*/
  349.           if (!HTSecure && 0 != strncmp(local_copy, "/htbin/", 7)) {
  350.               char *localname = HTLocalName(pathname);
  351.               free(pathname);
  352. --- 480,489 ----
  353.                      "HTAA_checkAuthorization: Forbidden by rule\n");
  354.           HTAAFailReason = HTAA_BY_RULE;
  355.       }
  356. !     else if (HTAAFailReason != HTAA_HTBIN) {
  357. !         /* pathname != NULL */
  358.           char *access = HTParse(pathname, "", PARSE_ACCESS);
  359. !         if (!*access || 0 == strcmp(access,"file")) { /*Local file, do AA*/
  360.           if (!HTSecure && 0 != strncmp(local_copy, "/htbin/", 7)) {
  361.               char *localname = HTLocalName(pathname);
  362.               free(pathname);
  363. ***************
  364. *** 529,534 ****
  365. --- 536,542 ----
  366.         case HTAA_NO_ENTRY:
  367.         case HTAA_SETUP_ERROR:
  368.         case HTAA_DOTDOT:
  369. +       case HTAA_HTBIN:
  370.       return 403;
  371.       break;
  372.   
  373. *** ../../../../2.13/WWW/Library/Implementation/HTAAUtil.c    Thu Oct  7 14:42:18 1993
  374. --- HTAAUtil.c    Thu Nov 11 11:23:30 1993
  375. ***************
  376. *** 33,40 ****
  377. --- 33,42 ----
  378.   **
  379.   ** AUTHORS:
  380.   **    AL    Ari Luotonen    luotonen@dxcern.cern.ch
  381. + **    MD     Mark Donszelmann    duns@vxdeop.cern.ch
  382.   **
  383.   ** HISTORY:
  384. + **     8 Nov 93  MD    (VMS only) Added case insensitive comparison in HTAA_templateCaseMatch
  385.   **
  386.   **
  387.   ** BUGS:
  388. ***************
  389. *** 224,230 ****
  390.   
  391.       for( ; *p  &&  *q  &&  *p == *q; p++, q++)    /* Find first mismatch */
  392.       ; /* do nothing else */
  393. !     
  394.       if (!*p && !*q)    return YES;    /* Equally long equal strings */
  395.       else if ('*' == *p) {        /* Wildcard */
  396.       p++;                /* Skip wildcard character */
  397. --- 226,232 ----
  398.   
  399.       for( ; *p  &&  *q  &&  *p == *q; p++, q++)    /* Find first mismatch */
  400.       ; /* do nothing else */
  401.       if (!*p && !*q)    return YES;    /* Equally long equal strings */
  402.       else if ('*' == *p) {        /* Wildcard */
  403.       p++;                /* Skip wildcard character */
  404. ***************
  405. *** 236,242 ****
  406.       }
  407.       }    /* if wildcard */
  408.       else        return NO;    /* Length or character mismatch */
  409. ! }
  410.   
  411.   
  412.   /* PUBLIC                    HTAA_makeProtectionTemplate()
  413. --- 238,290 ----
  414.       }
  415.       }    /* if wildcard */
  416.       else        return NO;    /* Length or character mismatch */
  417. ! }    
  418. ! /* PUBLIC                        HTAA_templateCaseMatch()
  419. ! **        STRING COMPARISON FUNCTION FOR FILE NAMES
  420. ! **           WITH ONE WILDCARD * IN THE TEMPLATE (Case Insensitive)
  421. ! ** NOTE:
  422. ! **    This is essentially the same code as in HTAA_templateMatch, but
  423. ! **    it compares case insensitive (for VMS). Reason for this routine
  424. ! **    is that HTAA_templateMatch gets called from several places, also 
  425. ! **    there where a case sensitive match is needed, so one cannot just
  426. ! **    change the HTAA_templateMatch routine for VMS.
  427. ! **
  428. ! ** ON ENTRY:
  429. ! **    template    is a template string to match the file name
  430. ! **            agaist, may contain a single wildcard
  431. ! **            character * which matches zero or more
  432. ! **            arbitrary characters.
  433. ! **    filename    is the filename (or pathname) to be matched
  434. ! **            agaist the template.
  435. ! **
  436. ! ** ON EXIT:
  437. ! **    returns        YES, if filename matches the template.
  438. ! **            NO, otherwise.
  439. ! */
  440. ! PUBLIC BOOL HTAA_templateCaseMatch ARGS2(CONST char *, template, 
  441. !                          CONST char *, filename)
  442. ! {
  443. !     CONST char *p = template;
  444. !     CONST char *q = filename;
  445. !     int m;
  446. !     for( ; *p  &&  *q  &&  toupper(*p) == toupper(*q); p++, q++) /* Find first mismatch */
  447. !     ; /* do nothing else */
  448. !     if (!*p && !*q)    return YES;    /* Equally long equal strings */
  449. !     else if ('*' == *p) {        /* Wildcard */
  450. !     p++;                /* Skip wildcard character */
  451. !     m = strlen(q) - strlen(p);    /* Amount to match to wildcard */
  452. !     if (m < 0) return NO;        /* No match, filename too short */
  453. !     else {            /* Skip the matched characters and compare */
  454. !         if (strcasecomp(p, q+m))    return NO;    /* Tail mismatch */
  455. !         else                return YES;    /* Tail match */
  456. !     }
  457. !     }    /* if wildcard */
  458. !     else        return NO;    /* Length or character mismatch */
  459. ! }    
  460.   
  461.   
  462.   /* PUBLIC                    HTAA_makeProtectionTemplate()
  463. *** ../../../../2.13/WWW/Library/Implementation/HTAAUtil.h    Thu Oct  7 14:44:23 1993
  464. --- HTAAUtil.h    Mon Nov 15 16:17:37 1993
  465. ***************
  466. *** 218,223 ****
  467. --- 218,249 ----
  468.                                          CONST char * filename));
  469.   
  470.   
  471. + /* PUBLIC                                               HTAA_templateCaseMatch()
  472. + **              STRING COMPARISON FUNCTION FOR FILE NAMES
  473. + **                 WITH ONE WILDCARD * IN THE TEMPLATE (Case Insensitive)
  474. + ** NOTE:
  475. + **      This is essentially the same code as in HTAA_templateMatch, but
  476. + **      it compares case insensitive (for VMS). Reason for this routine
  477. + **      is that HTAA_templateMatch gets called from several places, also
  478. + **      there where a case sensitive match is needed, so one cannot just
  479. + **      change the HTAA_templateMatch routine for VMS.
  480. + **
  481. + ** ON ENTRY:
  482. + **      template        is a template string to match the file name
  483. + **                      agaist, may contain a single wildcard
  484. + **                      character * which matches zero or more
  485. + **                      arbitrary characters.
  486. + **      filename        is the filename (or pathname) to be matched
  487. + **                      agaist the template.
  488. + **
  489. + ** ON EXIT:
  490. + **      returns         YES, if filename matches the template.
  491. + **                      NO, otherwise.
  492. + */
  493. + PUBLIC BOOL HTAA_templateCaseMatch PARAMS((CONST char * template,
  494. +                                          CONST char * filename));
  495.   /* PUBLIC                                       HTAA_makeProtectionTemplate()
  496.   **              CREATE A PROTECTION TEMPLATE FOR THE FILES
  497.   **              IN THE SAME DIRECTORY AS THE GIVEN FILE
  498. *** ../../../../2.13/WWW/Library/Implementation/HTACL.c    Wed Oct 13 16:53:41 1993
  499. --- HTACL.c    Thu Nov 11 11:23:32 1993
  500. ***************
  501. *** 4,11 ****
  502. --- 4,13 ----
  503.   **
  504.   ** AUTHORS:
  505.   **    AL    Ari Luotonen    luotonen@dxcern.cern.ch
  506. + **    MD     Mark Donszelmann    duns@vxdeop.cern.ch
  507.   **
  508.   ** HISTORY:
  509. + **     8 Nov 93  MD    (VMS only) case insensitive compare reading acl entry, filename
  510.   **
  511.   **
  512.   ** BUGS:
  513. ***************
  514. *** 169,175 ****
  515. --- 171,181 ----
  516.       outofmem(__FILE__, "HTAA_getAuthorizedGroups");
  517.       
  518.       while (EOF != HTAAFile_readField(acl_file, buf, len+1)) {
  519. + #ifdef VMS
  520. +     if (HTAA_templateCaseMatch(buf, filename)) {
  521. + #else /* not VMS */
  522.       if (HTAA_templateMatch(buf, filename)) {
  523. + #endif /* not VMS */
  524.           HTList *methods = HTList_new();
  525.           HTAAFile_readList(acl_file, methods, MAX_METHODNAME_LEN);
  526.           if (TRACE) {
  527. *** ../../../../2.13/WWW/Library/Implementation/HTAtom.c    Tue Apr 27 12:38:01 1993
  528. --- HTAtom.c    Mon Nov 15 16:11:31 1993
  529. ***************
  530. *** 16,32 ****
  531.   #include "HTAtom.h"
  532.   
  533.   #include <stdio.h>                /* joe@athena, TBL 921019 */
  534.   #include "HTUtils.h"
  535.   
  536.   PRIVATE HTAtom * hash_table[HASH_SIZE];
  537.   PRIVATE BOOL initialised = NO;
  538.   
  539. ! #ifdef __STDC__
  540. ! PUBLIC HTAtom * HTAtom_for(const char * string)
  541. ! #else
  542. ! PUBLIC HTAtom * HTAtom_for(string)
  543. !     char * string;
  544. ! #endif
  545.   {
  546.       int hash;
  547.       CONST char * p;
  548. --- 16,30 ----
  549.   #include "HTAtom.h"
  550.   
  551.   #include <stdio.h>                /* joe@athena, TBL 921019 */
  552. + #include <string.h>
  553.   #include "HTUtils.h"
  554. + #include "HTList.h"
  555.   
  556.   PRIVATE HTAtom * hash_table[HASH_SIZE];
  557.   PRIVATE BOOL initialised = NO;
  558.   
  559. ! PUBLIC HTAtom * HTAtom_for ARGS1(CONST char *, string)
  560.   {
  561.       int hash;
  562.       CONST char * p;
  563. ***************
  564. *** 70,73 ****
  565. --- 68,115 ----
  566.       return a;
  567.   }
  568.   
  569. + PRIVATE BOOL mime_match ARGS2(CONST char *, name,
  570. +                   CONST char *, templ)
  571. + {
  572. +     if (name && templ) {
  573. +     static char *n1 = NULL;
  574. +     static char *t1 = NULL;
  575. +     char *n2;
  576. +     char *t2;
  577. +     StrAllocCopy(n1, name);        /* These also free the ones    */
  578. +     StrAllocCopy(t1, templ);    /* from previous call.        */
  579. +     if (!(n2 = strchr(n1, '/'))  ||  !(t2 = strchr(t1, '/')))
  580. +         return NO;
  581. +     *(n2++) = (char)0;
  582. +     *(t2++) = (char)0;
  583. +     if ((0==strcmp(t1, "*") || 0==strcmp(t1, n1)) &&
  584. +         (0==strcmp(t2, "*") || 0==strcmp(t2, n2)))
  585. +         return YES;
  586. +     }
  587. +     return NO;
  588. + }
  589. +     
  590. + PUBLIC HTList *HTAtom_templateMatches ARGS1(CONST char *, templ)
  591. + {
  592. +     HTList *matches = HTList_new();
  593. +     if (initialised && templ) {
  594. +     int i;
  595. +     HTAtom *cur;
  596. +     for (i=0; i<HASH_SIZE; i++) {
  597. +         for (cur = hash_table[i];  cur;  cur=cur->next) {
  598. +         if (mime_match(cur->name, templ))
  599. +             HTList_addObject(matches, (void*)cur);
  600. +         }
  601. +     }
  602. +     }
  603. +     return matches;
  604. + }
  605.   
  606. *** ../../../../2.13/WWW/Library/Implementation/HTAtom.h    Thu Jun 10 11:55:24 1993
  607. --- HTAtom.h    Mon Nov 15 16:17:32 1993
  608. ***************
  609. *** 21,26 ****
  610. --- 21,34 ----
  611.   #ifndef HTATOM_H
  612.   #define HTATOM_H
  613.   
  614. + #include "HTUtils.h"
  615. + #include "HTList.h"
  616. + #ifdef SHORT_NAMES
  617. + #define HTAt_for        HTAtom_for
  618. + #define HTAt_tMa        HTAtom_templateMatches
  619. + #endif /*SHORT_NAMES*/
  620.   typedef struct _HTAtom HTAtom;
  621.   struct _HTAtom {
  622.           HTAtom *        next;
  623. ***************
  624. *** 28,38 ****
  625.   }; /* struct _HTAtom */
  626.   
  627.   
  628. ! #ifdef __STDC__
  629. ! extern HTAtom * HTAtom_for(const char * string);
  630. ! #else
  631. ! extern HTAtom * HTAtom_for();
  632. ! #endif
  633.   
  634.   #define HTAtom_name(a) ((a)->name)
  635.   
  636. --- 36,43 ----
  637.   }; /* struct _HTAtom */
  638.   
  639.   
  640. ! PUBLIC HTAtom * HTAtom_for PARAMS((CONST char * string));
  641. ! PUBLIC HTList * HTAtom_templateMatches PARAMS((CONST char * templ));
  642.   
  643.   #define HTAtom_name(a) ((a)->name)
  644.   
  645. *** ../../../../2.13/WWW/Library/Implementation/HTFile.c    Thu Nov  4 10:54:15 1993
  646. --- HTFile.c    Mon Nov 15 16:11:33 1993
  647. ***************
  648. *** 9,15 ****
  649.   **       Apr 91    vms-vms access included using DECnet syntax
  650.   **    26 Jun 92 (JFG) When running over DECnet, suppressed FTP.
  651.   **            Fixed access bug for relative names on VMS.
  652. ! **       Sep 92 (MD)  Access to VMS files allows sharing.
  653.   **
  654.   ** Bugs:
  655.   **    FTP: Cannot access VMS files from a unix machine.
  656. --- 9,16 ----
  657.   **       Apr 91    vms-vms access included using DECnet syntax
  658.   **    26 Jun 92 (JFG) When running over DECnet, suppressed FTP.
  659.   **            Fixed access bug for relative names on VMS.
  660. ! **       Sep 93 (MD)  Access to VMS files allows sharing.
  661. ! **    15 Nov 93 (MD)    Moved HTVMSname to HTVMSUTILS.C
  662.   **
  663.   ** Bugs:
  664.   **    FTP: Cannot access VMS files from a unix machine.
  665. ***************
  666. *** 25,30 ****
  667. --- 26,35 ----
  668.   
  669.   #include "HTUtils.h"
  670.   
  671. + #ifdef VMS
  672. + #include "HTVMSUtils.h"
  673. + #endif /* VMS */
  674.   #include "HTParse.h"
  675.   #include "tcp.h"
  676.   #include "HTTCP.h"
  677. ***************
  678. *** 74,80 ****
  679.   
  680.   PRIVATE char *HTMountRoot = "/Net/";        /* Where to find mounts */
  681.   #ifdef VMS
  682. ! PRIVATE char *HTCacheRoot = "/WWW$SCRATCH/";   /* Where to cache things */
  683.   #else
  684.   PRIVATE char *HTCacheRoot = "/tmp/W3_Cache_";   /* Where to cache things */
  685.   #endif
  686. --- 79,85 ----
  687.   
  688.   PRIVATE char *HTMountRoot = "/Net/";        /* Where to find mounts */
  689.   #ifdef VMS
  690. ! PRIVATE char *HTCacheRoot = "/WWW$SCRATCH";   /* Where to cache things */
  691.   #else
  692.   PRIVATE char *HTCacheRoot = "/tmp/W3_Cache_";   /* Where to cache things */
  693.   #endif
  694. ***************
  695. *** 146,220 ****
  696.   
  697.   
  698.   
  699. - #ifdef VMS
  700. - /*    Convert unix-style name into VMS name
  701. - **    -------------------------------------
  702. - **
  703. - ** Bug:    Returns pointer to static -- non-reentrant
  704. - */
  705. - PRIVATE char * vms_name(CONST char * nn, CONST char * fn)
  706. - {
  707.   
  708. - /*    We try converting the filename into Files-11 syntax. That is, we assume
  709. - **    first that the file is, like us, on a VMS node. We try remote
  710. - **    (or local) DECnet access. Files-11, VMS, VAX and DECnet
  711. - **    are trademarks of Digital Equipment Corporation. 
  712. - **    The node is assumed to be local if the hostname WITHOUT DOMAIN
  713. - **    matches the local one. @@@
  714. - */
  715. -     static char vmsname[INFINITY];    /* returned */
  716. -     char * filename = (char*)malloc(strlen(fn)+1);
  717. -     char * nodename = (char*)malloc(strlen(nn)+2+1);    /* Copies to hack */
  718. -     char *second;        /* 2nd slash */
  719. -     char *last;            /* last slash */
  720. -     
  721. -     char * hostname = HTHostName();
  722.   
  723. -     if (!filename || !nodename) outofmem(__FILE__, "vms_name");
  724. -     strcpy(filename, fn);
  725. -     strcpy(nodename, "");    /* On same node? Yes if node names match */
  726. -     {
  727. -         char *p, *q;
  728. -         for (p=hostname, q=nn; *p && *p!='.' && *q && *q!='.'; p++, q++){
  729. -         if (TOUPPER(*p)!=TOUPPER(*q)) {
  730. -             strcpy(nodename, nn);
  731. -         q = strchr(nodename, '.');    /* Mismatch */
  732. -         if (q) *q=0;            /* Chop domain */
  733. -         strcat(nodename, "::");        /* Try decnet anyway */
  734. -         break;
  735. -         }
  736. -     }
  737. -     }
  738.   
  739. -     second = strchr(filename+1, '/');        /* 2nd slash */
  740. -     last = strrchr(filename, '/');    /* last slash */
  741. -         
  742. -     if (!second) {                /* Only one slash */
  743. -     sprintf(vmsname, "%s%s", nodename, filename + 1);
  744. -     } else if(second==last) {        /* Exactly two slashes */
  745. -     *second = 0;        /* Split filename from disk */
  746. -     sprintf(vmsname, "%s%s:%s", nodename, filename+1, second+1);
  747. -     *second = '/';    /* restore */
  748. -     } else {                 /* More than two slashes */
  749. -     char * p;
  750. -     *second = 0;        /* Split disk from directories */
  751. -     *last = 0;        /* Split dir from filename */
  752. -     sprintf(vmsname, "%s%s:[%s]%s",
  753. -         nodename, filename+1, second+1, last+1);
  754. -     *second = *last = '/';    /* restore filename */
  755. -     for (p=strchr(vmsname, '['); *p!=']'; p++)
  756. -         if (*p=='/') *p='.';    /* Convert dir sep.  to dots */
  757. -     }
  758. -     free(nodename);
  759. -     free(filename);
  760. -     return vmsname;
  761. - }
  762. - #endif /* VMS */
  763.   /*    Send README file
  764.   **
  765.   **  If a README file exists, then it is inserted into the document here.
  766. --- 151,159 ----
  767. ***************
  768. *** 321,327 ****
  769.       
  770.       HTUnEscape(path);    /* Interpret % signs */
  771.       
  772. !     if (0==strcmp(access, "file")) {
  773.           free(access);    
  774.       if ((0==strcasecomp(host, HTHostName())) ||
  775.           (0==strcasecomp(host, "localhost")) || !*host) {
  776. --- 260,266 ----
  777.       
  778.       HTUnEscape(path);    /* Interpret % signs */
  779.       
  780. !     if (0==strcmp(access, "file")) { /* local file */
  781.           free(access);    
  782.       if ((0==strcasecomp(host, HTHostName())) ||
  783.           (0==strcasecomp(host, "localhost")) || !*host) {
  784. ***************
  785. *** 341,347 ****
  786. --- 280,293 ----
  787.       } else {  /* other access */
  788.       char * result;
  789.           CONST char * home =  (CONST char*)getenv("HOME");
  790. + #ifdef VMS
  791. +     if (!home) 
  792. +         home = HTCacheRoot; 
  793. +     else
  794. +            home = HTVMS_wwwName(home);
  795. + #else /* not VMS */
  796.       if (!home) home = "/tmp"; 
  797. + #endif /* not VMS */
  798.       result = (char *)malloc(
  799.           strlen(home)+strlen(access)+strlen(host)+strlen(path)+6+1);
  800.         if (result == NULL) outofmem(__FILE__, "HTLocalName");
  801. ***************
  802. *** 722,729 ****
  803.       {
  804.           FILE * fp;
  805.       char * vmsname = strchr(filename + 1, '/') ?
  806. !       vms_name(nodename, filename) : filename + 1;
  807. ! /* MD SEP 93, open files can be read... */
  808.       fp = fopen(vmsname, "r", "shr=put", "shr=upd");
  809.       
  810.   /*    If the file wasn't VMS syntax, then perhaps it is ultrix
  811. --- 668,674 ----
  812.       {
  813.           FILE * fp;
  814.       char * vmsname = strchr(filename + 1, '/') ?
  815. !       HTVMS_name(nodename, filename) : filename + 1;
  816.       fp = fopen(vmsname, "r", "shr=put", "shr=upd");
  817.       
  818.   /*    If the file wasn't VMS syntax, then perhaps it is ultrix
  819. ***************
  820. *** 732,738 ****
  821.           char ultrixname[INFINITY];
  822.           if (TRACE) fprintf(stderr, "HTFile: Can't open as %s\n", vmsname);
  823.           sprintf(ultrixname, "%s::\"%s\"", nodename, filename);
  824. - /* MD SEP 93, open files can be read... */
  825.             fp = fopen(ultrixname, "r", "shr=put", "shr=upd");
  826.           if (!fp) {
  827.           if (TRACE) fprintf(stderr, 
  828. --- 677,682 ----
  829. *** ../../../../2.13/WWW/Library/Implementation/HTFormat.h    Thu Sep  2 18:02:28 1993
  830. --- HTFormat.h    Tue Nov 16 15:27:49 1993
  831. ***************
  832. *** 156,161 ****
  833. --- 156,168 ----
  834.   
  835.   /*
  836.   
  837. +    The default presentation is used when no other is appriporate
  838. +    
  839. +  */
  840. + extern  HTPresentation* default_presentation;
  841. + /*
  842.   HTSetPresentation: Register a system command to present a format
  843.   
  844.     ON ENTRY,
  845. *** ../../../../2.13/WWW/Library/Implementation/HTGroup.h    Thu Nov  4 10:07:16 1993
  846. --- HTGroup.h    Mon Nov 15 16:17:37 1993
  847. ***************
  848. *** 39,44 ****
  849. --- 39,45 ----
  850.       HTAA_NO_ENTRY,      /* 403 Forbidden, no ACL entry          */
  851.       HTAA_SETUP_ERROR,   /* 403 Forbidden, server setup error    */
  852.       HTAA_DOTDOT,        /* 403 Forbidden, URL with /../ illegal */
  853. +     HTAA_HTBIN,         /* 403 Forbidden, /htbin not enabled    */
  854.       HTAA_NOT_FOUND      /* 404 Not found, or read protected     */
  855.   } HTAAFailReasonType;
  856.   
  857. *** ../../../../2.13/WWW/Library/Implementation/HTInit.h    Thu Jun 10 11:55:29 1993
  858. --- HTInit.h    Mon Nov 15 16:17:35 1993
  859. ***************
  860. *** 1,18 ****
  861. ! /*  */
  862. ! /*              Initialisation module                   HTInit.h
  863. ! **
  864. ! **      This module resisters all the plug&play software modules which
  865. ! **      will be used in the program.  This is for a browser.
  866. ! **
  867. ! **      To override this, just copy it and link in your version
  868. ! **      befoe you link with the library.
  869. ! */
  870.   #include "HTUtils.h"
  871.   
  872.   extern void HTFormatInit NOPARAMS;
  873.   extern void HTFileInit NOPARAMS;
  874.   /*
  875.   
  876.       */
  877. --- 1,20 ----
  878. ! /*                   /Net/dxcern/userd/timbl/hypertext/WWW/Library/Implementation/HTInit.html
  879. !                                   INITIALISATION MODULE
  880. !                                              
  881. !    This module resisters all the plug & play software modules which will be used in the
  882. !    program.  This is for a browser.
  883. !    
  884. !    To override this, just copy it and link in your version befoe you link with the
  885. !    library.
  886. !    
  887. !    Implemented by HTInit.c by default.
  888. !    
  889. !  */
  890.   #include "HTUtils.h"
  891.   
  892.   extern void HTFormatInit NOPARAMS;
  893.   extern void HTFileInit NOPARAMS;
  894.   /*
  895.   
  896.       */
  897. *** ../../../../2.13/WWW/Library/Implementation/HTMLDTD.c    Thu Nov  4 15:35:11 1993
  898. --- HTMLDTD.c    Thu Nov 11 11:25:21 1993
  899. ***************
  900. *** 1,5 ****
  901. --- 1,8 ----
  902.   /*        Our Static DTD for HTML
  903.   **        -----------------------
  904. + **
  905. + **     6 Nov 93    MD    Increased size of img_attr array to make space
  906. + **                  for terminator.
  907.   */
  908.   
  909.   /* Implements:
  910. *** ../../../../2.13/WWW/Library/Implementation/HTMLDTD.h    Wed Nov  3 16:29:06 1993
  911. --- HTMLDTD.h    Mon Nov 15 16:17:32 1993
  912. ***************
  913. *** 49,55 ****
  914.           HTML_U,         HTML_UL,
  915.           HTML_VAR,       HTML_XMP } HTMLElement;
  916.   
  917. ! #define HTML_ELEMENTS 48
  918.   
  919.   /*
  920.   
  921. --- 49,55 ----
  922.           HTML_U,         HTML_UL,
  923.           HTML_VAR,       HTML_XMP } HTMLElement;
  924.   
  925. ! #define HTML_ELEMENTS 47
  926.   
  927.   /*
  928.   
  929. *** ../../../../2.13/WWW/Library/Implementation/HTMLGen.c    Wed Nov  3 16:21:46 1993
  930. --- HTMLGen.c    Tue Nov 16 15:48:59 1993
  931. ***************
  932. *** 23,28 ****
  933. --- 23,29 ----
  934.   #include "HTStream.h"
  935.   #include "SGML.h"
  936.   #include "HTFormat.h"
  937. + #include "tcp.h"
  938.   
  939.   #define PUTC(c) (*me->targetClass.put_character)(me->target, c)
  940.   /* #define PUTS(s) (*me->targetClass.put_string)(me->target, s) */
  941. ***************
  942. *** 43,52 ****
  943.       HTStream *             target;
  944.       HTStreamClass            targetClass;    /* COPY for speed */
  945.       
  946. !     char                buffer[BUFFER_SIZE];
  947.       char *                write_pointer;
  948.       char *                line_break;
  949.       int                cleanness;
  950.       BOOL                preformatted;
  951.   };
  952.   
  953. --- 44,54 ----
  954.       HTStream *             target;
  955.       HTStreamClass            targetClass;    /* COPY for speed */
  956.       
  957. !     char                buffer[BUFFER_SIZE+1]; /* 1for NL */
  958.       char *                write_pointer;
  959.       char *                line_break;
  960.       int                cleanness;
  961. +     BOOL                delete_line_break_char;
  962.       BOOL                preformatted;
  963.   };
  964.   
  965. ***************
  966. *** 62,72 ****
  967. --- 64,85 ----
  968.       me->write_pointer = me->buffer;
  969.       me->line_break = me->buffer;
  970.       me->cleanness = 0;
  971. +     me->delete_line_break_char = NO;
  972.   }
  973.   
  974.   
  975.   /*    Character handling
  976.   **    ------------------
  977. + **
  978. + **    The tricky bits are the line break handling.  This attempts
  979. + **    to synchrononise line breaks on sentence or phrase ends. This
  980. + **    is important if one stores SGML files in a line-oriented code
  981. + **    repository, so that if a small change is made, line ends don't
  982. + **    shift in a ripple-through to apparently change a large part of the
  983. + **    file. We give extra "cleanness" to spaces appearing directly
  984. + **    after periods (full stops), [semi]colons and commas.
  985. + **       This should make the source files easier to read and modify
  986. + **    by hand, too, though this is not a primary design consideration.
  987.   */
  988.   PRIVATE void HTMLGen_put_character ARGS2(HTStructured *, me, char, c)
  989.   {
  990. ***************
  991. *** 79,107 ****
  992.       }
  993.       
  994.       if ((!me->preformatted  && c==' ')) {
  995. !         me->line_break = me->write_pointer;
  996. !     me->cleanness = 1;
  997.       }
  998.       
  999.       /* Flush buffer out when full */
  1000.       if (me->write_pointer == me->buffer + BUFFER_SIZE) {
  1001.           if (me->cleanness) {
  1002. !         me->line_break[-1] = '\n';
  1003.           (*me->targetClass.put_block)(me->target,
  1004.                           me->buffer,
  1005. !                     me->line_break - me->buffer);
  1006.           {  /* move next line in */
  1007. !             char * p,*q;
  1008. !         for(q=me->buffer, p=me->line_break; p < me->write_pointer; )
  1009.               *q++ = *p++;
  1010.           }
  1011.           me->cleanness = 0;
  1012.       } else {
  1013.           (*me->targetClass.put_block)(me->target,
  1014.               me->buffer,
  1015.           BUFFER_SIZE);
  1016.       }
  1017. -     me->write_pointer = me->buffer;
  1018.       me->line_break = me->buffer;
  1019.       }
  1020.   }
  1021. --- 92,140 ----
  1022.       }
  1023.       
  1024.       if ((!me->preformatted  && c==' ')) {
  1025. !         int new_cleanness = 1;
  1026. !     if (me->write_pointer > (me->buffer + 1)) {
  1027. !         char delims[5];
  1028. !         char * p;
  1029. !         strcpy(delims, ",;:.");        /* @@ english bias */
  1030. !         p = strchr(delims, me->write_pointer[-2]);
  1031. !         if (p) new_cleanness = p - delims + 2;
  1032. !     }
  1033. !     if (new_cleanness >= me->cleanness) {
  1034. !         me->line_break = me->write_pointer - 1;  /* Point to space */
  1035. !         me->cleanness = new_cleanness;
  1036. !         me->delete_line_break_char = YES;
  1037. !     }
  1038.       }
  1039.       
  1040.       /* Flush buffer out when full */
  1041.       if (me->write_pointer == me->buffer + BUFFER_SIZE) {
  1042.           if (me->cleanness) {
  1043. !         char line_break_char = me->line_break[0];
  1044. !         char * saved = me->line_break;
  1045. !         
  1046. !         if (me->delete_line_break_char) saved++; 
  1047. !         me->line_break[0] = '\n';
  1048.           (*me->targetClass.put_block)(me->target,
  1049.                           me->buffer,
  1050. !                     me->line_break - me->buffer + 1);
  1051. !         me->line_break[0] = line_break_char;
  1052.           {  /* move next line in */
  1053. !             char * p=saved;
  1054. !         char *q;
  1055. !         for(q=me->buffer; p < me->write_pointer; )
  1056.               *q++ = *p++;
  1057.           }
  1058.           me->cleanness = 0;
  1059. +         me->delete_line_break_char = 0;
  1060. +         me->write_pointer = me->write_pointer - (saved-me->buffer);
  1061.       } else {
  1062.           (*me->targetClass.put_block)(me->target,
  1063.               me->buffer,
  1064.           BUFFER_SIZE);
  1065. +         me->write_pointer = me->buffer;
  1066.       }
  1067.       me->line_break = me->buffer;
  1068.       }
  1069.   }
  1070. ***************
  1071. *** 141,147 ****
  1072.       BOOL was_preformatted = me->preformatted;
  1073.       HTTag * tag = &HTML_dtd.tags[element_number];
  1074.   
  1075. !     me->preformatted = NO;
  1076.       HTMLGen_put_character(me, '<');
  1077.       HTMLGen_put_string(me, tag->name);
  1078.       if (present) for (i=0; i< tag->number_of_attributes; i++) {
  1079. --- 174,180 ----
  1080.       BOOL was_preformatted = me->preformatted;
  1081.       HTTag * tag = &HTML_dtd.tags[element_number];
  1082.   
  1083. !     me->preformatted = NO;    /* free text within tags */
  1084.       HTMLGen_put_character(me, '<');
  1085.       HTMLGen_put_string(me, tag->name);
  1086.       if (present) for (i=0; i< tag->number_of_attributes; i++) {
  1087. ***************
  1088. *** 157,162 ****
  1089. --- 190,200 ----
  1090.       }
  1091.       HTMLGen_put_string(me, ">\n");
  1092.       
  1093. +     if (tag->contents != SGML_EMPTY) {  /* can break after element start */ 
  1094. +         me->line_break = me->write_pointer;    /* Don't you hate SGML?  */
  1095. +     me->cleanness = 1;
  1096. +     me->delete_line_break_char = NO;
  1097. +     }
  1098.       /* Make very specific HTML assumption that PRE can't be
  1099.          nested! */
  1100.          
  1101. ***************
  1102. *** 178,183 ****
  1103. --- 216,227 ----
  1104.   PRIVATE void HTMLGen_end_element ARGS2(HTStructured *, me,
  1105.               int , element_number)
  1106.   {
  1107. +     if (HTML_dtd.tags[element_number].contents != SGML_EMPTY) {
  1108. +                     /* can break before element end */ 
  1109. +         me->line_break = me->write_pointer;    /* Don't you hate SGML?  */
  1110. +     me->cleanness = 1;
  1111. +     me->delete_line_break_char = NO;
  1112. +     }
  1113.       HTMLGen_put_string(me, "</");
  1114.       HTMLGen_put_string(me, HTML_dtd.tags[element_number].name);
  1115.       HTMLGen_put_character(me, '>');
  1116. ***************
  1117. *** 265,270 ****
  1118. --- 309,315 ----
  1119.       me->write_pointer = me->buffer;
  1120.       me->line_break =     me->buffer;
  1121.       me->cleanness =     0;
  1122. +     me->delete_line_break_char = NO;
  1123.       me->preformatted =     NO;
  1124.       return me;
  1125.   }
  1126. *** ../../../../2.13/WWW/Library/Implementation/HTPasswd.c    Wed Nov  3 16:20:34 1993
  1127. --- HTPasswd.c    Thu Nov 11 11:23:42 1993
  1128. ***************
  1129. *** 4,11 ****
  1130. --- 4,13 ----
  1131.   **
  1132.   ** AUTHORS:
  1133.   **    AL    Ari Luotonen    luotonen@dxcern.cern.ch
  1134. + **    MD    Mark Donszelmann    duns@vxdeop.cern.ch
  1135.   **
  1136.   ** HISTORY:
  1137. + **     7 Nov 93     MD     free for crypt taken out (static data returned) 
  1138.   **
  1139.   **
  1140.   ** BUGS:
  1141. ***************
  1142. *** 101,107 ****
  1143.   
  1144.       tmp = crypt((char*)password, salt);  /*crypt() doesn't change its args*/
  1145.       strcat(result, tmp);
  1146. -     free(tmp);
  1147.   
  1148.       cur += 8;
  1149.       len -= 8;
  1150. --- 103,108 ----
  1151. ***************
  1152. *** 166,172 ****
  1153.   
  1154.       tmp = crypt((char*)password, salt);
  1155.       strcat(result, tmp);
  1156. -     free(tmp);
  1157.   
  1158.       cur1 += 8;
  1159.       cur2 += 13;
  1160. --- 167,172 ----
  1161. *** ../../../../2.13/WWW/Library/Implementation/HTRules.c    Wed Nov  3 16:20:34 1993
  1162. --- HTRules.c    Thu Nov 11 11:23:43 1993
  1163. ***************
  1164. *** 41,47 ****
  1165. --- 41,49 ----
  1166.   */
  1167.   PUBLIC char *HTBinDir = NULL;    /* Physical /htbin directory path.    */
  1168.                                   /* In future this should not be global.    */
  1169. + PUBLIC char *HTSearchScript = NULL;    /* Search script name.        */
  1170.   
  1171.   /*    Module-wide variables
  1172.   **    ---------------------
  1173.   */
  1174. ***************
  1175. *** 349,356 ****
  1176.               status >= 2 ? secs             : 0.0,
  1177.               status >= 3 ? secs_per_byte     : 0.0 );
  1178.   
  1179. !     } else if (0==strcasecomp(word1, "htbin")) { /* Physical /htbin location */
  1180. !     StrAllocCopy(HTBinDir, word2);
  1181.   
  1182.       } else {
  1183.       op =    0==strcasecomp(word1, "map")  ?    HT_Map
  1184. --- 351,362 ----
  1185.               status >= 2 ? secs             : 0.0,
  1186.               status >= 3 ? secs_per_byte     : 0.0 );
  1187.   
  1188. !     } else if (0==strncasecomp(word1, "htbin", 5) ||
  1189. !            0==strncasecomp(word1, "bindir", 6)) {
  1190. !     StrAllocCopy(HTBinDir, word2);    /* Physical /htbin location */
  1191. !     } else if (0==strncasecomp(word1, "search", 6)) {
  1192. !     StrAllocCopy(HTSearchScript, word2);    /* Search script name */
  1193.   
  1194.       } else {
  1195.       op =    0==strcasecomp(word1, "map")  ?    HT_Map
  1196. *** ../../../../2.13/WWW/Library/Implementation/HTRules.h    Thu Nov  4 10:07:13 1993
  1197. --- HTRules.h    Mon Nov 15 16:17:33 1993
  1198. ***************
  1199. *** 27,36 ****
  1200.           HT_Protect
  1201.   } HTRuleOp;
  1202.   
  1203. ! #ifndef HTBINDIR
  1204. ! #define HTBINDIR "/htbin"       /* Default /htbin location */
  1205. ! #endif
  1206.   extern char * HTBinDir;         /* Physical /htbin location */
  1207.   
  1208.   /*
  1209.   
  1210. --- 27,50 ----
  1211.           HT_Protect
  1212.   } HTRuleOp;
  1213.   
  1214. ! #ifdef SHORT_NAMES
  1215. ! #define HTSearSc HTSearchScript
  1216. ! #endif /*SHORT_NAMES*/
  1217. ! /*
  1218. ! Server Side Script Execution
  1219. !    If a URL starts with /htbin/ it is understood to mean a script execution request on
  1220. !    server. This feature needs to be turned on by setting HTBinDir by the htbin rule.
  1221. !    Index searching is enabled by setting HTSearchScript into the name of script in BinDir
  1222. !    doing the actual search by search rule (BinDir must also be set in this case, of
  1223. !    course).
  1224. !    
  1225. !  */
  1226.   extern char * HTBinDir;         /* Physical /htbin location */
  1227. + extern char * HTSearchScript;   /* Search script name */
  1228.   
  1229.   /*
  1230.   
  1231. *** ../../../../2.13/WWW/Library/Implementation/HTTP.c    Wed Oct 13 16:53:44 1993
  1232. --- HTTP.c    Thu Nov 11 11:23:44 1993
  1233. ***************
  1234. *** 144,150 ****
  1235.       hostname = HTParse((gate ? gate : arg), "", PARSE_HOST);
  1236.       if (hostname &&
  1237.           NULL != (colon = strchr(hostname, ':'))) {
  1238. !         *(colon++) = NULL;    /* Chop off port number */
  1239.           portnumber = atoi(colon);
  1240.       }
  1241.       else portnumber = 80;
  1242. --- 144,150 ----
  1243.       hostname = HTParse((gate ? gate : arg), "", PARSE_HOST);
  1244.       if (hostname &&
  1245.           NULL != (colon = strchr(hostname, ':'))) {
  1246. !         *(colon++) = '\0';    /* Chop off port number */
  1247.           portnumber = atoi(colon);
  1248.       }
  1249.       else portnumber = 80;
  1250. *** ../../../../2.13/WWW/Library/Implementation/HTUtils.h    Mon Oct 18 16:34:34 1993
  1251. --- HTUtils.h    Mon Nov 15 16:17:35 1993
  1252. ***************
  1253. *** 183,195 ****
  1254.   #define BOOL BOOLEAN
  1255.   #endif
  1256.   #ifndef YES
  1257. ! #define YES (BOOL)1
  1258. ! #define NO (BOOL)0
  1259.   #endif
  1260.   
  1261. ! #ifndef min
  1262. ! #define min(a,b) ((a) <= (b) ? (a) : (b))
  1263. ! #define max(a,b) ((a) >= (b) ? (a) : (b))
  1264.   #endif
  1265.   
  1266.   #define TCP_PORT 80     /* Allocated to http by Jon Postel/ISI 24-Jan-92 */
  1267. --- 183,195 ----
  1268.   #define BOOL BOOLEAN
  1269.   #endif
  1270.   #ifndef YES
  1271. ! #define YES (BOOLEAN)1
  1272. ! #define NO (BOOLEAN)0
  1273.   #endif
  1274.   
  1275. ! #ifndef MIN
  1276. ! #define MIN(a,b) ((a) <= (b) ? (a) : (b))
  1277. ! #define MAX(a,b) ((a) >= (b) ? (a) : (b))
  1278.   #endif
  1279.   
  1280.   #define TCP_PORT 80     /* Allocated to http by Jon Postel/ISI 24-Jan-92 */
  1281. ***************
  1282. *** 210,215 ****
  1283. --- 210,217 ----
  1284.    */
  1285.   
  1286.   #define HT_LOADED 29999                 /* Instead of a socket */
  1287. + #define HT_REDIRECTION_ON_FLY 29998     /* Redo the retrieve with a new URL */
  1288.   #define HT_OK           0               /* Generic success*/
  1289.   
  1290.   #define HT_NO_ACCESS    -10             /* Access not available */
  1291. *** ../../../../2.13/WWW/Library/Implementation/Version.make    Wed Nov  3 16:20:38 1993
  1292. --- Version.make    Thu Nov 11 11:23:48 1993
  1293. ***************
  1294. *** 1 ****
  1295. ! VC = 2.13
  1296. --- 1 ----
  1297. ! VC = 2.14
  1298.