Diff for /libwww/Library/src/HTUtils.html between versions 2.24 and 2.25

version 2.24, 1994/11/24 21:11:57 version 2.25, 1994/12/06 14:28:55
Line 24  Library of Common Code</A>. Line 24  Library of Common Code</A>.
 #ifndef HTUTILS_H  #ifndef HTUTILS_H
 #define HTUTILS_H  #define HTUTILS_H
   
 #if defined(__STDC__) || defined(__cplusplus)  #include "sysdep.h"
 #define _STANDARD_CODE_  
 #endif  
   
 #ifndef DEBUG  
 #define DEBUG   /* No one ever turns this off as trace is too important */  
 #endif          /* Keep option for really small memory applications too */  
   
 #ifdef _WINDOWS                         /* SCW */  
 #include "windef.h"  
 #define BOOLEAN_DEFINED  
 #endif  
   
 #ifdef SHORT_NAMES  #ifdef SHORT_NAMES
 #define WWW_TraceFlag HTTrFlag  #define WWW_TraceFlag HTTrFlag
 #endif  #endif
   
 #ifndef STDIO_H  
 #include &lt;stdio.h>  
 #define STDIO_H  
 #endif  
   
 </PRE>  </PRE>
   
 <H2>Debug message control</H2>  <H2>Debug message control</H2>
Line 115  numbers, and recursive pointers to Line 98  numbers, and recursive pointers to
 reasons. Curently this is a placeholder  reasons. Curently this is a placeholder
 for something more sophisticated.  for something more sophisticated.
 <PRE>typedef void * HTError;                    /* Unused at present -- best definition? */  <PRE>typedef void * HTError;                    /* Unused at present -- best definition? */
   
 </PRE>  
 <H2>Standard C library for malloc() etc</H2>  
   
 Replace memory allocation and free C RTL functions  
 with VAXC$xxx_OPT altrenatives for VAXC (but not DECC)  
 on VMS. This makes a big performance difference. (Foteos  
 Macrides).  
   
 <PRE>#ifdef vax  
 #ifdef unix  
 #define ultrix  /* Assume vax+unix=ultrix */  
 #endif  
 #endif  
   
 #ifndef VMS  
 #ifndef ultrix  
 #ifdef NeXT  
 #include &lt;libc.h>    /* NeXT */  
 #endif  
 #ifndef Mips  
 #ifndef MACH /* Vincent.Cate@furmint.nectar.cs.cmu.edu */  
 #include &lt;stdlib.h>  /* ANSI */  
 #endif  
 #else /* Mips */  
 #define S_ISDIR(m)      (((m)&S_IFMT) == S_IFDIR)  
 #define S_ISREG(m)      (((m)&S_IFMT) == S_IFREG)  
 #endif /* Mips */  
 #else /* ultrix */  
 #include &lt;malloc.h>  
 #include &lt;memory.h>  
 #include &lt;stdio.h>  
 #include &lt;stdlib.h>   /* ANSI */   /* BSN */  
 #endif  
   
 #else   /* VMS */  
 #include &lt;stdio.h>  
 #include &lt;stdlib.h>  
 #include &lt;unixlib.h>  
 #include &lt;ctype.h>  
 #if defined(VAXC) && !defined(__DECC)  
 #define malloc  VAXC$MALLOC_OPT  
 #define calloc  VAXC$CALLOC_OPT  
 #define free    VAXC$FREE_OPT  
 #define cfree   VAXC$CFREE_OPT  
 #define realloc VAXC$REALLOC_OPT  
 #endif /* VAXC but not DECC */  
 #define unlink remove  
 #define gmtime localtime  
 #include &lt;stat.h>  
 #define S_ISDIR(m)      (((m)&S_IFMT) == S_IFDIR)  
 #define S_ISREG(m)      (((m)&S_IFMT) == S_IFREG)  
 #define putenv HTVMS_putenv  
 #endif  
   
 </PRE>  </PRE>
 <H2>Macros for declarations</H2>  <H2>Macros for declarations</H2>
 <PRE>#define PUBLIC                     /* Accessible outside this module     */  <PRE>#define PUBLIC                     /* Accessible outside this module */
 #define PRIVATE static          /* Accessible only within this module */  #define PRIVATE static          /* Accessible only within this module */
   
 #ifdef _STANDARD_CODE_  #define CONST const
   #ifdef __STDC__
 #ifndef sco                     /* The sco CC compiler does not know const */  
 #define CONST const             /* "const" only exists in STDC */  
 #endif  
   
 #define NOPARAMS (void)  #define NOPARAMS (void)
 #define PARAMS(parameter_list) parameter_list  #define PARAMS(parameter_list) parameter_list
 #define NOARGS (void)  #define NOARGS (void)
