Symantec C++ for wid95: sc t4ht.c -mn -o+time -WA -3 -a8 -c -D_CONSOLE=1 -ot4ht.obj
<..defines..>+
#define IGNORED void
-_-_-
<..t4ht.h..>
/* **********************************************
Compiler options *
(uncommented | command line) *
------------------------------------------------*
Classic C (CC) default
#define ANSI ansi-c, c++
#define DOS_C
#define HAVE_STRING_H <string.h>
#define HAVE_DIRENT_H <dirent.h>
#define HAVE_SYS_NDIR_H <sys/ndir.h>
#define HAVE_SYS_DIR_H <sys/dir.h>
#define HAVE_NDIR_H <ndir.h>
#define HAVE_IO_H <io.h>
#define HAVE_UNISTD_H <unistd.h>
#define WIN32
#define KPATHSEA
#define SYSTEM_FUNCTION_OK
#define CDECL ..........
#define BCC32 bordland c++
*************************************************
Tex4ht variables *
(uncommented | command line) *
----------------------------------------------- */
<.h-defines.>
/* ******************************************** */
<.define MSVC-1-52.>
<.bordland: bcc32 -DBCC32 t4ht.>
<.bordland: bcc -DBCC tex4ht.>
<.DJGPP.>
#ifdef DOS_C
#define DOS
#endif
#ifdef DOS
#define DOS_WIN32
#ifndef HAVE_STRING_H
#define HAVE_STRING_H
#endif
#endif
#ifdef WIN32
#define DOS_WIN32
#endif
<.h-defines DOS-WIN32.>
<.h-defines KWIN32.>
<.h-include.>
<.h-defines 2.>
-_-_-
<..bordland: bcc32 -DBCC32 t4ht..>
#ifdef BCC32
#define WIN32
#define ANSI
#define HAVE_IO_H
#define HAVE_STRING_H
#define PLATFORM "ms-win32"
#endif
-_-_-
<..bordland: bcc -DBCC tex4ht..>
#ifdef BCC
#define DOS_C
#define ANSI
#define HAVE_IO_H
#define PLATFORM "ms-dos"
#endif
-_-_-
<..h-include..>
#ifdef KPATHSEA
#include <kpathsea/config.h>
#endif
#include <stdio.h> EOF, FILE
#include <stdlib.h> EXIT_FAILURE
-_-_-
Under ANSI C, all malloc stuff is declared in ‘<stdlib.h>’ (which you also include), hence this non-standard header is redundant.
<..defines..>+
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif
-_-_-
<..h-include..>+
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-_-_-
<..h-defines DOS-WIN32..>
#ifdef DOS_WIN32
#define STRUCT_DIRENT
#endif
-_-_-
<..h-include..>+
#ifdef HAVE_DIRENT_H
<.needs dirent.h.>
#else
#ifndef STRUCT_DIRENT
#define STRUCT_DIRECT
#endif
<.needs simulated dirent.h.>
#endif
-_-_-
<..needs dirent.h..>
#include <dirent.h>
-_-_-
<..needs simulated dirent.h..>
#ifdef HAVE_SYS_NDIR_H
#include <sys/ndir.h>
#endif
#ifdef HAVE_SYS_DIR_H
#include <sys/dir.h>
#endif
#ifdef HAVE_NDIR_H
#include <ndir.h>
#endif
-_-_-
REPLACE EXIT with somthing that DOS also accept.
<..t4ht.h..>+
#ifdef DOS
#define PROTOTYP
#endif
#ifdef ANSI
#define PROTOTYP
#endif
#ifdef KWIN32
#define PROTOTYP
#endif
-_-_-
<..defines..>+
#ifdef PROTOTYP
#define MYVOID void
#define ARG_I(x) x
#define ARG_II(x,y) x,y
#define ARG_III(x,y,z) x,y,z
#define ARG_IV(x,y,z,w) x,y,z,w
#define ARG_V(x,y,z,w,u) x,y,z,w,u
#else
#define MYVOID
#define ARG_I(x)
#define ARG_II(x,y)
#define ARG_III(x,y,z)
#define ARG_IV(x,y,z,w)
#define ARG_V(x,y,z,w,u)
#endif
-_-_-
<..h-defines 2NO..>
<.h-include before KPATHSEA.>
#ifdef KPATHSEA
#ifndef HAVE_STRCHR
#define strchr index
#endif
#ifndef HAVE_STRRCHR
#define strrchr rindex
#endif
#include <kpathsea/c-errno.h>
#include <kpathsea/c-ctype.h>
#include <kpathsea/c-fopen.h>
#include <kpathsea/c-pathmx.h>
#include <kpathsea/proginit.h>
#include <kpathsea/tex-file.h>
#include <kpathsea/tex-make.h>
#include <kpathsea/variable.h>
#include <signal.h>
#if !defined(_AMIGA) && !defined(WIN32)
#include <sys/time.h>
#endif
#include <fcntl.h>
#include <setjmp.h>
#endif /* KPATHSEA */
<.h-include after KPATHSEA.>
-_-_-
<..h-defines 2..>
<.h-include before KPATHSEA.>
#ifdef KPATHSEA
#include <kpathsea/c-errno.h>
#include <kpathsea/c-ctype.h>
#include <kpathsea/c-fopen.h>
#include <kpathsea/c-pathmx.h>
#include <kpathsea/proginit.h>
#include <kpathsea/tex-file.h>
#include <kpathsea/tex-make.h>
#include <kpathsea/variable.h>
#include <signal.h>
#if !defined(_AMIGA) && !defined(WIN32)
#include <sys/time.h>
#endif
#include <fcntl.h>
#include <setjmp.h>
#endif /* KPATHSEA */
<.h-include after KPATHSEA.>
-_-_-
The ‘__cdecl’ is defined in KPATHSEA: kpathsea/c-protos.h is defined to nothing for compilers other than MS.
<..t4ht.h..>+
#ifdef KPATHSEA
#ifdef WIN32
#undef CDECL
#define CDECL __cdecl
#else
#define CDECL
#endif
#endif
-_-_-
<..h-defines KWIN32..>
#ifdef KPATHSEA
#ifdef WIN32
#define KWIN32
#endif
#endif
-_-_-
For Win 95.
Options (bcc32 comamnd):
For DOS.
For DOS.
‘c:\msvc\bin\cl -Ic:\msvc\include -DDOS t4ht.c’
In tex-live ‘ cl -D_X86_=1 -DWINVER=0x0400 -DWIN32 -D_WIN32 -DWIN32_LEAN_AND_MEAN -D_MT -D_DLL -DKPATHSEA -D_IMPORT -DANSI -I. -I. -I.. -IG:\fptex\source\web2c-7.2 -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -O2x -G5rs -Gy -c /Fodynamic\t4ht.obj .\t4ht.c’
The following are the available flags (c:\msvc\bin\cl -help).
<..DJGPP..>
#ifdef __DJGPP__
#define DOS_WIN32
#define ANSI
#endif
-_-_-
<..DJGPP signals..>
#ifdef __DJGPP__
if (s != SIGINT && s != SIGQUIT)
exit(EXIT_FAILURE);
#endif
-_-_-
<..defines..>+
#if defined(DOS_WIN32) || defined(__DJGPP__)
#define dir_path_slash(str) (is_forward_slash(str)? ’/’ : ’\\’)
#else
#define dir_path_slash(str) ’/’
#endif
-_-_-
<..header functions..>
#if defined(DOS_WIN32) || defined(__DJGPP__)
static BOOL is_forward_slash( ARG_I(Q_CHAR *) );
#endif
-_-_-
<..functions..>
#if defined(DOS_WIN32) || defined(__DJGPP__)
static BOOL is_forward_slash(str)
Q_CHAR * str
;{
while( *str ){ if( *(str++) == ’/’ ) { return TRUE; } }
return FALSE;
}
#endif
-_-_-