summaryrefslogtreecommitdiff
path: root/Build/source/texk/tex4htk/t4ht.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/tex4htk/t4ht.c')
-rw-r--r--Build/source/texk/tex4htk/t4ht.c616
1 files changed, 611 insertions, 5 deletions
diff --git a/Build/source/texk/tex4htk/t4ht.c b/Build/source/texk/tex4htk/t4ht.c
index a5894b9d209..c0af58bc2bc 100644
--- a/Build/source/texk/tex4htk/t4ht.c
+++ b/Build/source/texk/tex4htk/t4ht.c
@@ -1,8 +1,12 @@
-/* t4ht.c (2012-07-25-19:28), generated from tex4ht-t4ht.tex
+#line 145 "./tex4ht-t4ht.tex"
+
+/* t4ht.c (2018-06-28-11:26), generated from tex4ht-t4ht.tex
Copyright (C) 2009-2012 TeX Users Group
Copyright (C) 1998-2009 Eitan M. Gurari
+#line 1 "./tex4ht-t4ht.tex"
+
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -22,6 +26,8 @@
*/
+#line 334 "./tex4ht-t4ht.tex"
+
/* **********************************************
Compiler options *
(uncommented | command line) *
@@ -47,6 +53,8 @@
(uncommented | command line) *
----------------------------------------------- */
+#line 3233 "./tex4ht-t4ht.tex"
+
#ifndef ENVFILE
#endif
@@ -55,6 +63,8 @@
/* ******************************************** */
+#line 384 "./tex4ht-t4ht.tex"
+
#ifdef BCC32
#define WIN32
#define ANSI
@@ -65,6 +75,8 @@
+#line 396 "./tex4ht-t4ht.tex"
+
#ifdef BCC
#define DOS_C
#define ANSI
@@ -74,6 +86,8 @@
+#line 758 "./tex4ht-t4ht.tex"
+
#ifdef __DJGPP__
#define DOS_WIN32
#define ANSI
@@ -93,12 +107,16 @@
#define DOS_WIN32
#endif
+#line 436 "./tex4ht-t4ht.tex"
+
#ifdef DOS_WIN32
#define STRUCT_DIRENT
#endif
+#line 579 "./tex4ht-t4ht.tex"
+
#ifdef KPATHSEA
#ifdef WIN32
#define KWIN32
@@ -107,6 +125,8 @@
+#line 406 "./tex4ht-t4ht.tex"
+
#ifdef KPATHSEA
#include <kpathsea/config.h>
#endif
@@ -114,13 +134,19 @@
#include <stdlib.h>
+#line 427 "./tex4ht-t4ht.tex"
+
#ifdef HAVE_STRING_H
#include <string.h>
#endif
+#line 443 "./tex4ht-t4ht.tex"
+
#ifdef HAVE_DIRENT_H
+#line 456 "./tex4ht-t4ht.tex"
+
#include <dirent.h>
@@ -129,6 +155,8 @@
#define STRUCT_DIRECT
#endif
+#line 461 "./tex4ht-t4ht.tex"
+
#ifdef HAVE_SYS_NDIR_H
#include <sys/ndir.h>
#endif
@@ -143,13 +171,21 @@
#endif
+#line 3974 "./tex4ht-t4ht.tex"
+
#include <signal.h>
+#line 542 "./tex4ht-t4ht.tex"
+
+
+#line 3496 "./tex4ht-t4ht.tex"
#ifndef __DJGPP__
+#line 3530 "./tex4ht-t4ht.tex"
+
#ifndef F_OK
#ifdef DOS_WIN32
#define F_OK 0
@@ -190,8 +226,12 @@
#include <setjmp.h>
#endif
+#line 3507 "./tex4ht-t4ht.tex"
+
#ifdef __DJGPP__
+#line 3530 "./tex4ht-t4ht.tex"
+
#ifndef F_OK
#ifdef DOS_WIN32
#define F_OK 0
@@ -219,6 +259,8 @@
+#line 479 "./tex4ht-t4ht.tex"
+
#ifdef DOS
#define PROTOTYP
#endif
@@ -230,6 +272,8 @@
#endif
+#line 568 "./tex4ht-t4ht.tex"
+
#ifdef KPATHSEA
#ifdef WIN32
#undef CDECL
@@ -240,6 +284,8 @@
#endif
+#line 3789 "./tex4ht-t4ht.tex"
+
#if defined(DOS_WIN32) || defined(__MSDOS__)
#define READ_BIN_FLAGS "rb"
#define READ_TEXT_FLAGS "r"
@@ -258,6 +304,8 @@
+#line 234 "./tex4ht-t4ht.tex"
+
#define Q_CHAR char
#define U_CHAR char
#define C_CHAR char
@@ -266,14 +314,20 @@
#define C_NULL (C_CHAR *) 0
+#line 328 "./tex4ht-t4ht.tex"
+
#define IGNORED void
+#line 421 "./tex4ht-t4ht.tex"
+
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif
+#line 491 "./tex4ht-t4ht.tex"
+
#ifdef PROTOTYP
#define MYVOID void
#define ARG_I(x) x
@@ -291,6 +345,8 @@
#endif
+#line 783 "./tex4ht-t4ht.tex"
+
#if defined(DOS_WIN32) || defined(__DJGPP__)
#define dir_path_slash(str) (is_forward_slash(str)? '/' : '\\')
#else
@@ -298,17 +354,23 @@
#endif
+#line 1158 "./tex4ht-t4ht.tex"
+
struct empty_pic_struct{
long int n;
struct empty_pic_struct *next;
};
+#line 1497 "./tex4ht-t4ht.tex"
+
#ifndef HTFDIR
#define HTFDIR ""
#endif
+#line 2035 "./tex4ht-t4ht.tex"
+
struct files_rec{
FILE* file;
char *name, *group, op;
@@ -325,46 +387,66 @@ struct files_rec{
#define Set_op 6
+#line 2177 "./tex4ht-t4ht.tex"
+
struct env_c_rec{
Q_CHAR *option;
struct env_c_rec *next;
};
+#line 2307 "./tex4ht-t4ht.tex"
+
struct sys_call_rec{
Q_CHAR * filter;
struct sys_call_rec *next;
};
+#line 2357 "./tex4ht-t4ht.tex"
+
struct htf_struct{
Q_CHAR *key, *body, *media;
struct htf_struct *next;
};
+#line 3088 "./tex4ht-t4ht.tex"
+
struct script_struct{
Q_CHAR *command;
struct script_struct *next;
};
+#line 3107 "./tex4ht-t4ht.tex"
+
#define NULL_SCRIPT (struct script_struct *) 0
+#line 3718 "./tex4ht-t4ht.tex"
+
#define LG_EXT ".lg"
+#line 3850 "./tex4ht-t4ht.tex"
+
#define bad_arg err_arg(0)
#define bad_mem err_i(1)
+#line 4201 "./tex4ht-t4ht.tex"
+
#define eq_str(x,y) (!strcmp(x,y))
+#line 4255 "./tex4ht-t4ht.tex"
+
#define m_alloc(typ,n) (typ *) malloc_chk((int) ((n) * sizeof(typ)))
+#line 4490 "./tex4ht-t4ht.tex"
+
#ifndef TRUE
#define TRUE 1
#endif
@@ -376,16 +458,24 @@ struct script_struct{
#endif
+#line 4504 "./tex4ht-t4ht.tex"
+
#define eq_str(x,y) (!strcmp(x,y))
+#line 246 "./tex4ht-t4ht.tex"
+
static int eoln_ch;
+#line 292 "./tex4ht-t4ht.tex"
+
static BOOL check_tex4ht_c_err = FALSE;
+#line 878 "./tex4ht-t4ht.tex"
+
static Q_CHAR *ch_mod = Q_NULL;
static Q_CHAR *debug = Q_NULL;
static Q_CHAR *Xfield = Q_NULL;
@@ -398,28 +488,42 @@ static BOOL newchmod = FALSE;
static Q_CHAR *noreuse = Q_NULL;
+#line 1100 "./tex4ht-t4ht.tex"
+
U_CHAR *HOME_DIR;
+#line 2184 "./tex4ht-t4ht.tex"
+
static struct env_c_rec *envChoice
= (struct env_c_rec*) 0;
+#line 2315 "./tex4ht-t4ht.tex"
+
static BOOL system_yes;
static struct sys_call_rec *system_calls = (struct sys_call_rec *) 0;
+#line 2352 "./tex4ht-t4ht.tex"
+
static struct htf_struct *htf_rec = (struct htf_struct *) 0;
+#line 2601 "./tex4ht-t4ht.tex"
+
static BOOL status;
+#line 2815 "./tex4ht-t4ht.tex"
+
static char *Font_css_base = NULL,
*Font_css_mag = NULL;
static int base_font_size = 10;
+#line 3095 "./tex4ht-t4ht.tex"
+
static struct script_struct
* dvigif_script = NULL_SCRIPT,
* dvigif_glyp_script = NULL_SCRIPT,
@@ -427,21 +531,33 @@ static struct script_struct
* empty_fig_script = NULL_SCRIPT,
* copy_script = NULL_SCRIPT,
*
+#line 2235 "./tex4ht-t4ht.tex"
+
file_script
= NULL_SCRIPT,
*
+#line 2171 "./tex4ht-t4ht.tex"
+
ext_script
= NULL_SCRIPT,
* chmod_script = NULL_SCRIPT;
+#line 3769 "./tex4ht-t4ht.tex"
+
static FILE* lg_file;
static long begin_lg_file;
+#line 3919 "./tex4ht-t4ht.tex"
+
static const C_CHAR *warn_err_mssg[]={
+#line 3841 "./tex4ht-t4ht.tex"
+
+
+#line 843 "./tex4ht-t4ht.tex"
"\n--------------------------------------------------------------------\n"
"t4ht [-f<dir char>]filename ...\n"
@@ -466,6 +582,8 @@ static const C_CHAR *warn_err_mssg[]={
,
"Insufficient memory\n",
+#line 3835 "./tex4ht-t4ht.tex"
+
"Illegal storage address\n",
"Floating-point\n",
"Interrupt with Cntr-C\n",
@@ -476,67 +594,105 @@ static const C_CHAR *warn_err_mssg[]={
"" };
+#line 4127 "./tex4ht-t4ht.tex"
+
static Q_CHAR command[255];
static int system_return;
+#line 4138 "./tex4ht-t4ht.tex"
+
static BOOL system_yes;
+#line 4191 "./tex4ht-t4ht.tex"
+
static BOOL always_call_sys = FALSE;
+#line 4376 "./tex4ht-t4ht.tex"
+
static Q_CHAR* match[10];
static int max_match[10];
+#line 793 "./tex4ht-t4ht.tex"
+
#if defined(DOS_WIN32) || defined(__DJGPP__)
static BOOL is_forward_slash( ARG_I(Q_CHAR *) );
#endif
+#line 1069 "./tex4ht-t4ht.tex"
+
static char * abs_addr( ARG_II( U_CHAR *, U_CHAR *) );
+#line 1379 "./tex4ht-t4ht.tex"
+
static void execute_script(
ARG_V(struct script_struct*,const Q_CHAR *,const Q_CHAR *,const Q_CHAR *,const Q_CHAR *) );
+#line 1531 "./tex4ht-t4ht.tex"
+
static struct script_struct * filterGifScript(
ARG_II( struct script_struct *, Q_CHAR *) );
+#line 1605 "./tex4ht-t4ht.tex"
+
void free_script(
ARG_I( struct script_struct *) );
+#line 2152 "./tex4ht-t4ht.tex"
+
static BOOL strpre( ARG_II(char *,char *) );
+#line 3051 "./tex4ht-t4ht.tex"
+
static struct script_struct * add_script( ARG_I(struct script_struct *) );
+#line 3627 "./tex4ht-t4ht.tex"
+
static FILE* f_open( ARG_II(const char*,const char*) );
+#line 3648 "./tex4ht-t4ht.tex"
+
static FILE* f_home_open( ARG_II(const char*,const char*) );
+#line 3678 "./tex4ht-t4ht.tex"
+
static FILE* open_file( ARG_II(const C_CHAR *, const C_CHAR *) );
+#line 3860 "./tex4ht-t4ht.tex"
+
static void err_i( ARG_I(int) );
+#line 3876 "./tex4ht-t4ht.tex"
+
static void err_arg( ARG_I(int) );
+#line 3894 "./tex4ht-t4ht.tex"
+
static void warn_i_str( ARG_II(int,const Q_CHAR *) );
+#line 3978 "./tex4ht-t4ht.tex"
+
static void
+#line 4019 "./tex4ht-t4ht.tex"
+
#ifdef CDECL
CDECL
#endif
@@ -545,36 +701,56 @@ CDECL
sig_err(ARG_I(int));
+#line 4105 "./tex4ht-t4ht.tex"
+
#ifdef KWIN32
static BOOL sigint_handler(ARG_I(DWORD));
#endif
+#line 4169 "./tex4ht-t4ht.tex"
+
static void call_sys(ARG_I(Q_CHAR *));
+#line 4212 "./tex4ht-t4ht.tex"
+
static void strct( ARG_II(C_CHAR *, const C_CHAR *) );
+#line 4232 "./tex4ht-t4ht.tex"
+
static long int get_long_int( ARG_I(Q_CHAR *) );
+#line 4261 "./tex4ht-t4ht.tex"
+
static void* malloc_chk(ARG_I(int));
+#line 4278 "./tex4ht-t4ht.tex"
+
static void* r_alloc(ARG_II(void *, size_t));
+#line 4342 "./tex4ht-t4ht.tex"
+
static BOOL scan_until_end_str( ARG_IV(const C_CHAR *, int, BOOL, FILE *) );
+#line 4392 "./tex4ht-t4ht.tex"
+
static BOOL scan_until_str( ARG_IV(const C_CHAR *, int, BOOL, FILE *) );
+#line 4430 "./tex4ht-t4ht.tex"
+
static BOOL scan_str( ARG_III(const C_CHAR *, BOOL, FILE *) );
+#line 799 "./tex4ht-t4ht.tex"
+
#if defined(DOS_WIN32) || defined(__DJGPP__)
static BOOL is_forward_slash
@@ -598,6 +774,8 @@ static BOOL is_forward_slash
#endif
+#line 1073 "./tex4ht-t4ht.tex"
+
static char * abs_addr
#ifdef ANSI
@@ -638,6 +816,8 @@ static char * abs_addr
}
+#line 1384 "./tex4ht-t4ht.tex"
+
static void execute_script
#ifdef ANSI
@@ -667,6 +847,8 @@ static void execute_script
Q_CHAR *p, *q;
const Q_CHAR *t;
+#line 1458 "./tex4ht-t4ht.tex"
+
#ifdef KPATHSEA
const char * texmf = kpse_var_value( "SELFAUTOPARENT" );
#endif
@@ -675,6 +857,8 @@ const char * texmf = kpse_var_value( "SELFAUTOPARENT" );
temp = script; system_return = 0;
while( temp ){
+#line 1424 "./tex4ht-t4ht.tex"
+
p = temp->command;
q = command;
while( *p != '\0' ){
@@ -697,6 +881,8 @@ while( *p != '\0' ){
case '4':{ t = match_4;
while( *t != '\0' ){ *(q++) = *(t++); } break; }
case '~':{
+#line 1464 "./tex4ht-t4ht.tex"
+
#ifdef KPATHSEA
if( texmf ){
t = texmf;
@@ -717,6 +903,8 @@ while( *p != '\0' ){
if( (command[0] != '\0') && !system_return ){
+#line 4162 "./tex4ht-t4ht.tex"
+
(IGNORED) call_sys(command);
}
@@ -724,6 +912,8 @@ while( *p != '\0' ){
} }
+#line 1536 "./tex4ht-t4ht.tex"
+
static struct script_struct * filterGifScript
#ifdef ANSI
@@ -753,6 +943,8 @@ static struct script_struct * filterGifScript
command = old_script->command;
if( *command != '.' ){
+#line 1559 "./tex4ht-t4ht.tex"
+
new_script = NULL_SCRIPT;
while( old_script != NULL_SCRIPT ){
command = old_script->command;
@@ -773,6 +965,10 @@ return filtered_script;
} else {
+#line 1578 "./tex4ht-t4ht.tex"
+
+
+#line 1598 "./tex4ht-t4ht.tex"
ext = file;
while( *ext != '\0' ){ ext++; }
@@ -794,6 +990,8 @@ while( TRUE ){
}
}
+#line 1559 "./tex4ht-t4ht.tex"
+
new_script = NULL_SCRIPT;
while( old_script != NULL_SCRIPT ){
command = old_script->command;
@@ -818,6 +1016,8 @@ return filtered_script;
}
+#line 1610 "./tex4ht-t4ht.tex"
+
void free_script
#ifdef ANSI
@@ -843,6 +1043,8 @@ void free_script
}
+#line 2156 "./tex4ht-t4ht.tex"
+
static BOOL strpre
#ifdef ANSI
@@ -868,6 +1070,8 @@ static BOOL strpre
}
+#line 3055 "./tex4ht-t4ht.tex"
+
static struct script_struct * add_script
#ifdef ANSI
@@ -904,8 +1108,12 @@ static struct script_struct * add_script
}
+#line 3576 "./tex4ht-t4ht.tex"
+
#if defined(__MSDOS__)
+#line 3582 "./tex4ht-t4ht.tex"
+
static char *get_env_dir
#ifdef ANSI
@@ -942,6 +1150,8 @@ static char *get_env_dir
#endif
+#line 3631 "./tex4ht-t4ht.tex"
+
static FILE* f_open
#ifdef ANSI
@@ -967,6 +1177,8 @@ static FILE* f_open
}
+#line 3652 "./tex4ht-t4ht.tex"
+
static FILE* f_home_open
#ifdef ANSI
@@ -998,6 +1210,8 @@ static FILE* f_home_open
}
+#line 3682 "./tex4ht-t4ht.tex"
+
static FILE* open_file
#ifdef ANSI
@@ -1036,6 +1250,8 @@ static FILE* open_file
}
+#line 3864 "./tex4ht-t4ht.tex"
+
static void err_i
#ifdef ANSI
@@ -1057,6 +1273,8 @@ static void err_i
}
+#line 3880 "./tex4ht-t4ht.tex"
+
static void err_arg
#ifdef ANSI
@@ -1078,6 +1296,8 @@ static void err_arg
}
+#line 3898 "./tex4ht-t4ht.tex"
+
static void warn_i_str
#ifdef ANSI
@@ -1102,9 +1322,13 @@ static void warn_i_str
}
+#line 3987 "./tex4ht-t4ht.tex"
+
static void
+#line 4019 "./tex4ht-t4ht.tex"
+
#ifdef CDECL
CDECL
#endif
@@ -1134,6 +1358,8 @@ sig_err
#endif
}
+#line 768 "./tex4ht-t4ht.tex"
+
#ifdef __DJGPP__
if (s != SIGINT && s != SIGQUIT)
exit(EXIT_FAILURE);
@@ -1143,6 +1369,8 @@ sig_err
}
+#line 4111 "./tex4ht-t4ht.tex"
+
#ifdef KWIN32
static BOOL sigint_handler
@@ -1164,6 +1392,8 @@ static BOOL sigint_handler
#endif
+#line 4176 "./tex4ht-t4ht.tex"
+
static void call_sys
#ifdef ANSI
@@ -1188,6 +1418,8 @@ static void call_sys
}
+#line 4216 "./tex4ht-t4ht.tex"
+
static void strct
#ifdef ANSI
@@ -1213,6 +1445,8 @@ static void strct
}
+#line 4236 "./tex4ht-t4ht.tex"
+
static long int get_long_int
#ifdef ANSI
@@ -1238,6 +1472,8 @@ static long int get_long_int
}
+#line 4265 "./tex4ht-t4ht.tex"
+
static void* malloc_chk
#ifdef ANSI
@@ -1257,6 +1493,8 @@ static void* malloc_chk
}
+#line 4282 "./tex4ht-t4ht.tex"
+
static void* r_alloc
#ifdef ANSI
@@ -1280,6 +1518,8 @@ static void* r_alloc
}
+#line 4346 "./tex4ht-t4ht.tex"
+
static BOOL scan_until_end_str
#ifdef ANSI
@@ -1322,6 +1562,8 @@ static BOOL scan_until_end_str
}
+#line 4396 "./tex4ht-t4ht.tex"
+
static BOOL scan_until_str
#ifdef ANSI
@@ -1365,6 +1607,8 @@ static BOOL scan_until_str
}
+#line 4434 "./tex4ht-t4ht.tex"
+
static BOOL scan_str
#ifdef ANSI
@@ -1401,6 +1645,8 @@ static BOOL scan_str
int
+#line 4019 "./tex4ht-t4ht.tex"
+
#ifdef CDECL
CDECL
#endif
@@ -1422,13 +1668,19 @@ CDECL
#undef SEP
#endif
{
+#line 1154 "./tex4ht-t4ht.tex"
+
struct empty_pic_struct *empty_pic;
+#line 3555 "./tex4ht-t4ht.tex"
+
Q_CHAR * tex4ht_env_file = (Q_CHAR *) 0;
Q_CHAR * dos_env_file =
#if defined(__MSDOS__)
+#line 3572 "./tex4ht-t4ht.tex"
+
get_env_dir(argv[0])
;
@@ -1440,6 +1692,8 @@ get_env_dir(argv[0])
+#line 3923 "./tex4ht-t4ht.tex"
+
#ifdef WIN32
/* See comments in tex4ht */
if (argc > 2) {
@@ -1487,6 +1741,8 @@ get_env_dir(argv[0])
+#line 4028 "./tex4ht-t4ht.tex"
+
#ifdef SIGSEGV
(void) signal(SIGSEGV,sig_err);
@@ -1494,6 +1750,8 @@ get_env_dir(argv[0])
(void) signal(SIGFPE,sig_err);
#ifdef KWIN32
+#line 4051 "./tex4ht-t4ht.tex"
+
SetConsoleCtrlHandler((PHANDLER_ROUTINE)sigint_handler, TRUE);
@@ -1505,22 +1763,26 @@ SetConsoleCtrlHandler((PHANDLER_ROUTINE)sigint_handler, TRUE);
+#line 173 "./tex4ht-t4ht.tex"
+
(IGNORED) printf("----------------------------\n");
#ifndef KPATHSEA
#ifdef PLATFORM
- (IGNORED) printf("t4ht.c (2012-07-25-19:28 %s)\n",PLATFORM);
+ (IGNORED) printf("t4ht.c (2018-06-28-11:26 %s)\n",PLATFORM);
#else
- (IGNORED) printf("t4ht.c (2012-07-25-19:28)\n");
+ (IGNORED) printf("t4ht.c (2018-06-28-11:26)\n");
#endif
#else
#ifdef PLATFORM
- (IGNORED) printf("t4ht.c (2012-07-25-19:28 %s kpathsea)\n",PLATFORM);
+ (IGNORED) printf("t4ht.c (2018-06-28-11:26 %s kpathsea)\n",PLATFORM);
#else
- (IGNORED) printf("t4ht.c (2012-07-25-19:28 kpathsea)\n");
+ (IGNORED) printf("t4ht.c (2018-06-28-11:26 kpathsea)\n");
#endif
#endif
+#line 910 "./tex4ht-t4ht.tex"
+
{ int i, count = 0;
for(i=0; i<argc; i++){
Q_CHAR *p = argv[i];
@@ -1559,11 +1821,17 @@ SetConsoleCtrlHandler((PHANDLER_ROUTINE)sigint_handler, TRUE);
+#line 1104 "./tex4ht-t4ht.tex"
+
HOME_DIR = getenv("HOME");
+#line 4142 "./tex4ht-t4ht.tex"
+
{ C_CHAR *yes = NULL;
system_yes = (
+#line 4154 "./tex4ht-t4ht.tex"
+
#ifdef SYSTEM_FUNCTION_OK
0
#else
@@ -1574,6 +1842,8 @@ system( yes ) != 0
}
+#line 4382 "./tex4ht-t4ht.tex"
+
{ int i;
for( i=0; i<=9; i++){
match[i] = (Q_CHAR *) malloc(70);
@@ -1584,9 +1854,13 @@ system( yes ) != 0
+#line 892 "./tex4ht-t4ht.tex"
+
{ int i;
Q_CHAR *p, *q;
+#line 1002 "./tex4ht-t4ht.tex"
+
#ifdef KPATHSEA
kpse_set_program_name (argv[0], "tex4ht");
#endif
@@ -1596,8 +1870,12 @@ system( yes ) != 0
if( argc == 1 ){ bad_arg; }
for(i=1; i<argc; i++){
if( *( p=argv[i] ) == '-' ){
+#line 1014 "./tex4ht-t4ht.tex"
+
if( (int) strlen((char *) argv[i] ) == 2 ){
if(
+#line 1041 "./tex4ht-t4ht.tex"
+
(*(p+1) != 'i')
&& (*(p+1) != 'p')
&& (*(p+1) != 'r')
@@ -1612,6 +1890,8 @@ if( (int) strlen((char *) argv[i] ) == 2 ){
switch( *(p+1) ){
case 'M':{ ch_mod = q; newchmod = TRUE; break; }
case 'S':{
+#line 2279 "./tex4ht-t4ht.tex"
+
{ struct sys_call_rec *q;
q = m_alloc(struct sys_call_rec, 1);
q->next = system_calls;
@@ -1623,6 +1903,8 @@ switch( *(p+1) ){
case 'X':{ Xfield = q; break;}
case 'b':{ bitmaps_no_dm = q-1; break;}
case 'c':{
+#line 2190 "./tex4ht-t4ht.tex"
+
struct env_c_rec *temp = (struct env_c_rec*)
m_alloc(struct env_c_rec, (int) 1);
temp->option = q;
@@ -1632,10 +1914,14 @@ envChoice = temp;
break;}
case 'd':{ dir = (*q=='~')? abs_addr(q,NULL) : q; break; }
case 'e':{
+#line 3482 "./tex4ht-t4ht.tex"
+
tex4ht_env_file = q;
break; }
case 'f':{
+#line 1058 "./tex4ht-t4ht.tex"
+
p = p + 2;
lg_name = p + (int) strlen((char *) p );
while( *lg_name != *p ){ lg_name--; }
@@ -1658,6 +1944,8 @@ lg_name++;
}
if( lg_name == NULL ){ bad_arg; }
+#line 944 "./tex4ht-t4ht.tex"
+
{ Q_CHAR *p, *q;
FILE* file;
(IGNORED) strcpy((char *) (char *) tmp_name, (char *) (char *) lg_name);
@@ -1681,6 +1969,8 @@ lg_name++;
+#line 968 "./tex4ht-t4ht.tex"
+
(IGNORED) strcpy((char *) job_name, (char *) tmp_name);
*(job_name + strlen((char *) job_name) - 4) = '\0';
@@ -1689,14 +1979,22 @@ lg_name++;
+#line 92 "./tex4ht-t4ht.tex"
+
+
+#line 2910 "./tex4ht-t4ht.tex"
{ FILE* file;
U_CHAR env_loc[512];
env_loc[0] = '\0';
+#line 3164 "./tex4ht-t4ht.tex"
+
{ Q_CHAR str[512],
*TEX4HTENV;
+#line 3449 "./tex4ht-t4ht.tex"
+
if( tex4ht_env_file ){
if( debug ){
(IGNORED) printf("%s?\n", tex4ht_env_file);
@@ -1713,6 +2011,8 @@ if( debug && file ){
+#line 3152 "./tex4ht-t4ht.tex"
+
if( !file ) {
if( debug ){
(IGNORED) printf("tex4ht.env?\n");
@@ -1725,6 +2025,8 @@ if( !file ) {
+#line 3203 "./tex4ht-t4ht.tex"
+
#ifndef DOS_WIN32
if( !file ) {
if( debug ){
@@ -1739,6 +2041,8 @@ if( !file ) {
+#line 3186 "./tex4ht-t4ht.tex"
+
if( !file ){
TEX4HTENV = getenv("TEX4HTENV");
if( TEX4HTENV ){
@@ -1751,8 +2055,12 @@ if( !file ){
+#line 3390 "./tex4ht-t4ht.tex"
+
if( !file ){
if( HOME_DIR ){ (IGNORED) sprintf(str,
+#line 3429 "./tex4ht-t4ht.tex"
+
#if defined(DOS_WIN32) || defined(__DJGPP__)
is_forward_slash(HOME_DIR)? "%s/tex4ht.env" : "%s\\tex4ht.env"
#else
@@ -1797,6 +2105,8 @@ if( !file ){
+#line 3217 "./tex4ht-t4ht.tex"
+
#ifdef ENVFILE
if( !file ) {
if( debug ){
@@ -1811,6 +2121,8 @@ if( !file ){
if( !file ) {
+#line 3465 "./tex4ht-t4ht.tex"
+
if( dos_env_file ){
if( debug ){
(IGNORED) printf("%s?\n", dos_env_file);
@@ -1823,11 +2135,15 @@ if( dos_env_file ){
}
+#line 3253 "./tex4ht-t4ht.tex"
+
#ifdef KPATHSEA
if( !file ) { U_CHAR * envfile;
char *arch, *p, str[256];
+#line 3280 "./tex4ht-t4ht.tex"
+
p = arch = (char *) kpse_var_value( "SELFAUTOLOC" );
while( *p != '\0' ){
if( (*p == '/') || (*p == '\\') ){
@@ -1839,6 +2155,8 @@ while( *p != '\0' ){
envfile = (char *) 0;
+#line 3291 "./tex4ht-t4ht.tex"
+
if( arch ){
(IGNORED) sprintf(str,"%s%ctex4ht.env", arch+1, *arch);
if( debug ){
@@ -1850,6 +2168,8 @@ if( arch ){
if ( !envfile ){
+#line 3303 "./tex4ht-t4ht.tex"
+
if( debug ){
(IGNORED) printf(
"kpse_open_file (\"tex4ht.env\", kpse_program_text_format)?\n");
@@ -1858,8 +2178,12 @@ envfile= kpse_find_file ("tex4ht.env", kpse_program_text_format, 0);
}
if ( !envfile ){
+#line 3357 "./tex4ht-t4ht.tex"
+
if( system("kpsewhich --progname=tex4ht tex4ht.env > tex4ht.tmp") == 0 ){
+#line 3370 "./tex4ht-t4ht.tex"
+
char fileaddr [256];
int loc = 0;
FILE* file = f_open("tex4ht.tmp", READ_TEXT_FLAGS);
@@ -1887,6 +2211,8 @@ if( file ){
if( debug ){
U_CHAR *p, *q;
+#line 3322 "./tex4ht-t4ht.tex"
+
p = (U_CHAR *) kpse_var_value( "T4HTINPUTS" );
if( p ){
(IGNORED) printf("T4HTINPUTS = %s\n", p);
@@ -1905,6 +2231,8 @@ if( !p && !q ){
if( !file ) warn_i_str( 5,
+#line 3241 "./tex4ht-t4ht.tex"
+
#ifdef DOS_WIN32
"tex4ht.env"
#endif
@@ -1918,6 +2246,8 @@ if( !p && !q ){
if( file ){
+#line 2927 "./tex4ht-t4ht.tex"
+
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) { Q_CHAR ch;
ch = (char) (eoln_ch = getc(file));
@@ -1926,41 +2256,55 @@ while( eoln_ch != EOF ) { Q_CHAR ch;
if( status ){
switch( ch ){
case 'A':{
+#line 2992 "./tex4ht-t4ht.tex"
+
if( debug ){
(IGNORED) printf(".......'A' script\n"); }
chmod_script = add_script(chmod_script);
break;}
case 'C':{
+#line 2967 "./tex4ht-t4ht.tex"
+
if( debug ){
(IGNORED) printf(".......'C' script\n"); }
copy_script = add_script(copy_script);
break;}
case 'E':{
+#line 2998 "./tex4ht-t4ht.tex"
+
if( debug ){
(IGNORED) printf(".......'E' script\n"); }
empty_fig_script = add_script(empty_fig_script);
break;}
case 'F':{
+#line 2953 "./tex4ht-t4ht.tex"
+
if( debug ){
(IGNORED) printf(".......'F' script\n"); }
dvigif_glyp_script = add_script(dvigif_glyp_script);
break;}
case 'G':{
+#line 1179 "./tex4ht-t4ht.tex"
+
if( debug ){ (IGNORED) printf(".......'G' script\n"); }
dvigif_script = add_script(dvigif_script);
break;}
case 'M':{
+#line 2960 "./tex4ht-t4ht.tex"
+
if( debug ){
(IGNORED) printf(".......'M' script\n"); }
move_script = add_script(move_script);
break;}
case 'S':{
+#line 2266 "./tex4ht-t4ht.tex"
+
{ struct sys_call_rec *q;
q = m_alloc(struct sys_call_rec, 1);
q->next = system_calls;
@@ -1974,30 +2318,44 @@ if( debug ){
break;}
case 'X':{
+#line 2977 "./tex4ht-t4ht.tex"
+
if( debug ){
(IGNORED) printf(".......'X' script\n"); }
+#line 2235 "./tex4ht-t4ht.tex"
+
file_script
= add_script(
+#line 2235 "./tex4ht-t4ht.tex"
+
file_script
);
break;}
case '.':{
+#line 2983 "./tex4ht-t4ht.tex"
+
if( debug ){
(IGNORED) printf(".......'.' script\n"); }
+#line 2171 "./tex4ht-t4ht.tex"
+
ext_script
= add_script(
+#line 2171 "./tex4ht-t4ht.tex"
+
ext_script
);
break;}
case '<':{
+#line 3009 "./tex4ht-t4ht.tex"
+
if( *(match[1]) != '/' ){
U_CHAR *p;
BOOL env_skip;
@@ -2006,6 +2364,8 @@ if( *(match[1]) != '/' ){
p++ ){}
if( *p == '>' ){ *p = '\0'; }
+#line 2198 "./tex4ht-t4ht.tex"
+
if( envChoice == (struct env_c_rec*) 0 ){
env_skip = !eq_str(match[1], "default" );
} else {
@@ -2018,6 +2378,8 @@ if( envChoice == (struct env_c_rec*) 0 ){
if( env_skip ){
+#line 3030 "./tex4ht-t4ht.tex"
+
U_CHAR cur_block[90];
if( debug ){
(IGNORED) printf("....... <%s> skipping ...\n", match[1]);
@@ -2057,15 +2419,23 @@ while( !status && (eoln_ch != EOF) ){
lg_file = open_file(lg_name,LG_EXT);
if( lg_file ) {
+#line 3755 "./tex4ht-t4ht.tex"
+
begin_lg_file = ftell(lg_file);
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 274 "./tex4ht-t4ht.tex"
+
if( check_tex4ht_c_err ){
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) {
@@ -2081,12 +2451,20 @@ if( check_tex4ht_c_err ){
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 1700 "./tex4ht-t4ht.tex"
+
{
+#line 2052 "./tex4ht-t4ht.tex"
+
Q_CHAR *file_name, file_mode[5];
int i, start_loc, end_loc, addr = 0;
char rec_op, *ch;
@@ -2115,6 +2493,8 @@ BOOL write_on;
( eq_str(match[2],"Skip ")? Skip_op :
( eq_str(match[2],"Cont ")? Cont_op : No_op )));
if( rec_op == No_op ){
+#line 1736 "./tex4ht-t4ht.tex"
+
ch = match[2];
if( (ch[0]=='S') && (ch[1]=='e') && (ch[2]=='t') ){
ch += 3; rec_op = Set_op;
@@ -2133,11 +2513,15 @@ if( rec_op != No_op ){
match[1], match[2], match[3], match[4], match[5]);
} else {
+#line 1998 "./tex4ht-t4ht.tex"
+
file_name = match[1];
*(file_name + (int) strlen((char *) file_name) - 1) = '\0';
strcpy((char *) file_mode, WRITE_TEXT_FLAGS);
for(i=1; i<=2; i++){
+#line 2017 "./tex4ht-t4ht.tex"
+
for( p = opened_files; p != (struct files_rec*) 0; p = p->right ){
if( eq_str(file_name,p->name) ) { break; }
}
@@ -2156,6 +2540,8 @@ to_rec = from_rec; from_rec = p;
file_name = match[5];
strcpy((char *) file_mode,
+#line 4305 "./tex4ht-t4ht.tex"
+
READ_BIN_FLAGS
);
@@ -2163,8 +2549,12 @@ READ_BIN_FLAGS
+#line 1959 "./tex4ht-t4ht.tex"
+
if( to_rec->down == (struct files_rec*) 0 ){
+#line 1973 "./tex4ht-t4ht.tex"
+
to_rec->down = p = m_alloc(struct files_rec, 1);
p->up = to_rec;
p->right = p->left = p->down = (struct files_rec*) 0;
@@ -2184,6 +2574,8 @@ to_rec = p;
}
if( to_rec->from_rec != from_rec ){
+#line 1985 "./tex4ht-t4ht.tex"
+
to_rec->right = p = m_alloc(struct files_rec, 1);
p->left = to_rec;
p->right = p->down = (struct files_rec*) 0;
@@ -2199,8 +2591,12 @@ to_rec = p;
+#line 1913 "./tex4ht-t4ht.tex"
+
if( to_rec->down == (struct files_rec*) 0 ){
+#line 1929 "./tex4ht-t4ht.tex"
+
to_rec->down = p = m_alloc(struct files_rec, 1);
p->up = to_rec;
p->right = p->left = p->down = (struct files_rec*) 0;
@@ -2222,6 +2618,8 @@ to_rec = p;
}
if( !eq_str(to_rec->group,match[3]) ){
+#line 1943 "./tex4ht-t4ht.tex"
+
to_rec->right = p = m_alloc(struct files_rec, 1);
p->left = to_rec;
p->right = p->down = (struct files_rec*) 0;
@@ -2239,6 +2637,8 @@ to_rec = p;
+#line 1900 "./tex4ht-t4ht.tex"
+
p = m_alloc(struct files_rec, 1);
p->down = to_rec->down; to_rec->down = p;
p->up = to_rec;
@@ -2252,6 +2652,8 @@ p->label = addr;
+#line 1782 "./tex4ht-t4ht.tex"
+
if( rec_op == Until_op ){
for( p = to_rec->down;
p != (struct files_rec*) 0; p = p->down ){
@@ -2259,6 +2661,8 @@ if( rec_op == Until_op ){
}
if( p == (struct files_rec*) 0 ){
+#line 1882 "./tex4ht-t4ht.tex"
+
(IGNORED) fprintf(stderr,"%sMissing `CopyTo From':\n", "--- warning --- ");
for( p = to_rec->down; p != (struct files_rec*) 0; p = p->down ){
(IGNORED) fprintf(stderr," %s %s%d %s\n", to_rec->name,
@@ -2275,16 +2679,22 @@ for( p = to_rec->down; p != (struct files_rec*) 0; p = p->down ){
} else {
+#line 1800 "./tex4ht-t4ht.tex"
+
in_file = from_rec->file;
out_file = to_rec->file;
start_loc = from_op->loc;
write_on = TRUE;
(IGNORED) fseek(in_file, (long) start_loc,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
for( p= from_op; p != to_rec; p = p->up ){
switch( p->op ){
case Until_op:{
+#line 1817 "./tex4ht-t4ht.tex"
+
if( write_on ){
end_loc = p->loc;
for(; start_loc<end_loc; start_loc++) {
@@ -2293,6 +2703,8 @@ if( write_on ){
break; }
case Skip_op:{
+#line 1826 "./tex4ht-t4ht.tex"
+
if( write_on ){
end_loc = p->loc;
for(; start_loc<end_loc; start_loc++) {
@@ -2303,6 +2715,8 @@ write_on = FALSE;
break; }
case Cont_op:{
+#line 1837 "./tex4ht-t4ht.tex"
+
end_loc = p->loc;
if( write_on ){
for(; start_loc<end_loc; start_loc++) {
@@ -2311,6 +2725,8 @@ if( write_on ){
} else {
start_loc = end_loc;
(IGNORED) fseek(in_file, (long) end_loc,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
}
@@ -2318,6 +2734,8 @@ write_on = TRUE;
break; }
case Set_op:{
+#line 1851 "./tex4ht-t4ht.tex"
+
addr = -1;
for( p1 = from_op->up; p1 != to_rec; p1 = p1->up ){
if( (p1->op == Addr_op) && (p1->label == p->label) ){
@@ -2331,6 +2749,8 @@ if( addr != -1 ){ (p->up)->loc = addr; }
+#line 1861 "./tex4ht-t4ht.tex"
+
to_rec->down = from_op->down;
if( from_op->down != (struct files_rec*) 0){
(from_op->down)->up = to_rec;
@@ -2357,14 +2777,22 @@ if( to_rec->down == (struct files_rec*) 0){
} } }
+#line 1749 "./tex4ht-t4ht.tex"
+
for( p = opened_files; p != (struct files_rec*) 0; ){
(IGNORED) fclose(p->file);
free((void *) p->name);
+#line 1758 "./tex4ht-t4ht.tex"
+
for( p1 = p->down; p1 != (struct files_rec*) 0; ){
+#line 1765 "./tex4ht-t4ht.tex"
+
for( p2 = p1->down; p2 != (struct files_rec*) 0; ){
+#line 1772 "./tex4ht-t4ht.tex"
+
for( p3 = p2->down; p3 != (struct files_rec*) 0; ){
p4 = p3; p3 = p3->down; free((void *) p4);
}
@@ -2386,11 +2814,17 @@ for( p3 = p2->down; p3 != (struct files_rec*) 0; ){
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2368 "./tex4ht-t4ht.tex"
+
{ struct htf_struct *last_rec, *p;
last_rec = (struct htf_struct *) 0;
eoln_ch = (int) 'x';
@@ -2398,6 +2832,8 @@ for( p3 = p2->down; p3 != (struct files_rec*) 0; ){
status = scan_str("htfcss: ", TRUE, lg_file);
status = scan_until_end_str("", 1, status, lg_file);
+#line 2383 "./tex4ht-t4ht.tex"
+
if( status ){
Q_CHAR *s, *t;
int i;
@@ -2414,9 +2850,13 @@ if( status ){
if( status ){ Q_CHAR *key, *body, *media;
media = body = key = match[1];
+#line 2400 "./tex4ht-t4ht.tex"
+
while( *body && (*body != ' ') ){ body++; }
if( *body == ' ' ){ media = body; *(body++) = '\0'; }
+#line 2412 "./tex4ht-t4ht.tex"
+
if( (int) strlen((char *) body) > 6 ){
if( (*(body) == '@')
&& (*(body+1) == 'm')
@@ -2436,6 +2876,8 @@ if( (int) strlen((char *) body) > 6 ){
if( *body ){
if( *key ){
+#line 2430 "./tex4ht-t4ht.tex"
+
p = m_alloc(struct htf_struct, 1);
p->next = (struct htf_struct *) 0;
p->key = m_alloc(char, (int) strlen((char *) key) + 1);
@@ -2456,6 +2898,8 @@ if( debug ){
}
#if 0 /* unreachable */
else if( last_rec ){
+#line 2449 "./tex4ht-t4ht.tex"
+
last_rec->body = (Q_CHAR *) r_alloc((void *) last_rec->body,
(size_t) strlen((char *) last_rec->body)
+ (size_t) strlen((char *) body)
@@ -2476,11 +2920,17 @@ if( debug ){
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2471 "./tex4ht-t4ht.tex"
+
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) {
status = scan_str("Font_Css_Plus ", TRUE, lg_file);
@@ -2490,6 +2940,8 @@ while( eoln_ch != EOF ) {
key = match[1];
*(key + (int) strlen((char *) key) - 1) = '\0';
+#line 2486 "./tex4ht-t4ht.tex"
+
if( (*key != '\0') && (*key != '\n') ) {
struct htf_struct *p;
p = m_alloc(struct htf_struct, 1);
@@ -2508,11 +2960,17 @@ if( (*key != '\0') && (*key != '\n') ) {
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 1124 "./tex4ht-t4ht.tex"
+
{ struct empty_pic_struct *last;
last = empty_pic = (struct empty_pic_struct *) 0;
while( TRUE ) {
@@ -2520,6 +2978,8 @@ if( (*key != '\0') && (*key != '\n') ) {
status = scan_until_str( ".idv[" , 1, status, lg_file);
status = scan_until_end_str("] ---", 1, status, lg_file);
if( status ){
+#line 1141 "./tex4ht-t4ht.tex"
+
if( last == (struct empty_pic_struct *) 0 ){
last = empty_pic = (struct empty_pic_struct *)
m_alloc(struct empty_pic_struct, (int) 1);
@@ -2534,6 +2994,8 @@ last->n = get_long_int(match[1]);
if ( eoln_ch == EOF ){ break; }
}
+#line 1141 "./tex4ht-t4ht.tex"
+
if( last == (struct empty_pic_struct *) 0 ){
last = empty_pic = (struct empty_pic_struct *)
m_alloc(struct empty_pic_struct, (int) 1);
@@ -2551,11 +3013,17 @@ last->n = get_long_int(match[1]);
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 1192 "./tex4ht-t4ht.tex"
+
{ BOOL characters, skip;
characters = skip = FALSE;
while( TRUE ) {
@@ -2565,6 +3033,8 @@ last->n = get_long_int(match[1]);
if( eq_str(match[1],"--- ") ){
if( eq_str(match[2],"needs ---") ){
+#line 1231 "./tex4ht-t4ht.tex"
+
status = scan_until_str(" ", 1, status, lg_file);
status = scan_until_str(".idv", 1, status, lg_file);
status = scan_until_str("[", 2, status, lg_file);
@@ -2574,6 +3044,8 @@ status = scan_until_str(" ", 3, status, lg_file);
status = scan_until_end_str("---", 4, status, lg_file);
if( status ) {
+#line 1353 "./tex4ht-t4ht.tex"
+
struct script_struct
* filtered_dvigif_script = NULL_SCRIPT;
@@ -2585,6 +3057,8 @@ struct script_struct
*(p + (int) strlen((char *) p) - 6) = '\0';
if( characters ){
+#line 1295 "./tex4ht-t4ht.tex"
+
Q_CHAR filename[255];
FILE* file;
(IGNORED) strcpy((char *) filename, "");
@@ -2593,6 +3067,8 @@ if( dir && !bitmaps_no_dm ){ (IGNORED) strct(filename, dir); }
file = fopen(filename, READ_TEXT_FLAGS);
if( !file || noreuse ){
+#line 1332 "./tex4ht-t4ht.tex"
+
filtered_dvigif_script = dvigif_glyp_script?
filterGifScript(dvigif_glyp_script, match[3]):
filterGifScript(dvigif_script, match[3]);
@@ -2602,6 +3078,8 @@ filtered_dvigif_script = dvigif_glyp_script?
if( dir && !bitmaps_no_dm && !system_return ){
(void) execute_script(move_script,match[3],dir,".","");
+#line 1346 "./tex4ht-t4ht.tex"
+
if( ch_mod && !bitmaps_no_dm && !system_return ){
(void) execute_script(chmod_script, ch_mod, dir?dir:"",match[3], "");
}
@@ -2614,6 +3092,8 @@ if( ch_mod && !bitmaps_no_dm && !system_return ){
(IGNORED) fclose(file);
if( newchmod )
{
+#line 1346 "./tex4ht-t4ht.tex"
+
if( ch_mod && !bitmaps_no_dm && !system_return ){
(void) execute_script(chmod_script, ch_mod, dir?dir:"",match[3], "");
}
@@ -2625,11 +3105,17 @@ if( ch_mod && !bitmaps_no_dm && !system_return ){
} else {
+#line 1258 "./tex4ht-t4ht.tex"
+
if( gif_i ==
+#line 1286 "./tex4ht-t4ht.tex"
+
empty_pic->n
) {
+#line 1272 "./tex4ht-t4ht.tex"
+
if( !skip ){
(void) execute_script(empty_fig_script,
(dir && !bitmaps_no_dm )? dir :"", match[3],"","");
@@ -2642,8 +3128,12 @@ empty_pic = empty_pic->next;
} else {
+#line 1265 "./tex4ht-t4ht.tex"
+
if( !nopict && !skip ){
+#line 1319 "./tex4ht-t4ht.tex"
+
filtered_dvigif_script = filterGifScript(dvigif_script, match[3]);
(void) execute_script(
filtered_dvigif_script,match[1],match[2],match[3],job_name);
@@ -2666,15 +3156,21 @@ if( ch_mod && !bitmaps_no_dm && !system_return ){
} else if( eq_str(match[2],"characters ---") ){
+#line 1221 "./tex4ht-t4ht.tex"
+
status = scan_until_end_str("", 1, status, lg_file);
characters = eq_str(match[1],"");
} else {
+#line 1212 "./tex4ht-t4ht.tex"
+
status = scan_until_end_str("", 1, status, lg_file);
}
} else {
+#line 1643 "./tex4ht-t4ht.tex"
+
status = scan_until_end_str(" ignore ---", 2, status, lg_file);
if( status ){
skip = eq_str(match[2]," ignore ---") ? TRUE :
@@ -2688,16 +3184,24 @@ if( status ){
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2534 "./tex4ht-t4ht.tex"
+
{
Q_CHAR css_name[255];
FILE *css_file, *tmp_file;
BOOL css_sty;
+#line 2578 "./tex4ht-t4ht.tex"
+
(IGNORED) strcpy((char *) css_name, (char *) job_name);
(IGNORED) strct(css_name, ".css");
css_file = fopen(css_name, READ_TEXT_FLAGS);
@@ -2709,6 +3213,8 @@ css_file = fopen(css_name, READ_TEXT_FLAGS);
if( !tmp_file ) {
(IGNORED) warn_i_str(5,tmp_name);
} else {
+#line 2568 "./tex4ht-t4ht.tex"
+
int ch;
while( (ch = getc(css_file)) != EOF ) {
(IGNORED) putc( ch, tmp_file );
@@ -2725,11 +3231,15 @@ while( (ch = getc(css_file)) != EOF ) {
(IGNORED) warn_i_str(5,css_name);
} else {
+#line 2590 "./tex4ht-t4ht.tex"
+
css_sty = FALSE;
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) {
status = scan_until_end_str("", 1, TRUE, tmp_file);
+#line 2607 "./tex4ht-t4ht.tex"
+
{ Q_CHAR *p, *q;
int n;
n = 0; p = match[1]; q = match[2];
@@ -2749,13 +3259,21 @@ while( eoln_ch != EOF ) {
if( css_sty ){
+#line 2624 "./tex4ht-t4ht.tex"
+
(IGNORED) fprintf(css_file, "/* start css.sty */\n");
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2797 "./tex4ht-t4ht.tex"
+
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) {
status = scan_str("Font_css_base: ", TRUE, lg_file);
@@ -2771,11 +3289,17 @@ while( eoln_ch != EOF ) {
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2682 "./tex4ht-t4ht.tex"
+
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) {
status = scan_str("Font_Size: ", TRUE, lg_file);
@@ -2786,11 +3310,17 @@ while( eoln_ch != EOF ) {
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2711 "./tex4ht-t4ht.tex"
+
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) {
status = scan_str("Font(\"", TRUE, lg_file);
@@ -2811,6 +3341,8 @@ while( eoln_ch != EOF ) {
p = match[4];
*(p + (int) strlen((char *) p) - 2) = '\0';
+#line 2759 "./tex4ht-t4ht.tex"
+
{ Q_CHAR *p;
second = (int)
( (int) get_long_int(match[3])
@@ -2824,6 +3356,8 @@ while( eoln_ch != EOF ) {
p++;
}
+#line 2779 "./tex4ht-t4ht.tex"
+
if( (int) ( (double) get_long_int(match[2])
/ (int) get_long_int(match[4])
+ 0.5
@@ -2838,11 +3372,15 @@ if( (int) ( (double) get_long_int(match[2])
+#line 2740 "./tex4ht-t4ht.tex"
+
font_sty = htf_rec;
while ( font_sty ) {
if( eq_str(font_sty->key,match[1]) ){
if( *(font_sty->media) == '\0' ){
+#line 2823 "./tex4ht-t4ht.tex"
+
(IGNORED) fprintf(css_file,
(Font_css_base == NULL)? ".%s-%s" : Font_css_base,
match[1], match[2]);
@@ -2864,6 +3402,8 @@ if( font_sty ) {
second = 100;
} else {
+#line 2843 "./tex4ht-t4ht.tex"
+
(IGNORED) fprintf(css_file, "@media %s{", font_sty->media);
(IGNORED) fprintf(css_file,
(Font_css_base == NULL)? ".%s-%s" : Font_css_base,
@@ -2885,6 +3425,8 @@ if( font_sty ) {
font_sty = font_sty->next;
}
if( second != 100 ){
+#line 2823 "./tex4ht-t4ht.tex"
+
(IGNORED) fprintf(css_file,
(Font_css_base == NULL)? ".%s-%s" : Font_css_base,
match[1], match[2]);
@@ -2909,14 +3451,22 @@ if( font_sty ) {
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2867 "./tex4ht-t4ht.tex"
+
{ char *font_class [256];
int last_class;
+#line 2886 "./tex4ht-t4ht.tex"
+
last_class = 0;
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) {
@@ -2929,7 +3479,11 @@ while( eoln_ch != EOF ) {
match[1] = (Q_CHAR *) malloc(7); max_match[1] = 7;
} }
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
@@ -2950,11 +3504,17 @@ while( eoln_ch != EOF ) {
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2663 "./tex4ht-t4ht.tex"
+
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) {
status = scan_str("Css: ", TRUE, lg_file);
@@ -2968,10 +3528,14 @@ while( eoln_ch != EOF ) {
+#line 2645 "./tex4ht-t4ht.tex"
+
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) {
status = scan_until_end_str("", 1, TRUE, tmp_file);
+#line 2607 "./tex4ht-t4ht.tex"
+
{ Q_CHAR *p, *q;
int n;
n = 0; p = match[1]; q = match[2];
@@ -2998,12 +3562,20 @@ while( eoln_ch != EOF ) {
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2082 "./tex4ht-t4ht.tex"
+
if(
+#line 2171 "./tex4ht-t4ht.tex"
+
ext_script
){
@@ -3020,16 +3592,22 @@ ext_script
while( *(--ext) != '.' ){ ; }
*ext = '\0'; ext++;
+#line 2104 "./tex4ht-t4ht.tex"
+
{
struct script_struct *cur, *add, *temp;
Q_CHAR extPlus[256];
cur =
+#line 2171 "./tex4ht-t4ht.tex"
+
ext_script
;
add = cur_script = NULL_SCRIPT;
while( cur ){
+#line 2125 "./tex4ht-t4ht.tex"
+
(IGNORED) strcpy((char *) extPlus, (char *) ext);
/*
if ( envChoice ) {
@@ -3041,6 +3619,8 @@ ext_script
if( strpre(extPlus, cur->command) ){
+#line 2135 "./tex4ht-t4ht.tex"
+
temp = (struct script_struct *)
m_alloc(struct script_struct, (int) 1);
temp->command = m_alloc(char, (int) strlen((char *) cur->command) + 1);
@@ -3061,6 +3641,8 @@ temp->next = NULL_SCRIPT;
(void) execute_script(cur_script,
match[1], Dotfield? Dotfield : "", "", "");
+#line 2144 "./tex4ht-t4ht.tex"
+
while( cur_script != (struct script_struct*) 0 ){
struct script_struct *temp;
temp = cur_script; cur_script = cur_script->next; free((void *) temp);
@@ -3071,12 +3653,20 @@ while( cur_script != (struct script_struct*) 0 ){
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2217 "./tex4ht-t4ht.tex"
+
if(
+#line 2235 "./tex4ht-t4ht.tex"
+
file_script
){
@@ -3097,11 +3687,17 @@ file_script
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 112 "./tex4ht-t4ht.tex"
+
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) {
status = scan_str("File: ", TRUE, lg_file);
@@ -3127,11 +3723,17 @@ while( eoln_ch != EOF ) {
+#line 3759 "./tex4ht-t4ht.tex"
+
(IGNORED) fseek(lg_file, begin_lg_file,
+#line 3763 "./tex4ht-t4ht.tex"
+
0
);
+#line 2245 "./tex4ht-t4ht.tex"
+
eoln_ch = (int) 'x';
while( eoln_ch != EOF ) { Q_CHAR *command, ch;
int n;
@@ -3144,6 +3746,8 @@ while( eoln_ch != EOF ) { Q_CHAR *command, ch;
command = match[2];
*(command + (int) strlen((char *) command) - 5) = '\0';
+#line 2289 "./tex4ht-t4ht.tex"
+
flag = FALSE;
p = system_calls;
while( p ){
@@ -3163,6 +3767,8 @@ while( p ){
if( flag ){
+#line 4162 "./tex4ht-t4ht.tex"
+
(IGNORED) call_sys(command);