Line 207  Macrides). Line 131  Macrides).
   
 #else  /* not ANSI */  #else  /* not ANSI */
   
 #ifndef _WINDOWS  
 #define CONST  
 #endif  
 #define NOPARAMS ()  #define NOPARAMS ()
 #define PARAMS(parameter_list) ()  #define PARAMS(parameter_list) ()
 #define NOARGS ()  #define NOARGS ()
Line 247  Macrides). Line 168  Macrides).
 /* #define GOOD(status) ((status)38;1)   VMS style status: test bit 0         */  /* #define GOOD(status) ((status)38;1)   VMS style status: test bit 0         */
 /* #define BAD(status)  (!GOOD(status))  Bit 0 set if OK, otherwise clear   */  /* #define BAD(status)  (!GOOD(status))  Bit 0 set if OK, otherwise clear   */
   
 #ifndef _WINDOWS  
 #ifndef BOOLEAN_DEFINED  
         typedef char    BOOLEAN;                /* Logical value */  
 #ifndef CURSES  #ifndef CURSES
 #ifndef TRUE  #ifndef TRUE
 #define TRUE    (BOOLEAN)1  #define TRUE    (BOOLEAN)1
 #define FALSE   (BOOLEAN)0  #define FALSE   (BOOLEAN)0
 #endif  #endif
 #endif   /*  CURSES  */  #endif   /*  CURSES  */
 #endif   /* _WINDOWS */  
 #define BOOLEAN_DEFINED  
 #endif  
   
 #ifndef BOOL  #ifndef BOOL
 #define BOOL BOOLEAN  #define BOOL BOOLEAN
Line 300  failure (&lt;0) codes Line 215  failure (&lt;0) codes
   
 #include "HTString.h"   /* String utilities */  #include "HTString.h"   /* String utilities */
   
 #ifdef _STANDARD_CODE_  
 #include &lt;stdarg.h>  
 #else  
 #include &lt;varargs.h>  
 #endif  
   
 #ifdef CURSES  #ifdef CURSES
         /* htbrowse.c; */  
 #ifdef ULTRIX      /* or DECSTATION */  
 #include &lt;cursesX.h> /* Extended curses under X. Only decent one :lou. */  
 #else  
 #include &lt;curses.h>  
 #endif /* ULTRIX */  
         extern        WINDOW  *w_top, *w_text, *w_prompt;          extern        WINDOW  *w_top, *w_text, *w_prompt;
         extern        void    user_message PARAMS((const char *fmt, ...));          extern        void    user_message PARAMS((const char *fmt, ...));
         extern        void    prompt_set PARAMS((CONST char * msg));          extern        void    prompt_set PARAMS((CONST char * msg));
Line 351  isupper(x) is.  These macros are Line 254  isupper(x) is.  These macros are
 CERTAINLY needed on #if defined(pyr)  CERTAINLY needed on #if defined(pyr)
 || define(mips) or BDSI platforms.  || define(mips) or BDSI platforms.
 For safefy, we make them mandatory.  For safefy, we make them mandatory.
 <PRE>#include &lt;ctype.h>  <PRE>
   
 #ifndef TOLOWER  #ifndef TOLOWER
   /* Pyramid and Mips can't uppercase non-alpha */    /* Pyramid and Mips can't uppercase non-alpha */

Removed from v.2.24  
changed lines
  Added in v.2.25


Webmaster