From a1165a963f66db22ade48394e8504283d09ae49e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 29 Jun 2018 18:22:30 +0000 Subject: sync with tex4ht for #line and -hA git-svn-id: svn://tug.org/texlive/trunk@48112 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/tex4htk/ChangeLog | 6 + Build/source/texk/tex4htk/t4ht.c | 616 ++++++- Build/source/texk/tex4htk/tex4ht.c | 3393 ++++++++++++++++++++++++++++++++++- 3 files changed, 3971 insertions(+), 44 deletions(-) (limited to 'Build/source') diff --git a/Build/source/texk/tex4htk/ChangeLog b/Build/source/texk/tex4htk/ChangeLog index ea32aafc550..751d7b994ff 100644 --- a/Build/source/texk/tex4htk/ChangeLog +++ b/Build/source/texk/tex4htk/ChangeLog @@ -1,3 +1,9 @@ +2018-06-29 Karl Berry + + * tex4ht.c (r416), + * t4ht (r185).c: sync with tex4ht repository for #line directives + and -hA to trace everything. + 2016-09-21 Karl Berry * tex4ht.c (main): allow any id byte <= 10, for xetex. 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 #endif @@ -114,13 +134,19 @@ #include +#line 427 "./tex4ht-t4ht.tex" + #ifdef HAVE_STRING_H #include #endif +#line 443 "./tex4ht-t4ht.tex" + #ifdef HAVE_DIRENT_H +#line 456 "./tex4ht-t4ht.tex" + #include @@ -129,6 +155,8 @@ #define STRUCT_DIRECT #endif +#line 461 "./tex4ht-t4ht.tex" + #ifdef HAVE_SYS_NDIR_H #include #endif @@ -143,13 +171,21 @@ #endif +#line 3974 "./tex4ht-t4ht.tex" + #include +#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 #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]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; inext = 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_locloc; for(; start_locloc; if( write_on ){ for(; start_locup; 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); diff --git a/Build/source/texk/tex4htk/tex4ht.c b/Build/source/texk/tex4htk/tex4ht.c index 1c977156c1d..80f01cb0a07 100644 --- a/Build/source/texk/tex4htk/tex4ht.c +++ b/Build/source/texk/tex4htk/tex4ht.c @@ -1,7 +1,11 @@ -/* tex4ht.c (2012-07-25-19:36), generated from tex4ht-c.tex - Copyright (C) 2009-2016 TeX Users Group - Copyright (C) 1996-2009 Eitan M. Gurari +#line 231 "./tex4ht-c.tex" + +/* tex4ht.c (2018-06-29-11:18), generated from tex4ht-c.tex + Copyright 2009-2018 TeX Users Group + Copyright 1996-2009 Eitan M. Gurari + +#line 1 "./tex4ht-c.tex" % % This work may be distributed and/or modified under the @@ -21,6 +25,8 @@ % version identification would be appreciated. */ +#line 245 "./tex4ht-c.tex" + /* Compiler options (uncommented | command line), as comments: Classic C (CC) default @@ -43,41 +49,57 @@ (uncommented | command line) * ----------------------------------------------- */ +#line 8842 "./tex4ht-c.tex" + #ifndef LGFNT #define LGFNT "Font(\"%s\",\"%s\",\"%d\",\"%d\")\n" #endif +#line 10839 "./tex4ht-c.tex" + #ifndef LGCLS #define LGCLS "Font_Class(%d,\"%s\"): %s\n" #endif +#line 11063 "./tex4ht-c.tex" + #ifndef LGPIC #define LGPIC "--- needs --- %%1.idv[%%2] ==> %%3 ---\n%" #endif +#line 11100 "./tex4ht-c.tex" + #ifndef LGSEP #define LGSEP "--- characters ---\n" #endif +#line 11128 "./tex4ht-c.tex" + #ifndef LGTYP #define LGTYP ".png" #endif +#line 13168 "./tex4ht-c.tex" + #ifndef ENVFILE #endif +#line 13550 "./tex4ht-c.tex" + #ifndef TFMDIR #endif +#line 13922 "./tex4ht-c.tex" + #ifndef HTFDIR #endif @@ -86,6 +108,8 @@ /* ******************************************** */ +#line 294 "./tex4ht-c.tex" + #ifdef BCC32 #define DOS_WIN32 #define ANSI @@ -95,6 +119,8 @@ +#line 305 "./tex4ht-c.tex" + #ifdef BCC #define DOS_C #define ANSI @@ -107,6 +133,8 @@ +#line 615 "./tex4ht-c.tex" + #ifdef __DJGPP__ #define DOS_WIN #define ANSI @@ -130,12 +158,16 @@ #endif #endif +#line 15683 "./tex4ht-c.tex" + #ifdef DOS_WIN32 #define STRUCT_DIRENT #endif +#line 441 "./tex4ht-c.tex" + #ifdef KPATHSEA #ifdef WIN32 #define KWIN32 @@ -144,6 +176,8 @@ +#line 361 "./tex4ht-c.tex" + #ifdef KPATHSEA #include #endif @@ -151,11 +185,15 @@ #include +#line 375 "./tex4ht-c.tex" + #ifdef HAVE_STRING_H #include #endif +#line 457 "./tex4ht-c.tex" + #ifdef WIN32 #ifdef KPATHSEA #undef CDECL @@ -170,12 +208,18 @@ #endif +#line 1036 "./tex4ht-c.tex" + #include +#line 1120 "./tex4ht-c.tex" + #include +#line 13765 "./tex4ht-c.tex" + #ifndef F_OK #ifdef DOS_WIN32 #define F_OK 0 @@ -196,6 +240,10 @@ #endif +#line 14870 "./tex4ht-c.tex" + + +#line 1231 "./tex4ht-c.tex" #ifdef KPATHSEA #include @@ -217,17 +265,25 @@ +#line 15621 "./tex4ht-c.tex" + #ifdef DOS_WIN32 #include #endif +#line 15672 "./tex4ht-c.tex" + #include +#line 15690 "./tex4ht-c.tex" + #ifdef HAVE_DIRENT_H +#line 15705 "./tex4ht-c.tex" + #include @@ -236,6 +292,8 @@ #define STRUCT_DIRECT #endif +#line 15710 "./tex4ht-c.tex" + #ifdef HAVE_SYS_NDIR_H #include #endif @@ -251,6 +309,8 @@ +#line 10875 "./tex4ht-c.tex" + #ifdef DOS #define HTM #endif @@ -258,6 +318,8 @@ +#line 17265 "./tex4ht-c.tex" + #ifdef DOS #define PROTOTYP #endif @@ -271,17 +333,25 @@ +#line 1308 "./tex4ht-c.tex" + + +#line 369 "./tex4ht-c.tex" #ifndef EXIT_FAILURE #define EXIT_FAILURE 1 #endif +#line 1015 "./tex4ht-c.tex" + #if INT_MAX < 2147483647L #define LONG L #endif +#line 1040 "./tex4ht-c.tex" + #ifdef LONG #define INTEGER long #else @@ -290,17 +360,25 @@ #define U_CHAR char +#line 1396 "./tex4ht-c.tex" + #define m_alloc(typ,n) (typ *) malloc_chk((int) ((n) * sizeof(typ))) +#line 1558 "./tex4ht-c.tex" + #ifndef PATH_MAX #define PATH_MAX 512 #endif +#line 4276 "./tex4ht-c.tex" + #define IGNORED void +#line 4566 "./tex4ht-c.tex" + struct files_rec{ FILE *file, *prev_file; char* name; @@ -308,18 +386,26 @@ struct files_rec{ }; +#line 4667 "./tex4ht-c.tex" + struct sys_call_rec{ char* filter; struct sys_call_rec *next; }; +#line 4848 "./tex4ht-c.tex" + #define HEIGHT 120 +#line 4890 "./tex4ht-c.tex" + #define NULL_MAP (struct map_line_type*) 0 +#line 4950 "./tex4ht-c.tex" + #define XRESOLUTION MARGINSP #ifdef LONG #define YRESOLUTION 786432L @@ -328,24 +414,36 @@ struct sys_call_rec{ #endif +#line 5082 "./tex4ht-c.tex" + #define MAX_MAP_LINE 500 +#line 6036 "./tex4ht-c.tex" + #define idv_int(val) int_to_dvi((long int) val,4) +#line 6291 "./tex4ht-c.tex" + struct halign_rec{ char * str; int refs; }; +#line 8634 "./tex4ht-c.tex" + #define design_size_to_pt(n) ((double)n / (double)(1L<<20)) +#line 8713 "./tex4ht-c.tex" + #define new_font font_tbl[font_tbl_size] +#line 9732 "./tex4ht-c.tex" + #ifdef LONG #define MARGINSP 344061L #else @@ -353,9 +451,13 @@ struct halign_rec{ #endif +#line 10122 "./tex4ht-c.tex" + #define HTF_ALIAS 10000000 +#line 10625 "./tex4ht-c.tex" + #ifndef TRUE #define TRUE 1 #endif @@ -367,25 +469,35 @@ struct halign_rec{ #endif +#line 10867 "./tex4ht-c.tex" + #define GIF_I "-%x%s" #define GIF_II "-%x-%x%s" #define GIF_VII "%s" +#line 10881 "./tex4ht-c.tex" + #ifdef HTM #define DOS_GIF_FILE #endif +#line 11308 "./tex4ht-c.tex" + #define BASE 36 +#line 11328 "./tex4ht-c.tex" + #define store_bit_I(ch,i) ch[(i)/8]|=(1<<((i)%8)); #define store_bit_Z(ch,i) ch[(i)/8]&=~(1<<((i)%8)) #define add_bit(ch,i,b) ch[(i)/8] |= ((b) << ((i)%8)) #define get_bit(ch,i) ((ch[(i)/8] >> ((i)%8)) & 1) +#line 11673 "./tex4ht-c.tex" + #define gif_open span_open #define gif_alt span_name #define gif_class span_size @@ -395,17 +507,23 @@ struct halign_rec{ #define gif_end end_span +#line 13412 "./tex4ht-c.tex" + struct env_c_rec{ char *option; struct env_c_rec *next; }; +#line 13494 "./tex4ht-c.tex" + #ifndef MAXFDIRS #define MAXFDIRS 100 #endif +#line 15566 "./tex4ht-c.tex" + #if defined(__DJGPP__) #define dir_path_slash(str) (is_forward_slash(str)? '/' : '\\') #else @@ -413,6 +531,8 @@ struct env_c_rec{ #endif +#line 15631 "./tex4ht-c.tex" + #ifndef S_ISDIR #define S_ISDIR(M) (((M) & _S_IFMT)==_S_IFDIR) #endif @@ -426,6 +546,8 @@ struct env_c_rec{ #endif +#line 15661 "./tex4ht-c.tex" + #if defined(DOS_WIN32) || !defined(S_ISLNK) #define LSTAT stat #else @@ -434,23 +556,35 @@ struct env_c_rec{ #define STSTAT stat +#line 15881 "./tex4ht-c.tex" + #define MAX_UNI_CODE 20 +#line 16074 "./tex4ht-c.tex" + #define BASE_A 55 #define BASE_a 87 +#line 16735 "./tex4ht-c.tex" + #define get_unt(n) fget_unt(dvi_file,n) +#line 16759 "./tex4ht-c.tex" + #define get_int(n) fget_int(dvi_file,n) +#line 16825 "./tex4ht-c.tex" + #define eq_str(x,y) (!strcmp(x,y)) #define gt_str(x,y) (strcmp(x,y)>0) +#line 17005 "./tex4ht-c.tex" + #define bad_arg err_i(0) #define bad_in_file(name) err_i_str(1,name) #define bad_out_file(name) err_i_str(2,name) @@ -460,6 +594,8 @@ struct env_c_rec{ #define bad_dvi err_i(7) +#line 17229 "./tex4ht-c.tex" + #if defined(DOS_WIN32) || defined(__MSDOS__) #define READ_BIN_FLAGS "rb" #define READ_TEXT_FLAGS "r" @@ -477,6 +613,8 @@ struct env_c_rec{ #endif +#line 17277 "./tex4ht-c.tex" + #ifdef PROTOTYP #define MYVOID void #define ARG_I(x) x @@ -499,10 +637,14 @@ struct env_c_rec{ +#line 4212 "./tex4ht-c.tex" + struct hcode_repl_typ { char *str; struct hcode_repl_typ *next; }; +#line 4736 "./tex4ht-c.tex" + struct count_rec{ char* str; int i, depth, max; @@ -511,33 +653,47 @@ struct count_rec{ }; +#line 4828 "./tex4ht-c.tex" + struct ch_map_rec{ char* line; int max, chars; }; +#line 6667 "./tex4ht-c.tex" + struct stack_entry{ long int x_val, y_val; INTEGER dx_1, dx_2, dy_1, dy_2; BOOL text_on; BOOL +#line 12462 "./tex4ht-c.tex" + accented ; +#line 6346 "./tex4ht-c.tex" + struct halign_rec *halign[8]; BOOL halign_on, halign_info, row_no, col_no; +#line 6695 "./tex4ht-c.tex" + int stack_id; struct group_info * begin; struct stack_end_entry * end; +#line 7787 "./tex4ht-c.tex" + struct group_path * path_start, * path_end; +#line 12870 "./tex4ht-c.tex" + char *class_open, *class_close, *temp_class_open, *temp_class_close; BOOL temp_class_del, ignore_subclass_del, active_class_del, @@ -547,6 +703,8 @@ BOOL temp_class_del, ignore_subclass_del, active_class_del, }; +#line 6702 "./tex4ht-c.tex" + struct group_info{ int stack_id; U_CHAR *info; @@ -554,12 +712,16 @@ struct group_info{ }; +#line 6760 "./tex4ht-c.tex" + struct stack_end_entry{ struct stack_end_entry *next; U_CHAR *send; }; +#line 7442 "./tex4ht-c.tex" + struct del_stack_entry{ struct del_stack_entry *next; U_CHAR ch; @@ -567,6 +729,8 @@ struct del_stack_entry{ }; +#line 7528 "./tex4ht-c.tex" + struct send_back_entry{ struct send_back_entry *next; U_CHAR *send; @@ -574,6 +738,8 @@ struct send_back_entry{ }; +#line 7792 "./tex4ht-c.tex" + struct group_path{ U_CHAR action; U_CHAR *path; @@ -582,19 +748,27 @@ struct group_path{ }; +#line 8618 "./tex4ht-c.tex" + struct font_entry { INTEGER num; INTEGER scale; INTEGER design_sz; +#line 8770 "./tex4ht-c.tex" + INTEGER mag; +#line 8774 "./tex4ht-c.tex" + char *family_name, *font_size; +#line 9444 "./tex4ht-c.tex" + INTEGER design_pt; int char_f, char_l; U_CHAR *char_wi; @@ -611,19 +785,27 @@ char *family_name, *font_size; +#line 9952 "./tex4ht-c.tex" + char *name, *gif_on, *ch_str, ch255; unsigned U_CHAR **str, *ch, *gif1; +#line 12071 "./tex4ht-c.tex" + unsigned U_CHAR *accent, *accented; unsigned int *accent_array, *accented_array, accent_N, accented_N; +#line 12762 "./tex4ht-c.tex" + char *math, *math_closing; +#line 8939 "./tex4ht-c.tex" + INTEGER layout_dir; unsigned long rgba_color; @@ -631,10 +813,14 @@ unsigned long rgba_color; }; +#line 10272 "./tex4ht-c.tex" + struct html_font_rec{ char* name; int i; }; +#line 11220 "./tex4ht-c.tex" + struct gif_file_rec{ U_CHAR code[4]; @@ -643,18 +829,26 @@ struct gif_file_rec{ +#line 11861 "./tex4ht-c.tex" + struct css_ext_rec{ char* name; struct css_ext_rec *next; }; +#line 11971 "./tex4ht-c.tex" + struct visited_file_rec{ char *name; struct visited_file_rec *next; }; +#line 13653 "./tex4ht-c.tex" + struct env_var_rec{ char* base; struct env_var_rec *next; }; +#line 13731 "./tex4ht-c.tex" + struct cache_font_rec{ char* dir; struct cache_file_rec * cache_file; struct cache_font_rec* next; }; @@ -662,24 +856,34 @@ struct cache_file_rec{ struct cache_file_rec* next; U_CHAR * file; }; +#line 13852 "./tex4ht-c.tex" + struct htf_com_rec{ char* name; struct htf_com_rec* next; }; +#line 16040 "./tex4ht-c.tex" + struct charset_rec{ int ch; char* str; }; +#line 16452 "./tex4ht-c.tex" + struct htf_4hf_rec { int ch, type1, type2; char* str; }; +#line 528 "./tex4ht-c.tex" + #ifdef WIN32 static U_CHAR dirname[PATH_MAX]; #endif +#line 625 "./tex4ht-c.tex" + static BOOL dos_file_names = #ifdef DOS_GIF_FILE TRUE @@ -689,36 +893,56 @@ static BOOL dos_file_names = ; +#line 1381 "./tex4ht-c.tex" + static FILE* dot_file; +#line 1572 "./tex4ht-c.tex" + static FILE* dvi_file; +#line 1629 "./tex4ht-c.tex" + static U_CHAR *ext = NULL; +#line 1670 "./tex4ht-c.tex" + static char* job_name; static int job_name_n; +#line 1779 "./tex4ht-c.tex" + static U_CHAR *no_root_file; +#line 1840 "./tex4ht-c.tex" + static FILE *out_file = (FILE *) 0, *root_file = (FILE *) 0, *cur_o_file = (FILE *) 0; +#line 2166 "./tex4ht-c.tex" + static int version_id; +#line 2213 "./tex4ht-c.tex" + static int stack_len; +#line 2581 "./tex4ht-c.tex" + static BOOL start_span = FALSE, in_span_ch = FALSE; +#line 2726 "./tex4ht-c.tex" + static BOOL in_trace_char = FALSE, block_start = FALSE; static int trace_dvi_P = 0, trace_dvi_C = 0, trace_dvi_H = 0, trace_dvi_R = 0, trace_dvi_V = 0; @@ -735,126 +959,200 @@ static U_CHAR *trace_dvi_del_P, *end_trace_dvi_del_P, static int push_depth=0, push_id=0, push_st[256]; +#line 2959 "./tex4ht-c.tex" + static long int x_val = 0, max_x_val = -10000, max_y_val = 0, prev_y_val = 0; +#line 3071 "./tex4ht-c.tex" + static INTEGER dx_1 = 0, dx_2 = 0; +#line 3172 "./tex4ht-c.tex" + static INTEGER dy_1 = 0, dy_2 = 0; static long int y_val = 0; +#line 3415 "./tex4ht-c.tex" + static U_CHAR *eoln_str = (char *)0; +#line 3436 "./tex4ht-c.tex" + static U_CHAR *space_str = (char *)0; +#line 3447 "./tex4ht-c.tex" + static int ignore_chs=0, ignore_spaces=0, recover_spaces=0; +#line 3600 "./tex4ht-c.tex" + static BOOL text_on = FALSE; +#line 3673 "./tex4ht-c.tex" + static U_CHAR rule_ch = '_'; static BOOL +#line 3739 "./tex4ht-c.tex" + rule_ch_off = FALSE; +#line 3819 "./tex4ht-c.tex" + static int cur_fnt = -1; +#line 3937 "./tex4ht-c.tex" + static U_CHAR special_hd[10]; +#line 4218 "./tex4ht-c.tex" + static struct hcode_repl_typ *hcode_repl = (struct hcode_repl_typ*) 0; +#line 4270 "./tex4ht-c.tex" + static BOOL nomargin = FALSE; static int next_char = -1; static U_CHAR *next_str = (char *) 0; +#line 4357 "./tex4ht-c.tex" + static BOOL keepChar = FALSE; +#line 4561 "./tex4ht-c.tex" + static struct files_rec *opened_files = (struct files_rec *) 0, *p; +#line 4675 "./tex4ht-c.tex" + static BOOL system_yes; static struct sys_call_rec *system_calls = (struct sys_call_rec *) 0; +#line 4745 "./tex4ht-c.tex" + static struct count_rec *counter = (struct count_rec *) 0; +#line 4836 "./tex4ht-c.tex" + static struct ch_map_rec ch_map[HEIGHT]; static int max_map_line, min_map_line; +#line 4882 "./tex4ht-c.tex" + static BOOL ch_map_flag = FALSE; +#line 4937 "./tex4ht-c.tex" + static INTEGER xresolution, yresolution; +#line 5037 "./tex4ht-c.tex" + static U_CHAR ok_map = TRUE; +#line 5076 "./tex4ht-c.tex" + static int prevcol = -1, prevrow; static double prev_x; +#line 5383 "./tex4ht-c.tex" + static BOOL dvi_flag = FALSE, dvi_page = FALSE; static FILE *idv_file; +#line 5424 "./tex4ht-c.tex" + static int errCode = 0; +#line 5483 "./tex4ht-c.tex" + static int id_version = -1; +#line 5962 "./tex4ht-c.tex" + static FILE* log_file; +#line 5971 "./tex4ht-c.tex" + static INTEGER mid_page_y, mid_page_x; +#line 6104 "./tex4ht-c.tex" + static int page_n, file_n; +#line 6287 "./tex4ht-c.tex" + static struct halign_rec *halign[8]; +#line 6372 "./tex4ht-c.tex" + static BOOL new_halign = FALSE; +#line 6598 "./tex4ht-c.tex" + static BOOL group_dvi = FALSE; +#line 6662 "./tex4ht-c.tex" + static int stack_n = 0; static struct stack_entry* stack; +#line 6796 "./tex4ht-c.tex" + static int ignore_end_group; +#line 7433 "./tex4ht-c.tex" + static struct del_stack_entry *del_stack; +#line 7458 "./tex4ht-c.tex" + static int ch_id, sv_id, id_latex, back_id_off; +#line 7537 "./tex4ht-c.tex" + static struct send_back_entry *back_token, *back_group; +#line 8440 "./tex4ht-c.tex" + static BOOL pos_dvi = FALSE; static U_CHAR *pos_body, * pos_text, * pos_line, *end_pos_body, * end_pos_text; @@ -864,76 +1162,116 @@ static long int base_pos_x, base_pos_y, min_pos_x, static short rect_pos; +#line 8638 "./tex4ht-c.tex" + static struct font_entry* font_tbl; static int font_tbl_size = 0; +#line 8707 "./tex4ht-c.tex" + static char* new_font_name; +#line 8849 "./tex4ht-c.tex" + static U_CHAR *lg_font_fmt = NULL; +#line 9740 "./tex4ht-c.tex" + static double word_sp = 999999.0, margin_sp; +#line 9974 "./tex4ht-c.tex" + static int ignore_ch = 0; +#line 10018 "./tex4ht-c.tex" + static unsigned U_CHAR null_str = '\0'; +#line 10484 "./tex4ht-c.tex" + static short dump_htf_files = 0; static BOOL dump_env_files = FALSE; +#line 10534 "./tex4ht-c.tex" + static BOOL dumped_env = FALSE; +#line 10691 "./tex4ht-c.tex" + static BOOL verb_ch = FALSE; +#line 10846 "./tex4ht-c.tex" + static U_CHAR *class_fmt = NULL; +#line 11070 "./tex4ht-c.tex" + static U_CHAR *font_gif = NULL; +#line 11107 "./tex4ht-c.tex" + static U_CHAR *begin_char_gif = NULL; +#line 11135 "./tex4ht-c.tex" + static U_CHAR *gif = NULL; +#line 11233 "./tex4ht-c.tex" + static struct gif_file_rec * gif_file = (struct gif_file_rec *) 0; +#line 11312 "./tex4ht-c.tex" + static U_CHAR xeh[]="0123456789abcdefghijklmnopqrstuvxyz"; +#line 11384 "./tex4ht-c.tex" + static BOOL gif_ch = TRUE; static int design_ch = 0; +#line 11434 "./tex4ht-c.tex" + static int pause_style = 0, default_font = -1, base_font_size=6533; static BOOL span_name_on = FALSE, span_on = FALSE; +#line 11636 "./tex4ht-c.tex" + static BOOL not_notify = FALSE; +#line 11652 "./tex4ht-c.tex" + static U_CHAR * span_name[256], * span_open[256], * span_size[256], * span_mag[256], * span_ch[256], * end_span[256], * span_ord[256], * gif_id[256]; static U_CHAR class_on[32]; +#line 12332 "./tex4ht-c.tex" + static BOOL needs_accent_sym = FALSE, needs_end_accent = FALSE; static char * t_accent_template = (char *) 0, * t_accent_first, * t_accent_second, @@ -943,96 +1281,146 @@ static char * t_accent_template = (char *) 0, * m_accent_third, * m_accent_fourth, * m_accent_fifth; +#line 12433 "./tex4ht-c.tex" + static BOOL needs_accented_sym = 0; static char * a_accent_template = (char *) 0, * a_accent_first, * a_accent_second, * a_accent_third, * a_accent_fourth, * a_accent_fifth; +#line 12449 "./tex4ht-c.tex" + static char * i_accent_template = (char *) 0, * i_accent_first, * i_accent_second, * i_accent_third, * i_accent_fourth, * i_accent_fifth; +#line 12551 "./tex4ht-c.tex" + static BOOL math_class_on = FALSE, show_class = FALSE; static int open_del = 256, math_class, pause_class, ignore_subclass_del; +#line 12559 "./tex4ht-c.tex" + static int sv_group_dvi, sv_trace_dvi_C, sv_in_trace_char, sv_span_on, sv_in_span_ch; +#line 12705 "./tex4ht-c.tex" + static U_CHAR *open_class[ +#line 12741 "./tex4ht-c.tex" + 82 ], *close_class[ +#line 12741 "./tex4ht-c.tex" + 82 ]; +#line 13056 "./tex4ht-c.tex" + static BOOL dump_env_search = FALSE; +#line 13419 "./tex4ht-c.tex" + static struct env_c_rec *envChoice = (struct env_c_rec*) 0; +#line 13487 "./tex4ht-c.tex" + static U_CHAR *fontdir[MAXFDIRS]; static int fontdir_count = 0; +#line 13722 "./tex4ht-c.tex" + static struct cache_font_rec *cache_font, *cur_cache_font; +#line 14138 "./tex4ht-c.tex" + #ifndef KPATHSEA static BOOL tex4ht_fls = FALSE; static char *tex4ht_fls_name = (char *) 0; #endif +#line 14201 "./tex4ht-c.tex" + static U_CHAR *HOME_DIR; +#line 14330 "./tex4ht-c.tex" + #ifndef KPATHSEA static FILE* cache_files; #endif +#line 14654 "./tex4ht-c.tex" + #ifdef KPATHSEA static char * export_str_chars = (char *) 0; #endif +#line 15060 "./tex4ht-c.tex" + static BOOL dump_htf_search = FALSE; +#line 15874 "./tex4ht-c.tex" + static FILE* put_4ht_file = (FILE *) 0; static int put_4ht_off = 1; static char uni_code[MAX_UNI_CODE]; static short uni_code_p = 0; +#line 16045 "./tex4ht-c.tex" + static int charset_n = 0, max_charset_n; static struct charset_rec *charset; +#line 16213 "./tex4ht-c.tex" + static BOOL u10 = FALSE; +#line 16356 "./tex4ht-c.tex" + static BOOL utf8 = FALSE; +#line 16457 "./tex4ht-c.tex" + static int htf_4hf_n = 0, max_htf_4hf_n; static struct htf_4hf_rec *htf_4hf; +#line 16631 "./tex4ht-c.tex" + static BOOL special_on = FALSE; +#line 16899 "./tex4ht-c.tex" + static const U_CHAR *warn_err_mssg[]={ +#line 16840 "./tex4ht-c.tex" + + +#line 1530 "./tex4ht-c.tex" "improper command line\ntex4ht [-f]in-file[.dvi]\n" " [-.] replacement to default file extension name .dvi\n" @@ -1041,8 +1429,8 @@ static const U_CHAR *warn_err_mssg[]={ " [-f] remove path from the file name\n" " [-F] replacement for missing font characters; 0--255; default 0\n" " [-g]\n" -" [-h(e|f|F|g|s|v|V)] trace: e-errors/warnings, f-htf, F-htf search\n" -" g-groups, s-specials, v-env, V-env search\n" +" [-h[efFgsvVA]] trace: e-errors/warnings, f-htf, F-htf search\n" +" g-groups, s-specials, v-env, V-env search, A-all\n" " [-i]\n" " [-l]\n" " [-P(*|)] permission for system calls: *-always, filter\n" @@ -1085,6 +1473,8 @@ static const U_CHAR *warn_err_mssg[]={ "Char code >255 in htf file: %d\n", "Improper char for code in htf file: %c\n", +#line 1220 "./tex4ht-c.tex" + "Illegal storage address\n", "Floating-point\n", "Interrupt with Cntr-C\n", @@ -1119,23 +1509,35 @@ static const U_CHAR *warn_err_mssg[]={ "" }; +#line 17130 "./tex4ht-c.tex" + static BOOL err_context = FALSE; +#line 17147 "./tex4ht-c.tex" + static U_CHAR *err_mark = (char *) 0; +#line 17167 "./tex4ht-c.tex" + static BOOL trace_special = FALSE; +#line 482 "./tex4ht-c.tex" + #ifdef WIN32 static BOOL sigint_handler(ARG_I(DWORD)); #endif +#line 1124 "./tex4ht-c.tex" + static void +#line 507 "./tex4ht-c.tex" + #ifdef CDECL CDECL #endif @@ -1144,258 +1546,420 @@ CDECL sig_err(ARG_I(int)); +#line 1402 "./tex4ht-c.tex" + static void* malloc_chk(ARG_I(int)); +#line 1418 "./tex4ht-c.tex" + static void* r_alloc(ARG_II(void *, size_t)); +#line 1681 "./tex4ht-c.tex" + static void strct( ARG_II(char *, const U_CHAR *) ); +#line 1720 "./tex4ht-c.tex" + static void open_o_file( ARG_I(void) ); +#line 1820 "./tex4ht-c.tex" + static FILE* open_html_file( ARG_I(char*) ); +#line 2798 "./tex4ht-c.tex" + static void set_del( ARG_II(char **, U_CHAR **) ); +#line 2989 "./tex4ht-c.tex" + static void try_new_line( ARG_I(void) ); +#line 3078 "./tex4ht-c.tex" + static INTEGER move_x( ARG_I(register INTEGER) ); +#line 3177 "./tex4ht-c.tex" + static INTEGER move_y( ARG_I(register INTEGER) ); +#line 3647 "./tex4ht-c.tex" + static void rule_x( ARG_I(BOOL) ); +#line 3877 "./tex4ht-c.tex" + static BOOL tex4ht_special( ARG_II( int*, long int*) ); +#line 4960 "./tex4ht-c.tex" + static void init_ch_map( ARG_I(void) ); +#line 4997 "./tex4ht-c.tex" + static void insert_ch_map( ARG_II(char,BOOL) ); +#line 5287 "./tex4ht-c.tex" + static void dump_ch_map( ARG_I(void) ); +#line 5781 "./tex4ht-c.tex" + static void set_loc( ARG_II(int, long int) ); +#line 6000 "./tex4ht-c.tex" + static void idv_char( ARG_I(int) ); +#line 6013 "./tex4ht-c.tex" + static void cond_idv_char( ARG_I(int) ); +#line 6028 "./tex4ht-c.tex" + static void idv_copy( ARG_I(void) ); +#line 6043 "./tex4ht-c.tex" + static void cond_idv_int( ARG_II(long int, int) ); +#line 6057 "./tex4ht-c.tex" + static void int_to_dvi( ARG_II(long int, int) ); +#line 6079 "./tex4ht-c.tex" + static void cond_string( ARG_II(int, int) ); +#line 6109 "./tex4ht-c.tex" + static INTEGER advance_idv_page( ARG_II( INTEGER,char*) ); +#line 6152 "./tex4ht-c.tex" + static void store_mv( ARG_II( int, INTEGER) ); +#line 7235 "./tex4ht-c.tex" + static void push_stack( ARG_I(void) ); +#line 7282 "./tex4ht-c.tex" + static void pop_stack( ARG_I(void) ); +#line 7383 "./tex4ht-c.tex" + static struct del_stack_entry* push_del( ARG_II(char, int) ); +#line 7404 "./tex4ht-c.tex" + static struct del_stack_entry* pop_del( ARG_III(char,int,int) ); +#line 7616 "./tex4ht-c.tex" + static struct send_back_entry * rev_list( ARG_I(struct send_back_entry *) ); +#line 7670 "./tex4ht-c.tex" + static struct send_back_entry * back_insert( ARG_II(struct send_back_entry *, int) ); +#line 8544 "./tex4ht-c.tex" + static double pos_dbl( ARG_I(long int *) ); +#line 9264 "./tex4ht-c.tex" + static void doGlyphArray( ARG_I(BOOL) ); +#line 9312 "./tex4ht-c.tex" + static int search_font_tbl( ARG_I(int) ); +#line 10413 "./tex4ht-c.tex" + static int get_html_ch( ARG_I(FILE*) ); +#line 10434 "./tex4ht-c.tex" + static FILE* f_open( ARG_II(const char*,const char*) ); +#line 10458 "./tex4ht-c.tex" + static void dump_htf( ARG_I(FILE*) ); +#line 10510 "./tex4ht-c.tex" + static void dump_env( ARG_I(void) ); +#line 10543 "./tex4ht-c.tex" + static void htf_to_lg( ARG_IV(struct html_font_rec*,char*,int,FILE*)); +#line 10593 "./tex4ht-c.tex" + static INTEGER get_html_file_id( ARG_IV(FILE*, int, int, int) ); +#line 10727 "./tex4ht-c.tex" + static void notify_class_info( ARG_I(int) ); +#line 10951 "./tex4ht-c.tex" + static void script( ARG_IV(char *, U_CHAR *, int, U_CHAR *) ); +#line 11173 "./tex4ht-c.tex" + static void dos_gif_file( ARG_III(char *, int, int) ); +#line 11342 "./tex4ht-c.tex" + static void put_alt_ch( ARG_II( int, BOOL) ); +#line 12345 "./tex4ht-c.tex" + static void get_open_accent( ARG_VII(char**, char**, char**, char**, char**, char**, long int*)); +#line 12587 "./tex4ht-c.tex" + static int scan_class( ARG_I(int) ); +#line 12627 "./tex4ht-c.tex" + static INTEGER set_ch_class( ARG_I(int) ); +#line 12682 "./tex4ht-c.tex" + static int math_class_of( ARG_II(int,int) ); +#line 13288 "./tex4ht-c.tex" + static char* get_script( ARG_III(char *, const U_CHAR *, int) ); +#line 13338 "./tex4ht-c.tex" + static BOOL search_dot_file( ARG_I( int) ); +#line 13578 "./tex4ht-c.tex" + static struct env_var_rec * get_env_var( ARG_I(const char *) ); +#line 13881 "./tex4ht-c.tex" + static void com_dir( ARG_I(char*) ); +#line 14572 "./tex4ht-c.tex" + #ifdef KPATHSEA static void export_htf( ARG_II(char**, char[]) ); #endif +#line 15302 "./tex4ht-c.tex" + static FILE* search_in_dot_file( ARG_IV( int, const U_CHAR *, const U_CHAR *, struct env_var_rec *) ); +#line 15347 "./tex4ht-c.tex" + static FILE* search_file_base( ARG_IV( const U_CHAR *, const U_CHAR *, const U_CHAR *, struct env_var_rec *) ); +#line 15379 "./tex4ht-c.tex" + static char * abs_addr( ARG_II( const U_CHAR *, const U_CHAR *) ); +#line 15420 "./tex4ht-c.tex" + static FILE* search_file( ARG_III(const char *, const U_CHAR *, const U_CHAR *) ); +#line 15480 "./tex4ht-c.tex" + static void add_to_cache( ARG_III(const char*,const char*,int) ); +#line 15501 "./tex4ht-c.tex" + static FILE* search_file_ext( ARG_III(const char *, const U_CHAR *, const U_CHAR *) ); +#line 15576 "./tex4ht-c.tex" + #if defined(__DJGPP__) static BOOL is_forward_slash( ARG_I(const char*) ); #endif +#line 15800 "./tex4ht-c.tex" + static FILE* f_open_pathed_filename( ARG_II(const char*,const char*) ); +#line 15834 "./tex4ht-c.tex" + static INTEGER put_4ht_ch( ARG_II(int,FILE *) ); +#line 15908 "./tex4ht-c.tex" + static void flush_uni( ARG_I(void) ); +#line 16571 "./tex4ht-c.tex" + static INTEGER insert_ch( ARG_I(int) ); +#line 16609 "./tex4ht-c.tex" + static void put_char( ARG_I(int) ); +#line 16642 "./tex4ht-c.tex" + static void print_f( ARG_I(const char*) ); +#line 16662 "./tex4ht-c.tex" + static void print_f_4ht( ARG_I(const char*) ); +#line 16687 "./tex4ht-c.tex" + static int get_char( ARG_I(void) ); +#line 16699 "./tex4ht-c.tex" + static int get_noop( ARG_I(void) ); +#line 16715 "./tex4ht-c.tex" + static char* get_str( ARG_I(int) ); +#line 16739 "./tex4ht-c.tex" + static long fget_unt( ARG_II(FILE*, int) ); +#line 16763 "./tex4ht-c.tex" + static long fget_int( ARG_II(FILE *, int) ); +#line 16799 "./tex4ht-c.tex" + static long cond_int( ARG_I(register INTEGER) ); +#line 16906 "./tex4ht-c.tex" + static void warn_i( ARG_I(int) ); +#line 16930 "./tex4ht-c.tex" + static void warn_i_int( ARG_II(int,int) ); +#line 16946 "./tex4ht-c.tex" + static void warn_i_int_2( ARG_III(int,int,int) ); +#line 16962 "./tex4ht-c.tex" + static void warn_i_str( ARG_II(int,const char *) ); +#line 16982 "./tex4ht-c.tex" + static void warn_i_str2( ARG_III(int,const char *,const char *) ); +#line 17016 "./tex4ht-c.tex" + static void err_i( ARG_I(int) ); +#line 17033 "./tex4ht-c.tex" + static void err_i_int( ARG_II(int,int) ); +#line 17049 "./tex4ht-c.tex" + static void err_i_str( ARG_II(int,char *) ); +#line 17096 "./tex4ht-c.tex" + static void show_err_context( ARG_I(void) ); +#line 488 "./tex4ht-c.tex" + #ifdef WIN32 @@ -1414,6 +1978,8 @@ static BOOL sigint_handler #endif { +#line 502 "./tex4ht-c.tex" + if( dwCtrlType ){ (IGNORED) printf(" "); } @@ -1423,9 +1989,13 @@ if( dwCtrlType ){ (IGNORED) printf(" "); } #endif +#line 1133 "./tex4ht-c.tex" + static void +#line 507 "./tex4ht-c.tex" + #ifdef CDECL CDECL #endif @@ -1455,6 +2025,8 @@ sig_err #endif } +#line 750 "./tex4ht-c.tex" + #ifdef __DJGPP__ if (s != SIGINT && s != SIGQUIT) exit(EXIT_FAILURE); @@ -1464,6 +2036,8 @@ sig_err } +#line 1406 "./tex4ht-c.tex" + static void* malloc_chk #ifdef ANSI @@ -1483,6 +2057,8 @@ static void* malloc_chk } +#line 1422 "./tex4ht-c.tex" + static void* r_alloc #ifdef ANSI @@ -1506,6 +2082,8 @@ static void* r_alloc } +#line 1685 "./tex4ht-c.tex" + static void strct #ifdef ANSI @@ -1531,9 +2109,13 @@ static void strct } +#line 1724 "./tex4ht-c.tex" + static void open_o_file(MYVOID) { +#line 1735 "./tex4ht-c.tex" + struct files_rec* p; p = m_alloc(struct files_rec, 1); if( opened_files != (struct files_rec*) 0 ) opened_files->prev = p; @@ -1548,6 +2130,8 @@ p->file = } +#line 1824 "./tex4ht-c.tex" + static FILE* open_html_file #ifdef ANSI @@ -1575,6 +2159,8 @@ static FILE* open_html_file } +#line 2802 "./tex4ht-c.tex" + static void set_del #ifdef ANSI @@ -1598,17 +2184,25 @@ static void set_del } +#line 2993 "./tex4ht-c.tex" + static void try_new_line(MYVOID) { long int v; double dy; dy = (cur_fnt == -1)? 0.0 : ( +#line 3016 "./tex4ht-c.tex" + ( +#line 9903 "./tex4ht-c.tex" + design_size_to_pt( 1.7 * (double) font_tbl[cur_fnt].ex ) * (double) font_tbl[cur_fnt].scale < 0? -1 : 1) * +#line 9903 "./tex4ht-c.tex" + design_size_to_pt( 1.7 * (double) font_tbl[cur_fnt].ex ) * (double) font_tbl[cur_fnt].scale @@ -1617,14 +2211,22 @@ design_size_to_pt( 1.7 * (double) font_tbl[cur_fnt].ex ) if( !text_on && (y_val > max_y_val) ){ if( v > dy/2.5 ){ +#line 1748 "./tex4ht-c.tex" + if( !no_root_file ){ +#line 12279 "./tex4ht-c.tex" + if( needs_end_accent && t_accent_template ){ +#line 2609 "./tex4ht-c.tex" + if( span_on && in_span_ch ){ if( *end_span[0] ){ in_span_ch = FALSE; +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -1634,6 +2236,8 @@ if( no_root_file ){ open_o_file(); } (IGNORED) fprintf(cur_o_file, "%s", t_accent_fifth); needs_end_accent = FALSE; +#line 12422 "./tex4ht-c.tex" + needs_accented_sym--; @@ -1641,6 +2245,8 @@ needs_accented_sym--; if( ! +#line 3739 "./tex4ht-c.tex" + rule_ch_off ){ put_char('\n'); } @@ -1651,14 +2257,22 @@ rule_ch_off } }else{ if( v > dy ){ +#line 1748 "./tex4ht-c.tex" + if( !no_root_file ){ +#line 12279 "./tex4ht-c.tex" + if( needs_end_accent && t_accent_template ){ +#line 2609 "./tex4ht-c.tex" + if( span_on && in_span_ch ){ if( *end_span[0] ){ in_span_ch = FALSE; +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -1668,6 +2282,8 @@ if( no_root_file ){ open_o_file(); } (IGNORED) fprintf(cur_o_file, "%s", t_accent_fifth); needs_end_accent = FALSE; +#line 12422 "./tex4ht-c.tex" + needs_accented_sym--; @@ -1675,6 +2291,8 @@ needs_accented_sym--; if( ! +#line 3739 "./tex4ht-c.tex" + rule_ch_off ){ put_char('\n'); } @@ -1686,6 +2304,8 @@ rule_ch_off } } +#line 3082 "./tex4ht-c.tex" + static INTEGER move_x #ifdef ANSI @@ -1706,10 +2326,14 @@ static INTEGER move_x if( (x_val > max_x_val) && x_val ){ if( max_x_val == -10000) max_x_val = x_val - d; +#line 3237 "./tex4ht-c.tex" + i = (INTEGER) ( (double) (dx = x_val - max_x_val) / (text_on? word_sp : margin_sp) + 0.5 ); +#line 3252 "./tex4ht-c.tex" + if( i==0 ){ i = (INTEGER) ( (double) dx / word_sp @@ -1719,6 +2343,8 @@ if( i==0 ){ if( i<0 ) i=0; if( i==0 ){ +#line 3457 "./tex4ht-c.tex" + long curr_pos; BOOL done; int ch, cr_fnt; @@ -1730,16 +2356,26 @@ while( !done ){ +#line 3764 "./tex4ht-c.tex" + case +#line 17458 "./tex4ht-c.tex" + 246 : (void) get_char(); case +#line 17455 "./tex4ht-c.tex" + 245 : (void) get_char(); case +#line 17452 "./tex4ht-c.tex" + 244 : (void) get_char(); case +#line 17449 "./tex4ht-c.tex" + 243 : { for( i=0; i<14; i++ ){ ch = get_char(); } @@ -1749,22 +2385,34 @@ case case +#line 17324 "./tex4ht-c.tex" + 141 : case +#line 17327 "./tex4ht-c.tex" + 142 : { break; } default: { if( (ch < +#line 17415 "./tex4ht-c.tex" + 171 ) || (ch > +#line 17421 "./tex4ht-c.tex" + 234 ) ){ done = TRUE; } else { +#line 3482 "./tex4ht-c.tex" + double word_sp; cr_fnt = ch - +#line 17415 "./tex4ht-c.tex" + 171 ; cr_fnt = search_font_tbl( cr_fnt ); @@ -1774,6 +2422,8 @@ i = (INTEGER) ( (double) dx / (text_on? word_sp : margin_sp) + 0.5 ); +#line 3252 "./tex4ht-c.tex" + if( i==0 ){ i = (INTEGER) ( (double) dx / word_sp @@ -1786,11 +2436,15 @@ if( i>0 ){ i =1; } } } } } (IGNORED) fseek(dvi_file, curr_pos, +#line 2174 "./tex4ht-c.tex" + 0 ); } if( i ){ +#line 2822 "./tex4ht-c.tex" + if( trace_dvi_H && !ch_map_flag ){ if( *trace_dvi_del_H != '\0' ){ (IGNORED) fprintf(cur_o_file, "%s%d", trace_dvi_del_H, (int) dx); @@ -1801,12 +2455,18 @@ if( trace_dvi_H && !ch_map_flag ){ } if( !ignore_spaces ){ +#line 12279 "./tex4ht-c.tex" + if( needs_end_accent && t_accent_template ){ +#line 2609 "./tex4ht-c.tex" + if( span_on && in_span_ch ){ if( *end_span[0] ){ in_span_ch = FALSE; +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -1816,6 +2476,8 @@ if( no_root_file ){ open_o_file(); } (IGNORED) fprintf(cur_o_file, "%s", t_accent_fifth); needs_end_accent = FALSE; +#line 12422 "./tex4ht-c.tex" + needs_accented_sym--; @@ -1829,6 +2491,8 @@ max_x_val = x_val; } else if( d && text_on && (x_val != max_x_val) ){ +#line 3128 "./tex4ht-c.tex" + if( !ignore_spaces ){ i = (INTEGER) ( (double) (dx = d) / word_sp + 0.5 ); if( i<0 ) i=0; @@ -1842,6 +2506,8 @@ if( !ignore_spaces ){ } +#line 3181 "./tex4ht-c.tex" + static INTEGER move_y #ifdef ANSI @@ -1857,6 +2523,8 @@ static INTEGER move_y #endif { y_val += d; +#line 2831 "./tex4ht-c.tex" + if( trace_dvi_V && !ch_map_flag ){ if( *trace_dvi_del_V != '\0' ){ (IGNORED) fprintf(cur_o_file, "%s%d", trace_dvi_del_V, d); @@ -1869,6 +2537,8 @@ if( trace_dvi_V && !ch_map_flag ){ } +#line 3652 "./tex4ht-c.tex" + static void rule_x #ifdef ANSI @@ -1888,6 +2558,8 @@ static void rule_x up = (INTEGER) get_int(4); right = (INTEGER) get_int(4); if( ch_map_flag ){ +#line 5244 "./tex4ht-c.tex" + long int sv_x_val, sv_y_val, sv_right, sv; int ch; sv_x_val = x_val; @@ -1898,10 +2570,16 @@ if( right < 0 ){ x_val += right; right = -right; } if( up < 0 ){ y_val += up; up = -up; } ch = ( (right > xresolution) && (up > yresolution) ) ? +#line 4859 "./tex4ht-c.tex" + 3 : ( ( right > up )? +#line 4853 "./tex4ht-c.tex" + 1 : +#line 4856 "./tex4ht-c.tex" + 2 ); right += x_val; @@ -1913,17 +2591,23 @@ x_val = sv_x_val; y_val = sv_y_val; if( sv_x_val + sv_right > max_x_val ) max_x_val = sv_x_val + sv_right; if( +#line 4992 "./tex4ht-c.tex" + tag ) x_val += sv_right; } else if( pos_dvi ){ +#line 8349 "./tex4ht-c.tex" + long int d; if( (up > 0) && (right > 0) ){ if( *pos_line ){ double from_x, from_y; +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -1961,6 +2645,8 @@ if( no_root_file ){ open_o_file(); } if( tag ) x_val += right; } else if( (up>0) && (right>0) ) { +#line 3703 "./tex4ht-c.tex" + if( (x_val + right) && ( ((x_val + right) > max_x_val) || ( !text_on && !ignore_chs ) @@ -1972,6 +2658,8 @@ if( (x_val + right) && / (text_on? word_sp : margin_sp) + 0.5 ); +#line 3728 "./tex4ht-c.tex" + if( i==0 ){ i = (INTEGER) ( (double) (x_val + right - max_x_val) / word_sp @@ -1981,6 +2669,8 @@ if( i==0 ){ if( i && !text_on ) try_new_line(); +#line 2844 "./tex4ht-c.tex" + if( trace_dvi_R && !ch_map_flag ){ if( *trace_dvi_del_R != '\0' ){ (IGNORED) fprintf(cur_o_file, "%s%d %d", @@ -1992,11 +2682,15 @@ if( trace_dvi_R && !ch_map_flag ){ while( i-- ) { text_on=TRUE; if( rule_ch && ! +#line 3739 "./tex4ht-c.tex" + rule_ch_off ){ put_char(rule_ch); } } +#line 2855 "./tex4ht-c.tex" + if( trace_dvi_R && !ch_map_flag ){ if( *trace_dvi_del_r != '\0' ){ (IGNORED) fprintf(cur_o_file, "%s%d %d", @@ -2013,6 +2707,10 @@ if( trace_dvi_R && !ch_map_flag ){ if( tag ) x_val += right; } else { +#line 3746 "./tex4ht-c.tex" + + +#line 2844 "./tex4ht-c.tex" if( trace_dvi_R && !ch_map_flag ){ if( *trace_dvi_del_R != '\0' ){ @@ -2024,6 +2722,8 @@ if( trace_dvi_R && !ch_map_flag ){ +#line 2855 "./tex4ht-c.tex" + if( trace_dvi_R && !ch_map_flag ){ if( *trace_dvi_del_r != '\0' ){ (IGNORED) fprintf(cur_o_file, "%s%d %d", @@ -2039,6 +2739,8 @@ if( trace_dvi_R && !ch_map_flag ){ } } +#line 3881 "./tex4ht-c.tex" + static BOOL tex4ht_special #ifdef ANSI @@ -2063,7 +2765,11 @@ static BOOL tex4ht_special long unsigned N; tex4ht = FALSE; +#line 3930 "./tex4ht-c.tex" + *special_n = (long int) (N = get_unt(*chr - +#line 17439 "./tex4ht-c.tex" + 239 + 1)); for(i=4; i--; ){ @@ -2075,12 +2781,16 @@ for(i=4; i--; ){ for(i=4; i<9; i++) special_hd[i]=get_char(); special_hd[9]='\0'; +#line 3918 "./tex4ht-c.tex" + tex4ht = (special_hd[4] == 't') || (special_hd[4] == 'T'); tex4ht = tex4ht && special_hd[5] == '4'; tex4ht = tex4ht && ((special_hd[6] == 'h') || (special_hd[6] == 'H')); tex4ht = tex4ht && ((special_hd[7] == 't') || (special_hd[7] == 'T')); if( tex4ht && trace_special ){ +#line 17179 "./tex4ht-c.tex" + { long curr_pos; int n, i; U_CHAR ch; @@ -2095,6 +2805,8 @@ if( tex4ht && trace_special ){ } (IGNORED) putc( '\n', cur_o_file ); (IGNORED) fseek(dvi_file, curr_pos, +#line 2174 "./tex4ht-c.tex" + 0 ); } @@ -2115,6 +2827,8 @@ if( tex4ht && trace_special ){ } +#line 4964 "./tex4ht-c.tex" + static void init_ch_map(MYVOID) { int i; for( i=0; i0? y_val : 0.0) / (double) yresolution + 0.5); if( row >= HEIGHT ){ @@ -2168,8 +2892,12 @@ tag }else prevrow = -1; prev_x = x + ( +#line 9819 "./tex4ht-c.tex" + design_size_to_pt( *(font_tbl[cur_fnt].wtbl + (int) ( +#line 9826 "./tex4ht-c.tex" + *(font_tbl[cur_fnt].char_wi + (int) ( (design_ch? design_ch : ch) - font_tbl[cur_fnt].char_f)% 256) @@ -2192,15 +2920,23 @@ design_size_to_pt( *(font_tbl[cur_fnt].wtbl if( row < min_map_line ) min_map_line = row; if( row > max_map_line ) max_map_line = row; if( ch_map[row].max ){ +#line 5120 "./tex4ht-c.tex" + int n; char* p; if( ch_map[row].chars > col ){ +#line 5171 "./tex4ht-c.tex" + if( +#line 4992 "./tex4ht-c.tex" + tag ){ if( *(ch_map[row].line + ch_map[row].max - 1) || (ch_map[row].chars - col == 1) ){ +#line 5216 "./tex4ht-c.tex" + ch_map[row].max += 5; ch_map[row].line = (char *) r_alloc((void *) ch_map[row].line, @@ -2214,6 +2950,8 @@ ch_map[row].chars += 5; p = ch_map[row].line + ch_map[row].max; while( col ){ unsigned char temp_ch; if( ((unsigned char) (*p)) < +#line 4862 "./tex4ht-c.tex" + 4 ) col--; temp_ch = *(--p); *(p+1) = temp_ch; } @@ -2222,6 +2960,8 @@ ch_map[row].chars += 5; p = ch_map[row].line + ch_map[row].max; while( col ){ if( ((unsigned char) (*p)) < +#line 4862 "./tex4ht-c.tex" + 4 ) col--; p--; } } @@ -2229,8 +2969,12 @@ ch_map[row].chars += 5; } else{ +#line 5134 "./tex4ht-c.tex" + n = (col - ch_map[row].chars + 8) / 5 * 5; ch_map[row].chars += n - +#line 4992 "./tex4ht-c.tex" + tag ; ch_map[row].max += n; @@ -2240,6 +2984,8 @@ ch_map[row].line = (char *) while( n-- ) *(ch_map[row].line + ch_map[row].max - n) = 0; *(ch_map[row].line + ch_map[row].max - (ch_map[row].chars - col) + ! +#line 4992 "./tex4ht-c.tex" + tag ) = ch; @@ -2247,9 +2993,13 @@ tag } else { +#line 5089 "./tex4ht-c.tex" + int n; char* p; ch_map[row].chars = (n = (col + 2 + 5) / 5 * 5) - +#line 4992 "./tex4ht-c.tex" + tag ; ch_map[row].max = n - 1; @@ -2261,11 +3011,15 @@ while( n-- ){ *(p++) = 0; } } } } +#line 5295 "./tex4ht-c.tex" + static void dump_ch_map(MYVOID) { int n, i, min, k, extra_sp; U_CHAR *p; +#line 5325 "./tex4ht-c.tex" + { int max; min = 100; max = 0; for( i=min_map_line; i<=max_map_line; i++ ){ @@ -2281,10 +3035,14 @@ static void dump_ch_map(MYVOID) if( ( n = ch_map[i].max) > 0 ){ p = ch_map[i].line; k = min; extra_sp = 0; +#line 5338 "./tex4ht-c.tex" + { U_CHAR *s; s = p + n; while( n && !(*s) && !(*(s-1)) ){ n--; s--; } if( n && !(*s) && (((unsigned char) *(s-1)) < +#line 4862 "./tex4ht-c.tex" + 4 ) ) n--; } @@ -2293,25 +3051,39 @@ static void dump_ch_map(MYVOID) while( 1 + n-- ){ if( --k < 0 ){ if( extra_sp && (((unsigned char) *p) < +#line 4862 "./tex4ht-c.tex" + 4 ) && (((unsigned char) *(p+1)) < +#line 4862 "./tex4ht-c.tex" + 4 ) ) { extra_sp--; } else { switch( *p ){ +#line 5346 "./tex4ht-c.tex" + case 0: { put_char(' '); break; } case +#line 4853 "./tex4ht-c.tex" + 1 : { put_char('-'); break; } case +#line 4856 "./tex4ht-c.tex" + 2 : { put_char('|'); break; } case +#line 4859 "./tex4ht-c.tex" + 3 : { put_char('#'); break; } case ' ': { extra_sp++; } default: { +#line 5355 "./tex4ht-c.tex" + BOOL tag; INTEGER count; tag = TRUE; count = 0; @@ -2320,6 +3092,8 @@ do{ if( *p == '<' ) tag = FALSE; else count += tag; put_char( *p ); n--; }while( ((unsigned char) *(++p)) >= +#line 4862 "./tex4ht-c.tex" + 4 ); if( !count ){ n++; p--; } @@ -2338,6 +3112,8 @@ if( !count ){ n++; p--; } } +#line 5785 "./tex4ht-c.tex" + static void set_loc #ifdef ANSI @@ -2362,6 +3138,8 @@ static void set_loc } +#line 6004 "./tex4ht-c.tex" + static void idv_char #ifdef ANSI @@ -2378,6 +3156,8 @@ static void idv_char { (IGNORED) putc( n, idv_file ); } +#line 6017 "./tex4ht-c.tex" + static void cond_idv_char #ifdef ANSI @@ -2396,10 +3176,14 @@ static void cond_idv_char } +#line 6032 "./tex4ht-c.tex" + static void idv_copy( MYVOID ) { idv_char( get_char() ); file_n++; } +#line 6047 "./tex4ht-c.tex" + static void cond_idv_int #ifdef ANSI @@ -2420,6 +3204,8 @@ static void cond_idv_int } +#line 6061 "./tex4ht-c.tex" + static void int_to_dvi #ifdef ANSI @@ -2450,6 +3236,8 @@ static void int_to_dvi } +#line 6083 "./tex4ht-c.tex" + static void cond_string #ifdef ANSI @@ -2470,6 +3258,8 @@ static void cond_string } +#line 6113 "./tex4ht-c.tex" + static INTEGER advance_idv_page #ifdef ANSI @@ -2492,33 +3282,51 @@ static INTEGER advance_idv_page { int i; if( page_n++ ){ idv_char( +#line 17327 "./tex4ht-c.tex" + 142 ); file_n++; idv_char( +#line 17321 "./tex4ht-c.tex" + 140 ); file_n++; idv_char( +#line 17318 "./tex4ht-c.tex" + 139 ); idv_int( page_n ); for( i=36; i--; ) idv_char( 0); idv_int( bop_addr ); bop_addr = file_n; file_n += 45; idv_char( +#line 17324 "./tex4ht-c.tex" + 141 ); file_n++; for( i=1; i<=cur_font[0]; i++ ){ idv_char( cur_font[i] ); file_n++; } } +#line 6145 "./tex4ht-c.tex" + store_mv( +#line 17354 "./tex4ht-c.tex" + 151 , dx_1); store_mv( +#line 17369 "./tex4ht-c.tex" + 156 , dx_2); store_mv( +#line 17396 "./tex4ht-c.tex" + 165 , dy_1); store_mv( +#line 17411 "./tex4ht-c.tex" + 170 , dy_2); @@ -2527,6 +3335,8 @@ store_mv( } +#line 6170 "./tex4ht-c.tex" + static void store_mv #ifdef ANSI @@ -2549,6 +3359,8 @@ static void store_mv } +#line 7239 "./tex4ht-c.tex" + static void push_stack(MYVOID) { stack[stack_n].x_val = x_val; @@ -2558,29 +3370,41 @@ static void push_stack(MYVOID) stack[stack_n].dy_1 = dy_1; stack[stack_n].dy_2 = dy_2; +#line 7257 "./tex4ht-c.tex" + stack[stack_n+1].sv_no_left_del = stack[stack_n+1].no_left_del; stack[stack_n+1].no_left_del = stack[stack_n].no_left_del; stack_n++; if( stack_n > +#line 6682 "./tex4ht-c.tex" + ((int) stack_len + 2) ){ warn_i(40); } +#line 12473 "./tex4ht-c.tex" + stack[stack_n].accented = FALSE; } +#line 7286 "./tex4ht-c.tex" + static void pop_stack(MYVOID) { +#line 12466 "./tex4ht-c.tex" + if( stack[stack_n].accented ){ +#line 12417 "./tex4ht-c.tex" + needs_accented_sym--; @@ -2589,6 +3413,8 @@ needs_accented_sym--; +#line 7262 "./tex4ht-c.tex" + stack[stack_n].no_left_del = stack[stack_n].sv_no_left_del; @@ -2602,6 +3428,8 @@ stack[stack_n].no_left_del = stack[stack_n].sv_no_left_del; } +#line 7387 "./tex4ht-c.tex" + static struct del_stack_entry* push_del #ifdef ANSI @@ -2627,6 +3455,8 @@ static struct del_stack_entry* push_del } +#line 7408 "./tex4ht-c.tex" + static struct del_stack_entry* pop_del #ifdef ANSI @@ -2659,6 +3489,8 @@ static struct del_stack_entry* pop_del } +#line 7621 "./tex4ht-c.tex" + static struct send_back_entry * rev_list #ifdef ANSI @@ -2685,6 +3517,8 @@ static struct send_back_entry * rev_list } +#line 7675 "./tex4ht-c.tex" + static struct send_back_entry * back_insert #ifdef ANSI @@ -2714,6 +3548,8 @@ static struct send_back_entry * back_insert } +#line 8548 "./tex4ht-c.tex" + static double pos_dbl #ifdef ANSI @@ -2742,6 +3578,8 @@ static double pos_dbl } +#line 9268 "./tex4ht-c.tex" + static void doGlyphArray #ifdef ANSI @@ -2770,6 +3608,8 @@ static void doGlyphArray } +#line 9316 "./tex4ht-c.tex" + static int search_font_tbl #ifdef ANSI @@ -2794,6 +3634,8 @@ static int search_font_tbl } +#line 10417 "./tex4ht-c.tex" + static int get_html_ch #ifdef ANSI @@ -2818,6 +3660,8 @@ static int get_html_ch } +#line 10438 "./tex4ht-c.tex" + static FILE* f_open #ifdef ANSI @@ -2843,6 +3687,8 @@ static FILE* f_open } +#line 10462 "./tex4ht-c.tex" + static void dump_htf #ifdef ANSI @@ -2874,12 +3720,16 @@ static void dump_htf } } } +#line 10514 "./tex4ht-c.tex" + static void dump_env( MYVOID ) { int ch; if( !dumped_env ){ dumped_env = TRUE; (IGNORED) fseek(dot_file, 0L, +#line 2174 "./tex4ht-c.tex" + 0 ); (IGNORED) fprintf(stderr, @@ -2895,6 +3745,8 @@ static void dump_env( MYVOID ) } } +#line 10547 "./tex4ht-c.tex" + static void htf_to_lg #ifdef ANSI @@ -2939,6 +3791,8 @@ static void htf_to_lg } } +#line 10597 "./tex4ht-c.tex" + static INTEGER get_html_file_id #ifdef ANSI @@ -2964,6 +3818,8 @@ static INTEGER get_html_file_id name = new_font_name; while( *name == (ch = get_html_ch(file)) ) name++; +#line 10114 "./tex4ht-c.tex" + if( ( name == new_font_name ) && (n == 19) && (ch=='.') ){ return HTF_ALIAS; } @@ -2978,6 +3834,8 @@ if( ( name == new_font_name ) && (n == 19) && (ch=='.') ){ i = i * 10 + ch - '0'; ch = get_html_ch(file); } if( i != bound ){ +#line 16919 "./tex4ht-c.tex" + (IGNORED) fprintf(stderr,"--- warning --- "); (IGNORED) fprintf(stderr, warn_err_mssg[22] @@ -2989,6 +3847,8 @@ if( ( name == new_font_name ) && (n == 19) && (ch=='.') ){ } +#line 10731 "./tex4ht-c.tex" + static void notify_class_info #ifdef ANSI @@ -3037,6 +3897,8 @@ static void notify_class_info } +#line 10955 "./tex4ht-c.tex" + static void script #ifdef ANSI @@ -3067,11 +3929,15 @@ static void script while( TRUE ){ if( *ch == '%' ){ +#line 10989 "./tex4ht-c.tex" + *ch = '\0'; (IGNORED) fprintf(log_file, "%s", p); *(ch++) = '%'; +#line 11000 "./tex4ht-c.tex" + p=fmt; *(p++) = '%'; if( *ch == '\0' ){ job[ (int) strlen((char *) job) ] ='.'; return; } while( *ch != '%' ){ *(p++) = *(ch ++); } @@ -3094,6 +3960,8 @@ while( *ch != '%' ){ *(p++) = *(ch ++); } } } +#line 11183 "./tex4ht-c.tex" + static void dos_gif_file @@ -3122,6 +3990,8 @@ static void dos_gif_file m = n = (int) strlen((char *) str); if( n > 4 ){ +#line 11243 "./tex4ht-c.tex" + if( (p = gif_file) != NULL ){ while( TRUE ){ if( eq_str( str, p->name ) ) break; @@ -3130,8 +4000,12 @@ if( (p = gif_file) != NULL ){ if( p == NULL ){ +#line 11256 "./tex4ht-c.tex" + p = m_alloc(struct gif_file_rec, 1); +#line 11276 "./tex4ht-c.tex" + for(i=str[n]; n; ){ i+=str[--n]; if( i > (INT_MAX / 8) ) i/=2; } if( (n=i % BASE) <10 ) n+= 10 + i%(BASE-20); *(ch = p->code)= n; n += i; @@ -3141,6 +4015,8 @@ ch[3] = n%BASE; +#line 11290 "./tex4ht-c.tex" + if( gif_file ){ q = gif_file->next; while( TRUE ){ @@ -3178,6 +4054,8 @@ if( gif_file ){ p->next = gif_file->next; gif_file->next = p; } +#line 11346 "./tex4ht-c.tex" + static void put_alt_ch #ifdef ANSI @@ -3198,6 +4076,8 @@ static void put_alt_ch { if( !ch_str_flag ) put_char( chr ); else if( chr > 0 ){ +#line 11363 "./tex4ht-c.tex" + unsigned U_CHAR * p; p = font_tbl[cur_fnt].str[chr-1]; if( gif_ch ) print_f( (char *) p ); @@ -3214,6 +4094,8 @@ else while( *p ){ } +#line 12350 "./tex4ht-c.tex" + static void get_open_accent #ifdef ANSI @@ -3264,6 +4146,8 @@ static void get_open_accent } } +#line 12591 "./tex4ht-c.tex" + static int scan_class #ifdef ANSI @@ -3283,6 +4167,8 @@ static int scan_class math_class = get_char(); if( (math_class >= '0' ) && (math_class < '0' + +#line 12717 "./tex4ht-c.tex" + 79 ) ){ @@ -3291,11 +4177,15 @@ static int scan_class if( flag== 1 ) { switch( math_class ){ case '-': { math_class = +#line 12717 "./tex4ht-c.tex" + 79 ; pause_class++; break; } case '+': { math_class = +#line 12717 "./tex4ht-c.tex" + 79 ; @@ -3304,22 +4194,34 @@ static int scan_class } } else if( flag== 2 ) { switch( math_class ){ case +#line 12724 "./tex4ht-c.tex" + ')' : { math_class = +#line 12732 "./tex4ht-c.tex" + ( +#line 12717 "./tex4ht-c.tex" + 79 + 1) ; break; } case +#line 12728 "./tex4ht-c.tex" + '(' : { math_class = +#line 12736 "./tex4ht-c.tex" + ( +#line 12717 "./tex4ht-c.tex" + 79 + 2) @@ -3333,6 +4235,8 @@ static int scan_class } +#line 12631 "./tex4ht-c.tex" + static INTEGER set_ch_class #ifdef ANSI @@ -3349,6 +4253,8 @@ static INTEGER set_ch_class { int r_ch; r_ch = ch - font_tbl[cur_fnt].char_f; if( math_class == +#line 7367 "./tex4ht-c.tex" + 5 ){ @@ -3360,14 +4266,22 @@ static INTEGER set_ch_class *(font_tbl[cur_fnt].math + r_ch) = math_class; } open_del = ( math_class == +#line 7371 "./tex4ht-c.tex" + 4 )? ch : 256; +#line 9798 "./tex4ht-c.tex" + return (INTEGER)( +#line 9835 "./tex4ht-c.tex" + design_size_to_pt( *(font_tbl[cur_fnt].wtbl + (int) ( +#line 9843 "./tex4ht-c.tex" + *(font_tbl[cur_fnt].char_wi + (int) ( ch - font_tbl[cur_fnt].char_f)% 256) @@ -3382,6 +4296,8 @@ design_size_to_pt( *(font_tbl[cur_fnt].wtbl } +#line 12686 "./tex4ht-c.tex" + static int math_class_of #ifdef ANSI @@ -3399,6 +4315,8 @@ static int math_class_of math_class = ch - font_tbl[cur_fnt].char_f; return ((get_bit( font_tbl[cur_fnt].math_closing, math_class))? +#line 7367 "./tex4ht-c.tex" + 5 : *( math_class + font_tbl[cur_fnt].math)); @@ -3406,8 +4324,12 @@ static int math_class_of } +#line 13223 "./tex4ht-c.tex" + #if defined(__MSDOS__) +#line 13232 "./tex4ht-c.tex" + static char *get_env_dir #ifdef ANSI @@ -3443,6 +4365,8 @@ static char *get_env_dir #endif +#line 13292 "./tex4ht-c.tex" + static char* get_script #ifdef ANSI @@ -3468,10 +4392,14 @@ static char* get_script if( !name ) { U_CHAR str[256], *ch; (IGNORED) fseek(dot_file, 0L, +#line 2174 "./tex4ht-c.tex" + 0 ); if( search_dot_file( x ) ){ +#line 13316 "./tex4ht-c.tex" + ch = str; str[254] = '\0'; do{ int int_ch; while((*(ch++) = (char) @@ -3492,6 +4420,8 @@ do{ int int_ch; } +#line 13342 "./tex4ht-c.tex" + static BOOL search_dot_file #ifdef ANSI @@ -3514,6 +4444,8 @@ static BOOL search_dot_file if( chr == ch ){ return TRUE; } if( chr == '<' ) { +#line 13365 "./tex4ht-c.tex" + U_CHAR match[256]; int i; for( i = 0; (chr != '\n') && (chr != EOF ) ; i++){ @@ -3528,6 +4460,8 @@ if( match[0] != '/' ){ i++){} if( match[i] == '>' ){ match[i] = '\0'; } +#line 13433 "./tex4ht-c.tex" + if( envChoice == (struct env_c_rec*) 0 ){ env_skip = !eq_str(match, "default" ); } else { @@ -3540,6 +4474,8 @@ if( envChoice == (struct env_c_rec*) 0 ){ if( env_skip ){ +#line 13385 "./tex4ht-c.tex" + U_CHAR cur_block[90]; BOOL status; (IGNORED) strcpy((char *) cur_block, (char *) match); @@ -3574,6 +4510,8 @@ while( !status && (chr != EOF) ){ } } +#line 13582 "./tex4ht-c.tex" + static struct env_var_rec * get_env_var #ifdef ANSI @@ -3605,6 +4543,8 @@ static struct env_var_rec * get_env_var *from = '\0'; base = from + 1; +#line 13624 "./tex4ht-c.tex" + { U_CHAR *str; if( *(from+1) == '~' ){ if( HOME_DIR ){ @@ -3625,6 +4565,8 @@ static struct env_var_rec * get_env_var if( base ){ +#line 13616 "./tex4ht-c.tex" + p = m_alloc(struct env_var_rec, 1); p->next = tfm_dirs; p->base = base; @@ -3639,6 +4581,8 @@ tfm_dirs = p; } +#line 13885 "./tex4ht-c.tex" + static void com_dir #ifdef ANSI @@ -3661,6 +4605,8 @@ static void com_dir } +#line 14578 "./tex4ht-c.tex" + #ifdef KPATHSEA static void export_htf @@ -3714,6 +4660,8 @@ static void export_htf #endif +#line 15307 "./tex4ht-c.tex" + static FILE* search_in_dot_file #ifdef ANSI @@ -3742,20 +4690,28 @@ static FILE* search_in_dot_file #ifndef KPATHSEA if( cache_files != (FILE *) 0 ){ +#line 14017 "./tex4ht-c.tex" + U_CHAR cache_dir[256], dot_dir[256], *p, *q; BOOL flag; int n, ch; (IGNORED) fseek(cache_files, 0L, +#line 2174 "./tex4ht-c.tex" + 0 ); ch = (int) getc(cache_files); while ( ch != EOF ){ if ( ch == ' ' ) { +#line 14034 "./tex4ht-c.tex" + q = cache_dir; do *(q++) = ch = (int) getc(cache_files); while( (ch !='\n') && (ch != EOF) ); *(q-1 - (*(q-2) == +#line 15556 "./tex4ht-c.tex" + #if defined(__DJGPP__) '\\' #else @@ -3770,6 +4726,8 @@ while( (ch !='\n') && (ch != EOF) ); } else { +#line 14046 "./tex4ht-c.tex" + p = name; flag = FALSE; while( *(p++) == ch ){ ch = (int) getc(cache_files); @@ -3782,8 +4740,12 @@ else{ if( flag ){ +#line 14057 "./tex4ht-c.tex" + flag = FALSE; (IGNORED) fseek(dot_file, 0L, +#line 2174 "./tex4ht-c.tex" + 0 ); while( search_dot_file( typ ) && !flag ){ U_CHAR *q, save_ch; @@ -3795,6 +4757,8 @@ while( search_dot_file( typ ) && !flag ){ U_CHAR *q, save_ch; flag = *(q - 2) = '!'; q -= (flag? 2 : 1); *(q - (*(q-1) == +#line 15556 "./tex4ht-c.tex" + #if defined(__DJGPP__) '\\' #else @@ -3817,6 +4781,8 @@ while( search_dot_file( typ ) && !flag ){ U_CHAR *q, save_ch; if( flag ){ +#line 14083 "./tex4ht-c.tex" + n = (int) strlen((char *) cache_dir); cache_dir[n] = dir_path_slash(cache_dir); cache_dir[n+1] = '\0'; @@ -3831,6 +4797,8 @@ cache_dir[n+1] = '\0'; } #endif (IGNORED) fseek(dot_file, 0L, +#line 2174 "./tex4ht-c.tex" + 0 ); while( search_dot_file( typ ) ){ @@ -3851,6 +4819,8 @@ cache_dir[n+1] = '\0'; } +#line 15352 "./tex4ht-c.tex" + static FILE* search_file_base #ifdef ANSI @@ -3891,6 +4861,8 @@ static FILE* search_file_base } +#line 15383 "./tex4ht-c.tex" + static char * abs_addr #ifdef ANSI @@ -3931,6 +4903,8 @@ static char * abs_addr } +#line 15424 "./tex4ht-c.tex" + static FILE* search_file #ifdef ANSI @@ -3957,6 +4931,8 @@ static FILE* search_file int i; BOOL subs; +#line 15465 "./tex4ht-c.tex" + if( (file = f_open(name, flags)) != NULL ){ return file; } @@ -3966,6 +4942,8 @@ if( (file = f_open(name, flags)) != NULL ){ subs = str[i] == '!'; if( subs ) str[i] = '\0'; else i++; +#line 15449 "./tex4ht-c.tex" + (IGNORED) strct(str, #if defined(__DJGPP__) (( dir[i-1] == '/') || ( dir[i-1] == '\\')) @@ -3979,6 +4957,8 @@ if( (file = f_open(name, flags)) != NULL ){ +#line 15470 "./tex4ht-c.tex" + (IGNORED) strct(str,name); if( (file = f_open(str, flags)) != NULL ){ str[i] = '\0'; add_to_cache(str,name,i); @@ -3991,6 +4971,8 @@ if( (file = f_open(str, flags)) != NULL ){ } +#line 15484 "./tex4ht-c.tex" + static void add_to_cache #ifdef ANSI @@ -4012,6 +4994,8 @@ static void add_to_cache struct cache_font_rec *cur_cache_font; +#line 13679 "./tex4ht-c.tex" + { int found; found = FALSE; for( cur_cache_font = cache_font; @@ -4022,6 +5006,8 @@ static void add_to_cache if( !found ){ cur_cache_font = m_alloc(struct cache_font_rec, 1); +#line 13942 "./tex4ht-c.tex" + cur_cache_font->cache_file = (struct cache_file_rec *) 0; @@ -4046,6 +5032,8 @@ cur_cache_font->cache_file = (struct cache_file_rec *) 0; +#line 13946 "./tex4ht-c.tex" + { struct cache_file_rec *file_rec, *prev_file_rec; prev_file_rec = (struct cache_file_rec *) 0; @@ -4064,6 +5052,8 @@ cur_cache_font->cache_file = (struct cache_file_rec *) 0; } if( flag ) { +#line 13971 "./tex4ht-c.tex" + file_entry = m_alloc(struct cache_file_rec, 1); file_entry->file = m_alloc(char, strlen(name)+1); (IGNORED) strcpy((char *) file_entry->file, name); @@ -4087,6 +5077,8 @@ if( ! cur_cache_font->cache_file ){ } +#line 15505 "./tex4ht-c.tex" + static FILE* search_file_ext #ifdef ANSI @@ -4126,6 +5118,8 @@ static FILE* search_file_ext return file; } if( (str[n] == +#line 15556 "./tex4ht-c.tex" + #if defined(__DJGPP__) '\\' #else @@ -4141,15 +5135,19 @@ static FILE* search_file_ext #ifndef NOSUBDIR #ifdef WIN32 +#line 537 "./tex4ht-c.tex" + { WIN32_FIND_DATA find_file_data; HANDLE hnd; int proceed; (IGNORED) strcpy((char *) dirname, (char *) str); - strct(dirname, "/*.*"); + strct(dirname, "/*.*"); hnd = FindFirstFile(dirname, &find_file_data); if (hnd != INVALID_HANDLE_VALUE) { +#line 551 "./tex4ht-c.tex" + proceed = 1; while (proceed) { if( !eq_str(find_file_data.cFileName, ".") && @@ -4174,8 +5172,12 @@ FindClose(hnd); #else +#line 15596 "./tex4ht-c.tex" + { DIR *dp; +#line 15725 "./tex4ht-c.tex" + #ifdef STRUCT_DIRECT struct direct @@ -4190,6 +5192,8 @@ FindClose(hnd); if( !eq_str(dirp->d_name, ".") && !eq_str(dirp->d_name, "..") ) { +#line 15611 "./tex4ht-c.tex" + (IGNORED) strcpy((char *) str+n, (char *) dirp->d_name ); str[n-1] = dir_path_slash(str); if( LSTAT(str, &buf) >= 0 ) @@ -4210,6 +5214,8 @@ if( LSTAT(str, &buf) >= 0 ) } +#line 15582 "./tex4ht-c.tex" + #if defined(__DJGPP__) static BOOL is_forward_slash @@ -4233,6 +5239,8 @@ static BOOL is_forward_slash #endif +#line 15804 "./tex4ht-c.tex" + static FILE* f_open_pathed_filename #ifdef ANSI @@ -4265,6 +5273,8 @@ static FILE* f_open_pathed_filename } +#line 15838 "./tex4ht-c.tex" + static INTEGER put_4ht_ch #ifdef ANSI @@ -4283,6 +5293,8 @@ static INTEGER put_4ht_ch c = ch; if( ch=='&' ){ +#line 15904 "./tex4ht-c.tex" + flush_uni(); @@ -4296,8 +5308,12 @@ flush_uni(); } else if( uni_code_p ){ if( ch == ';' ){ +#line 16127 "./tex4ht-c.tex" + if( uni_code[1] != '#' ){ +#line 15904 "./tex4ht-c.tex" + flush_uni(); @@ -4319,12 +5335,16 @@ else{ value = value*base + digit; } if( value<0 ){ +#line 15904 "./tex4ht-c.tex" + flush_uni(); (IGNORED) putc( ch, htFile ); } else { +#line 16154 "./tex4ht-c.tex" + int bottom, mid, top; BOOL found=FALSE; bottom = 0; top = charset_n; @@ -4332,6 +5352,8 @@ while( !found ){ mid = (bottom + top) / 2; if( value == charset[mid].ch ){ +#line 16180 "./tex4ht-c.tex" + { U_CHAR *p; p = charset[mid].str; while( *p != '\0' ){ @@ -4348,6 +5370,8 @@ while( !found ){ else { (IGNORED) putc( *p, htFile ); if ( (*p=='&') && u10 ){ +#line 16254 "./tex4ht-c.tex" + if ( *(p+1) == '#' ){ p++; (IGNORED) putc( '#', htFile ); @@ -4369,6 +5393,8 @@ if ( *(p+1) == '#' ){ else { if( digit == ';' ){ +#line 16285 "./tex4ht-c.tex" + char uni_10[MAX_UNI_CODE]; int n; n = 0; @@ -4408,6 +5434,8 @@ while( n>0 ){ } if( ! found ){ if( u10 || utf8 ){ +#line 16223 "./tex4ht-c.tex" + short n; long dec; int ch; @@ -4422,6 +5450,8 @@ if( (uni_code[2] == 'x') || (uni_code[2] == 'X') ) { : (ch-'0')); } if( u10 ){ +#line 16243 "./tex4ht-c.tex" + if( dec == 0 ){ uni_code_p = 3; uni_code[2] = '0'; } else { @@ -4433,6 +5463,10 @@ if( (uni_code[2] == 'x') || (uni_code[2] == 'X') ) { } else { +#line 16364 "./tex4ht-c.tex" + + +#line 16314 "./tex4ht-c.tex" if( dec < 0x80 ){ uni_code_p = 1; uni_code[0] = dec; @@ -4486,6 +5520,8 @@ else { } +#line 15904 "./tex4ht-c.tex" + flush_uni(); @@ -4507,6 +5543,8 @@ flush_uni(); ) ) { +#line 15904 "./tex4ht-c.tex" + flush_uni(); @@ -4517,6 +5555,8 @@ flush_uni(); } +#line 15912 "./tex4ht-c.tex" + static void flush_uni( MYVOID ) { int i; @@ -4528,6 +5568,8 @@ static void flush_uni( MYVOID ) } +#line 16575 "./tex4ht-c.tex" + static INTEGER insert_ch #ifdef ANSI @@ -4545,8 +5587,12 @@ static INTEGER insert_ch if( !ignore_chs ){ BOOL flag; +#line 16597 "./tex4ht-c.tex" + flag = FALSE; if( +#line 4338 "./tex4ht-c.tex" + next_str ) { @@ -4560,15 +5606,25 @@ next_str if( !flag ){ try_new_line(); +#line 10647 "./tex4ht-c.tex" + + +#line 12296 "./tex4ht-c.tex" if( x_val > needs_end_accent ){ +#line 12279 "./tex4ht-c.tex" + if( needs_end_accent && t_accent_template ){ +#line 2609 "./tex4ht-c.tex" + if( span_on && in_span_ch ){ if( *end_span[0] ){ in_span_ch = FALSE; +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -4578,6 +5634,8 @@ if( no_root_file ){ open_o_file(); } (IGNORED) fprintf(cur_o_file, "%s", t_accent_fifth); needs_end_accent = FALSE; +#line 12422 "./tex4ht-c.tex" + needs_accented_sym--; @@ -4588,10 +5646,14 @@ needs_accented_sym--; +#line 2543 "./tex4ht-c.tex" + if( span_on && (default_font != font_tbl[cur_fnt].num) ){ if( !ch_map_flag && start_span ){ if( span_name_on ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -4615,9 +5677,13 @@ if( no_root_file ){ open_o_file(); } } +#line 2897 "./tex4ht-c.tex" + if( trace_dvi_C ){ if( !ch_map_flag ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -4633,9 +5699,13 @@ if( no_root_file ){ open_o_file(); } +#line 12911 "./tex4ht-c.tex" + if( show_class && !pause_class && !ignore_subclass_del){ if( !stack[stack_n].no_left_del && stack[stack_n+1].active_class_del ){ +#line 12986 "./tex4ht-c.tex" + (IGNORED) print_f( (stack[stack_n+1].temp_class_del)? stack[stack_n+1].temp_class_open : stack[stack_n+1].class_open); @@ -4643,6 +5713,8 @@ if( show_class && !pause_class && !ignore_subclass_del){ if( !stack[stack_n+1].ignore_subclass_del ){ +#line 12924 "./tex4ht-c.tex" + math_class = math_class_of( ch, cur_fnt ); (IGNORED) print_f( open_class[math_class]); @@ -4650,6 +5722,8 @@ math_class = math_class_of( ch, cur_fnt ); } } else { +#line 12924 "./tex4ht-c.tex" + math_class = math_class_of( ch, cur_fnt ); (IGNORED) print_f( open_class[math_class]); @@ -4657,9 +5731,13 @@ math_class = math_class_of( ch, cur_fnt ); } } +#line 8192 "./tex4ht-c.tex" + if( pos_dvi ){ long int d; if( *pos_text ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -4669,9 +5747,15 @@ if( no_root_file ){ open_o_file(); } } if( x_val < min_pos_x ) min_pos_x = x_val; if( (d = x_val + +#line 9849 "./tex4ht-c.tex" + (int)( +#line 9835 "./tex4ht-c.tex" + design_size_to_pt( *(font_tbl[cur_fnt].wtbl + (int) ( +#line 9843 "./tex4ht-c.tex" + *(font_tbl[cur_fnt].char_wi + (int) ( ch - font_tbl[cur_fnt].char_f)% 256) @@ -4683,9 +5767,15 @@ design_size_to_pt( *(font_tbl[cur_fnt].wtbl ) > max_pos_x ) max_pos_x = d; if( (d = y_val - +#line 9873 "./tex4ht-c.tex" + (int)( +#line 9858 "./tex4ht-c.tex" + design_size_to_pt( *(font_tbl[cur_fnt].htbl + (int) ( +#line 9865 "./tex4ht-c.tex" + ( *(font_tbl[cur_fnt].char_hidp + (int) ( ch - font_tbl[cur_fnt].char_f)% 256) >> 4 @@ -4698,9 +5788,15 @@ design_size_to_pt( *(font_tbl[cur_fnt].htbl ) < min_pos_y ) min_pos_y = d; if( (d = y_val + +#line 9896 "./tex4ht-c.tex" + (int)( +#line 9882 "./tex4ht-c.tex" + design_size_to_pt( *(font_tbl[cur_fnt].dtbl + (int) ( +#line 9889 "./tex4ht-c.tex" + ( *(font_tbl[cur_fnt].char_hidp + (int) ( ch - font_tbl[cur_fnt].char_f)% 256) ) & 0x0F @@ -4715,6 +5811,8 @@ design_size_to_pt( *(font_tbl[cur_fnt].dtbl +#line 12390 "./tex4ht-c.tex" + if( a_accent_template && needs_accented_sym ){ (IGNORED) fprintf(cur_o_file, "%s%s%s%d%s%d%s", a_accent_first, font_tbl[cur_fnt].family_name, @@ -4727,29 +5825,43 @@ if( a_accent_template && needs_accented_sym ){ if( +#line 4332 "./tex4ht-c.tex" + next_char != -1 ) { +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } (IGNORED) put_4ht_ch( +#line 4332 "./tex4ht-c.tex" + next_char , cur_o_file ); +#line 4332 "./tex4ht-c.tex" + next_char = -1; } else if( +#line 4338 "./tex4ht-c.tex" + next_str ) { +#line 4347 "./tex4ht-c.tex" + if( keepChar ){ keepChar=FALSE; { +#line 10676 "./tex4ht-c.tex" + int gif_flag, chr, r_ch; BOOL ch_str_flag; r_ch = ch - font_tbl[cur_fnt].char_f; @@ -4759,17 +5871,23 @@ chr = ((r_ch == 255) && font_tbl[cur_fnt].ch255 )? 256 : *(font_tbl[cur_fnt].ch + r_ch); if( (gif_flag % 2) || ch_str_flag ){ design_ch = ch; { +#line 10699 "./tex4ht-c.tex" + U_CHAR str[256], *p; BOOL sv; int mag; sv = special_on; special_on = TRUE; if( gif_ch && (gif_flag % 2) ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } if( !gif_open[gif_flag] ){ +#line 10776 "./tex4ht-c.tex" + (IGNORED) sprintf(str, "configuration for htf class %d (char %d of %s.htf)", gif_flag, ch,font_tbl[cur_fnt].name @@ -4777,13 +5895,19 @@ if( no_root_file ){ open_o_file(); } warn_i_str(50,str); +#line 10784 "./tex4ht-c.tex" + gif_open[gif_flag] = m_alloc(char, +#line 10809 "./tex4ht-c.tex" + 29 ); (IGNORED) strcpy((char *) gif_open[gif_flag], +#line 10805 "./tex4ht-c.tex" + "\"+++++\"+" ); @@ -4808,6 +5932,8 @@ gif_id[gif_flag] = gif_open[gif_flag]+28; store_bit_I( class_on, gif_flag ); } +#line 11465 "./tex4ht-c.tex" + p= gif_open[gif_flag]; if( p ) if( *p ){ @@ -4815,6 +5941,8 @@ if( *p ){ mag = (int) ((double) font_tbl[cur_fnt].scale / font_tbl[cur_fnt].design_sz * 10 ); +#line 10891 "./tex4ht-c.tex" + if( !dos_file_names ){ print_f(font_tbl[cur_fnt].name); if( mag == 10 ) (IGNORED) sprintf(str, GIF_I, design_ch, gif); @@ -4822,6 +5950,8 @@ if( !dos_file_names ){ } +#line 10912 "./tex4ht-c.tex" + if( dos_file_names ){ dos_gif_file(str, mag, design_ch); @@ -4837,6 +5967,8 @@ if( dos_file_names ){ +#line 11498 "./tex4ht-c.tex" + p = gif_alt[gif_flag]; if( p ) if( *p ){ @@ -4845,6 +5977,8 @@ if( p ) +#line 11512 "./tex4ht-c.tex" + p = gif_class[gif_flag]; if( p ) if( *p ){ @@ -4853,6 +5987,8 @@ if( p ) +#line 11536 "./tex4ht-c.tex" + p = gif_size[gif_flag]; if( p ) if( *p ){ @@ -4861,6 +5997,8 @@ if( p ) +#line 11553 "./tex4ht-c.tex" + p = gif_mag[gif_flag]; if( p ) if( *p && (font_tbl[cur_fnt].mag != 100) ){ @@ -4869,6 +6007,8 @@ if( p ) +#line 11568 "./tex4ht-c.tex" + p = gif_ord[gif_flag]; if( p ) if( *p ){ @@ -4877,15 +6017,23 @@ if( p ) +#line 11585 "./tex4ht-c.tex" + p = gif_end[gif_flag]; if( p ) if( *p ){ print_f( p ); } } else { +#line 10828 "./tex4ht-c.tex" + if( !gif_flag || (gif_flag % 2) || ch_map_flag ) { put_alt_ch(chr,ch_str_flag); } else{ +#line 11721 "./tex4ht-c.tex" + + +#line 11737 "./tex4ht-c.tex" if( gif_flag && !get_bit( class_on, gif_flag ) ) { notify_class_info(gif_flag); @@ -4895,6 +6043,8 @@ if( gif_flag && !get_bit( class_on, gif_flag ) ) { if( span_on ){ +#line 11747 "./tex4ht-c.tex" + if( span_open[gif_flag] ) if( *span_open[gif_flag] ){ print_f( span_open[gif_flag] ); @@ -4902,6 +6052,8 @@ if( span_open[gif_flag] ) +#line 11771 "./tex4ht-c.tex" + if( span_name[gif_flag] ) if( *span_name[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_name[gif_flag], @@ -4910,6 +6062,8 @@ if( span_name[gif_flag] ) +#line 11781 "./tex4ht-c.tex" + if( span_size[gif_flag] ) if( *span_size[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_size[gif_flag], @@ -4918,6 +6072,8 @@ if( span_size[gif_flag] ) +#line 11790 "./tex4ht-c.tex" + if( span_mag[gif_flag] ) if( *span_mag[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_mag[gif_flag], @@ -4926,6 +6082,8 @@ if( span_mag[gif_flag] ) +#line 11799 "./tex4ht-c.tex" + if( span_ord[gif_flag] ) if( *span_ord[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_ord[gif_flag], chr); @@ -4933,6 +6091,8 @@ if( span_ord[gif_flag] ) +#line 11763 "./tex4ht-c.tex" + if( span_ch[gif_flag] ) if( *span_ch[gif_flag] ){ print_f( span_ch[gif_flag] ); @@ -4943,6 +6103,8 @@ if( span_ch[gif_flag] ) put_alt_ch(chr,ch_str_flag); if( span_on ){ +#line 11754 "./tex4ht-c.tex" + if( end_span[gif_flag] ) if( *end_span[gif_flag] ){ print_f( end_span[gif_flag] ); @@ -4958,13 +6120,21 @@ special_on = sv; } design_ch = 0; } else { +#line 10819 "./tex4ht-c.tex" + if( !gif_flag || (gif_flag % 2) || ch_map_flag ) { put_char(chr); } else{ +#line 11702 "./tex4ht-c.tex" + + +#line 1715 "./tex4ht-c.tex" if( no_root_file ){ open_o_file(); } +#line 11737 "./tex4ht-c.tex" + if( gif_flag && !get_bit( class_on, gif_flag ) ) { notify_class_info(gif_flag); store_bit_I( class_on, gif_flag ); @@ -4973,6 +6143,8 @@ if( gif_flag && !get_bit( class_on, gif_flag ) ) { if( span_on ){ +#line 11747 "./tex4ht-c.tex" + if( span_open[gif_flag] ) if( *span_open[gif_flag] ){ print_f( span_open[gif_flag] ); @@ -4980,6 +6152,8 @@ if( span_open[gif_flag] ) +#line 11771 "./tex4ht-c.tex" + if( span_name[gif_flag] ) if( *span_name[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_name[gif_flag], @@ -4988,6 +6162,8 @@ if( span_name[gif_flag] ) +#line 11781 "./tex4ht-c.tex" + if( span_size[gif_flag] ) if( *span_size[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_size[gif_flag], @@ -4996,6 +6172,8 @@ if( span_size[gif_flag] ) +#line 11790 "./tex4ht-c.tex" + if( span_mag[gif_flag] ) if( *span_mag[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_mag[gif_flag], @@ -5004,6 +6182,8 @@ if( span_mag[gif_flag] ) +#line 11799 "./tex4ht-c.tex" + if( span_ord[gif_flag] ) if( *span_ord[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_ord[gif_flag], chr); @@ -5011,6 +6191,8 @@ if( span_ord[gif_flag] ) +#line 11763 "./tex4ht-c.tex" + if( span_ch[gif_flag] ) if( *span_ch[gif_flag] ){ print_f( span_ch[gif_flag] ); @@ -5021,6 +6203,8 @@ if( span_ch[gif_flag] ) put_char(chr); if( span_on ){ +#line 11754 "./tex4ht-c.tex" + if( end_span[gif_flag] ) if( *end_span[gif_flag] ){ print_f( end_span[gif_flag] ); @@ -5042,11 +6226,15 @@ if( end_span[gif_flag] ) } else { if( verb_ch ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } (IGNORED) put_4ht_ch( ch, cur_o_file ); } else { +#line 10676 "./tex4ht-c.tex" + int gif_flag, chr, r_ch; BOOL ch_str_flag; r_ch = ch - font_tbl[cur_fnt].char_f; @@ -5056,17 +6244,23 @@ chr = ((r_ch == 255) && font_tbl[cur_fnt].ch255 )? 256 : *(font_tbl[cur_fnt].ch + r_ch); if( (gif_flag % 2) || ch_str_flag ){ design_ch = ch; { +#line 10699 "./tex4ht-c.tex" + U_CHAR str[256], *p; BOOL sv; int mag; sv = special_on; special_on = TRUE; if( gif_ch && (gif_flag % 2) ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } if( !gif_open[gif_flag] ){ +#line 10776 "./tex4ht-c.tex" + (IGNORED) sprintf(str, "configuration for htf class %d (char %d of %s.htf)", gif_flag, ch,font_tbl[cur_fnt].name @@ -5074,13 +6268,19 @@ if( no_root_file ){ open_o_file(); } warn_i_str(50,str); +#line 10784 "./tex4ht-c.tex" + gif_open[gif_flag] = m_alloc(char, +#line 10809 "./tex4ht-c.tex" + 29 ); (IGNORED) strcpy((char *) gif_open[gif_flag], +#line 10805 "./tex4ht-c.tex" + "\"+++++\"+" ); @@ -5105,6 +6305,8 @@ gif_id[gif_flag] = gif_open[gif_flag]+28; store_bit_I( class_on, gif_flag ); } +#line 11465 "./tex4ht-c.tex" + p= gif_open[gif_flag]; if( p ) if( *p ){ @@ -5112,6 +6314,8 @@ if( *p ){ mag = (int) ((double) font_tbl[cur_fnt].scale / font_tbl[cur_fnt].design_sz * 10 ); +#line 10891 "./tex4ht-c.tex" + if( !dos_file_names ){ print_f(font_tbl[cur_fnt].name); if( mag == 10 ) (IGNORED) sprintf(str, GIF_I, design_ch, gif); @@ -5119,6 +6323,8 @@ if( !dos_file_names ){ } +#line 10912 "./tex4ht-c.tex" + if( dos_file_names ){ dos_gif_file(str, mag, design_ch); @@ -5134,6 +6340,8 @@ if( dos_file_names ){ +#line 11498 "./tex4ht-c.tex" + p = gif_alt[gif_flag]; if( p ) if( *p ){ @@ -5142,6 +6350,8 @@ if( p ) +#line 11512 "./tex4ht-c.tex" + p = gif_class[gif_flag]; if( p ) if( *p ){ @@ -5150,6 +6360,8 @@ if( p ) +#line 11536 "./tex4ht-c.tex" + p = gif_size[gif_flag]; if( p ) if( *p ){ @@ -5158,6 +6370,8 @@ if( p ) +#line 11553 "./tex4ht-c.tex" + p = gif_mag[gif_flag]; if( p ) if( *p && (font_tbl[cur_fnt].mag != 100) ){ @@ -5166,6 +6380,8 @@ if( p ) +#line 11568 "./tex4ht-c.tex" + p = gif_ord[gif_flag]; if( p ) if( *p ){ @@ -5174,15 +6390,23 @@ if( p ) +#line 11585 "./tex4ht-c.tex" + p = gif_end[gif_flag]; if( p ) if( *p ){ print_f( p ); } } else { +#line 10828 "./tex4ht-c.tex" + if( !gif_flag || (gif_flag % 2) || ch_map_flag ) { put_alt_ch(chr,ch_str_flag); } else{ +#line 11721 "./tex4ht-c.tex" + + +#line 11737 "./tex4ht-c.tex" if( gif_flag && !get_bit( class_on, gif_flag ) ) { notify_class_info(gif_flag); @@ -5192,6 +6416,8 @@ if( gif_flag && !get_bit( class_on, gif_flag ) ) { if( span_on ){ +#line 11747 "./tex4ht-c.tex" + if( span_open[gif_flag] ) if( *span_open[gif_flag] ){ print_f( span_open[gif_flag] ); @@ -5199,6 +6425,8 @@ if( span_open[gif_flag] ) +#line 11771 "./tex4ht-c.tex" + if( span_name[gif_flag] ) if( *span_name[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_name[gif_flag], @@ -5207,6 +6435,8 @@ if( span_name[gif_flag] ) +#line 11781 "./tex4ht-c.tex" + if( span_size[gif_flag] ) if( *span_size[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_size[gif_flag], @@ -5215,6 +6445,8 @@ if( span_size[gif_flag] ) +#line 11790 "./tex4ht-c.tex" + if( span_mag[gif_flag] ) if( *span_mag[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_mag[gif_flag], @@ -5223,6 +6455,8 @@ if( span_mag[gif_flag] ) +#line 11799 "./tex4ht-c.tex" + if( span_ord[gif_flag] ) if( *span_ord[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_ord[gif_flag], chr); @@ -5230,6 +6464,8 @@ if( span_ord[gif_flag] ) +#line 11763 "./tex4ht-c.tex" + if( span_ch[gif_flag] ) if( *span_ch[gif_flag] ){ print_f( span_ch[gif_flag] ); @@ -5240,6 +6476,8 @@ if( span_ch[gif_flag] ) put_alt_ch(chr,ch_str_flag); if( span_on ){ +#line 11754 "./tex4ht-c.tex" + if( end_span[gif_flag] ) if( *end_span[gif_flag] ){ print_f( end_span[gif_flag] ); @@ -5255,13 +6493,21 @@ special_on = sv; } design_ch = 0; } else { +#line 10819 "./tex4ht-c.tex" + if( !gif_flag || (gif_flag % 2) || ch_map_flag ) { put_char(chr); } else{ +#line 11702 "./tex4ht-c.tex" + + +#line 1715 "./tex4ht-c.tex" if( no_root_file ){ open_o_file(); } +#line 11737 "./tex4ht-c.tex" + if( gif_flag && !get_bit( class_on, gif_flag ) ) { notify_class_info(gif_flag); store_bit_I( class_on, gif_flag ); @@ -5270,6 +6516,8 @@ if( gif_flag && !get_bit( class_on, gif_flag ) ) { if( span_on ){ +#line 11747 "./tex4ht-c.tex" + if( span_open[gif_flag] ) if( *span_open[gif_flag] ){ print_f( span_open[gif_flag] ); @@ -5277,6 +6525,8 @@ if( span_open[gif_flag] ) +#line 11771 "./tex4ht-c.tex" + if( span_name[gif_flag] ) if( *span_name[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_name[gif_flag], @@ -5285,6 +6535,8 @@ if( span_name[gif_flag] ) +#line 11781 "./tex4ht-c.tex" + if( span_size[gif_flag] ) if( *span_size[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_size[gif_flag], @@ -5293,6 +6545,8 @@ if( span_size[gif_flag] ) +#line 11790 "./tex4ht-c.tex" + if( span_mag[gif_flag] ) if( *span_mag[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_mag[gif_flag], @@ -5301,6 +6555,8 @@ if( span_mag[gif_flag] ) +#line 11799 "./tex4ht-c.tex" + if( span_ord[gif_flag] ) if( *span_ord[gif_flag] ){ (IGNORED) fprintf(cur_o_file, span_ord[gif_flag], chr); @@ -5308,6 +6564,8 @@ if( span_ord[gif_flag] ) +#line 11763 "./tex4ht-c.tex" + if( span_ch[gif_flag] ) if( *span_ch[gif_flag] ){ print_f( span_ch[gif_flag] ); @@ -5318,6 +6576,8 @@ if( span_ch[gif_flag] ) put_char(chr); if( span_on ){ +#line 11754 "./tex4ht-c.tex" + if( end_span[gif_flag] ) if( *end_span[gif_flag] ){ print_f( end_span[gif_flag] ); @@ -5333,26 +6593,36 @@ if( end_span[gif_flag] ) } } +#line 12403 "./tex4ht-c.tex" + if( a_accent_template && needs_accented_sym ){ (IGNORED) fprintf(cur_o_file, "%s", a_accent_fifth); } +#line 8211 "./tex4ht-c.tex" + if( pos_dvi ){ print_f(end_pos_text); } +#line 12945 "./tex4ht-c.tex" + if( show_class && !pause_class && !ignore_subclass_del ){ if( !stack[stack_n].no_left_del && stack[stack_n+1].active_class_del ){ if( !stack[stack_n+1].ignore_subclass_del ){ +#line 12960 "./tex4ht-c.tex" + (IGNORED) print_f( close_class[math_class]); } +#line 12973 "./tex4ht-c.tex" + (IGNORED) print_f( (stack[stack_n+1].temp_class_del)? stack[stack_n+1].temp_class_close : stack[stack_n+1].class_close); @@ -5361,6 +6631,8 @@ if( show_class && !pause_class && !ignore_subclass_del ){ stack[stack_n+1].active_class_del = FALSE; } else { +#line 12960 "./tex4ht-c.tex" + (IGNORED) print_f( close_class[math_class]); @@ -5370,8 +6642,12 @@ if( show_class && !pause_class && !ignore_subclass_del ){ +#line 2913 "./tex4ht-c.tex" + if( trace_dvi_C && !ch_map_flag ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -5380,17 +6656,27 @@ if( no_root_file ){ open_o_file(); } } +#line 2619 "./tex4ht-c.tex" + + + +#line 12305 "./tex4ht-c.tex" +#line 12279 "./tex4ht-c.tex" if( needs_end_accent && t_accent_template ){ +#line 2609 "./tex4ht-c.tex" + if( span_on && in_span_ch ){ if( *end_span[0] ){ in_span_ch = FALSE; +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -5400,6 +6686,8 @@ if( no_root_file ){ open_o_file(); } (IGNORED) fprintf(cur_o_file, "%s", t_accent_fifth); needs_end_accent = FALSE; +#line 12422 "./tex4ht-c.tex" + needs_accented_sym--; @@ -5413,10 +6701,16 @@ needs_accented_sym--; text_on = TRUE; } } +#line 9798 "./tex4ht-c.tex" + return (INTEGER)( +#line 9835 "./tex4ht-c.tex" + design_size_to_pt( *(font_tbl[cur_fnt].wtbl + (int) ( +#line 9843 "./tex4ht-c.tex" + *(font_tbl[cur_fnt].char_wi + (int) ( ch - font_tbl[cur_fnt].char_f)% 256) @@ -5431,6 +6725,8 @@ design_size_to_pt( *(font_tbl[cur_fnt].wtbl } +#line 16613 "./tex4ht-c.tex" + static void put_char #ifdef ANSI @@ -5449,23 +6745,31 @@ static void put_char && !( ((ch==' ') || (ch=='\n')) && no_root_file ) ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } if( ch_map_flag ){ if( special_on || ((ch != '\n') && (ch != ' ')) ){ +#line 4988 "./tex4ht-c.tex" + insert_ch_map((char) ch, TRUE); } }else { if ( ch == '\n' ){ +#line 3409 "./tex4ht-c.tex" + if( eoln_str ){ print_f(eoln_str); } else { (IGNORED) put_4ht_ch( ch, cur_o_file ); } recover_spaces = 0; } else if ( ch == ' ' ){ +#line 3431 "./tex4ht-c.tex" + if( space_str ){ print_f(space_str); } else { (IGNORED) put_4ht_ch( ch, cur_o_file ); } @@ -5474,6 +6778,8 @@ else { (IGNORED) put_4ht_ch( ch, cur_o_file ); } } } } +#line 16646 "./tex4ht-c.tex" + static void print_f #ifdef ANSI @@ -5489,6 +6795,8 @@ static void print_f #endif { +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -5499,6 +6807,8 @@ if( no_root_file ){ open_o_file(); } } } +#line 16666 "./tex4ht-c.tex" + static void print_f_4ht #ifdef ANSI @@ -5514,6 +6824,8 @@ static void print_f_4ht #endif { +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -5526,21 +6838,29 @@ if( no_root_file ){ open_o_file(); } } } } +#line 16691 "./tex4ht-c.tex" + static int get_char(MYVOID) { return (int) getc(dvi_file); } +#line 16703 "./tex4ht-c.tex" + static int get_noop(MYVOID) { int ch; while( (ch = get_char()) == +#line 17315 "./tex4ht-c.tex" + 138 ){;} return ch; } +#line 16719 "./tex4ht-c.tex" + static char* get_str #ifdef ANSI @@ -5562,6 +6882,8 @@ static char* get_str } +#line 16743 "./tex4ht-c.tex" + static long fget_unt #ifdef ANSI @@ -5587,6 +6909,8 @@ static long fget_unt } +#line 16767 "./tex4ht-c.tex" + static long fget_int #ifdef ANSI @@ -5614,6 +6938,8 @@ static long fget_int } +#line 16803 "./tex4ht-c.tex" + static long cond_int #ifdef ANSI @@ -5642,6 +6968,8 @@ static long cond_int } +#line 16910 "./tex4ht-c.tex" + static void warn_i #ifdef ANSI @@ -5661,6 +6989,8 @@ static void warn_i } +#line 16934 "./tex4ht-c.tex" + static void warn_i_int #ifdef ANSI @@ -5682,6 +7012,8 @@ static void warn_i_int } +#line 16950 "./tex4ht-c.tex" + static void warn_i_int_2 #ifdef ANSI @@ -5703,6 +7035,8 @@ static void warn_i_int_2 } +#line 16966 "./tex4ht-c.tex" + static void warn_i_str #ifdef ANSI @@ -5729,6 +7063,8 @@ static void warn_i_str } +#line 16986 "./tex4ht-c.tex" + static void warn_i_str2 #ifdef ANSI @@ -5756,6 +7092,8 @@ static void warn_i_str2 } +#line 17020 "./tex4ht-c.tex" + static void err_i #ifdef ANSI @@ -5778,6 +7116,8 @@ static void err_i } +#line 17037 "./tex4ht-c.tex" + static void err_i_int #ifdef ANSI @@ -5800,6 +7140,8 @@ static void err_i_int } +#line 17053 "./tex4ht-c.tex" + static void err_i_str #ifdef ANSI @@ -5826,6 +7168,8 @@ static void err_i_str } +#line 17100 "./tex4ht-c.tex" + static void show_err_context(MYVOID) { long curr_pos; int n, i; @@ -5840,6 +7184,8 @@ static void show_err_context(MYVOID) } } (IGNORED) fseek(dvi_file, curr_pos, +#line 2174 "./tex4ht-c.tex" + 0 ); (IGNORED) putc( '\n', stderr ); (IGNORED) putc( '\n', stderr ); @@ -5849,6 +7195,8 @@ static void show_err_context(MYVOID) int +#line 507 "./tex4ht-c.tex" + #ifdef CDECL CDECL #endif @@ -5870,31 +7218,47 @@ CDECL #undef SEP #endif { +#line 1385 "./tex4ht-c.tex" + register INTEGER i; int ch; +#line 2208 "./tex4ht-c.tex" + int unread_pages; +#line 5398 "./tex4ht-c.tex" + long int eof_op_n, begin_postamble; int dis_pages; +#line 6602 "./tex4ht-c.tex" + int stack_id=0; +#line 11856 "./tex4ht-c.tex" + static struct css_ext_rec * css_ext = (struct css_ext_rec *) 0; static char css_default[] = "4cs"; +#line 12257 "./tex4ht-c.tex" + BOOL in_accenting; +#line 13032 "./tex4ht-c.tex" + char* tex4ht_env_file = (char *) 0; char* dos_env_file = #if defined(__MSDOS__) +#line 13219 "./tex4ht-c.tex" + get_env_dir(argv[0]) ; @@ -5905,10 +7269,14 @@ get_env_dir(argv[0]) +#line 13857 "./tex4ht-c.tex" + struct htf_com_rec* htf_font_dir = (struct htf_com_rec *) 0; +#line 1064 "./tex4ht-c.tex" + #ifdef WIN32 /* The idea here is to split options apart at spaces: a single argument "-foo -bar" becomes the two options "-foo" and "-bar". We need to @@ -5962,6 +7330,8 @@ struct htf_com_rec* htf_font_dir = (struct htf_com_rec *) 0; +#line 1159 "./tex4ht-c.tex" + #ifdef SIGSEGV (void) signal(SIGSEGV,sig_err); @@ -5969,6 +7339,8 @@ struct htf_com_rec* htf_font_dir = (struct htf_com_rec *) 0; (void) signal(SIGFPE,sig_err); #ifdef WIN32 +#line 577 "./tex4ht-c.tex" + SetConsoleCtrlHandler((PHANDLER_ROUTINE)sigint_handler, TRUE); @@ -5980,18 +7352,20 @@ SetConsoleCtrlHandler((PHANDLER_ROUTINE)sigint_handler, TRUE); +#line 1336 "./tex4ht-c.tex" + (IGNORED) printf("----------------------------\n"); #ifndef KPATHSEA #ifdef PLATFORM - (IGNORED) printf("tex4ht.c (2012-07-25-19:36 %s)\n",PLATFORM); + (IGNORED) printf("tex4ht.c (2018-06-29-11:18 %s)\n",PLATFORM); #else - (IGNORED) printf("tex4ht.c (2012-07-25-19:36)\n"); + (IGNORED) printf("tex4ht.c (2018-06-29-11:18)\n"); #endif #else #ifdef PLATFORM - (IGNORED) printf("tex4ht.c (2012-07-25-19:36 %s kpathsea)\n",PLATFORM); + (IGNORED) printf("tex4ht.c (2018-06-29-11:18 %s kpathsea)\n",PLATFORM); #else - (IGNORED) printf("tex4ht.c (2012-07-25-19:36 kpathsea)\n"); + (IGNORED) printf("tex4ht.c (2018-06-29-11:18 kpathsea)\n"); #endif #endif for(i=0; iid = -1; +#line 8458 "./tex4ht-c.tex" + pos_text = pos_line = end_pos_body = end_pos_text = pos_body = m_alloc(char, (int) 1); (IGNORED) strcpy((char *) pos_text, "" ); +#line 9746 "./tex4ht-c.tex" + margin_sp = (double) MARGINSP; +#line 11660 "./tex4ht-c.tex" + { int i; i=256; while( i-- ) { span_name[i] = span_open[i] = span_size[i] = span_mag[i] = span_ch[i] = end_span[i] = @@ -6059,10 +7453,16 @@ margin_sp = (double) MARGINSP; } +#line 12261 "./tex4ht-c.tex" + in_accenting = FALSE; +#line 12751 "./tex4ht-c.tex" + for( math_class=0; math_class< +#line 12717 "./tex4ht-c.tex" + 79 ; math_class++ ){ @@ -6072,16 +7472,24 @@ for( math_class=0; math_class< } +#line 14205 "./tex4ht-c.tex" + HOME_DIR = getenv("HOME"); +#line 1360 "./tex4ht-c.tex" + { long file_len; +#line 1443 "./tex4ht-c.tex" + { int i; U_CHAR *p; const U_CHAR *in_name = "", *out_name = ""; +#line 14876 "./tex4ht-c.tex" + #ifdef KPATHSEA kpse_set_program_name (argv[0], "tex4ht"); @@ -6089,6 +7497,8 @@ HOME_DIR = getenv("HOME"); +#line 642 "./tex4ht-c.tex" + #if !defined(DOS_GIF_FILE) && !defined(WIN32) && defined(__DJGPP__) dos_file_names = !_use_lfn(NULL); #endif @@ -6097,15 +7507,21 @@ HOME_DIR = getenv("HOME"); if( argc == 1 ){ bad_arg; } for(i=1; ioption = p+2; @@ -6114,10 +7530,14 @@ envChoice = temp; break;} case 'e':{ +#line 13023 "./tex4ht-c.tex" + tex4ht_env_file = p+2; break; } case 'f':{ +#line 1503 "./tex4ht-c.tex" + p = p + 2; in_name = p + (int) strlen((char *) p ); while( *in_name != *p ){ in_name--; } @@ -6125,6 +7545,8 @@ in_name++; break; } case 'F':{ +#line 9961 "./tex4ht-c.tex" + char *digit = p+2; ignore_ch = 0; while( *digit != '\0' ){ @@ -6138,28 +7560,43 @@ while( *digit != '\0' ){ break; } case 'g':{ +#line 11141 "./tex4ht-c.tex" + gif = p+2; break; } case 'h':{ -switch( *(p+2) ){ - case 'e':{ +#line 1513 "./tex4ht-c.tex" + +{ + char trace = *(p+2); + if (trace == 'A' || trace == 'e') { +#line 17134 "./tex4ht-c.tex" + err_context = TRUE; - break; } - case 'f':{ + } + if (trace == 'A' || trace == 'f') { +#line 10489 "./tex4ht-c.tex" + dump_htf_files = 1; - break; } - case 'F':{ + } + if (trace == 'A' || trace == 'F') { +#line 15064 "./tex4ht-c.tex" + dump_htf_search = TRUE; - break; } - case 's':{ + } + if (trace == 'A' || trace == 's') { +#line 17163 "./tex4ht-c.tex" + trace_special = TRUE; - break;} - case 'g':{ + } + if (trace == 'A' || trace == 'g') { +#line 2753 "./tex4ht-c.tex" + trace_dvi_P++; if( !( *trace_dvi_del_P || *end_trace_dvi_del_P || *trace_dvi_del_p || *end_trace_dvi_del_p @@ -6183,20 +7620,26 @@ if( !( *trace_dvi_del_P || *end_trace_dvi_del_P (IGNORED) strcpy((char *) end_trace_dvi_del_p, "]" ); } - break;} - case 'v':{ + } + if (trace == 'A' || trace == 'v') { +#line 10493 "./tex4ht-c.tex" + dump_env_files = TRUE; - break; } - case 'V':{ + } + if (trace == 'A' || trace == 'V') { +#line 13060 "./tex4ht-c.tex" + dump_env_search = TRUE; - break; } - default:{ bad_arg; } + } + else { bad_arg; } } break; } case 'i':{ +#line 13861 "./tex4ht-c.tex" + com_dir(p); { struct htf_com_rec *q, *t; @@ -6214,12 +7657,16 @@ dump_env_search = TRUE; break; } case 'l':{ +#line 14212 "./tex4ht-c.tex" + #ifndef KPATHSEA tex4ht_fls_name = p+2; #endif break; } case 'P':{ +#line 4642 "./tex4ht-c.tex" + { struct sys_call_rec *q; q = m_alloc(struct sys_call_rec, 1); q->next = system_calls; @@ -6229,10 +7676,14 @@ tex4ht_fls_name = p+2; break; } case 'S':{ +#line 11075 "./tex4ht-c.tex" + font_gif = p+2; break; } case 's':{ +#line 11840 "./tex4ht-c.tex" + struct css_ext_rec * css = m_alloc(struct css_ext_rec, 1);; css->name = p + 2; css->next = css_ext; @@ -6240,12 +7691,18 @@ css_ext = css; break; } case 't':{ +#line 13479 "./tex4ht-c.tex" + com_dir(p); fontdir[fontdir_count++] = p+2; break; } case 'u':{ +#line 16217 "./tex4ht-c.tex" + if( eq_str(p+2, "10") ){ u10 = TRUE; } +#line 16360 "./tex4ht-c.tex" + else if( eq_str(p+2, "tf8") ){ utf8 = TRUE; } @@ -6253,6 +7710,8 @@ else{ bad_arg;} break; } case 'v':{ +#line 5467 "./tex4ht-c.tex" + { U_CHAR *q; q = p + 2; id_version = 0; @@ -6269,6 +7728,8 @@ else{ bad_arg;} break; } case 'x':{ +#line 649 "./tex4ht-c.tex" + switch( *(p+2) ){ case 's':{ dos_file_names = TRUE; break; } default:{ bad_arg; } @@ -6276,6 +7737,8 @@ switch( *(p+2) ){ break; } case '.':{ +#line 1634 "./tex4ht-c.tex" + ext = p+1; break; } @@ -6286,6 +7749,8 @@ ext = p+1; else in_name = argv[i]; } +#line 11847 "./tex4ht-c.tex" + if( css_ext == (struct css_ext_rec *) 0 ){ struct css_ext_rec * css = m_alloc(struct css_ext_rec, 1);; css->name = css_default; @@ -6295,7 +7760,11 @@ if( css_ext == (struct css_ext_rec *) 0 ){ +#line 1588 "./tex4ht-c.tex" + if( *in_name != '\0' ){ +#line 1596 "./tex4ht-c.tex" + BOOL tag; job_name_n = (int) strlen( in_name ); job_name = m_alloc(char, job_name_n+6); @@ -6303,11 +7772,15 @@ job_name = m_alloc(char, job_name_n+6); tag = job_name_n < 3; if( !tag ){ tag = !eq_str( job_name+job_name_n- +#line 1614 "./tex4ht-c.tex" + ( (ext==NULL)? 4 : (int) strlen((char *) ext) ) , +#line 1620 "./tex4ht-c.tex" + ( (ext==NULL)? ".dvi" : ext ) @@ -6316,11 +7789,15 @@ if( !tag ){ } if( tag ){ job_name_n+= +#line 1614 "./tex4ht-c.tex" + ( (ext==NULL)? 4 : (int) strlen((char *) ext) ) ; (IGNORED) strct(job_name, +#line 1620 "./tex4ht-c.tex" + ( (ext==NULL)? ".dvi" : ext ) @@ -6329,17 +7806,23 @@ if( tag ){ } if( (dvi_file = fopen(job_name, READ_BIN_FLAGS)) == NULL ) { +#line 1655 "./tex4ht-c.tex" + { int i; for(i=job_name_n-5; i; i--){ if( job_name[i] == '.' ){ job_name[i] = '\0'; job_name_n = i + +#line 1614 "./tex4ht-c.tex" + ( (ext==NULL)? 4 : (int) strlen((char *) ext) ) ; (IGNORED) strct(job_name, +#line 1620 "./tex4ht-c.tex" + ( (ext==NULL)? ".dvi" : ext ) @@ -6353,6 +7836,8 @@ if( (dvi_file = fopen(job_name, READ_BIN_FLAGS)) == NULL ) } +#line 5388 "./tex4ht-c.tex" + job_name[job_name_n-1] = 'v'; job_name[job_name_n-2] = 'd'; job_name[job_name_n-3] = 'i'; @@ -6369,13 +7854,19 @@ if( (idv_file = fopen(job_name, WRITE_BIN_FLAGS)) == NULL ) { +#line 1700 "./tex4ht-c.tex" + U_CHAR *name=0; if( *out_name == '\0' ) { if( *in_name == '\0' ){ +#line 1785 "./tex4ht-c.tex" + bad_arg; } else { +#line 1790 "./tex4ht-c.tex" + int n = (int) strlen((char *) job_name ); name = m_alloc(char, 6 + n); (IGNORED) strcpy((char *) name, (char *) job_name); @@ -6388,6 +7879,8 @@ name[n+4] ='\0'; } } else{ +#line 1808 "./tex4ht-c.tex" + int tag = 1; int n = (int) strlen( out_name ); name = m_alloc(char, 6 + n); @@ -6406,8 +7899,12 @@ no_root_file = name; +#line 13064 "./tex4ht-c.tex" + { U_CHAR str[PATH_MAX], *TEX4HTENV; +#line 13082 "./tex4ht-c.tex" + if( dump_env_search && tex4ht_env_file ){ (IGNORED) printf("-e: %s?\n", tex4ht_env_file); } @@ -6416,6 +7913,8 @@ dot_file = tex4ht_env_file? +#line 13127 "./tex4ht-c.tex" + if( !dot_file ){ if( dump_env_search ){ (IGNORED) printf("%s?\n", "tex4ht.env"); } dot_file = f_open("tex4ht.env", READ_TEXT_FLAGS); @@ -6432,6 +7931,8 @@ if( !dot_file ){ if( !dot_file ){ +#line 13156 "./tex4ht-c.tex" + TEX4HTENV = getenv("TEX4HTENV"); if( TEX4HTENV ){ if( dump_env_search ){ @@ -6445,9 +7946,13 @@ if( TEX4HTENV ){ } +#line 13094 "./tex4ht-c.tex" + if( !dot_file ){ if( HOME_DIR ){ (IGNORED) sprintf(str, +#line 13175 "./tex4ht-c.tex" + #if defined(__DJGPP__) is_forward_slash(HOME_DIR)? "%s/tex4ht.env" : "%s\\tex4ht.env" #else @@ -6475,6 +7980,8 @@ if( !dot_file ){ +#line 13143 "./tex4ht-c.tex" + #ifdef ENVFILE if( !dot_file ){ if( dump_env_search ){ (IGNORED) printf("ENVFILE: %s?\n", ENVFILE); } @@ -6488,6 +7995,8 @@ if( !dot_file ){ +#line 13120 "./tex4ht-c.tex" + if( !dot_file && dos_env_file){ if( dump_env_search ){ (IGNORED) printf("%s?\n", dos_env_file); } dot_file = f_open( dos_env_file, READ_TEXT_FLAGS ); @@ -6495,11 +8004,15 @@ if( !dot_file && dos_env_file){ +#line 14885 "./tex4ht-c.tex" + #ifdef KPATHSEA if( !dot_file ) { U_CHAR * envfile; char *arch, *p, str[256]; +#line 14937 "./tex4ht-c.tex" + p = arch = (char *) kpse_var_value( "SELFAUTOLOC" ); while( *p != '\0' ){ if( (*p == '/') || (*p == '\\') ){ @@ -6511,6 +8024,8 @@ while( *p != '\0' ){ envfile = (char *) 0; +#line 14948 "./tex4ht-c.tex" + if( arch ){ (IGNORED) sprintf(str,"%s%ctex4ht.env", arch+1, *arch); if( dump_env_search ){ @@ -6521,6 +8036,8 @@ if( arch ){ if ( !envfile ){ +#line 14959 "./tex4ht-c.tex" + if( dump_env_search ){ (IGNORED) printf("kpse_open_file (\"tex4ht.env\", ...)?\n"); } @@ -6528,11 +8045,16 @@ envfile= kpse_find_file ("tex4ht.env", kpse_program_text_format, 0); } if ( !envfile ){ +#line 15010 "./tex4ht-c.tex" + +#define KPSEWHICH_CMD "kpsewhich --progname=tex4ht --format=othertext tex4ht.env" if( dump_env_search ){ - (IGNORED) printf("system(\"kpsewhich --progname=tex4ht tex4ht.env\")?\n"); + (IGNORED) printf("system(" KPSEWHICH_CMD ")?\n"); /* cpp concatenation */ } -if( system("kpsewhich --progname=tex4ht tex4ht.env > tex4ht.tmp") == 0 ){ +if( system(KPSEWHICH_CMD ">tex4ht.tmp") == 0 ){ +#line 15040 "./tex4ht-c.tex" + char fileaddr [256]; int loc = 0; FILE* file = f_open("tex4ht.tmp", READ_TEXT_FLAGS); @@ -6548,7 +8070,7 @@ if( file ){ envfile= kpse_find_file (fileaddr, kpse_program_text_format, 0); if( envfile ){ warn_i_str( 50, - "search support for kpse_find_file--unsing system kpsewhich calls instead"); + "search support for kpse_find_file--using kpsewhich calls instead"); } } } @@ -6566,20 +8088,25 @@ if( file ){ #endif - if( !dot_file ) warn_i_str( 1, + if( !dot_file ) { bad_in_file( +#line 13185 "./tex4ht-c.tex" + #ifdef DOS_WIN32 "tex4ht.env" -#endif -#ifndef DOS_WIN32 +#else "tex4ht.env | .tex4ht" #endif -); +); } /* give up if no tex4ht.env */ } +#line 4624 "./tex4ht-c.tex" + (IGNORED) fseek(dot_file, 0L, +#line 2174 "./tex4ht-c.tex" + 0 ); while ( search_dot_file( 'P' ) ){ struct sys_call_rec *q; @@ -6598,14 +8125,22 @@ while ( search_dot_file( 'P' ) ){ struct sys_call_rec *q; } +#line 8855 "./tex4ht-c.tex" + lg_font_fmt = (char *) get_script(lg_font_fmt,LGFNT,'f'); +#line 10852 "./tex4ht-c.tex" + class_fmt = (char *) get_script(class_fmt,LGCLS,'c'); +#line 11081 "./tex4ht-c.tex" + font_gif = (char *) get_script(font_gif,LGPIC,'s'); +#line 11087 "./tex4ht-c.tex" + { int n; n = (int) strlen((char *) font_gif); if( font_gif[n-1] != '%' ){ font_gif[n] = '%'; font_gif[n+1] = '\0'; } @@ -6614,9 +8149,13 @@ font_gif = (char *) get_script(font_gif,LGPIC,'s'); +#line 11119 "./tex4ht-c.tex" + begin_char_gif = (char *) get_script(begin_char_gif,LGSEP,'b'); +#line 11147 "./tex4ht-c.tex" + gif = (char *) get_script(gif,LGTYP,'g'); { int n; n = (int) strlen((char *) gif) - 1; @@ -6626,11 +8165,15 @@ gif = (char *) get_script(gif,LGTYP,'g'); +#line 1880 "./tex4ht-c.tex" + { long curr_pos; curr_pos = ftell(dvi_file); (IGNORED) fseek(dvi_file, 0, SEEK_END); file_len = ftell(dvi_file); (IGNORED) fseek(dvi_file, curr_pos, +#line 2174 "./tex4ht-c.tex" + 0 ); if( (file_len % 4) != 0 ) bad_dvi; @@ -6638,6 +8181,8 @@ gif = (char *) get_script(gif,LGTYP,'g'); +#line 5951 "./tex4ht-c.tex" + { U_CHAR str[256]; (IGNORED) strcpy((char *) str, (char *) job_name); str[job_name_n-1] = '\0'; @@ -6649,11 +8194,15 @@ gif = (char *) get_script(gif,LGTYP,'g'); +#line 14435 "./tex4ht-c.tex" + #ifdef KPATHSEA { char str [256], *export_str, *postfix; export_str = m_alloc(char, 1); *export_str = '\0'; +#line 14523 "./tex4ht-c.tex" + { struct htf_com_rec *q; q = htf_font_dir; @@ -6663,6 +8212,8 @@ gif = (char *) get_script(gif,LGTYP,'g'); q = q->next; } } (IGNORED) fseek(dot_file, 0L, +#line 2174 "./tex4ht-c.tex" + 0 ); while ( search_dot_file( 'i' ) ){ @@ -6681,6 +8232,8 @@ while ( search_dot_file( 'i' ) ){ export_htf( &export_str, str ); #endif +#line 14553 "./tex4ht-c.tex" + { U_CHAR * q; q = (U_CHAR *) kpse_var_value( "TEX4HTFONTSET" ); if( q ){ @@ -6708,6 +8261,8 @@ while ( search_dot_file( 'i' ) ){ } } if( (int) strlen((char *) export_str) != 0 ){ +#line 14466 "./tex4ht-c.tex" + { char *from_ch; int i, n, m; n = (int) strlen((char *) str); @@ -6725,9 +8280,13 @@ while ( search_dot_file( 'i' ) ){ +#line 14491 "./tex4ht-c.tex" + { U_CHAR * q; if( dump_htf_search ) { U_CHAR *p, *q; +#line 14840 "./tex4ht-c.tex" + p = (U_CHAR *) kpse_var_value( "TEX4HTFONTSET" ); if( p ){ (IGNORED) printf("given TEX4HTFONTSET = %s\n", p); @@ -6757,6 +8316,8 @@ if( !p && !q ){ } } +#line 14671 "./tex4ht-c.tex" + { int n; n = (int) strlen((char *) export_str); if( n > 0 ){ @@ -6767,9 +8328,13 @@ if( !p && !q ){ free((void *) export_str); +#line 14788 "./tex4ht-c.tex" + if( dump_htf_search || dump_env_search ) { U_CHAR *p, *q; +#line 14818 "./tex4ht-c.tex" + p = kpse_find_file ( "texmf.cnf", kpse_cnf_format, 0); if( p ){ (IGNORED) printf( "texmf.cnf = %s\n", p); @@ -6795,21 +8360,31 @@ if( !p && !q ){ +#line 2150 "./tex4ht-c.tex" + i=0; do{ i++; file_len -= 1; (IGNORED) fseek(dvi_file, file_len, +#line 2174 "./tex4ht-c.tex" + 0 ); } while( (ch=get_char()) == +#line 17418 "./tex4ht-c.tex" + 223 ); eof_op_n = file_len; if( (i<4) || ((ch != +#line 2283 "./tex4ht-c.tex" + 2 -) && (ch > +) && (ch > +#line 2292 "./tex4ht-c.tex" + 10 )) @@ -6817,39 +8392,63 @@ if( (i<4) version_id = ch; +#line 2185 "./tex4ht-c.tex" + file_len -= 5; (IGNORED) fseek(dvi_file, file_len, +#line 2174 "./tex4ht-c.tex" + 0 ); if( get_char() != +#line 17467 "./tex4ht-c.tex" + 249 ) bad_dvi; eof_op_n -= begin_postamble = get_unt(4); (IGNORED) fseek(dvi_file, begin_postamble, +#line 2174 "./tex4ht-c.tex" + 0 ); +#line 2197 "./tex4ht-c.tex" + if( get_char() != +#line 17464 "./tex4ht-c.tex" + 248 ) bad_dvi; (IGNORED) fseek(dvi_file, 16L, +#line 2177 "./tex4ht-c.tex" + 1 ); +#line 5966 "./tex4ht-c.tex" + mid_page_y = (INTEGER) get_unt(4) / 2; mid_page_x = (INTEGER) get_unt(4) / 2; if( (stack_len = (int) get_unt(2)) < 1) bad_dvi; +#line 6677 "./tex4ht-c.tex" + stack = m_alloc(struct stack_entry, +#line 6682 "./tex4ht-c.tex" + ((int) stack_len + 2) ); +#line 6716 "./tex4ht-c.tex" + { int i; for( i= +#line 6682 "./tex4ht-c.tex" + ((int) stack_len + 2) -1; i>=0; i--){ @@ -6857,14 +8456,20 @@ stack = m_alloc(struct stack_entry, stack[i].end = (struct stack_end_entry *) 0; stack[i].stack_id = -1; +#line 6352 "./tex4ht-c.tex" + stack[i].halign_info = FALSE; stack[i].halign_on = FALSE; +#line 7802 "./tex4ht-c.tex" + stack[i].path_start = (struct group_path *) 0; stack[i].path_end = (struct group_path *) 0; +#line 12885 "./tex4ht-c.tex" + stack[i].class_open = stack[i].class_close = (char *) 0; stack[i].temp_class_open = m_alloc(char, 1 ); @@ -6882,24 +8487,36 @@ stack[i].ignore_subclass_del = stack[i].temp_class_del unread_pages = (int) get_unt(2); +#line 2222 "./tex4ht-c.tex" + { +#line 10254 "./tex4ht-c.tex" + int fonts_n; struct html_font_rec *html_font=0; +#line 11936 "./tex4ht-c.tex" + struct visited_file_rec * visited_file = (struct visited_file_rec *) 0; +#line 13646 "./tex4ht-c.tex" + #ifndef KPATHSEA struct env_var_rec *tfm_dirs; #endif struct env_var_rec *htf_dirs; +#line 14661 "./tex4ht-c.tex" + #ifdef KPATHSEA +#line 14681 "./tex4ht-c.tex" + int cardinality=0; char ** fontset=0; @@ -6910,14 +8527,20 @@ char ** fontset=0; BOOL missing_fonts; #ifndef KPATHSEA +#line 14193 "./tex4ht-c.tex" + U_CHAR files_cache[PATH_MAX]; +#line 14153 "./tex4ht-c.tex" + { U_CHAR *p; if( !tex4ht_fls_name ){ tex4ht_fls_name = p = files_cache; (IGNORED) fseek(dot_file, 0L, +#line 2174 "./tex4ht-c.tex" + 0 ); if ( search_dot_file( 'l' ) ){ @@ -6930,6 +8553,8 @@ U_CHAR files_cache[PATH_MAX]; } } +#line 14172 "./tex4ht-c.tex" + if( *tex4ht_fls_name == '~' ){ tex4ht_fls_name = abs_addr(tex4ht_fls_name,getenv("TEX4HTWR")); } @@ -6939,20 +8564,28 @@ if( *tex4ht_fls_name == '~' ){ +#line 14336 "./tex4ht-c.tex" + cache_files = f_open(tex4ht_fls_name, READ_BIN_FLAGS); #endif +#line 10259 "./tex4ht-c.tex" + fonts_n = 0; +#line 13726 "./tex4ht-c.tex" + cache_font = (struct cache_font_rec *) 0; cur_cache_font = (struct cache_font_rec *) 0; missing_fonts = FALSE; +#line 13566 "./tex4ht-c.tex" + #ifndef KPATHSEA tfm_dirs = get_env_var("TEX4HTTFM"); #endif @@ -6960,10 +8593,14 @@ htf_dirs = get_env_var("TEX4HTHTF"); +#line 14686 "./tex4ht-c.tex" + #ifdef KPATHSEA if( export_str_chars ){ +#line 14707 "./tex4ht-c.tex" + { U_CHAR *p; int n; cardinality = 1; @@ -6987,12 +8624,18 @@ if( export_str_chars ){ +#line 15933 "./tex4ht-c.tex" + { U_CHAR name[256]; FILE* file; (IGNORED) sprintf(name, "%s.4hf", "unicode"); +#line 13835 "./tex4ht-c.tex" + file = NULL; +#line 13903 "./tex4ht-c.tex" + { struct htf_com_rec *p; p = htf_font_dir; @@ -7017,15 +8660,21 @@ if( export_str_chars ){ READ_TEXT_FLAGS, htf_dirs); #endif +#line 15071 "./tex4ht-c.tex" + #ifdef KPATHSEA if( !file ){ U_CHAR * htfname; htfname= kpse_find_file (name, kpse_program_text_format, 0); if ( htfname ){ +#line 14727 "./tex4ht-c.tex" + { U_CHAR * head, * tail, *p; int n; +#line 14737 "./tex4ht-c.tex" + n = (int) strlen((char *) htfname); tail = head = m_alloc(char, n+1); (IGNORED) strcpy((char *) head, (char *) htfname); @@ -7046,6 +8695,8 @@ while( n>11 ){ htfname = (U_CHAR *) 0; +#line 14759 "./tex4ht-c.tex" + for( n = 0 ; (n < cardinality) && !htfname ; n++){ p = tail; while( *p != '\0' ){ @@ -7082,6 +8733,8 @@ for( n = 0 ; (n < cardinality) && !htfname ; n++){ if( file ){ +#line 15948 "./tex4ht-c.tex" + int chr, delimiter, delimiter_n, line_no, digit, i, j; U_CHAR in[512], *in_p, * start[4], *p; BOOL char_on, err; @@ -7089,15 +8742,21 @@ int value; +#line 16051 "./tex4ht-c.tex" + max_charset_n = 256; charset = m_alloc(struct charset_rec, 256); +#line 16463 "./tex4ht-c.tex" + max_htf_4hf_n = 256; htf_4hf = m_alloc(struct htf_4hf_rec, 256); +#line 15956 "./tex4ht-c.tex" + err = FALSE; line_no = 0; while( TRUE ){ @@ -7106,6 +8765,8 @@ while( TRUE ){ if( chr == EOF ){ break; } if( (chr>32) && (chr<127) ){ +#line 15992 "./tex4ht-c.tex" + delimiter = chr; delimiter_n = 1; char_on = TRUE; @@ -7128,6 +8789,8 @@ while( TRUE ) { if( delimiter_n == 8 ){ if( *in != '?' ) { if( +#line 15985 "./tex4ht-c.tex" + (*in != '&') || (*(in+1) != '#') || ( (*(in+2) != 'x') && (*(in+2) != 'X')) @@ -7136,6 +8799,8 @@ while( TRUE ) { ){ err = TRUE; } else { +#line 16061 "./tex4ht-c.tex" + value = 0; for( p=in+3; *p!=';'; p++){ digit = (int) *p; @@ -7149,6 +8814,10 @@ for( p=in+3; *p!=';'; p++){ if( start[3] == (in_p-1) ){ if( !err ){ +#line 16080 "./tex4ht-c.tex" + + +#line 16110 "./tex4ht-c.tex" if( (charset_n+1) == max_charset_n){ max_charset_n += 10; @@ -7183,6 +8852,10 @@ charset[i].ch = value; } } else { +#line 16379 "./tex4ht-c.tex" + + +#line 16419 "./tex4ht-c.tex" if( (htf_4hf_n+1) == max_htf_4hf_n){ max_htf_4hf_n += 10; @@ -7216,6 +8889,8 @@ if(i == htf_4hf_n){ htf_4hf_n++; } htf_4hf[i].str = p; htf_4hf[i].ch = value; +#line 16429 "./tex4ht-c.tex" + value = 0; p = start[1]; while( *p != '\0' ){ @@ -7226,6 +8901,8 @@ while( *p != '\0' ){ htf_4hf[i].type1 = value; +#line 16440 "./tex4ht-c.tex" + value = 0; p = start[3]; while( *p != '\0' ){ @@ -7242,6 +8919,8 @@ htf_4hf[i].type2 = value; } } } else { err = TRUE; } +#line 16018 "./tex4ht-c.tex" + if( err ){ warn_i_int(48,line_no); (IGNORED) printf( "%c", delimiter ); @@ -7267,9 +8946,13 @@ if( err ){ put_4ht_off = 0; } else{ put_4ht_off = 1; +#line 16056 "./tex4ht-c.tex" + max_charset_n = 0; +#line 16468 "./tex4ht-c.tex" + max_htf_4hf_n = 0; } @@ -7277,9 +8960,13 @@ max_htf_4hf_n = 0; while( (ch = get_char()) != +#line 17467 "./tex4ht-c.tex" + 249 ){ +#line 8661 "./tex4ht-c.tex" + #ifdef MAXFONTS if( (font_tbl_size + 1) < MAXFONTS ) #endif @@ -7292,21 +8979,29 @@ if( (font_tbl_size + 1) < MAXFONTS ) * sizeof(struct font_entry))) : m_alloc(struct font_entry, 1); if( (version_id == -5 +#line 2292 "./tex4ht-c.tex" + +10 ) && (ch == +#line 17488 "./tex4ht-c.tex" + 252 ) ){ +#line 8884 "./tex4ht-c.tex" + unsigned short flags; new_font.num = (INTEGER) get_unt(4); new_font.scale = (INTEGER) get_unt(4); new_font.design_sz = new_font.scale; flags = (INTEGER) get_unt(2); +#line 8911 "./tex4ht-c.tex" + { int n, family_name_n, style_name_n; U_CHAR *ch; @@ -7329,10 +9024,14 @@ flags = (INTEGER) get_unt(2); new_font.layout_dir = (flags & +#line 8949 "./tex4ht-c.tex" + 0x0100 ) ? 1 : 0; new_font.rgba_color = (flags & +#line 8953 "./tex4ht-c.tex" + 0x0200 )? @@ -7340,6 +9039,8 @@ new_font.rgba_color = (flags & : 0xffffffff; if( flags & +#line 8957 "./tex4ht-c.tex" + 0x0800 ){ @@ -7353,6 +9054,10 @@ if( flags & } } (IGNORED) printf("(--- xdv font = %s (not implemented) ---)\n", new_font_name); +#line 9075 "./tex4ht-c.tex" + + +#line 9296 "./tex4ht-c.tex" { int i; for( i=font_tbl_size-1; i>0; i-- ) @@ -7360,6 +9065,8 @@ if( flags & +#line 9096 "./tex4ht-c.tex" + { /* @@ -7371,8 +9078,12 @@ if( flags & } else { */ +#line 9117 "./tex4ht-c.tex" + { +#line 9164 "./tex4ht-c.tex" + new_font.char_f = 0; new_font.char_l = 255; new_font.wtbl_n = 0; @@ -7382,6 +9093,8 @@ new_font.dtbl_n = 0; +#line 9189 "./tex4ht-c.tex" + { U_CHAR *ch, *hidp; int i; ch = new_font.char_wi = m_alloc(char, new_font.char_l @@ -7395,6 +9108,8 @@ new_font.dtbl_n = 0; +#line 9203 "./tex4ht-c.tex" + { INTEGER *p; int i; p = new_font.wtbl = m_alloc( INTEGER, new_font.wtbl_n); @@ -7404,6 +9119,8 @@ new_font.dtbl_n = 0; +#line 9214 "./tex4ht-c.tex" + { INTEGER *p; int i; p = new_font.htbl = m_alloc( INTEGER, new_font.htbl_n); @@ -7418,13 +9135,21 @@ new_font.dtbl_n = 0; +#line 9138 "./tex4ht-c.tex" + + +#line 9149 "./tex4ht-c.tex" new_font.it = 0; +#line 9154 "./tex4ht-c.tex" + new_font.word_sp = 350000; +#line 9750 "./tex4ht-c.tex" + if( new_font.word_sp == 0 ) { int i; for( i = new_font.char_f; i <= new_font.char_l; i++ ){ @@ -7460,6 +9185,8 @@ new_font_name[font_name_n] = '\0'; new_font.name = m_alloc(char, font_name_n + 1); (IGNORED) strcpy((char *) new_font.name, (char *) new_font_name ); +#line 8779 "./tex4ht-c.tex" + { int n, i; for( n=0; n '9' )){ @@ -7489,6 +9218,8 @@ new_font.name = m_alloc(char, font_name_n + 1); +#line 9086 "./tex4ht-c.tex" + new_font.mag = new_font.scale / (new_font.design_sz / 100); @@ -7498,22 +9229,36 @@ new_font.mag = new_font.scale / (new_font.design_sz / 100); } else { +#line 8695 "./tex4ht-c.tex" + + +#line 8721 "./tex4ht-c.tex" switch( ch ){ case +#line 17449 "./tex4ht-c.tex" + 243 : case +#line 17452 "./tex4ht-c.tex" + 244 : case +#line 17455 "./tex4ht-c.tex" + 245 : { new_font.num = (INTEGER) get_unt(ch - +#line 17449 "./tex4ht-c.tex" + 243 + 1); break; } case +#line 17458 "./tex4ht-c.tex" + 246 : { new_font.num = (INTEGER) get_int(4); break; } @@ -7525,6 +9270,8 @@ new_font_checksum = (INTEGER) get_int(4); new_font.scale = (INTEGER) get_unt(4); new_font.design_sz = (INTEGER) get_unt(4); +#line 8735 "./tex4ht-c.tex" + { int n, area_ln; U_CHAR *ch; area_ln = (int) get_unt(1); @@ -7537,6 +9284,10 @@ new_font.design_sz = (INTEGER) get_unt(4); +#line 8751 "./tex4ht-c.tex" + + +#line 9296 "./tex4ht-c.tex" { int i; for( i=font_tbl_size-1; i>0; i-- ) @@ -7544,24 +9295,34 @@ new_font.design_sz = (INTEGER) get_unt(4); +#line 9342 "./tex4ht-c.tex" + { FILE *font_file; U_CHAR file_name[256]; +#line 13510 "./tex4ht-c.tex" + { font_file = NULL; (IGNORED) sprintf(file_name, "%s.tfm", new_font_name); +#line 14969 "./tex4ht-c.tex" + #ifdef KPATHSEA { U_CHAR * tfmfile; tfmfile = kpse_find_file (file_name, kpse_tfm_format, 0); if( !tfmfile ){ +#line 15024 "./tex4ht-c.tex" + char s [256]; (IGNORED) strcpy(s, "kpsewhich "); (IGNORED) strcat(s, file_name); (IGNORED) strcat(s, " > tex4ht.tmp "); if( system(s) == 0 ){ +#line 15040 "./tex4ht-c.tex" + char fileaddr [256]; int loc = 0; FILE* file = f_open("tex4ht.tmp", READ_TEXT_FLAGS); @@ -7587,6 +9348,8 @@ if( file ){ +#line 13666 "./tex4ht-c.tex" + for( cur_cache_font = cache_font; cur_cache_font; cur_cache_font = cur_cache_font->next ) @@ -7607,6 +9370,8 @@ for( cur_cache_font = cache_font; font_file = search_in_dot_file( 't', file_name, READ_BIN_FLAGS, tfm_dirs); +#line 13542 "./tex4ht-c.tex" + #ifdef TFMDIR if( !font_file ) font_file = search_file_base(file_name, TFMDIR, @@ -7615,6 +9380,8 @@ for( cur_cache_font = cache_font; +#line 14986 "./tex4ht-c.tex" + #endif @@ -7628,7 +9395,11 @@ for( cur_cache_font = cache_font; new_font.char_l = 1; } else { +#line 9383 "./tex4ht-c.tex" + { +#line 9433 "./tex4ht-c.tex" + INTEGER file_length; int header_length, it_correction_table_length, @@ -7639,6 +9410,8 @@ for( cur_cache_font = cache_font; +#line 9405 "./tex4ht-c.tex" + file_length = (INTEGER) fget_int(font_file,2); header_length = (int) fget_int(font_file,2); new_font.char_f = (int) fget_int(font_file,2); @@ -7661,6 +9434,10 @@ if( file_length != ( 6 + header_length +#line 9478 "./tex4ht-c.tex" + + +#line 9487 "./tex4ht-c.tex" { INTEGER checksum; checksum = ( INTEGER) fget_int(font_file,4); @@ -7673,15 +9450,21 @@ if( file_length != ( 6 + header_length +#line 9507 "./tex4ht-c.tex" + new_font.design_pt = ( INTEGER) fget_int(font_file,4); (IGNORED) fseek(font_file, (long) ((header_length - 2) * 4), +#line 2177 "./tex4ht-c.tex" + 1 ); +#line 9519 "./tex4ht-c.tex" + { U_CHAR *ch, *hidp; int i; ch = new_font.char_wi = m_alloc(char, new_font.char_l @@ -7692,12 +9475,16 @@ new_font.design_pt = ( INTEGER) fget_int(font_file,4); *(ch++) = (int) fget_unt(font_file,1); *(hidp++) = (int) fget_unt(font_file,1); (IGNORED) fseek(font_file, 2L, +#line 2177 "./tex4ht-c.tex" + 1 ); } } +#line 9574 "./tex4ht-c.tex" + { INTEGER *p; int i; p = new_font.wtbl = m_alloc( INTEGER, new_font.wtbl_n); @@ -7707,6 +9494,8 @@ new_font.design_pt = ( INTEGER) fget_int(font_file,4); +#line 9610 "./tex4ht-c.tex" + { INTEGER *p; int i; p = new_font.htbl = m_alloc( INTEGER, new_font.htbl_n); @@ -7715,6 +9504,8 @@ new_font.design_pt = ( INTEGER) fget_int(font_file,4); } } +#line 9634 "./tex4ht-c.tex" + { INTEGER *p; int i; p = new_font.dtbl = m_alloc( INTEGER, new_font.dtbl_n); @@ -7725,43 +9516,67 @@ new_font.design_pt = ( INTEGER) fget_int(font_file,4); +#line 9657 "./tex4ht-c.tex" + (IGNORED) fseek(font_file, (long) (it_correction_table_length * 4), +#line 2177 "./tex4ht-c.tex" + 1 ); +#line 9667 "./tex4ht-c.tex" + (IGNORED) fseek(font_file, (long) (lig_kern_table_length * 4), +#line 2177 "./tex4ht-c.tex" + 1 ); +#line 9676 "./tex4ht-c.tex" + (IGNORED) fseek(font_file, (long) (kern_table_length * 4), +#line 2177 "./tex4ht-c.tex" + 1 ); +#line 9686 "./tex4ht-c.tex" + (IGNORED) fseek(font_file, (long) (extensible_char_table_length * 4), +#line 2177 "./tex4ht-c.tex" + 1 ); +#line 9701 "./tex4ht-c.tex" + + +#line 9716 "./tex4ht-c.tex" new_font.it = ( INTEGER) fget_int(font_file,4); +#line 9722 "./tex4ht-c.tex" + new_font.word_sp = ( INTEGER) fget_int(font_file,4); +#line 9750 "./tex4ht-c.tex" + if( new_font.word_sp == 0 ) { int i; for( i = new_font.char_f; i <= new_font.char_l; i++ ){ @@ -7777,30 +9592,46 @@ if( new_font.word_sp == 0 ) new_font.word_sp = MARGINSP; +#line 9766 "./tex4ht-c.tex" + (IGNORED) fseek(font_file, 4L, +#line 2177 "./tex4ht-c.tex" + 1 ); +#line 9770 "./tex4ht-c.tex" + (IGNORED) fseek(font_file, 4L, +#line 2177 "./tex4ht-c.tex" + 1 ); +#line 9159 "./tex4ht-c.tex" + new_font.ex = 450000; +#line 9776 "./tex4ht-c.tex" + new_font.ex = (INTEGER) fget_int(font_file,4); +#line 9782 "./tex4ht-c.tex" +#line 9788 "./tex4ht-c.tex" + + @@ -7816,6 +9647,8 @@ new_font_name[font_name_n] = '\0'; new_font.name = m_alloc(char, font_name_n + 1); (IGNORED) strcpy((char *) new_font.name, (char *) new_font_name ); +#line 8779 "./tex4ht-c.tex" + { int n, i; for( n=0; n '9' )){ @@ -7845,6 +9680,8 @@ new_font.name = m_alloc(char, font_name_n + 1); +#line 8766 "./tex4ht-c.tex" + new_font.mag = new_font.scale / (new_font.design_sz / 100); @@ -7854,9 +9691,13 @@ new_font.mag = new_font.scale / (new_font.design_sz / 100); } +#line 9992 "./tex4ht-c.tex" + { U_CHAR str[256]; int i, design_n, n_gif; +#line 10087 "./tex4ht-c.tex" + int loopBound = 0; U_CHAR loopName[256]; loopName[0] = '\0'; @@ -7865,17 +9706,23 @@ loopName[0] = '\0'; n_gif = new_font.char_l - new_font.char_f + 1; new_font.ch255 = 0; +#line 10022 "./tex4ht-c.tex" + { int n_gif_bytes; n_gif_bytes = (n_gif + 7) / 8; new_font.gif_on = m_alloc(char, n_gif_bytes ); new_font.ch_str = m_alloc(char, n_gif_bytes ); +#line 12766 "./tex4ht-c.tex" + new_font.math_closing = m_alloc(char, n_gif_bytes ); new_font.math = m_alloc(char, n_gif ); for( i=n_gif_bytes; i--; ) { +#line 12772 "./tex4ht-c.tex" + new_font.math_closing[i] = new_font.ch_str[i] = new_font.gif_on[i] = 0; @@ -7883,6 +9730,8 @@ new_font.math_closing[i] = new_font.gif1 = m_alloc(unsigned char, n_gif ); for( i=n_gif; i--; ) { +#line 12776 "./tex4ht-c.tex" + new_font.math[i] = new_font.gif1[i] = 0; @@ -7890,6 +9739,8 @@ new_font.math[i] = +#line 12076 "./tex4ht-c.tex" + new_font.accent = m_alloc(unsigned char, n_gif ); new_font.accented = m_alloc(unsigned char, n_gif ); new_font.accent_array = (unsigned int *) 0; @@ -7902,6 +9753,8 @@ for( i=n_gif; i--; ) { new_font.ch = m_alloc(unsigned char, n_gif ); +#line 10037 "./tex4ht-c.tex" + for( i = new_font.char_f; i <= new_font.char_l ; i++ ){ new_font.ch[i - new_font.char_f] = (char) (((31 10 ){ int char_f, char_l; new_font_name[font_name_n] = '\0'; +#line 13826 "./tex4ht-c.tex" + { U_CHAR name[256]; (IGNORED) sprintf(name, "%s.htf", new_font_name); +#line 13835 "./tex4ht-c.tex" + file = NULL; +#line 13903 "./tex4ht-c.tex" + { struct htf_com_rec *p; p = htf_font_dir; @@ -7965,15 +9828,21 @@ if( loopBound > 10 ){ READ_TEXT_FLAGS, htf_dirs); #endif +#line 15071 "./tex4ht-c.tex" + #ifdef KPATHSEA if( !file ){ U_CHAR * htfname; htfname= kpse_find_file (name, kpse_program_text_format, 0); if ( htfname ){ +#line 14727 "./tex4ht-c.tex" + { U_CHAR * head, * tail, *p; int n; +#line 14737 "./tex4ht-c.tex" + n = (int) strlen((char *) htfname); tail = head = m_alloc(char, n+1); (IGNORED) strcpy((char *) head, (char *) htfname); @@ -7994,6 +9863,8 @@ while( n>11 ){ htfname = (U_CHAR *) 0; +#line 14759 "./tex4ht-c.tex" + for( n = 0 ; (n < cardinality) && !htfname ; n++){ p = tail; while( *p != '\0' ){ @@ -8029,6 +9900,8 @@ for( n = 0 ; (n < cardinality) && !htfname ; n++){ if( file ){ +#line 8825 "./tex4ht-c.tex" + if( (strlen((char *) new_font.family_name) + strlen((char *) new_font.font_size) + 4) == strlen((char *) name) ){ new_font.family_name = (char *) r_alloc((void *) new_font.family_name, @@ -8044,6 +9917,8 @@ if( (strlen((char *) new_font.family_name) + if( file != NULL){ INTEGER x_char_l; +#line 10578 "./tex4ht-c.tex" + x_char_l = get_html_file_id(file, new_font.char_f, new_font.char_l, 19); if( x_char_l != HTF_ALIAS) { @@ -8055,6 +9930,8 @@ if( x_char_l != HTF_ALIAS) { if( x_char_l == HTF_ALIAS) { +#line 10164 "./tex4ht-c.tex" + { int chr; font_name_n=0; while( (chr = get_html_ch(file)) != '\n' ){ @@ -8075,9 +9952,13 @@ if( x_char_l != HTF_ALIAS) { (IGNORED) fclose(file); flag = FALSE; break; } +#line 10281 "./tex4ht-c.tex" + if( char_f <= new_font.char_l ){ U_CHAR del; int j, n; +#line 10295 "./tex4ht-c.tex" + while( char_f < new_font.char_f ){ while( get_html_ch(file) != '\n' ); char_f++; } @@ -8087,11 +9968,15 @@ while( char_f < new_font.char_f ){ - char_f + 1; for( i = char_f - new_font.char_f; i < n; i++ ){ +#line 10310 "./tex4ht-c.tex" + { int indirect_ch, base=0, value=0, digit, ch1; indirect_ch = 0; del = get_html_ch(file); j=0; while( (str[j++] = get_html_ch(file)) != del ) { +#line 10344 "./tex4ht-c.tex" + if( (digit=str[j-1]) == '\\' ) if( (indirect_ch = !indirect_ch) != 0) { switch( value=get_html_ch(file) ){ @@ -8128,6 +10013,8 @@ else if ( indirect_ch ){ if( (ch < '0') || (ch > '9') ) break; ch1 = ch1 * 10 + ch - '0'; } +#line 16478 "./tex4ht-c.tex" + if( (*str == '&') && (*(str+1) == '#') @@ -8147,6 +10034,8 @@ if( } if( !err ){ +#line 16516 "./tex4ht-c.tex" + int bottom, mid, top; BOOL found=FALSE; bottom = 0; top = htf_4hf_n; @@ -8154,6 +10043,8 @@ while( !found ){ mid = (bottom + top) / 2; if( value == htf_4hf[mid].ch ){ +#line 16502 "./tex4ht-c.tex" + if( htf_4hf[mid].type1 == ch1 ){ ch1 = htf_4hf[mid].type2; (IGNORED) strcpy((char *) str, (char *) htf_4hf[mid].str ); @@ -8181,6 +10072,8 @@ if( htf_4hf[mid].type1 == ch1 ){ do{ if( (ch = get_html_ch(file)) == del ){ +#line 12088 "./tex4ht-c.tex" + ch1 = 0; while( ((ch = (int) get_html_ch(file)) != del) ){ if( (ch < '0') || (ch > '9') ){ warn_i_int(48,i); break; } @@ -8199,6 +10092,8 @@ new_font.accent[i] = new_font.accent_N; do{ if( (ch = get_html_ch(file)) == del ){ +#line 12102 "./tex4ht-c.tex" + ch1 = 0; while( ((ch = (int) get_html_ch(file)) != del) ){ if( (ch < '0') || (ch > '9') ){ warn_i_int(48,i); break; } @@ -8220,6 +10115,8 @@ new_font.accented[i] = new_font.accented_N; +#line 10387 "./tex4ht-c.tex" + add_bit( new_font.ch_str, i, j!=2 ); switch( j ){ case 1: { new_font.ch[i] = 0; break; } @@ -8237,6 +10134,8 @@ switch( j ){ } +#line 10301 "./tex4ht-c.tex" + while( char_l > new_font.char_l ){ while( get_html_ch(file) != '\n' ); char_l--; } @@ -8246,11 +10145,15 @@ while( char_l > new_font.char_l ){ +#line 10589 "./tex4ht-c.tex" + (void) get_html_file_id(file, new_font.char_f, new_font.char_l, 18); htf_to_lg(html_font, new_font_name, fonts_n, file); +#line 10497 "./tex4ht-c.tex" + if( dump_htf_files ){ dump_htf_files++; dump_htf( file ); dump_htf_files--; } @@ -8267,6 +10170,8 @@ if( dump_htf_files ){ "%d--%d)\n", new_font.char_f, new_font.char_l); dump_env(); } else { +#line 10503 "./tex4ht-c.tex" + if( dump_env_files ){ dump_env(); } } @@ -8276,6 +10181,8 @@ if( dump_env_files ){ dump_env(); } new_font.str = (unsigned U_CHAR **) r_alloc((void *) new_font.str, (size_t) ( (design_n?design_n:1) * sizeof(char *)) ); +#line 10229 "./tex4ht-c.tex" + for( i = fonts_n; i--; ) if( eq_str(html_font[i].name, new_font_name) ){ int k; k = html_font[i].i; @@ -8285,6 +10192,8 @@ for( i = fonts_n; i--; ) free((void *) new_font.ch_str ); new_font.ch_str = font_tbl[ k ].ch_str; +#line 12780 "./tex4ht-c.tex" + free((void *) new_font.math_closing ); new_font.math_closing = font_tbl[ k ].math_closing; free((void *) new_font.math ); @@ -8293,6 +10202,8 @@ free((void *) new_font.math ); break; } if( i < 0 ){ +#line 10244 "./tex4ht-c.tex" + html_font = fonts_n? (struct html_font_rec *) r_alloc((void *) html_font, (size_t) ((fonts_n+1) * sizeof(struct html_font_rec) )) : m_alloc(struct html_font_rec, 1); @@ -8308,6 +10219,8 @@ fonts_n++; +#line 11873 "./tex4ht-c.tex" + { static struct css_ext_rec * search_css_ext; for( search_css_ext = css_ext; search_css_ext != (struct css_ext_rec *) 0; @@ -8319,12 +10232,18 @@ fonts_n++; FILE* file; css_file_name[css_name_n] = '\0'; +#line 11890 "./tex4ht-c.tex" + { U_CHAR name[256]; (IGNORED) sprintf(name, "%s.%s", css_file_name, search_css_ext->name); +#line 13835 "./tex4ht-c.tex" + file = NULL; +#line 13903 "./tex4ht-c.tex" + { struct htf_com_rec *p; p = htf_font_dir; @@ -8349,15 +10268,21 @@ fonts_n++; READ_TEXT_FLAGS, htf_dirs); #endif +#line 15071 "./tex4ht-c.tex" + #ifdef KPATHSEA if( !file ){ U_CHAR * htfname; htfname= kpse_find_file (name, kpse_program_text_format, 0); if ( htfname ){ +#line 14727 "./tex4ht-c.tex" + { U_CHAR * head, * tail, *p; int n; +#line 14737 "./tex4ht-c.tex" + n = (int) strlen((char *) htfname); tail = head = m_alloc(char, n+1); (IGNORED) strcpy((char *) head, (char *) htfname); @@ -8378,6 +10303,8 @@ while( n>11 ){ htfname = (U_CHAR *) 0; +#line 14759 "./tex4ht-c.tex" + for( n = 0 ; (n < cardinality) && !htfname ; n++){ p = tail; while( *p != '\0' ){ @@ -8414,6 +10341,10 @@ for( n = 0 ; (n < cardinality) && !htfname ; n++){ if( file != NULL ){ +#line 11911 "./tex4ht-c.tex" + + +#line 11959 "./tex4ht-c.tex" BOOL is_visited = FALSE; struct visited_file_rec * v = visited_file; @@ -8427,6 +10358,8 @@ while( v != (struct visited_file_rec *) 0 ){ if( !is_visited ){ +#line 11951 "./tex4ht-c.tex" + struct visited_file_rec * v = m_alloc(struct visited_file_rec, 1); v->name = m_alloc(char, (int) strlen((char *) name ) + 1 ); (IGNORED) strcpy((char *) v->name, (char *) name); @@ -8468,6 +10401,8 @@ visited_file = v; } +#line 11941 "./tex4ht-c.tex" + while( visited_file != (struct visited_file_rec *) 0 ){ struct visited_file_rec * v = visited_file; visited_file = visited_file->next; @@ -8476,6 +10411,8 @@ while( visited_file != (struct visited_file_rec *) 0 ){ } +#line 14696 "./tex4ht-c.tex" + #ifdef KPATHSEA if( export_str_chars ){ @@ -8485,6 +10422,8 @@ if( export_str_chars ){ #endif +#line 16409 "./tex4ht-c.tex" + for( i = 0; idir) ){ +#line 14276 "./tex4ht-c.tex" + file_rec = cur_cache_font->cache_file; if( file_rec ){ if( !eq_str( prev_dir, cur_cache_font->dir) ){ @@ -8575,6 +10528,8 @@ if( file_rec ){ (IGNORED) strcpy((char *) prev_dir, (char *) dir); } else if( !is_dir && (file[0] != '\0') ){ +#line 14296 "./tex4ht-c.tex" + if( cur_cache_font != (struct cache_font_rec *)0 ){ if( eq_str(dir,cur_cache_font->dir) ){ file_rec = cur_cache_font->cache_file; @@ -8596,8 +10551,12 @@ if( cur_cache_font != (struct cache_font_rec *)0 ){ } } +#line 14316 "./tex4ht-c.tex" + while( cur_cache_font != (struct cache_font_rec *)0 ){ +#line 14276 "./tex4ht-c.tex" + file_rec = cur_cache_font->cache_file; if( file_rec ){ if( !eq_str( prev_dir, cur_cache_font->dir) ){ @@ -8628,12 +10587,16 @@ if( file_rec ){ #endif +#line 10263 "./tex4ht-c.tex" + if( html_font ){ while( fonts_n-- ) free((void *) html_font[fonts_n].name); free((void *) html_font ); } +#line 13714 "./tex4ht-c.tex" + while( (cur_cache_font = cache_font) != (struct cache_font_rec *)0 ){ cache_font = cache_font->next; free((void *) cur_cache_font->dir ); @@ -8646,11 +10609,17 @@ while( (cur_cache_font = cache_font) != (struct cache_font_rec *)0 ){ (IGNORED) fclose(dot_file); } +#line 2268 "./tex4ht-c.tex" + (IGNORED) fseek(dvi_file, 0L, +#line 2174 "./tex4ht-c.tex" + 0 ); ch = get_noop(); if( ch != +#line 17473 "./tex4ht-c.tex" + 247 ) bad_dvi; if( ((int) get_char()) != version_id ) bad_dvi; @@ -8661,95 +10630,151 @@ for( i= get_char(); i>0; i-- ) ch = get_char(); +#line 2318 "./tex4ht-c.tex" + { dis_pages = unread_pages; while( unread_pages-- ){ (IGNORED) printf("[%d", dis_pages - unread_pages); +#line 2343 "./tex4ht-c.tex" + x_val = dx_1 = dx_2 = 0; max_x_val = -10000; y_val = max_y_val = prev_y_val = dy_1 = dy_2 = 0; if( get_noop() != +#line 17318 "./tex4ht-c.tex" + 139 ) bad_dvi; for( i = 1; i<45; i++ ) if( get_char() == EOF ) bad_dvi; while( (ch = get_char()) != +#line 17321 "./tex4ht-c.tex" + 140 ){ +#line 2930 "./tex4ht-c.tex" + { register int ch_1; ch_1 = ch; +#line 6460 "./tex4ht-c.tex" + if( stack[stack_n].halign_on ) { switch( ch ){ case +#line 17372 "./tex4ht-c.tex" + 157 : { ; } case +#line 17375 "./tex4ht-c.tex" + 158 : { ; } case +#line 17378 "./tex4ht-c.tex" + 159 : { ; } case +#line 17381 "./tex4ht-c.tex" + 160 : { ; } case +#line 17384 "./tex4ht-c.tex" + 161 : { ; } case +#line 17387 "./tex4ht-c.tex" + 162 : { ; } case +#line 17390 "./tex4ht-c.tex" + 163 : { ; } case +#line 17393 "./tex4ht-c.tex" + 164 : { ; } case +#line 17396 "./tex4ht-c.tex" + 165 : { ; } case +#line 17399 "./tex4ht-c.tex" + 166 : { ; } case +#line 17402 "./tex4ht-c.tex" + 167 : { ; } case +#line 17405 "./tex4ht-c.tex" + 168 : { ; } case +#line 17408 "./tex4ht-c.tex" + 169 : { ; } case +#line 17411 "./tex4ht-c.tex" + 170 : { ; } case +#line 17307 "./tex4ht-c.tex" + 132 : { ; } case +#line 17312 "./tex4ht-c.tex" + 137 : { ; } case +#line 17427 "./tex4ht-c.tex" + 235 : { ; } case +#line 17430 "./tex4ht-c.tex" + 236 : { ; } case +#line 17433 "./tex4ht-c.tex" + 237 : { ; } case +#line 17436 "./tex4ht-c.tex" + 238 : { ; } case +#line 17324 "./tex4ht-c.tex" + 141 : { break; } default: { +#line 6496 "./tex4ht-c.tex" + print_f( stack[stack_n].halign[1]->str ); stack[stack_n].halign_on = FALSE; @@ -8758,7 +10783,11 @@ stack[stack_n].halign_on = FALSE; +#line 3197 "./tex4ht-c.tex" + if( (ch > 127) && (ch < 137) && (ch != +#line 17307 "./tex4ht-c.tex" + 132 ) ){ ch_1 = (int) get_unt( (ch - (ch>132)) % 4 +1); @@ -8766,9 +10795,13 @@ if( (ch > 127) && (ch < 137) && (ch != +#line 7653 "./tex4ht-c.tex" + if( group_dvi ){ if( ( ch < 132 ) || ( (ch > 127) && (ch < 137) && (ch != +#line 17307 "./tex4ht-c.tex" + 132 ) ) ){ @@ -8778,14 +10811,20 @@ if( group_dvi ){ +#line 2626 "./tex4ht-c.tex" + if( trace_dvi_C && !in_trace_char ){ if( (ch < 137) && (ch != +#line 17307 "./tex4ht-c.tex" + 132 ) ){ in_trace_char = TRUE; block_start = TRUE; } } else if ( in_trace_char ){ if( !trace_dvi_C || (ch > 136) || (ch == +#line 17307 "./tex4ht-c.tex" + 132 ) ){ in_trace_char = FALSE; @@ -8793,9 +10832,13 @@ else if ( in_trace_char ){ +#line 2587 "./tex4ht-c.tex" + if( span_on && !in_span_ch && !ignore_chs && !in_accenting && (default_font != font_tbl[cur_fnt].num) ){ if( (ch < 137) && (ch != +#line 17307 "./tex4ht-c.tex" + 132 ) ){ in_span_ch = TRUE; start_span = TRUE; @@ -8803,18 +10846,26 @@ if( span_on && !in_span_ch && !ignore_chs && !in_accenting else if ( in_span_ch ){ if( !span_on || (ch == +#line 17307 "./tex4ht-c.tex" + 132 ) || ((136 < ch) && (ch < +#line 17330 "./tex4ht-c.tex" + 143 )) || (ch > +#line 17369 "./tex4ht-c.tex" + 156 ) ){ in_span_ch = FALSE; if( *end_span[0] ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -8824,26 +10875,38 @@ if( no_root_file ){ open_o_file(); } +#line 12210 "./tex4ht-c.tex" + if( in_accenting ){ +#line 12242 "./tex4ht-c.tex" + long int width; if( i_accent_template ){ (IGNORED) fprintf(cur_o_file, "%s", i_accent_second); } needs_end_accent = (needs_accent_sym == 2 * TRUE); if( needs_end_accent && t_accent_template ) { +#line 12199 "./tex4ht-c.tex" + needs_accented_sym++; } else if( m_accent_template ) { +#line 12199 "./tex4ht-c.tex" + needs_accented_sym++; stack[stack_n-1].accented = TRUE; } needs_accent_sym = FALSE; width = (INTEGER)( +#line 9835 "./tex4ht-c.tex" + design_size_to_pt( *(font_tbl[cur_fnt].wtbl + (int) ( +#line 9843 "./tex4ht-c.tex" + *(font_tbl[cur_fnt].char_wi + (int) ( ch - font_tbl[cur_fnt].char_f)% 256) @@ -8857,6 +10920,8 @@ in_accenting = FALSE; } else if( +#line 12267 "./tex4ht-c.tex" + needs_accent_sym && (ch < 128) ){ @@ -8889,6 +10954,8 @@ needs_accent_sym && (ch < 128) if( ch < 132 ) { x_val += math_class_on? +#line 12649 "./tex4ht-c.tex" + set_ch_class(ch_1) @@ -8898,6 +10965,8 @@ set_ch_class(ch_1) case 133: case 134: case 135: case 136: { INTEGER w; w = math_class_on? +#line 12649 "./tex4ht-c.tex" + set_ch_class(ch_1) : insert_ch(ch_1); @@ -8905,154 +10974,252 @@ set_ch_class(ch_1) break; } +#line 3036 "./tex4ht-c.tex" + case +#line 17330 "./tex4ht-c.tex" + 143 : {;} case +#line 17333 "./tex4ht-c.tex" + 144 : {;} case +#line 17336 "./tex4ht-c.tex" + 145 : {;} case +#line 17339 "./tex4ht-c.tex" + 146 : { try_new_line(); (void) move_x((INTEGER) get_int(ch - +#line 17330 "./tex4ht-c.tex" + 143 + 1 )); break; } +#line 3046 "./tex4ht-c.tex" + case +#line 17342 "./tex4ht-c.tex" + 147 : { (void) move_x( dx_1 ); break; } case +#line 17345 "./tex4ht-c.tex" + 148 : {;} case +#line 17348 "./tex4ht-c.tex" + 149 : {;} case +#line 17351 "./tex4ht-c.tex" + 150 : {;} case +#line 17354 "./tex4ht-c.tex" + 151 : { try_new_line(); dx_1 = move_x((INTEGER) get_int(ch - +#line 17342 "./tex4ht-c.tex" + 147 )); break; } +#line 3058 "./tex4ht-c.tex" + case +#line 17357 "./tex4ht-c.tex" + 152 : { (void) move_x( dx_2 ); break; } case +#line 17360 "./tex4ht-c.tex" + 153 : {;} case +#line 17363 "./tex4ht-c.tex" + 154 : {;} case +#line 17366 "./tex4ht-c.tex" + 155 : {;} case +#line 17369 "./tex4ht-c.tex" + 156 : { try_new_line(); dx_2 = move_x((INTEGER) get_int(ch - +#line 17357 "./tex4ht-c.tex" + 152 )); break; } +#line 3143 "./tex4ht-c.tex" + case +#line 17372 "./tex4ht-c.tex" + 157 : {;} case +#line 17375 "./tex4ht-c.tex" + 158 : {;} case +#line 17378 "./tex4ht-c.tex" + 159 : {;} case +#line 17381 "./tex4ht-c.tex" + 160 : { (void) move_y( (INTEGER) get_int(ch - +#line 17372 "./tex4ht-c.tex" + 157 + 1 )); break; } +#line 3152 "./tex4ht-c.tex" + case +#line 17384 "./tex4ht-c.tex" + 161 : { (void) move_y( dy_1 ); break; } case +#line 17387 "./tex4ht-c.tex" + 162 : {;} case +#line 17390 "./tex4ht-c.tex" + 163 : {;} case +#line 17393 "./tex4ht-c.tex" + 164 : {;} case +#line 17396 "./tex4ht-c.tex" + 165 : { dy_1 = move_y( (INTEGER) get_int(ch - +#line 17384 "./tex4ht-c.tex" + 161 )); break; } +#line 3162 "./tex4ht-c.tex" + case +#line 17399 "./tex4ht-c.tex" + 166 : { (void) move_y( dy_2 ); break; } case +#line 17402 "./tex4ht-c.tex" + 167 : {;} case +#line 17405 "./tex4ht-c.tex" + 168 : {;} case +#line 17408 "./tex4ht-c.tex" + 169 : {;} case +#line 17411 "./tex4ht-c.tex" + 170 : { dy_2 = move_y( (INTEGER) get_int(ch - +#line 17399 "./tex4ht-c.tex" + 166 )); break; } +#line 3586 "./tex4ht-c.tex" + case +#line 17307 "./tex4ht-c.tex" + 132 : { (void) rule_x( TRUE ); break; } case +#line 17312 "./tex4ht-c.tex" + 137 : { (void) rule_x( FALSE ); break; } +#line 3759 "./tex4ht-c.tex" + + +#line 3764 "./tex4ht-c.tex" case +#line 17458 "./tex4ht-c.tex" + 246 : (void) get_char(); case +#line 17455 "./tex4ht-c.tex" + 245 : (void) get_char(); case +#line 17452 "./tex4ht-c.tex" + 244 : (void) get_char(); case +#line 17449 "./tex4ht-c.tex" + 243 : { for( i=0; i<14; i++ ){ ch = get_char(); } @@ -9063,15 +11230,23 @@ case +#line 3776 "./tex4ht-c.tex" + case +#line 17488 "./tex4ht-c.tex" + 252 : if( version_id == -5 +#line 2292 "./tex4ht-c.tex" + +10 ){ +#line 9228 "./tex4ht-c.tex" + unsigned short flags; for( i=0; i<8; i++ ){ ch = get_char(); } flags = (INTEGER) get_unt(2); @@ -9081,10 +11256,14 @@ for( i = (INTEGER) get_unt(1) ; i>0 ; i-- ){ ch = get_char(); } if( flags & +#line 8953 "./tex4ht-c.tex" + 0x0200 ){ (void) get_unt(4); } if( flags & +#line 8957 "./tex4ht-c.tex" + 0x0800 ){ @@ -9101,28 +11280,40 @@ if( flags & break; } case +#line 17494 "./tex4ht-c.tex" + 253 : if( version_id == -5 +#line 2292 "./tex4ht-c.tex" + +10 ){ +#line 9251 "./tex4ht-c.tex" + doGlyphArray(TRUE); break; } case +#line 17499 "./tex4ht-c.tex" + 254 : if( version_id == -5 +#line 2292 "./tex4ht-c.tex" + +10 ){ +#line 9256 "./tex4ht-c.tex" + doGlyphArray(FALSE); @@ -9130,19 +11321,31 @@ doGlyphArray(FALSE); } +#line 3795 "./tex4ht-c.tex" + default: { if( (ch < +#line 17415 "./tex4ht-c.tex" + 171 ) || (ch > +#line 17421 "./tex4ht-c.tex" + 234 ) ) { bad_char(ch); } else { cur_fnt = ch - +#line 17415 "./tex4ht-c.tex" + 171 ; +#line 9307 "./tex4ht-c.tex" + cur_fnt = search_font_tbl( cur_fnt ); word_sp = +#line 9909 "./tex4ht-c.tex" + design_size_to_pt( font_tbl[cur_fnt].word_sp ) * (double) font_tbl[cur_fnt].scale @@ -9153,26 +11356,42 @@ design_size_to_pt( font_tbl[cur_fnt].word_sp ) } +#line 3805 "./tex4ht-c.tex" + case +#line 17427 "./tex4ht-c.tex" + 235 : case +#line 17430 "./tex4ht-c.tex" + 236 : case +#line 17433 "./tex4ht-c.tex" + 237 : case +#line 17436 "./tex4ht-c.tex" + 238 : { INTEGER n; n = ch - +#line 17427 "./tex4ht-c.tex" + 235 + 1; cur_fnt = (int) ((n==4)? get_int(4) : get_unt((int) n)); +#line 9307 "./tex4ht-c.tex" + cur_fnt = search_font_tbl( cur_fnt ); word_sp = +#line 9909 "./tex4ht-c.tex" + design_size_to_pt( font_tbl[cur_fnt].word_sp ) * (double) font_tbl[cur_fnt].scale @@ -9182,26 +11401,44 @@ design_size_to_pt( font_tbl[cur_fnt].word_sp ) break; } +#line 3841 "./tex4ht-c.tex" + case +#line 17439 "./tex4ht-c.tex" + 239 : {;} case +#line 17441 "./tex4ht-c.tex" + 240 : {;} case +#line 17443 "./tex4ht-c.tex" + 241 : {;} case +#line 17445 "./tex4ht-c.tex" + 242 : { +#line 3857 "./tex4ht-c.tex" + long int special_n; +#line 12279 "./tex4ht-c.tex" + if( needs_end_accent && t_accent_template ){ +#line 2609 "./tex4ht-c.tex" + if( span_on && in_span_ch ){ if( *end_span[0] ){ in_span_ch = FALSE; +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -9211,6 +11448,8 @@ if( no_root_file ){ open_o_file(); } (IGNORED) fprintf(cur_o_file, "%s", t_accent_fifth); needs_end_accent = FALSE; +#line 12422 "./tex4ht-c.tex" + needs_accented_sym--; @@ -9219,13 +11458,19 @@ needs_accented_sym--; if( tex4ht_special( &ch, &special_n) ) { int sv; sv = ch; special_on = TRUE; +#line 3944 "./tex4ht-c.tex" + try_new_line(); switch( ch ){ case '*': { +#line 4583 "./tex4ht-c.tex" + if( special_n ){ special_n--; switch ( get_char() ){ case '<': { +#line 4687 "./tex4ht-c.tex" + U_CHAR name[256]; int i=0; FILE* file; @@ -9234,6 +11479,8 @@ while( special_n-- > 0 ){ name[i++] = get_char(); } file = f_open(name, READ_TEXT_FLAGS); if( file ) { +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -9245,12 +11492,18 @@ if( no_root_file ){ open_o_file(); } break; } case '>': { +#line 4394 "./tex4ht-c.tex" + if( special_n > 0 ){ +#line 4502 "./tex4ht-c.tex" + static struct files_rec *p, *q; U_CHAR name[256]; int i; +#line 4512 "./tex4ht-c.tex" + i = 0; name[(int) special_n] = '\0'; while( special_n-- > 0 ){ name[i++] = get_char(); } @@ -9261,6 +11514,8 @@ for( p = opened_files; p != (struct files_rec*) 0; p = p->next ){ if( p != (struct files_rec*) 0 ){ +#line 4523 "./tex4ht-c.tex" + for( q = p; q->next != (struct files_rec*) 0; q = q->next ){ } if( q != p ){ q->next = p; @@ -9277,11 +11532,17 @@ if( q != p ){ } else { +#line 4468 "./tex4ht-c.tex" + + +#line 4472 "./tex4ht-c.tex" static struct files_rec *p, *q; for( p = opened_files; p != (struct files_rec*) 0; p = p->next ){ if( (p->file == cur_o_file) && p->prev_file ){ +#line 4484 "./tex4ht-c.tex" + for( q = opened_files; q != (struct files_rec*) 0; q = q->next ){ if( q->file == p->prev_file ){ break; @@ -9306,6 +11567,8 @@ if( q == (struct files_rec*) 0 ){ break; } case '!': { +#line 4606 "./tex4ht-c.tex" + U_CHAR name[256], ch; int i=0, n; struct sys_call_rec *p; @@ -9314,6 +11577,8 @@ name[(int) special_n] = '\0'; while( special_n-- > 0 ){ name[i++] = get_char(); } (IGNORED) printf("System call: %s\n", name); +#line 4652 "./tex4ht-c.tex" + flag = FALSE; p = system_calls; while( p ){ @@ -9335,10 +11600,14 @@ if( flag ){ break; } case '^': { +#line 12153 "./tex4ht-c.tex" + special_n--; switch ( get_char() ){ case 't': { if( special_n ){ +#line 12315 "./tex4ht-c.tex" + (IGNORED) get_open_accent(&t_accent_template, &t_accent_first, &t_accent_second, &t_accent_third, &t_accent_fourth, @@ -9346,6 +11615,8 @@ switch ( get_char() ){ } else { +#line 12191 "./tex4ht-c.tex" + needs_accent_sym = TRUE * 2; } @@ -9353,6 +11624,8 @@ needs_accent_sym = TRUE * 2; } case 'm': { if( special_n ){ +#line 12322 "./tex4ht-c.tex" + (IGNORED) get_open_accent(&m_accent_template, &m_accent_first, &m_accent_second, &m_accent_third, &m_accent_fourth, @@ -9360,12 +11633,16 @@ needs_accent_sym = TRUE * 2; } else { +#line 12195 "./tex4ht-c.tex" + needs_accent_sym = TRUE; } break; } case 'a': { +#line 12426 "./tex4ht-c.tex" + (IGNORED) get_open_accent(&a_accent_template, &a_accent_first, &a_accent_second, &a_accent_third, &a_accent_fourth, @@ -9375,6 +11652,8 @@ needs_accent_sym = TRUE; break; } case 'i': { +#line 12442 "./tex4ht-c.tex" + (IGNORED) get_open_accent(&i_accent_template, &i_accent_first, &i_accent_second, &i_accent_third, &i_accent_fourth, @@ -9384,6 +11663,8 @@ needs_accent_sym = TRUE; break; } default: { +#line 17086 "./tex4ht-c.tex" + while( special_n-- ) (void) get_char(); } @@ -9391,6 +11672,8 @@ while( special_n-- ) (void) get_char(); break; } case '@': { +#line 6237 "./tex4ht-c.tex" + int i; i = 0; special_n--; @@ -9403,6 +11686,8 @@ switch ( get_char() ){ case '3': { i++; } case '2': { i++; } case '1': { +#line 6311 "./tex4ht-c.tex" + if( halign[i]->refs == 1 ){ free((void *) halign[i]->str ); } else { @@ -9416,12 +11701,18 @@ special_n=0; break; } case '/': { if( special_n ){ +#line 17086 "./tex4ht-c.tex" + while( special_n-- ) (void) get_char(); } else { +#line 6490 "./tex4ht-c.tex" + if( stack[stack_n].halign_on ) { +#line 6496 "./tex4ht-c.tex" + print_f( stack[stack_n].halign[1]->str ); stack[stack_n].halign_on = FALSE; @@ -9434,11 +11725,15 @@ stack[stack_n].halign_on = FALSE; case '@': { i++; if( special_n ){ +#line 17086 "./tex4ht-c.tex" + while( special_n-- ) (void) get_char(); } else { +#line 6368 "./tex4ht-c.tex" + new_halign = i * TRUE; @@ -9446,6 +11741,8 @@ new_halign = i * TRUE; break; } default: { +#line 17086 "./tex4ht-c.tex" + while( special_n-- ) (void) get_char(); } @@ -9453,6 +11750,8 @@ while( special_n-- ) (void) get_char(); break; } case '=': { +#line 4149 "./tex4ht-c.tex" + char *str, *repl; struct hcode_repl_typ *p, *q; BOOL flag; @@ -9463,6 +11762,8 @@ if( special_n ){ } *str = 0; +#line 4176 "./tex4ht-c.tex" + if( hcode_repl != (struct hcode_repl_typ*) 0 ){ if( *(hcode_repl->str) == *repl ){ p = hcode_repl; @@ -9485,6 +11786,8 @@ if( hcode_repl != (struct hcode_repl_typ*) 0 ){ +#line 4199 "./tex4ht-c.tex" + flag = *repl != *(repl+1); if( !flag ){ flag = *(repl+2) != 0; } if( flag ){ @@ -9497,6 +11800,8 @@ if( flag ){ } else { +#line 4166 "./tex4ht-c.tex" + while( hcode_repl != (struct hcode_repl_typ*) 0 ){ p = hcode_repl; hcode_repl = hcode_repl->next; @@ -9509,25 +11814,35 @@ while( hcode_repl != (struct hcode_repl_typ*) 0 ){ break; } default: { +#line 17086 "./tex4ht-c.tex" + while( special_n-- ) (void) get_char(); } } } else { +#line 17091 "./tex4ht-c.tex" + ; } break; } case '@': { +#line 4240 "./tex4ht-c.tex" + int code, digit; special_n--; switch ( code = get_char() ){ case '%': { +#line 2511 "./tex4ht-c.tex" + if( special_n>1 ) { special_n--; if ( get_char() == '%' ) { if( special_n>2 ) { +#line 2648 "./tex4ht-c.tex" + U_CHAR type, ch, *p, *q, *pp=0, *qq=0, pre[256], post[256]; special_n -= 2; type = get_char(); ch = get_char(); p = pre; @@ -9539,12 +11854,16 @@ p = post; while( special_n-- > 0 ) { *(p++)=get_char(); } *p='\0'; +#line 2661 "./tex4ht-c.tex" + p = m_alloc(char, 1 + (int) strlen((char *) pre)); (IGNORED) strcpy((char *) p, (char *) pre ); q = m_alloc(char, 1 + (int) strlen((char *) post)); (IGNORED) strcpy((char *) q, (char *) post ); +#line 2670 "./tex4ht-c.tex" + switch ( type ){ case 'P': { pp = trace_dvi_del_P; trace_dvi_del_P = p; @@ -9593,10 +11912,14 @@ free((void *) qq); } else { +#line 17086 "./tex4ht-c.tex" + while( special_n-- ) (void) get_char(); } } else { +#line 17086 "./tex4ht-c.tex" + while( special_n-- ) (void) get_char(); } @@ -9619,10 +11942,14 @@ while( special_n-- ) (void) get_char(); break; } case '@': { verb_ch = !verb_ch; break; } case '/': { +#line 17174 "./tex4ht-c.tex" + trace_special = !trace_special; break; } case 'e': { +#line 17151 "./tex4ht-c.tex" + if( err_mark ){ free((void *) err_mark); } if( special_n ){ err_mark = get_str( (int) special_n ); special_n=0; @@ -9630,21 +11957,31 @@ if( special_n ){ break; } case '!': { +#line 3262 "./tex4ht-c.tex" + while( recover_spaces-- ){ text_on=TRUE; put_char(' '); } recover_spaces = 0; break; } case '(': { +#line 3268 "./tex4ht-c.tex" + ignore_spaces++; break; } case ')': { +#line 3272 "./tex4ht-c.tex" + ignore_spaces--; break; } case '[': { +#line 3290 "./tex4ht-c.tex" + if( special_n ){ +#line 3278 "./tex4ht-c.tex" + U_CHAR *unhskip_mark; long retract_addr; BOOL unhskip; @@ -9656,162 +11993,264 @@ int cr_fnt, ch, unskip_depth; unhskip_mark = get_str( (int) special_n ); special_n=0; retract_addr = ftell(dvi_file); +#line 3304 "./tex4ht-c.tex" + unhskip = TRUE; while( unhskip ){ if( (ch = get_char()) >= 128 ) { switch( ch ){ +#line 7078 "./tex4ht-c.tex" + case +#line 17458 "./tex4ht-c.tex" + 246 : (void) get_char(); case +#line 17455 "./tex4ht-c.tex" + 245 : (void) get_char(); case +#line 17452 "./tex4ht-c.tex" + 244 : (void) get_char(); case +#line 17449 "./tex4ht-c.tex" + 243 : { int i; for( i=14; i; i-- ){ ch = get_char(); } i = ch + get_char(); (IGNORED) fseek(dvi_file, (long) i, +#line 2177 "./tex4ht-c.tex" + 1 ); break; } +#line 7149 "./tex4ht-c.tex" + case +#line 17307 "./tex4ht-c.tex" + 132 : case +#line 17312 "./tex4ht-c.tex" + 137 :{ (IGNORED) fseek(dvi_file, 8L, +#line 2177 "./tex4ht-c.tex" + 1 ); break; } +#line 7157 "./tex4ht-c.tex" + case +#line 17318 "./tex4ht-c.tex" + 139 : { (IGNORED) fseek(dvi_file, 44L, +#line 2177 "./tex4ht-c.tex" + 1 ); break; } +#line 7162 "./tex4ht-c.tex" + case +#line 17330 "./tex4ht-c.tex" + 143 : case +#line 17333 "./tex4ht-c.tex" + 144 : case +#line 17336 "./tex4ht-c.tex" + 145 : case +#line 17339 "./tex4ht-c.tex" + 146 : { (IGNORED) (get_int( ch - +#line 17330 "./tex4ht-c.tex" + 143 + 1 )); break; } case +#line 17345 "./tex4ht-c.tex" + 148 : case +#line 17348 "./tex4ht-c.tex" + 149 : case +#line 17351 "./tex4ht-c.tex" + 150 : case +#line 17354 "./tex4ht-c.tex" + 151 : { (IGNORED) (get_int( ch - +#line 17345 "./tex4ht-c.tex" + 148 + 1)); break; } case +#line 17360 "./tex4ht-c.tex" + 153 : case +#line 17363 "./tex4ht-c.tex" + 154 : case +#line 17366 "./tex4ht-c.tex" + 155 : case +#line 17369 "./tex4ht-c.tex" + 156 : { (IGNORED) (get_int( ch - +#line 17360 "./tex4ht-c.tex" + 153 + 1)); break; } case +#line 17372 "./tex4ht-c.tex" + 157 : case +#line 17375 "./tex4ht-c.tex" + 158 : case +#line 17378 "./tex4ht-c.tex" + 159 : case +#line 17381 "./tex4ht-c.tex" + 160 : { (IGNORED) (get_int( ch - +#line 17372 "./tex4ht-c.tex" + 157 + 1)); break; } case +#line 17387 "./tex4ht-c.tex" + 162 : case +#line 17390 "./tex4ht-c.tex" + 163 : case +#line 17393 "./tex4ht-c.tex" + 164 : case +#line 17396 "./tex4ht-c.tex" + 165 : { (IGNORED) (get_int( ch - +#line 17387 "./tex4ht-c.tex" + 162 + 1)); break; } case +#line 17402 "./tex4ht-c.tex" + 167 : case +#line 17405 "./tex4ht-c.tex" + 168 : case +#line 17408 "./tex4ht-c.tex" + 169 : case +#line 17411 "./tex4ht-c.tex" + 170 : { (IGNORED) (get_int( ch - +#line 17402 "./tex4ht-c.tex" + 167 + 1)); break; } +#line 7198 "./tex4ht-c.tex" + case +#line 17342 "./tex4ht-c.tex" + 147 : case +#line 17357 "./tex4ht-c.tex" + 152 : case +#line 17384 "./tex4ht-c.tex" + 161 : case +#line 17399 "./tex4ht-c.tex" + 166 : { break; } +#line 3342 "./tex4ht-c.tex" + case 128: case 129: case 130: case 131: case 133: case 134: case 135: case 136: { (void) get_unt( (ch-(ch>132)) % 4 +1); @@ -9820,23 +12259,39 @@ case 134: case 135: case 136: { +#line 3355 "./tex4ht-c.tex" + case +#line 17324 "./tex4ht-c.tex" + 141 : case +#line 17327 "./tex4ht-c.tex" + 142 : { break; } +#line 3364 "./tex4ht-c.tex" + case +#line 17439 "./tex4ht-c.tex" + 239 : case +#line 17441 "./tex4ht-c.tex" + 240 : case +#line 17443 "./tex4ht-c.tex" + 241 : case +#line 17445 "./tex4ht-c.tex" + 242 : { long int i; if( tex4ht_special( &ch, &i ) ){ char *mark; @@ -9852,10 +12307,14 @@ case default: { ; } } } } }else{ +#line 7014 "./tex4ht-c.tex" + U_CHAR *ch; ch = special_hd + 4; while( *ch ){ ch++; } (IGNORED) fseek(dvi_file, (long) i, +#line 2177 "./tex4ht-c.tex" + 1 ); @@ -9865,20 +12324,32 @@ while( *ch ){ ch++; } +#line 7091 "./tex4ht-c.tex" + case +#line 17427 "./tex4ht-c.tex" + 235 : case +#line 17430 "./tex4ht-c.tex" + 236 : case +#line 17433 "./tex4ht-c.tex" + 237 : case +#line 17436 "./tex4ht-c.tex" + 238 : { INTEGER n; n = ch - +#line 17427 "./tex4ht-c.tex" + 235 + 1; cr_fnt = (int) ((n==4)? get_int(4) : get_unt((int) n)); @@ -9886,15 +12357,23 @@ case break; } default: { if( (ch < +#line 17415 "./tex4ht-c.tex" + 171 ) || (ch > +#line 17421 "./tex4ht-c.tex" + 234 ) ) { if( ch == +#line 17321 "./tex4ht-c.tex" + 140 ) { warn_i(46); } else { warn_i_int(45,ch); } } else { cr_fnt = ch - +#line 17415 "./tex4ht-c.tex" + 171 ; cr_fnt = search_font_tbl( cr_fnt ); @@ -9906,19 +12385,29 @@ default: { } } } +#line 3320 "./tex4ht-c.tex" + do{ long int i; char *mark; ch = get_char(); if( ( ch== +#line 17439 "./tex4ht-c.tex" + 239 ) || ( ch== +#line 17441 "./tex4ht-c.tex" + 240 ) || ( ch== +#line 17443 "./tex4ht-c.tex" + 241 ) || ( ch== +#line 17445 "./tex4ht-c.tex" + 242 ) ) @@ -9930,6 +12419,8 @@ do{ } } } (IGNORED) fseek(dvi_file, (long) retract_addr, +#line 2174 "./tex4ht-c.tex" + 0 ); } while(FALSE); @@ -9943,17 +12434,23 @@ do{ break; } case ']': { +#line 3390 "./tex4ht-c.tex" + if( special_n ){ while( special_n-- > 0 ){ (void) get_char(); } } else { ignore_chs--; } break; } case '?': { +#line 3397 "./tex4ht-c.tex" + while( special_n-- > 0 ){ (void) get_char(); } break; } case '-': { if( special_n ) { code = 0; +#line 4280 "./tex4ht-c.tex" + while( special_n-- > 0 ){ digit = get_char() - '0'; if ( (digit < 0) || (digit > 9) ) { warn_i_int(41,digit+'0') ; } @@ -9966,34 +12463,50 @@ if ( (code < 0) || (code > 255) ) { code = '?'; warn_i_int(41,'?') ; } } else { nomargin = TRUE; } break; } case '*': { +#line 4342 "./tex4ht-c.tex" + keepChar=1; } case '+': { +#line 4299 "./tex4ht-c.tex" + if( +#line 4332 "./tex4ht-c.tex" + next_char != -1 ) { +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } (IGNORED) put_4ht_ch( +#line 4332 "./tex4ht-c.tex" + next_char , cur_o_file ); +#line 4332 "./tex4ht-c.tex" + next_char = -1; } if( +#line 4338 "./tex4ht-c.tex" + next_str ){ print_f(next_str); free((void *) next_str); next_str = (char *) 0; } next_str = get_str( (int) special_n ); special_n = 0; +#line 4314 "./tex4ht-c.tex" + { char *front, *back; int i; back = front = next_str; @@ -10012,6 +12525,8 @@ next_str = get_str( (int) special_n ); special_n = 0; break; } case '.': { +#line 3402 "./tex4ht-c.tex" + if( eoln_str ){ free((void *) eoln_str); } if( special_n ){ eoln_str = get_str( (int) special_n ); special_n=0; @@ -10019,6 +12534,8 @@ if( special_n ){ break; } case ',': { +#line 3424 "./tex4ht-c.tex" + if( space_str ){ free((void *) space_str); } if( special_n ){ space_str = get_str( (int) special_n ); special_n=0; @@ -10026,12 +12543,16 @@ if( special_n ){ break; } case '_': { +#line 3678 "./tex4ht-c.tex" + if( !special_n ){ rule_ch = '\0'; } else { while( special_n-- > 0 ){ rule_ch = get_char(); } } break; } case 'D': { +#line 3686 "./tex4ht-c.tex" + struct files_rec *p; while( special_n-- > 0 ) (void) putc( get_char(), log_file ); for( p = opened_files; p != (struct files_rec*) 0; p = p->next ){ @@ -10043,9 +12564,13 @@ for( p = opened_files; p != (struct files_rec*) 0; p = p->next ){ break; } case 'u': { +#line 15886 "./tex4ht-c.tex" + special_n--; switch ( code = get_char() ){ case '+': { put_4ht_off++; +#line 15904 "./tex4ht-c.tex" + flush_uni(); break; } @@ -10056,7 +12581,11 @@ flush_uni(); break; } default: { +#line 4289 "./tex4ht-c.tex" + code -= '0'; +#line 4280 "./tex4ht-c.tex" + while( special_n-- > 0 ){ digit = get_char() - '0'; if ( (digit < 0) || (digit > 9) ) { warn_i_int(41,digit+'0') ; } @@ -10066,6 +12595,8 @@ if ( (code < 0) || (code > 255) ) { code = '?'; warn_i_int(41,'?') ; } next_char = code; if( +#line 4338 "./tex4ht-c.tex" + next_str ){ print_f(next_str); @@ -10076,10 +12607,14 @@ next_str break; } case '+': { +#line 5438 "./tex4ht-c.tex" + while( special_n-- > 0 ) (void) get_char(); break; } case '=': { +#line 4119 "./tex4ht-c.tex" + while( special_n-- > 0 ){ int ch; BOOL flag; @@ -10101,6 +12636,10 @@ while( special_n-- > 0 ){ break; } case '<': case '>': { +#line 4383 "./tex4ht-c.tex" + + +#line 4539 "./tex4ht-c.tex" int i=0; U_CHAR *name; @@ -10110,15 +12649,21 @@ while( special_n-- > 0 ) *(name + i++) = get_char(); +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } +#line 4553 "./tex4ht-c.tex" + for( p = opened_files; p != (struct files_rec*) 0; p = p->next ) { if( eq_str(p->name, name) ) break; } if( ch == '>' ){ +#line 4407 "./tex4ht-c.tex" + if( p != (struct files_rec*) 0 ){ out_file = p->file; p->prev_file = cur_o_file; @@ -10126,6 +12671,8 @@ if( p != (struct files_rec*) 0 ){ } else { if( !(*name) ) out_file = (FILE *) 0; else { +#line 4419 "./tex4ht-c.tex" + p = m_alloc(struct files_rec, 1); if( opened_files != (struct files_rec*) 0 ) opened_files->prev = p; p->prev = (struct files_rec *) 0; @@ -10139,8 +12686,12 @@ p->prev_file = cur_o_file; } else { +#line 4431 "./tex4ht-c.tex" + if( p == (struct files_rec *) 0 ) bad_special( name ); +#line 4442 "./tex4ht-c.tex" + if( p->prev != (struct files_rec*) 0 ) (p->prev)->next = p->next; else opened_files = p->next; if( p->next != (struct files_rec*) 0 ) (p->next)->prev = p->prev; @@ -10158,8 +12709,12 @@ cur_o_file = ( out_file == (FILE *) 0 )? root_file break; } case '!': { +#line 4814 "./tex4ht-c.tex" + ch_map_flag = !ch_map_flag; if( ch_map_flag ){ +#line 4904 "./tex4ht-c.tex" + init_ch_map(); xresolution = yresolution = 0; while( special_n-- > 0 ){ @@ -10169,8 +12724,12 @@ while( special_n-- > 0 ){ else if( (ch == ',') && !xresolution && yresolution ) { xresolution = yresolution; yresolution = 0; } else { +#line 4928 "./tex4ht-c.tex" + xresolution = yresolution = 0; +#line 17078 "./tex4ht-c.tex" + warn_i_int( 26, '!'); (IGNORED) putc( ch, stderr); while( special_n-- ) (IGNORED) putc( get_char(), stderr); @@ -10187,6 +12746,8 @@ else { xresolution = xresolution * (INTEGER) (XRESOLUTION / 100); } else { +#line 5273 "./tex4ht-c.tex" + dump_ch_map(); } @@ -10194,6 +12755,8 @@ dump_ch_map(); break; } case '|': { gif_ch = !gif_ch; break; } case ':': { +#line 4720 "./tex4ht-c.tex" + if( special_n-- ){ int code, n; U_CHAR str [255], *p; @@ -10204,6 +12767,8 @@ if( special_n-- ){ while( special_n-- ) { *(p++) = get_char(); } *p = '\0'; +#line 4749 "./tex4ht-c.tex" + q = counter; while( q ){ if( eq_str(str,q->str) ) break; q = q->next; @@ -10219,10 +12784,14 @@ if( !q ){ +#line 4781 "./tex4ht-c.tex" + switch ( code ){ case '+': { (q->i)++; break; } case '-': { (q->i)--; break; } case '>': { +#line 4764 "./tex4ht-c.tex" + if( q->depth == q->max ){ q->max += 10; if( (q->stack = (int *) r_alloc( (void *) q->stack, @@ -10232,6 +12801,8 @@ q->stack[q->depth++] = q->i; break; } case '<': { if( q->depth ){ +#line 4773 "./tex4ht-c.tex" + q->depth--; if( q->max > q->depth + 20 ){ q->max -= 15; if( (q->stack = (int *) r_alloc( (void *) q->stack, @@ -10241,12 +12812,16 @@ if( q->max > q->depth + 20 ){ q->max -= 15; } break; } case '!': { +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } (IGNORED) fprintf(cur_o_file, "%d", q->i); break; } case '|': { if( q->depth ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -10261,6 +12836,8 @@ if( no_root_file ){ open_o_file(); } break; } case ';': { +#line 11398 "./tex4ht-c.tex" + int n, code; U_CHAR *p, *q; code = get_char(); @@ -10277,9 +12854,13 @@ switch ( code ){ break; } case '+': { default_font = -1; break; } case '%': { +#line 11812 "./tex4ht-c.tex" + int f; f = 0; while( *p ){ f = 10*f + *(p++) - '0'; } +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -10289,6 +12870,10 @@ if( no_root_file ){ open_o_file(); } break; } case '=': { +#line 11821 "./tex4ht-c.tex" + + +#line 1715 "./tex4ht-c.tex" if( no_root_file ){ open_o_file(); } @@ -10300,14 +12885,22 @@ if( font_tbl[cur_fnt].mag != 100 ){ break; } case '|': { +#line 11597 "./tex4ht-c.tex" + { int bad_str, m; U_CHAR ch, *t[ +#line 11641 "./tex4ht-c.tex" + 8 ], err_str[256]; bad_str= +#line 11643 "./tex4ht-c.tex" + 7 ; (IGNORED) strcpy((char *) err_str, (char *) p); if( n> +#line 11645 "./tex4ht-c.tex" + 10 ){ m = 100*( *p-'0' ) + 10*( *(p+1)-'0' )+ *(p+2)-'0'; @@ -10316,6 +12909,8 @@ if( n> while( (*p = *(p+4)) != '\0' ){ if( ch == *p ){ *p = '\0'; if( bad_str-- > 0 ) t[ +#line 11643 "./tex4ht-c.tex" + 7 - bad_str] = p+1; } @@ -10323,6 +12918,8 @@ if( n> } } if( !bad_str ){ if( m==0 ){ span_name_on = n> +#line 11647 "./tex4ht-c.tex" + 11 ; } q = span_open[m]; span_open[m] = t[0]; @@ -10341,6 +12938,8 @@ if( bad_str ){ warn_i_str(37,err_str); } break; } case ',': { +#line 11632 "./tex4ht-c.tex" + not_notify = TRUE; break; } @@ -10351,14 +12950,20 @@ if( q ) free((void *) q); break; } case '"': { +#line 8394 "./tex4ht-c.tex" + if( special_n ){ +#line 8465 "./tex4ht-c.tex" + { U_CHAR * p, ch, i; ch = get_char(); p = pos_text = pos_line = end_pos_text = end_pos_body = pos_body = (char *) r_alloc((void *) pos_body,(size_t) special_n + 1); i = 0; +#line 8484 "./tex4ht-c.tex" + { BOOL after_star=0; while( special_n-- > 0 ){ if( (*p = get_char()) == ch ){ @@ -10377,6 +12982,8 @@ if( special_n ){ +#line 8504 "./tex4ht-c.tex" + { long int v=0; double w[5]; int j; @@ -10384,6 +12991,8 @@ if( special_n ){ BOOL done; for(j=0;j<5;j++){ +#line 8526 "./tex4ht-c.tex" + done = FALSE; sign = 1; if( --special_n > 0 ){ if( (ch = get_char()) == '-' ){ sign = -1; v=0; } @@ -10427,6 +13036,8 @@ if( rect_pos ){ special_n -= 2; rect_pos = get_char() - '0';} double dim=0.0; BOOL dim_on; +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -10435,6 +13046,8 @@ if( no_root_file ){ open_o_file(); } dim_on = TRUE; switch( *p ){ +#line 8424 "./tex4ht-c.tex" + case 'X': { dim = pos_x_A * (max_pos_x - base_pos_x) + pos_x_B; break; } case 'x': { dim = pos_x_A * (base_pos_x - min_pos_x) + pos_x_B; @@ -10460,17 +13073,25 @@ case 'D': { dim = pos_y_C * (max_pos_y - min_pos_y) + pos_y_D; break; } case '~': { +#line 6579 "./tex4ht-c.tex" + if( special_n ){ +#line 6610 "./tex4ht-c.tex" + U_CHAR in_ch; if( (in_ch = get_char()) == '>' ) { +#line 6732 "./tex4ht-c.tex" + if( special_n == 1 ){ special_n--; switch( get_char() ){ case '[': { ignore_end_group++; break; } case ']': { ignore_end_group--; break; } default: { +#line 17091 "./tex4ht-c.tex" + ; } @@ -10493,11 +13114,15 @@ if( special_n == 1 ){ } else if( in_ch == '!' ) { +#line 7807 "./tex4ht-c.tex" + struct group_path *p, *t; U_CHAR *q, str[256]; int n; p = m_alloc(struct group_path,1); +#line 7830 "./tex4ht-c.tex" + n = 0; while( --special_n ) { str[n] = get_char(); @@ -10517,6 +13142,8 @@ p->path = m_alloc(char,n+1); +#line 7849 "./tex4ht-c.tex" + q = p->info = m_alloc(char,special_n+1); while( --special_n ) *q++ = get_char(); *q = '\0'; @@ -10541,6 +13168,8 @@ if( p->action == '>' ){ if( !group_dvi ){ warn_i(42); } (IGNORED) fseek(dvi_file, (long) --special_n, +#line 2177 "./tex4ht-c.tex" + 1 ); special_n = 0; @@ -10551,18 +13180,28 @@ if( p->action == '>' ){ long curr_pos; int ch, sv_stack_n; +#line 7112 "./tex4ht-c.tex" + int cr_fnt; +#line 7472 "./tex4ht-c.tex" + BOOL ch_token; int id_hide; +#line 7116 "./tex4ht-c.tex" + cr_fnt = cur_fnt; +#line 7477 "./tex4ht-c.tex" + sv_id = 0; +#line 7468 "./tex4ht-c.tex" + ch_id = 0; @@ -10576,25 +13215,37 @@ while( del_stack != (struct del_stack_entry*) 0 ){ stack_id = 0; curr_pos = ftell(dvi_file); sv_stack_n = stack_n; +#line 6987 "./tex4ht-c.tex" + while( group_dvi ){ +#line 7124 "./tex4ht-c.tex" + if( (ch = get_char()) >= 128 ) { switch( ch ){ +#line 7140 "./tex4ht-c.tex" + case 128: case 129: case 130: case 131: case 133: case 134: case 135: case 136: { ch = (int) get_unt( (ch-(ch>132)) % 4 +1); +#line 7352 "./tex4ht-c.tex" + ch_id++; if(!back_id_off ){ if( !id_hide ){ ch_token = TRUE; sv_id = ch_id; } switch( math_class_of( ch, cr_fnt ) ){ case +#line 7371 "./tex4ht-c.tex" + 4 : { del_stack = push_del( (char) ch, cr_fnt); break; } case +#line 7367 "./tex4ht-c.tex" + 5 : { @@ -10608,165 +13259,271 @@ if(!back_id_off ){ +#line 7078 "./tex4ht-c.tex" + case +#line 17458 "./tex4ht-c.tex" + 246 : (void) get_char(); case +#line 17455 "./tex4ht-c.tex" + 245 : (void) get_char(); case +#line 17452 "./tex4ht-c.tex" + 244 : (void) get_char(); case +#line 17449 "./tex4ht-c.tex" + 243 : { int i; for( i=14; i; i-- ){ ch = get_char(); } i = ch + get_char(); (IGNORED) fseek(dvi_file, (long) i, +#line 2177 "./tex4ht-c.tex" + 1 ); break; } +#line 7149 "./tex4ht-c.tex" + case +#line 17307 "./tex4ht-c.tex" + 132 : case +#line 17312 "./tex4ht-c.tex" + 137 :{ (IGNORED) fseek(dvi_file, 8L, +#line 2177 "./tex4ht-c.tex" + 1 ); break; } +#line 7157 "./tex4ht-c.tex" + case +#line 17318 "./tex4ht-c.tex" + 139 : { (IGNORED) fseek(dvi_file, 44L, +#line 2177 "./tex4ht-c.tex" + 1 ); break; } +#line 7162 "./tex4ht-c.tex" + case +#line 17330 "./tex4ht-c.tex" + 143 : case +#line 17333 "./tex4ht-c.tex" + 144 : case +#line 17336 "./tex4ht-c.tex" + 145 : case +#line 17339 "./tex4ht-c.tex" + 146 : { (IGNORED) (get_int( ch - +#line 17330 "./tex4ht-c.tex" + 143 + 1 )); break; } case +#line 17345 "./tex4ht-c.tex" + 148 : case +#line 17348 "./tex4ht-c.tex" + 149 : case +#line 17351 "./tex4ht-c.tex" + 150 : case +#line 17354 "./tex4ht-c.tex" + 151 : { (IGNORED) (get_int( ch - +#line 17345 "./tex4ht-c.tex" + 148 + 1)); break; } case +#line 17360 "./tex4ht-c.tex" + 153 : case +#line 17363 "./tex4ht-c.tex" + 154 : case +#line 17366 "./tex4ht-c.tex" + 155 : case +#line 17369 "./tex4ht-c.tex" + 156 : { (IGNORED) (get_int( ch - +#line 17360 "./tex4ht-c.tex" + 153 + 1)); break; } case +#line 17372 "./tex4ht-c.tex" + 157 : case +#line 17375 "./tex4ht-c.tex" + 158 : case +#line 17378 "./tex4ht-c.tex" + 159 : case +#line 17381 "./tex4ht-c.tex" + 160 : { (IGNORED) (get_int( ch - +#line 17372 "./tex4ht-c.tex" + 157 + 1)); break; } case +#line 17387 "./tex4ht-c.tex" + 162 : case +#line 17390 "./tex4ht-c.tex" + 163 : case +#line 17393 "./tex4ht-c.tex" + 164 : case +#line 17396 "./tex4ht-c.tex" + 165 : { (IGNORED) (get_int( ch - +#line 17387 "./tex4ht-c.tex" + 162 + 1)); break; } case +#line 17402 "./tex4ht-c.tex" + 167 : case +#line 17405 "./tex4ht-c.tex" + 168 : case +#line 17408 "./tex4ht-c.tex" + 169 : case +#line 17411 "./tex4ht-c.tex" + 170 : { (IGNORED) (get_int( ch - +#line 17402 "./tex4ht-c.tex" + 167 + 1)); break; } +#line 7198 "./tex4ht-c.tex" + case +#line 17342 "./tex4ht-c.tex" + 147 : case +#line 17357 "./tex4ht-c.tex" + 152 : case +#line 17384 "./tex4ht-c.tex" + 161 : case +#line 17399 "./tex4ht-c.tex" + 166 : { break; } +#line 6869 "./tex4ht-c.tex" + case +#line 17324 "./tex4ht-c.tex" + 141 : { +#line 6889 "./tex4ht-c.tex" + { struct group_info *p, *last; if( (last = p = stack[ stack_n ].begin) != (struct group_info *)0 ) if( p->stack_id == -1 ){ +#line 6899 "./tex4ht-c.tex" + while( p ){ if( p->stack_id != -1 ){ break; } p->stack_id = stack_id; @@ -10776,6 +13533,8 @@ while( p ){ +#line 6909 "./tex4ht-c.tex" + while ( stack[ stack_n ].begin != last ){ p = (stack[ stack_n ].begin) -> next; (stack[ stack_n ].begin) -> next = last->next; @@ -10790,6 +13549,8 @@ while ( stack[ stack_n ].begin != last ){ stack[stack_n].stack_id = stack_id++; +#line 7337 "./tex4ht-c.tex" + if( !back_id_off ) { struct del_stack_entry *p; p = m_alloc(struct del_stack_entry,1); @@ -10800,15 +13561,21 @@ if( !back_id_off ) stack_n++; if( stack_n > +#line 6682 "./tex4ht-c.tex" + ((int) stack_len + 2) ){ warn_i(40); } break; } case +#line 17327 "./tex4ht-c.tex" + 142 : { stack_n--; +#line 7323 "./tex4ht-c.tex" + if( !back_id_off ){ if( !id_hide ){ ch_token = FALSE; sv_id = stack[stack_n].stack_id; } @@ -10828,19 +13595,31 @@ if( !back_id_off ){ +#line 7000 "./tex4ht-c.tex" + case +#line 17439 "./tex4ht-c.tex" + 239 : case +#line 17441 "./tex4ht-c.tex" + 240 : case +#line 17443 "./tex4ht-c.tex" + 241 : case +#line 17445 "./tex4ht-c.tex" + 242 : { long int i; if( tex4ht_special( &ch, &i ) ){ if( ch == '~' ){ +#line 7027 "./tex4ht-c.tex" + if( i==0 ){ group_dvi = FALSE ; }else{ @@ -10849,6 +13628,8 @@ if( i==0 ){ if( i-- ){ U_CHAR ch; if( (ch = get_char()) == '*' ) { +#line 7552 "./tex4ht-c.tex" + struct send_back_entry *p, *q, *t=0; if( back_id_off ){ while( i-- ){ (IGNORED) get_char(); } @@ -10857,6 +13638,8 @@ if( back_id_off ){ p->send = get_str( (int)( i - 1 )); if( ch_token ){ +#line 7593 "./tex4ht-c.tex" + p->id = sv_id; if( sv_id > back_token->id ){ p->next = back_token; back_token = p; @@ -10882,41 +13665,55 @@ if( sv_id > back_token->id ){ } else if( (ch == '[') && (i==1) ){ i--; +#line 7491 "./tex4ht-c.tex" + id_hide++; } else if( (ch == ']') && (i==1) ){ i--; +#line 7496 "./tex4ht-c.tex" + id_hide--; } else if( (ch == '-') && (i==1) ){ i--; +#line 7500 "./tex4ht-c.tex" + id_latex++; } else if( (ch == '+') && (i==1) ){ i--; +#line 7505 "./tex4ht-c.tex" + id_latex--; } else if( (ch == '(') && (i==1) ){ i--; +#line 7511 "./tex4ht-c.tex" + back_id_off++; } else if( (ch == ')') && (i==1) ){ i--; +#line 7516 "./tex4ht-c.tex" + back_id_off--; } else { +#line 6844 "./tex4ht-c.tex" + struct group_info *p; U_CHAR *q; int j; @@ -10934,6 +13731,8 @@ while( --i ) *q++ = get_char(); break; } default: { (IGNORED) fseek(dvi_file, (long) --i, +#line 2177 "./tex4ht-c.tex" + 1 ); break; } } } @@ -10941,14 +13740,20 @@ while( --i ) *q++ = get_char(); } else { (IGNORED) fseek(dvi_file, (long) i, +#line 2177 "./tex4ht-c.tex" + 1 ); } }else{ +#line 7014 "./tex4ht-c.tex" + U_CHAR *ch; ch = special_hd + 4; while( *ch ){ ch++; } (IGNORED) fseek(dvi_file, (long) i, +#line 2177 "./tex4ht-c.tex" + 1 ); @@ -10958,20 +13763,32 @@ while( *ch ){ ch++; } +#line 7091 "./tex4ht-c.tex" + case +#line 17427 "./tex4ht-c.tex" + 235 : case +#line 17430 "./tex4ht-c.tex" + 236 : case +#line 17433 "./tex4ht-c.tex" + 237 : case +#line 17436 "./tex4ht-c.tex" + 238 : { INTEGER n; n = ch - +#line 17427 "./tex4ht-c.tex" + 235 + 1; cr_fnt = (int) ((n==4)? get_int(4) : get_unt((int) n)); @@ -10979,15 +13796,23 @@ case break; } default: { if( (ch < +#line 17415 "./tex4ht-c.tex" + 171 ) || (ch > +#line 17421 "./tex4ht-c.tex" + 234 ) ) { if( ch == +#line 17321 "./tex4ht-c.tex" + 140 ) { warn_i(46); } else { warn_i_int(45,ch); } } else { cr_fnt = ch - +#line 17415 "./tex4ht-c.tex" + 171 ; cr_fnt = search_font_tbl( cr_fnt ); @@ -10998,16 +13823,22 @@ default: { } } else { +#line 7352 "./tex4ht-c.tex" + ch_id++; if(!back_id_off ){ if( !id_hide ){ ch_token = TRUE; sv_id = ch_id; } switch( math_class_of( ch, cr_fnt ) ){ case +#line 7371 "./tex4ht-c.tex" + 4 : { del_stack = push_del( (char) ch, cr_fnt); break; } case +#line 7367 "./tex4ht-c.tex" + 5 : { @@ -11022,6 +13853,8 @@ if(!back_id_off ){ +#line 6952 "./tex4ht-c.tex" + { struct group_info *first, *second, *temp; int i; for(i = stack_len; i >= 0; i--){ @@ -11039,29 +13872,43 @@ for(i = stack_len; i >= 0; i--){ } } } +#line 7608 "./tex4ht-c.tex" + back_group = rev_list( back_group ); back_token = rev_list( back_token ); back_token = back_insert ( back_token, 0); +#line 7468 "./tex4ht-c.tex" + ch_id = 0; (IGNORED) fseek(dvi_file, curr_pos, +#line 2174 "./tex4ht-c.tex" + 0 ); group_dvi = TRUE; stack_n = sv_stack_n; stack_id = 0; } else { +#line 6811 "./tex4ht-c.tex" + { int stack_n; for( stack_n= +#line 6682 "./tex4ht-c.tex" + ((int) stack_len + 2) ; stack_n>0; stack_n--){ group_dvi = TRUE; +#line 6790 "./tex4ht-c.tex" + while( stack[stack_n-1].end ){ +#line 6768 "./tex4ht-c.tex" + struct stack_end_entry *q, *p, *t; q = stack[ stack_n-1 ].end; p = stack[ stack_n-1 ].end = (struct stack_end_entry *) 0; @@ -11080,6 +13927,8 @@ while( p ){ group_dvi =FALSE; +#line 6822 "./tex4ht-c.tex" + while( stack[stack_n-1].begin ){ struct group_info *p; warn_i_str(44, stack[stack_n-1].begin->info); @@ -11096,6 +13945,8 @@ stack[stack_n-1].stack_id = -1; break; } case '.': { +#line 1759 "./tex4ht-c.tex" + if( no_root_file ){ U_CHAR *name; name = m_alloc(char, 256); @@ -11116,10 +13967,14 @@ if( no_root_file ){ break; } case '^': { +#line 12526 "./tex4ht-c.tex" + switch( special_n ){ case 0:{ if( math_class_on ){ open_del = 256; pause_class = ignore_subclass_del = 0; math_class_on = FALSE; +#line 12573 "./tex4ht-c.tex" + group_dvi = sv_group_dvi; trace_dvi_C = sv_trace_dvi_C; in_trace_char = sv_in_trace_char; @@ -11131,6 +13986,8 @@ in_span_ch = sv_in_span_ch; break; } case 1:{ +#line 12564 "./tex4ht-c.tex" + sv_group_dvi = group_dvi; sv_trace_dvi_C = trace_dvi_C; sv_in_trace_char = in_trace_char; @@ -11140,6 +13997,8 @@ sv_in_span_ch = in_span_ch; special_n--; if( (math_class = scan_class(1)) == +#line 12717 "./tex4ht-c.tex" + 79 ) @@ -11148,9 +14007,13 @@ sv_in_span_ch = in_span_ch; break; } case 2:{ +#line 12799 "./tex4ht-c.tex" + special_n -= 2; math_class = scan_class(0); stack[stack_n+1].ignore_subclass_del = ( +#line 12724 "./tex4ht-c.tex" + ')' == get_char()); @@ -11163,6 +14026,8 @@ stack[stack_n+1].class_close = close_class[math_class]; break; } default:{ +#line 12655 "./tex4ht-c.tex" + { U_CHAR str[256], *p, ch, **q; math_class = scan_class(2); ch = get_char(); special_n -= 2; p = str; @@ -11171,9 +14036,13 @@ stack[stack_n+1].class_close = close_class[math_class]; } *p = '\0'; q = (math_class > +#line 12713 "./tex4ht-c.tex" + 78 )? &( +#line 12831 "./tex4ht-c.tex" + stack[stack_n+1].temp_class_open ) @@ -11182,9 +14051,13 @@ stack[stack_n+1].temp_class_open 1 + (size_t) strlen((char *) str)); (IGNORED) strcpy((char *) *q, (char *) str); q = (math_class > +#line 12713 "./tex4ht-c.tex" + 78 ) ? &( +#line 12827 "./tex4ht-c.tex" + stack[stack_n+1].temp_class_close ) @@ -11193,12 +14066,20 @@ stack[stack_n+1].temp_class_close while( special_n-- > 0 ){ *(p++) = get_char(); } *p = '\0'; if( math_class > +#line 12713 "./tex4ht-c.tex" + 78 ){ +#line 12818 "./tex4ht-c.tex" + stack[stack_n+1].ignore_subclass_del = (math_class == +#line 12732 "./tex4ht-c.tex" + ( +#line 12717 "./tex4ht-c.tex" + 79 + 1) @@ -11218,6 +14099,8 @@ stack[stack_n+1].active_class_del = TRUE; special_on = FALSE; +#line 17071 "./tex4ht-c.tex" + if( special_n > 0 ){ warn_i_int( 26, sv); while( special_n-- ) (IGNORED) putc( get_char(), stderr); @@ -11225,6 +14108,8 @@ if( special_n > 0 ){ } else { +#line 3871 "./tex4ht-c.tex" + while( special_n-- ) (void) get_char(); } @@ -11232,12 +14117,22 @@ while( special_n-- ) (void) get_char(); break; } +#line 7217 "./tex4ht-c.tex" + case +#line 17324 "./tex4ht-c.tex" + 141 : { +#line 7225 "./tex4ht-c.tex" + + +#line 6412 "./tex4ht-c.tex" if( new_halign ){ +#line 6379 "./tex4ht-c.tex" + stack[stack_n].halign_on = new_halign; if( stack[stack_n].halign_info ) { int j; @@ -11285,6 +14180,8 @@ if( stack_n ){ +#line 6920 "./tex4ht-c.tex" + { struct group_info *p; if( group_dvi && ( (p = stack[stack_n].begin ) != (struct group_info *)0) @@ -11303,14 +14200,20 @@ if( stack_n ){ stack[stack_n].text_on = text_on; push_stack(); +#line 7645 "./tex4ht-c.tex" + if( group_dvi ) { back_group = back_insert ( back_group, push_id); } +#line 7859 "./tex4ht-c.tex" + { +#line 7879 "./tex4ht-c.tex" + struct group_path *start_head, *start_tail, *parent_start_head, *parent_start_tail, *end_head, *end_tail, @@ -11323,14 +14226,20 @@ start_head = start_tail = parent_start_head = parent_start_tail if( +#line 3739 "./tex4ht-c.tex" + rule_ch_off ){ +#line 3272 "./tex4ht-c.tex" + ignore_spaces--; +#line 3739 "./tex4ht-c.tex" + rule_ch_off = FALSE; @@ -11339,35 +14248,51 @@ rule_ch_off p = stack[stack_n - 2].path_start; if( p != (struct group_path *) 0 ){ +#line 7900 "./tex4ht-c.tex" + while( p != (struct group_path *) 0 ){ +#line 8005 "./tex4ht-c.tex" + if( *(p->path ) == 'e' ) { (IGNORED) strcpy((char *) p->path, (char *) p->path+1); if( *(p->path) == '\0' ) { switch( p->action ){ case '<': print_f( p->info ); place = +#line 7976 "./tex4ht-c.tex" + 4 ; break; case '/': ignore_chs++; place = +#line 7970 "./tex4ht-c.tex" + 2 ; break; case '-': +#line 3739 "./tex4ht-c.tex" + rule_ch_off = TRUE; +#line 3268 "./tex4ht-c.tex" + ignore_spaces++; place = +#line 7976 "./tex4ht-c.tex" + 4 ; break; } } else { place = +#line 7970 "./tex4ht-c.tex" + 2 ; } @@ -11376,6 +14301,8 @@ ignore_spaces++; (IGNORED) strcpy((char *) p->path, (char *) p->path+1); } place = +#line 7964 "./tex4ht-c.tex" + 0 ; } @@ -11385,8 +14312,12 @@ ignore_spaces++; p = p->next; q->next = (struct group_path *) 0; +#line 7920 "./tex4ht-c.tex" + switch( place ){ case +#line 7964 "./tex4ht-c.tex" + 0 : if( parent_start_head == (struct group_path *) 0 ){ @@ -11396,6 +14327,8 @@ switch( place ){ } break; case +#line 7970 "./tex4ht-c.tex" + 2 : if( start_head == (struct group_path *) 0 ){ @@ -11405,9 +14338,13 @@ switch( place ){ } break; case +#line 7976 "./tex4ht-c.tex" + 4 : +#line 7979 "./tex4ht-c.tex" + free((void *) q->path ); free((void *) q->info ); free((void *) q ); @@ -11424,11 +14361,17 @@ free((void *) q ); p = stack[stack_n - 2].path_end; if( p != (struct group_path *) 0 ){ +#line 7910 "./tex4ht-c.tex" + while( p != (struct group_path *) 0 ){ +#line 8041 "./tex4ht-c.tex" + if( *(p->path ) == 'e' ) { (IGNORED) strcpy((char *) p->path, (char *) p->path+1); place = +#line 7973 "./tex4ht-c.tex" + 3 ; } else { @@ -11436,6 +14379,8 @@ if( *(p->path ) == 'e' ) { (IGNORED) strcpy((char *) p->path, (char *) p->path+1); } place = +#line 7967 "./tex4ht-c.tex" + 1 ; } @@ -11445,8 +14390,12 @@ if( *(p->path ) == 'e' ) { p = p->next; q->next = (struct group_path *) 0; +#line 7942 "./tex4ht-c.tex" + switch( place ){ case +#line 7967 "./tex4ht-c.tex" + 1 : if( parent_end_head == (struct group_path *) 0 ){ @@ -11456,6 +14405,8 @@ switch( place ){ } break; case +#line 7973 "./tex4ht-c.tex" + 3 : if( end_head == (struct group_path *) 0 ){ @@ -11465,9 +14416,13 @@ switch( place ){ } break; case +#line 7976 "./tex4ht-c.tex" + 4 : +#line 7979 "./tex4ht-c.tex" + free((void *) q->path ); free((void *) q->info ); free((void *) q ); @@ -11482,6 +14437,8 @@ free((void *) q ); } +#line 7891 "./tex4ht-c.tex" + stack[stack_n - 1].path_start = start_head; stack[stack_n - 1].path_end = end_head; stack[stack_n - 2].path_start = parent_start_head; @@ -11492,9 +14449,13 @@ free((void *) q ); +#line 2867 "./tex4ht-c.tex" + if( push_depth<256 ) { push_st[push_depth] = push_id++; } if( trace_dvi_P && !ch_map_flag ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -11509,9 +14470,13 @@ push_depth++; +#line 12840 "./tex4ht-c.tex" + if( stack[stack_n].active_class_del ){ if( show_class && !pause_class && !ignore_subclass_del ){ +#line 12980 "./tex4ht-c.tex" + (IGNORED) print_f( (stack[stack_n].temp_class_del)? stack[stack_n].temp_class_open : stack[stack_n].class_open); @@ -11527,14 +14492,22 @@ if( stack[stack_n].active_class_del ){ break; } case +#line 17327 "./tex4ht-c.tex" + 142 : { +#line 7270 "./tex4ht-c.tex" + + +#line 12852 "./tex4ht-c.tex" if( stack[stack_n].active_class_del ){ ignore_subclass_del = ignore_subclass_del - stack[stack_n].ignore_subclass_del; if( show_class && !pause_class && !ignore_subclass_del ){ +#line 12967 "./tex4ht-c.tex" + (IGNORED) print_f( (stack[stack_n].temp_class_del)? stack[stack_n].temp_class_close : stack[stack_n].class_close); @@ -11546,16 +14519,24 @@ if( stack[stack_n].active_class_del ){ +#line 8061 "./tex4ht-c.tex" + { struct group_path *p, *q; if( stack_n > 1 ){ p = stack[stack_n - 1].path_start; if( p != (struct group_path *) 0 ){ +#line 8076 "./tex4ht-c.tex" + while( p != (struct group_path *) 0 ){ +#line 8102 "./tex4ht-c.tex" + if( *(p->path) != '\0' ) { +#line 8132 "./tex4ht-c.tex" + char str[256]; (IGNORED) strcpy(str, "...."); *(str+3) = p->action; (IGNORED) strct(str,p->info); warn_i_str(38,str); @@ -11566,6 +14547,8 @@ if( *(p->path) != '\0' ) { case '/': ignore_chs--; break; default: { +#line 8132 "./tex4ht-c.tex" + char str[256]; (IGNORED) strcpy(str, "...."); *(str+3) = p->action; (IGNORED) strct(str,p->info); warn_i_str(38,str); @@ -11578,6 +14561,8 @@ if( *(p->path) != '\0' ) { q = p; p = p->next; +#line 7979 "./tex4ht-c.tex" + free((void *) q->path ); free((void *) q->info ); free((void *) q ); @@ -11590,10 +14575,16 @@ free((void *) q ); p = stack[stack_n - 1].path_end; if( p != (struct group_path *) 0 ){ +#line 8085 "./tex4ht-c.tex" + while( p != (struct group_path *) 0 ){ +#line 8118 "./tex4ht-c.tex" + if( *(p->path) != '\0' ) { +#line 8132 "./tex4ht-c.tex" + char str[256]; (IGNORED) strcpy(str, "...."); *(str+3) = p->action; (IGNORED) strct(str,p->info); warn_i_str(38,str); @@ -11604,6 +14595,8 @@ if( *(p->path) != '\0' ) { case '>': print_f( p->info ); break; default: { +#line 8132 "./tex4ht-c.tex" + char str[256]; (IGNORED) strcpy(str, "...."); *(str+3) = p->action; (IGNORED) strct(str,p->info); warn_i_str(38,str); @@ -11616,6 +14609,8 @@ if( *(p->path) != '\0' ) { q = p; p = p->next; +#line 7979 "./tex4ht-c.tex" + free((void *) q->path ); free((void *) q->info ); free((void *) q ); @@ -11628,8 +14623,12 @@ free((void *) q ); +#line 6790 "./tex4ht-c.tex" + while( stack[stack_n-1].end ){ +#line 6768 "./tex4ht-c.tex" + struct stack_end_entry *q, *p, *t; q = stack[ stack_n-1 ].end; p = stack[ stack_n-1 ].end = (struct stack_end_entry *) 0; @@ -11647,9 +14646,13 @@ while( p ){ +#line 2883 "./tex4ht-c.tex" + push_depth--; if( trace_dvi_P && !ch_map_flag ){ +#line 1715 "./tex4ht-c.tex" + if( no_root_file ){ open_o_file(); } @@ -11663,9 +14666,15 @@ if( no_root_file ){ open_o_file(); } +#line 6441 "./tex4ht-c.tex" + + +#line 6490 "./tex4ht-c.tex" if( stack[stack_n].halign_on ) { +#line 6496 "./tex4ht-c.tex" + print_f( stack[stack_n].halign[1]->str ); stack[stack_n].halign_on = FALSE; @@ -11673,6 +14682,8 @@ stack[stack_n].halign_on = FALSE; +#line 6503 "./tex4ht-c.tex" + if( stack_n ){ if( stack[stack_n-1].halign_on ) { @@ -11681,6 +14692,8 @@ if( stack_n ){ +#line 6512 "./tex4ht-c.tex" + if( stack_n-1 ){ if( stack[stack_n-2].halign_on ) { @@ -11712,6 +14725,8 @@ text_on = stack[stack_n].text_on; } +#line 5280 "./tex4ht-c.tex" + if( ch_map_flag ){ warn_i(27); init_ch_map(); } @@ -11723,6 +14738,8 @@ if( ch_map_flag ){ put_char('\n');put_char('\n'); +#line 4454 "./tex4ht-c.tex" + while( opened_files != (struct files_rec*) 0 ) { (IGNORED) fclose( opened_files->file ); @@ -11731,30 +14748,46 @@ while( opened_files != (struct files_rec*) 0 ) { +#line 5776 "./tex4ht-c.tex" + INTEGER bop_addr; +#line 5841 "./tex4ht-c.tex" + int stack_depth=0; +#line 5898 "./tex4ht-c.tex" + char cur_font[6]; BOOL visible_cnt=FALSE; +#line 5404 "./tex4ht-c.tex" + job_name[job_name_n-3] = '\0'; +#line 5446 "./tex4ht-c.tex" + file_n = 14; (IGNORED) fseek(dvi_file, 0L, +#line 2174 "./tex4ht-c.tex" + 0 ); do{ ch = get_char(); idv_char( ch ); file_n++; }while( ch == +#line 17315 "./tex4ht-c.tex" + 138 ); +#line 5460 "./tex4ht-c.tex" + ch = get_char(); if( id_version != -1 ){ ch = id_version; } idv_char( ch ); @@ -11767,20 +14800,30 @@ idv_char( (int) i ); while( i-- ) idv_copy(); page_n = 0; +#line 6096 "./tex4ht-c.tex" + x_val = 0; y_val = 0; stack_n = 0; idv_char( +#line 17318 "./tex4ht-c.tex" + 139 ); idv_int( page_n + 1 ); for( i=36; i--; ) idv_char( 0); idv_int( -1 ); bop_addr = file_n; file_n += 45; idv_char( +#line 17324 "./tex4ht-c.tex" + 141 ); file_n++; while( dis_pages ){ +#line 5524 "./tex4ht-c.tex" + if( (ch = get_char()) < 128 ) { visible_cnt = TRUE; cond_idv_char( ch );} else switch( ch ){ +#line 5531 "./tex4ht-c.tex" + case 128: case 129: case 130: case 131: case 133: case 134: case 135: case 136: { visible_cnt = TRUE; cond_string( ch, (ch - (ch>132)) % 4 +1 ); @@ -11788,147 +14831,237 @@ case 134: case 135: case 136: { } +#line 5542 "./tex4ht-c.tex" + case +#line 17318 "./tex4ht-c.tex" + 139 : { x_val = 0; y_val = 0; stack_n = 0; (IGNORED) fseek(dvi_file, 44L, +#line 2177 "./tex4ht-c.tex" + 1 ); break; } case +#line 17321 "./tex4ht-c.tex" + 140 : { dis_pages--; } case +#line 17315 "./tex4ht-c.tex" + 138 : { break; } +#line 5551 "./tex4ht-c.tex" + case +#line 17342 "./tex4ht-c.tex" + 147 : { cond_idv_char( ch ); x_val += dx_1; break; } case +#line 17357 "./tex4ht-c.tex" + 152 : { cond_idv_char( ch ); x_val += dx_2; break; } case +#line 17384 "./tex4ht-c.tex" + 161 : { cond_idv_char( ch ); y_val += dy_1; break; } case +#line 17399 "./tex4ht-c.tex" + 166 : { cond_idv_char( ch ); y_val += dy_2; break; } +#line 5563 "./tex4ht-c.tex" + case +#line 17330 "./tex4ht-c.tex" + 143 : case +#line 17333 "./tex4ht-c.tex" + 144 : case +#line 17336 "./tex4ht-c.tex" + 145 : case +#line 17339 "./tex4ht-c.tex" + 146 : { cond_idv_char( ch ); x_val += cond_int( ch - +#line 17330 "./tex4ht-c.tex" + 143 + 1 ); break; } case +#line 17345 "./tex4ht-c.tex" + 148 : case +#line 17348 "./tex4ht-c.tex" + 149 : case +#line 17351 "./tex4ht-c.tex" + 150 : case +#line 17354 "./tex4ht-c.tex" + 151 : { cond_idv_char( ch ); dx_1 = (INTEGER) cond_int( ch - +#line 17345 "./tex4ht-c.tex" + 148 + 1); x_val += dx_1; break; } case +#line 17360 "./tex4ht-c.tex" + 153 : case +#line 17363 "./tex4ht-c.tex" + 154 : case +#line 17366 "./tex4ht-c.tex" + 155 : case +#line 17369 "./tex4ht-c.tex" + 156 : { cond_idv_char( ch ); dx_2 = (INTEGER) cond_int( ch - +#line 17360 "./tex4ht-c.tex" + 153 + 1); x_val += dx_2; break; } +#line 5584 "./tex4ht-c.tex" + case +#line 17372 "./tex4ht-c.tex" + 157 : case +#line 17375 "./tex4ht-c.tex" + 158 : case +#line 17378 "./tex4ht-c.tex" + 159 : case +#line 17381 "./tex4ht-c.tex" + 160 : { cond_idv_char( ch ); y_val += cond_int( ch - +#line 17372 "./tex4ht-c.tex" + 157 + 1); break; } case +#line 17387 "./tex4ht-c.tex" + 162 : case +#line 17390 "./tex4ht-c.tex" + 163 : case +#line 17393 "./tex4ht-c.tex" + 164 : case +#line 17396 "./tex4ht-c.tex" + 165 : { cond_idv_char( ch ); dy_1 = (INTEGER) cond_int( ch - +#line 17387 "./tex4ht-c.tex" + 162 + 1); y_val += dy_1; break; } case +#line 17402 "./tex4ht-c.tex" + 167 : case +#line 17405 "./tex4ht-c.tex" + 168 : case +#line 17408 "./tex4ht-c.tex" + 169 : case +#line 17411 "./tex4ht-c.tex" + 170 : { cond_idv_char( ch ); dy_2 = (INTEGER) cond_int( ch - +#line 17402 "./tex4ht-c.tex" + 167 + 1); y_val += dy_2; break; } +#line 5611 "./tex4ht-c.tex" + case +#line 17307 "./tex4ht-c.tex" + 132 :{ visible_cnt = TRUE; cond_string( ch,4 ); x_val += cond_int(4); break; } case +#line 17312 "./tex4ht-c.tex" + 137 :{ visible_cnt = TRUE; cond_string( ch, 8 ); @@ -11936,14 +15069,24 @@ case } +#line 5644 "./tex4ht-c.tex" + case +#line 17439 "./tex4ht-c.tex" + 239 : case +#line 17441 "./tex4ht-c.tex" + 240 : case +#line 17443 "./tex4ht-c.tex" + 241 : case +#line 17445 "./tex4ht-c.tex" + 242 : { long int i; int special_nr; @@ -11951,21 +15094,31 @@ case if( tex4ht_special( &ch, &i ) ){ if( ch == '+' ){ +#line 5699 "./tex4ht-c.tex" + if( i==0 ){ if( dvi_flag ){ dvi_flag = 0; +#line 5831 "./tex4ht-c.tex" + if( !visible_cnt ) { U_CHAR str[256]; (IGNORED) sprintf(str, "--- empty picture --- %sidv[%d] ---\n", job_name,page_n); (IGNORED) printf("%s", str); (IGNORED) fprintf(log_file, "%s",str); } while( stack_depth-- > 0 ){ idv_char( +#line 17327 "./tex4ht-c.tex" + 142 ); file_n++; } } } else{ if( dvi_flag ){ +#line 5758 "./tex4ht-c.tex" + cond_idv_char( special_nr ); cond_idv_int( i, special_nr - +#line 17439 "./tex4ht-c.tex" + 239 + 1 ); while( i-- ) cond_idv_char( get_char() ); @@ -11974,6 +15127,8 @@ visible_cnt = TRUE; } else switch( get_char() ){ case '+': { +#line 5738 "./tex4ht-c.tex" + { U_CHAR str[256], *ch; ch = str; while( --i ) *(ch++) = get_char(); *ch = '\0'; script(font_gif, job_name ,page_n+1, str); @@ -11982,18 +15137,26 @@ visible_cnt = TRUE; dvi_flag = TRUE; dvi_page = TRUE; +#line 5766 "./tex4ht-c.tex" + visible_cnt = FALSE; bop_addr = advance_idv_page( bop_addr, cur_font ); stack_depth = 0; set_loc( +#line 17330 "./tex4ht-c.tex" + 143 , x_val ); set_loc( +#line 17372 "./tex4ht-c.tex" + 157 , y_val ); break; } case '@': { +#line 5714 "./tex4ht-c.tex" + while( --i ) (void) putc( get_char(), log_file ); (IGNORED) putc( '\n', log_file ); @@ -12004,12 +15167,18 @@ while( --i ) (void) putc( get_char(), log_file ); } else while( i-- ) (void) get_char(); }else if( dvi_flag ){ +#line 5677 "./tex4ht-c.tex" + visible_cnt = TRUE; +#line 5682 "./tex4ht-c.tex" + { U_CHAR *ch; int j; ch = special_hd; (IGNORED) putc( (unsigned) +#line 17445 "./tex4ht-c.tex" + 242 , idv_file ); file_n++; for(j=4; j--; ){ (IGNORED) putc( *ch, idv_file ); file_n++; ch++; } @@ -12022,25 +15191,37 @@ visible_cnt = TRUE; }else { +#line 5662 "./tex4ht-c.tex" + if( dvi_page || !page_n ){ dvi_page = FALSE; +#line 5766 "./tex4ht-c.tex" + visible_cnt = FALSE; bop_addr = advance_idv_page( bop_addr, cur_font ); stack_depth = 0; set_loc( +#line 17330 "./tex4ht-c.tex" + 143 , x_val ); set_loc( +#line 17372 "./tex4ht-c.tex" + 157 , y_val ); } dvi_flag = TRUE; +#line 5682 "./tex4ht-c.tex" + { U_CHAR *ch; int j; ch = special_hd; (IGNORED) putc( (unsigned) +#line 17445 "./tex4ht-c.tex" + 242 , idv_file ); file_n++; for(j=4; j--; ){ (IGNORED) putc( *ch, idv_file ); file_n++; ch++; } @@ -12057,7 +15238,11 @@ dvi_flag = FALSE; } +#line 5798 "./tex4ht-c.tex" + case +#line 17324 "./tex4ht-c.tex" + 141 : { push_stack(); @@ -12065,6 +15250,8 @@ case cond_idv_char( ch ); break; } case +#line 17327 "./tex4ht-c.tex" + 142 : { INTEGER cur_x, cur_y; stack_depth--; @@ -12072,31 +15259,47 @@ case if( dvi_flag ){ if( stack_depth<0 ){ warn_i_int( 24, page_n ); +#line 5815 "./tex4ht-c.tex" + cond_idv_char( +#line 17339 "./tex4ht-c.tex" + 146 ); idv_int( x_val - cur_x - dx_1 - dx_2 ); cond_idv_char( +#line 17354 "./tex4ht-c.tex" + 151 ); idv_int( dx_1 ); cond_idv_char( +#line 17369 "./tex4ht-c.tex" + 156 ); idv_int( dx_2 ); cond_idv_char( +#line 17381 "./tex4ht-c.tex" + 160 ); idv_int( y_val - cur_y - dy_1 - dy_2 ); cond_idv_char( +#line 17396 "./tex4ht-c.tex" + 165 ); idv_int( dy_1 ); cond_idv_char( +#line 17411 "./tex4ht-c.tex" + 170 ); idv_int( dy_2 ); cond_idv_char( +#line 17324 "./tex4ht-c.tex" + 141 ); file_n += 24; @@ -12106,16 +15309,26 @@ cond_idv_char( break; } +#line 5852 "./tex4ht-c.tex" + case +#line 17458 "./tex4ht-c.tex" + 246 : case +#line 17455 "./tex4ht-c.tex" + 245 : case +#line 17452 "./tex4ht-c.tex" + 244 : case +#line 17449 "./tex4ht-c.tex" + 243 : { idv_char( ch ); file_n++; for( i=14; i; i-- ){ ch = get_char(); idv_char( ch ); file_n++; } @@ -12124,20 +15337,32 @@ case break; } +#line 5871 "./tex4ht-c.tex" + case +#line 17427 "./tex4ht-c.tex" + 235 : case +#line 17430 "./tex4ht-c.tex" + 236 : case +#line 17433 "./tex4ht-c.tex" + 237 : case +#line 17436 "./tex4ht-c.tex" + 238 : { int i; idv_char( ch ); file_n++; cur_font[0] = ch - +#line 17427 "./tex4ht-c.tex" + 235 + 2; cur_font[1] = ch; @@ -12147,35 +15372,53 @@ case break; } +#line 5885 "./tex4ht-c.tex" + default: { if( (ch < +#line 17415 "./tex4ht-c.tex" + 171 ) || (ch > +#line 17421 "./tex4ht-c.tex" + 234 ) ){ if( +#line 8969 "./tex4ht-c.tex" + (version_id == -5 +#line 2292 "./tex4ht-c.tex" + +10 ) && ( (ch == +#line 17482 "./tex4ht-c.tex" + 251 ) || (ch == +#line 17488 "./tex4ht-c.tex" + 252 ) || (ch == +#line 17494 "./tex4ht-c.tex" + 253 ) || (ch == +#line 17499 "./tex4ht-c.tex" + 254 ) @@ -12183,12 +15426,18 @@ default: { ){ +#line 8991 "./tex4ht-c.tex" + switch( ch ){ case +#line 17488 "./tex4ht-c.tex" + 252 : +#line 9019 "./tex4ht-c.tex" + { int i, flags; (void) get_unt(4); @@ -12199,9 +15448,13 @@ switch( ch ){ if ((flags & +#line 8983 "./tex4ht-c.tex" + 0x0002 ) || (flags & +#line 8987 "./tex4ht-c.tex" + 0x0001 )) { @@ -12221,6 +15474,8 @@ i-- if( flags & +#line 8953 "./tex4ht-c.tex" + 0x0200 ){ @@ -12228,6 +15483,8 @@ i-- } if( flags & +#line 8957 "./tex4ht-c.tex" + 0x0800 ){ @@ -12246,10 +15503,14 @@ if( flags & break; case +#line 17499 "./tex4ht-c.tex" + 254 : +#line 9004 "./tex4ht-c.tex" + { int i, glyphCount; (void) get_unt(4); @@ -12280,18 +15541,24 @@ if( flags & } +#line 5418 "./tex4ht-c.tex" + if( errCode > 0 ){ (IGNORED) fprintf(log_file, "tex4ht.c error: %d\n", errCode); } +#line 5911 "./tex4ht-c.tex" + { int ch, i, mag; U_CHAR str[256]; (IGNORED) fprintf(log_file, "%s", begin_char_gif); dvi_flag = TRUE; for( cur_fnt = font_tbl_size; cur_fnt--; ){ +#line 8813 "./tex4ht-c.tex" + (IGNORED) fprintf(log_file, lg_font_fmt, font_tbl[cur_fnt].family_name, font_tbl[cur_fnt].font_size, @@ -12304,31 +15571,49 @@ if( errCode > 0 ){ if( get_bit( font_tbl[cur_fnt].gif_on, i) ){ bop_addr = advance_idv_page( bop_addr, cur_font ); set_loc( +#line 17330 "./tex4ht-c.tex" + 143 , (long int) mid_page_x ); set_loc( +#line 17372 "./tex4ht-c.tex" + 157 , (long int) mid_page_y ); +#line 5981 "./tex4ht-c.tex" + { INTEGER num; num = font_tbl[cur_fnt].num; if( num <= +#line 17424 "./tex4ht-c.tex" + 63 ) cond_idv_char( (int) (num + +#line 17415 "./tex4ht-c.tex" + 171 ) ); else if( dvi_flag ){ if( (num < 0) || (num > 16777215L) ) idv_int( +#line 17436 "./tex4ht-c.tex" + 238 ); else if( num < 256 ) { idv_char( +#line 17427 "./tex4ht-c.tex" + 235 ); file_n++; } else if( num < 65536L ) int_to_dvi((long int) +#line 17430 "./tex4ht-c.tex" + 236 ,2); else int_to_dvi((long int) +#line 17433 "./tex4ht-c.tex" + 237 ,3); cond_idv_char( (int) num ); @@ -12336,12 +15621,16 @@ if( errCode > 0 ){ +#line 5939 "./tex4ht-c.tex" + if( (ch = i + font_tbl[cur_fnt].char_f) > 127 ) { if( ch < 256 ) cond_idv_char(133); else warn_i(23); } cond_idv_char( ch ); mag = (int) ((double) font_tbl[cur_fnt].scale / font_tbl[cur_fnt].design_sz * 10 ); +#line 10899 "./tex4ht-c.tex" + if( !dos_file_names ){ if( mag == 10 ) (IGNORED) sprintf(str, "%s-%x%s", font_tbl[cur_fnt].name, ch, gif); @@ -12350,6 +15639,8 @@ if( !dos_file_names ){ } +#line 10927 "./tex4ht-c.tex" + if( dos_file_names ){ (IGNORED) strcpy((char *) str, (char *) font_tbl[cur_fnt].name); @@ -12370,47 +15661,71 @@ script(font_gif, job_name ,page_n, str); +#line 5492 "./tex4ht-c.tex" + idv_char( +#line 17327 "./tex4ht-c.tex" + 142 ); file_n += 2; idv_char( +#line 17321 "./tex4ht-c.tex" + 140 ); (IGNORED) fseek(dvi_file, begin_postamble, +#line 2174 "./tex4ht-c.tex" + 0 ); begin_postamble = file_n; idv_char( +#line 17464 "./tex4ht-c.tex" + 248 ); file_n += 5; idv_int( bop_addr ); (IGNORED) fseek(dvi_file, 5L, +#line 2177 "./tex4ht-c.tex" + 1 ); for( i = 20; i; i-- ) idv_copy(); +#line 5502 "./tex4ht-c.tex" + i = (INTEGER) get_int(2) + 1; idv_char( (int) i >> 8 ); idv_char( (int) i & 0xFF ); file_n += 2; if( !page_n ) page_n++; idv_char( page_n >> 8 ); idv_char( (int) page_n & 0xFF ); file_n += 2; (IGNORED) fseek(dvi_file, 2L, +#line 2177 "./tex4ht-c.tex" + 1 ); +#line 5510 "./tex4ht-c.tex" + eof_op_n -= 32; while( --eof_op_n ) idv_copy(); idv_int(begin_postamble); (IGNORED) fseek(dvi_file, 4L, +#line 2177 "./tex4ht-c.tex" + 1 ); file_n += 4; +#line 5460 "./tex4ht-c.tex" + ch = get_char(); if( id_version != -1 ){ ch = id_version; } idv_char( ch ); for( i = 8 - file_n % 4; i; i-- ) idv_char( +#line 17418 "./tex4ht-c.tex" + 223 ); -- cgit v1.2.3