about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTUtils.h
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-11-06 16:18:09 -0500
committerThomas E. Dickey <dickey@invisible-island.net>1998-11-06 16:18:09 -0500
commit18024037b515bfff83e0230b35151babe6005e18 (patch)
treeb8c80055282a00883284722a3dd6bb25234e07f0 /WWW/Library/Implementation/HTUtils.h
parent3d8ecbe48af249fa0d77ce4d273e32ce4b7e6e18 (diff)
downloadlynx-snapshots-18024037b515bfff83e0230b35151babe6005e18.tar.gz
snapshot of project "lynx", label v2-8-1dev_4
Diffstat (limited to 'WWW/Library/Implementation/HTUtils.h')
-rw-r--r--WWW/Library/Implementation/HTUtils.h82
1 files changed, 21 insertions, 61 deletions
diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h
index 16fc0eb2..d96a6cb7 100644
--- a/WWW/Library/Implementation/HTUtils.h
+++ b/WWW/Library/Implementation/HTUtils.h
@@ -1,7 +1,9 @@
-/*                                       Utility macros for the W3 code library
+/*                                                    Utitlity macros for the W3 code library
                                   MACROS FOR GENERAL USE
                                              
-   See also: the system dependent file "tcp.h", which is included here.
+   Generates: HTUtils.h
+   
+   See also: the system dependent file "tcp.h"
    
  */
 
@@ -15,12 +17,8 @@
 #ifdef HAVE_CONFIG_H
 #include <lynx_cfg.h>	/* generated by autoconf 'configure' script */
 #include <sys/types.h>
-#include <stdio.h>
-
 #else
 
-#include <stdio.h>
-
 #define DONT_TRACK_INTERNAL_LINKS 1
 
 /* Explicit system-configure */
@@ -29,7 +27,6 @@
 #define NO_UNISTD_H
 #define NO_KEYPAD
 #define NO_UTMP
-#define NO_FILIO_H
 #endif
 
 /* FIXME: these will be removed after completing auto-configure script */
@@ -77,10 +74,6 @@
 #define HAVE_UTMP 1
 #endif
 
-#endif /* HAVE_CONFIG_H */ 
-
-#ifndef LY_MAXPATH
-#define LY_MAXPATH 256
 #endif
 
 #ifndef	GCC_UNUSED
@@ -95,15 +88,6 @@
 #define popen _popen
 #define pclose _pclose
 #endif /* _WINDOWS */
- 
-#ifdef __EMX__ 
-#include <unistd.h> /* should be re-include protected under EMX */ 
-#include <stdlib.h> /* should be re-include protected under EMX */ 
-#define getcwd _getcwd2 
-#define chdir _chdir2 
- 
-#endif 
- 
 
 #ifdef SHORT_NAMES
 #define WWW_TraceFlag HTTrFlag
@@ -114,6 +98,10 @@
 Debug message control.
 
  */
+#ifndef STDIO_H
+#include <stdio.h>
+#define STDIO_H
+#endif
 
 #ifdef DEBUG
 #define TRACE (WWW_TraceFlag)
@@ -124,6 +112,9 @@ Debug message control.
 #define PROGRESS(str) /* nothing for now */
 #endif
 
+#define CTRACE if(TRACE)fprintf
+#define tfp stderr
+
 /*
 
   ERROR TYPE
@@ -166,6 +157,7 @@ Standard C library for malloc() etc
 
 #include <malloc.h>
 #include <memory.h>
+#include <stdio.h>
 #include <stdlib.h>   /* ANSI */   /* BSN */
 
 #endif /* !ultrix */
@@ -173,6 +165,7 @@ Standard C library for malloc() etc
 
 #include <stdlib.h>
 #include <unixlib.h>
+#include <ctype.h>
 #if defined(VAXC) && !defined(__DECC)
 #define malloc	VAXC$MALLOC_OPT
 #define calloc	VAXC$CALLOC_OPT
@@ -311,7 +304,6 @@ Sucess (>=0) and failure (<0) codes
 
 #define HT_ERROR                -1      /* Generic failure */
 
-#define HT_CANNOT_TRANSLATE -4
 #define HT_NO_ACCESS    -10             /* Access not available */
 #define HT_FORBIDDEN    -11             /* Access forbidden */
 #define HT_INTERNAL     -12             /* Weird -- should never happen. */
@@ -321,12 +313,10 @@ Sucess (>=0) and failure (<0) codes
 #include <HTString.h>   /* String utilities */
 
 #ifndef va_arg
-#if defined(__STDC__) || defined(VMS)
+#ifdef __STDC__
 #include <stdarg.h>
-#define LYva_start(ap,format) va_start(ap,format)
 #else
 #include <varargs.h>
-#define LYva_start(ap,format) va_start(ap)
 #endif
 #endif
 
@@ -342,7 +332,11 @@ Out Of Memory checking for malloc() return:
 
 #include <LYexit.h>
 
-extern void outofmem PARAMS((CONST char *fname, CONST char *func));
+#define outofmem(file, func)\
+ { fprintf(stderr,\
+  "\r\n\r\n\r\n%s %s: out of memory.  Aborting...\r\n", file, func);\
+  LYOutOfMemory = TRUE; exit(-1);}
+/* extern void outofmem PARAMS((const char *fname, const char *func)); */
 
 /*
 
@@ -362,8 +356,6 @@ Upper- and Lowercase macros
 #define TOUPPER(c) (islower((unsigned char)c) ? toupper((unsigned char)c) : ((unsigned char)c))
 #endif /* TOLOWER */
 
-#define FREE(x) if (x) {free(x); x = NULL;}
-
 /*
 
 The local equivalents of CR and LF
@@ -376,40 +368,8 @@ The local equivalents of CR and LF
 #define LF   FROMASCII('\012')  /* ASCII line feed LOCAL EQUIVALENT */
 #define CR   FROMASCII('\015')  /* Will be converted to ^M for transmission */
 
-#define CTRACE if(TRACE)fprintf
-#define tfp TraceFP()
-#define CTRACE_SLEEP(secs) if (TRACE && LYTraceLogFP == 0) sleep(secs)
-#define CTRACE_FLUSH(fp) if(TRACE) fflush(fp)
-
-extern FILE *TraceFP NOPARAMS;
-
-#include <tcp.h>
-
-/*
- * We force this include-ordering since socks.h contains redefinitions of
- * functions that probably are prototyped via other includes.  The socks.h
- * definitions have to be included everywhere, since they're making wrappers
- * for the stdio functions as well as the network functions.
- */
-#if defined(USE_SOCKS5) && !defined(DONT_USE_SOCKS5)
-#define SOCKS4TO5	/* turn on the Rxxxx definitions used in Lynx */
-#include <socks.h>
+#endif /* HTUTILS_H */
 
 /*
- * The AIX- and SOCKS4-specific definitions in socks.h are inconsistent. 
- * Repair them so they're consistent (and usable).
- */
-#if defined(_AIX) && !defined(USE_SOCKS4_PREFIX)
-#undef  Raccept
-#define Raccept       accept
-#undef  Rgetsockname
-#define Rgetsockname  getsockname
-#undef  Rgetpeername
-#define Rgetpeername  getpeername
-#endif
 
-#endif /* USE_SOCKS5 */
-
-#define SHORTENED_RBIND	/* FIXME: do this in configure-script */
-
-#endif /* HTUTILS_H */
+   end of utilities */