1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
|
/*
* Configuration file for HTMLDOC.
*
* Copyright © 2011-2020 by Michael R Sweet.
* Copyright © 1997-2010 by Easy Software Products. All rights reserved.
*
* This program is free software. Distribution and use rights are outlined in
* the file "COPYING".
*/
/*
* Include necessary headers...
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <io.h>
#include <direct.h>
/*
* Microsoft renames the POSIX functions to _name, and introduces
* a broken compatibility layer using the original names. As a result,
* random crashes can occur when, for example, strdup() allocates memory
* from a different heap than used by malloc() and free().
*
* To avoid moronic problems like this, we #define the POSIX function
* names to the corresponding non-standard Microsoft names.
*/
#define access _access
#define close _close
#define fileno _fileno
#define lseek _lseek
#define mkdir(d,p) _mkdir(d)
#define open _open
#define read _read
#define rmdir _rmdir
#define snprintf _snprintf
#define strdup _strdup
#define unlink _unlink
#define vsnprintf _vsnprintf
#define write _write
/*
* Microsoft "safe" functions use a different argument order than POSIX...
*/
#define gmtime_r(t,tm) gmtime_s(tm,t)
/*
* Map the POSIX sleep() and usleep() functions to the Win32 Sleep() function...
*/
typedef unsigned long useconds_t;
#define sleep(X) Sleep(1000 * (X))
#define usleep(X) Sleep((X)/1000)
/*
* Map various parameters to Posix style system calls
*/
# define F_OK 00
# define W_OK 02
# define R_OK 04
# define O_RDONLY _O_RDONLY
# define O_WRONLY _O_WRONLY
# define O_CREAT _O_CREAT
# define O_TRUNC _O_TRUNC
/*
* Compiler stuff...
*/
#undef const
#undef __CHAR_UNSIGNED__
#define __attribute__(x)
typedef long ssize_t;
/*
* What is the version number for this software?
*/
#define SVERSION "1.9.11"
/*
* Limits for the output "engines"...
*/
#define MAX_CHAPTERS 1000 /* Maximum number of chapters or files */
#define MAX_COLUMNS 200 /* Maximum number of columns in a table */
#define MAX_HF_IMAGES 10 /* Maximum number of header/footer images */
/*
* Memory allocation units for other stuff...
*/
#define ALLOC_FILES 10 /* Temporary/image files */
#define ALLOC_HEADINGS 50 /* Headings */
#define ALLOC_LINKS 100 /* Web links */
#define ALLOC_OBJECTS 100 /* PDF objects */
#define ALLOC_PAGES 10 /* PS/PDF pages */
#define ALLOC_ROWS 20 /* Table rows */
/*
* Locations of files (overridden by the registry...)
*/
#define DOCUMENTATION "C:/Program Files/HTMLDOC/doc"
#define HTML_DATA "C:/Program Files/HTMLDOC"
/*
* Do we have the FLTK library?
*/
#ifndef _CONSOLE
# define HAVE_LIBFLTK 1
#endif /* !_CONSOLE */
/*
* Do we have the Xpm library?
*/
/* #undef HAVE_LIBXPM */
/*
* Which encryption libraries do we have?
*/
/* #undef HAVE_CDSASSL */
/* #undef HAVE_GNUTLS */
#define HAVE_SSPISSL 1
#define HAVE_SSL 1
/*
* Do we have the gnutls_transport_set_pull_timeout_function function?
*/
/* #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
/*
* Do we have the gnutls_priority_set_direct function?
*/
/* #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT */
/*
* What Security framework headers do we have?
*/
/* #undef HAVE_AUTHORIZATION_H */
/* #undef HAVE_SECBASEPRIV_H */
/* #undef HAVE_SECCERTIFICATE_H */
/* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
/* #undef HAVE_SECITEM_H */
/* #undef HAVE_SECITEMPRIV_H */
/* #undef HAVE_SECPOLICY_H */
/* #undef HAVE_SECPOLICYPRIV_H */
/* #undef HAVE_SECURETRANSPORTPRIV_H */
/*
* Do we have the cssmErrorString function?
*/
/* #undef HAVE_CSSMERRORSTRING */
/*
* Do we have the SecGenerateSelfSignedCertificate function?
*/
/* #undef HAVE_SECGENERATESELFSIGNEDCERTIFICATE */
/*
* Do we have the SecKeychainOpen function?
*/
/* #undef HAVE_SECKEYCHAINOPEN */
/*
* Do we have (a working) SSLSetEnabledCiphers function?
*/
/* #undef HAVE_SSLSETENABLEDCIPHERS */
/*
* Do we need to use <strings.h>?
*/
/* #undef HAVE_STRINGS_H */
/*
* Do we have the <locale.h> header file?
*/
#define HAVE_LOCALE_H 1
/*
* Do we have some of the "standard" string functions?
*/
#define HAVE_STRDUP 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
/* #undef HAVE_STRLCAT */
/* #undef HAVE_STRLCPY */
/*
* How about snprintf() and vsnprintf()?
*/
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
/*
* Does the "tm" structure contain the "tm_gmtoff" member?
*/
/* #undef HAVE_TM_GMTOFF */
/*
* Which random number generator function to use...
*/
/* #undef HAVE_ARC4RANDOM */
/* #undef HAVE_RANDOM */
/* #undef HAVE_LRAND48 */
#ifdef HAVE_ARC4RANDOM
# define HTMLDOC_RAND() arc4random()
# define HTMLDOC_SRAND(v)
#elif defined(HAVE_RANDOM)
# define HTMLDOC_RAND() random()
# define HTMLDOC_SRAND(v) srandom(v)
#elif defined(HAVE_LRAND48)
# define HTMLDOC_RAND() lrand48()
# define HTMLDOC_SRAND(v) srand48(v)
#else
# define HTMLDOC_RAND() rand()
# define HTMLDOC_SRAND(v) srand(v)
#endif /* HAVE_ARC4RANDOM */
/*
* Do we have hstrerror()?
*/
/* #undef HAVE_HSTRERROR */
/*
* Do we have getaddrinfo()?
*/
#define HAVE_GETADDRINFO 1
/*
* Do we have getnameinfo()?
*/
#define HAVE_GETNAMEINFO 1
/*
* Do we have the <resolv.h> header file and/or res_init()?
*/
/* #undef HAVE_RESOLV_H */
/* #undef HAVE_RES_INIT */
/*
* Do we have poll()?
*/
/* #undef HAVE_POLL */
/*
* Do we have the long long type?
*/
/* #undef HAVE_LONG_LONG */
#ifdef HAVE_LONG_LONG
# define HTMLDOC_LLFMT "%lld"
# define HTMLDOC_LLCAST (long long)
#else
# define HTMLDOC_LLFMT "%ld"
# define HTMLDOC_LLCAST (long)
#endif /* HAVE_LONG_LONG */
/*
* Do we have the strtoll() function?
*/
/* #undef HAVE_STRTOLL */
#ifndef HAVE_STRTOLL
# define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
#endif /* !HAVE_STRTOLL */
|