[tex4ht-commits] [SCM] tex4ht updated: r64 - trunk/lit
karl at gnu.org.ua
karl at gnu.org.ua
Wed Nov 17 19:39:45 CET 2010
Author: karl
Date: 2010-11-17 20:39:45 +0200 (Wed, 17 Nov 2010)
New Revision: 64
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-c.tex
trunk/lit/tex4ht-t4ht.tex
Log:
fixes for some warnings, from peb
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2010-11-17 18:38:02 UTC (rev 63)
+++ trunk/lit/ChangeLog 2010-11-17 18:39:45 UTC (rev 64)
@@ -1,3 +1,8 @@
+2010-11-17 Peter Breitenlohner <peb at mppmu.mpg.de>
+
+ * tex4ht-c.tex,
+ * tex4ht-t4ht.tex: some warning fixes.
+
2010-11-17 Karl Berry <karl at gnu.org>
* tex4ht-c.tex: compiler options are a comment, despite #define's.
Modified: trunk/lit/tex4ht-c.tex
===================================================================
--- trunk/lit/tex4ht-c.tex 2010-11-17 18:38:02 UTC (rev 63)
+++ trunk/lit/tex4ht-c.tex 2010-11-17 18:39:45 UTC (rev 64)
@@ -1177,6 +1177,9 @@
\<KPATHSEA h-include\><<<
#ifdef KPATHSEA
+#ifdef __MINGW32__
+#define HAVE_BOOLEAN 1
+#endif /* __MINGW32__ */
#include <kpathsea/config.h>
#include <kpathsea/c-errno.h>
#include <kpathsea/c-ctype.h>
@@ -1389,7 +1392,8 @@
\<scan job args\><<<
{ int i;
- U_CHAR *p, *in_name = "", *out_name = "";
+ U_CHAR *p;
+ const U_CHAR *in_name = "", *out_name = "";
`<kpathsea arg 0`>
`<DJGPP gif names for pictorial symbols`>
if( argc == 1 ){ bad_arg; }
@@ -1542,9 +1546,9 @@
\<file = non-piped input file\><<<
BOOL tag;
-job_name_n = (int) strlen((char *) in_name );
+job_name_n = (int) strlen( in_name );
job_name = m_alloc(char, job_name_n+6);
-(IGNORED) strcpy((char *) job_name, (char *) in_name);
+(IGNORED) strcpy((char *) job_name, in_name);
tag = job_name_n < 3;
if( !tag ){
tag = !eq_str( job_name+job_name_n-`<dvi ext name length`>,`<dvi ext name`>);
@@ -1626,18 +1630,18 @@
\`'char *strcat( (char *, const U_CHAR *) );'.
\<header functions\><<<
-static void strct( ARG_II(char *, U_CHAR *) );
+static void strct( ARG_II(char *, const U_CHAR *) );
>>>
\<functions\><<<
`[
static void strct( str1, str2 )
U_CHAR * str1`;
- U_CHAR * str2
+ const U_CHAR * str2
;{ U_CHAR * ch;
ch = str1 + (int) strlen((char *) str1);
- (IGNORED) strcpy((char *) ch, (char *) str2 );
+ (IGNORED) strcpy((char *) ch, str2 );
}
>>>
@@ -1754,9 +1758,9 @@
\<name = output file from arg list\><<<
int tag = 1;
- int n = (int) strlen((char *) out_name );
+ int n = (int) strlen( out_name );
name = m_alloc(char, 6 + n);
-(IGNORED) strcpy((char *) name, (char *) out_name);
+(IGNORED) strcpy((char *) name, out_name);
while( n-- ) tag = tag && (*(name+n) != '.') ;
if( tag ) (IGNORED) strct(name,".html");
#ifdef HTM
@@ -2703,19 +2707,19 @@
trace_dvi_del_P =
(char *) r_alloc((void *) trace_dvi_del_P,
(size_t) 4);
- (IGNORED) strcpy((char *) trace_dvi_del_P, (char *) "[G " );
+ (IGNORED) strcpy((char *) trace_dvi_del_P, "[G " );
end_trace_dvi_del_P =
(char *) r_alloc((void *) end_trace_dvi_del_P,
(size_t) 2);
- (IGNORED) strcpy((char *) end_trace_dvi_del_P, (char *) "]" );
+ (IGNORED) strcpy((char *) end_trace_dvi_del_P, "]" );
trace_dvi_del_p =
(char *) r_alloc((void *) trace_dvi_del_p,
(size_t) 5);
- (IGNORED) strcpy((char *) trace_dvi_del_p, (char *) "[/G " );
+ (IGNORED) strcpy((char *) trace_dvi_del_p, "[/G " );
end_trace_dvi_del_p =
(char *) r_alloc((void *) end_trace_dvi_del_p,
(size_t) 2);
- (IGNORED) strcpy((char *) end_trace_dvi_del_p, (char *) "]" );
+ (IGNORED) strcpy((char *) end_trace_dvi_del_p, "]" );
}
>>>
@@ -8076,7 +8080,7 @@
\<warn 38 for path\><<<
char str[256];
-(IGNORED) strcpy((char *) str, (char *) "...."); *(str+3) = p->action;
+(IGNORED) strcpy(str, "...."); *(str+3) = p->action;
(IGNORED) strct(str,p->info); warn_i_str(38,str);
>>>
@@ -8403,7 +8407,7 @@
\<main's init\><<<
pos_text = pos_line = end_pos_body = end_pos_text = pos_body =
m_alloc(char, (int) 1);
-(IGNORED) strcpy((char *) pos_text, (char *) "" );
+(IGNORED) strcpy((char *) pos_text, "" );
>>>
@@ -10377,14 +10381,14 @@
\<header functions\><<<
-static FILE* f_open( ARG_II(char*,char*) );
+static FILE* f_open( ARG_II(const char*,const char*) );
>>>
\<functions\><<<
`[
static FILE* f_open( name, flags )
- char* name `;
- char* flags
+ const char* name `;
+ const char* flags
;{ FILE* file;
if( (file = fopen(name,flags) ) != NULL ) {
(IGNORED) printf("(%s)\n",name);
@@ -10730,7 +10734,7 @@
gif_open[gif_flag] = m_alloc(char,
`<1 + strlen((char *) <IMG SRC="+"ALT="+++++">+)`>);
(IGNORED) strcpy((char *) gif_open[gif_flag],
-(char *) `<<IMG SRC="+"ALT="+++++">+`>);
+ `<<IMG SRC="+"ALT="+++++">+`>);
gif_alt[gif_flag] = gif_open[gif_flag]+11;
*(gif_alt[gif_flag] - 1) = '\0';
gif_class[gif_flag] = gif_open[gif_flag]+19;
@@ -11403,7 +11407,7 @@
\<main's initOUT\><<<
img_src = m_alloc(char, (int) 12);
-(IGNORED) strcpy((char *) img_src, (char *) "<img \nsrc=\"" );
+(IGNORED) strcpy((char *) img_src, "<img \nsrc=\"" );
>>>
@@ -11435,7 +11439,7 @@
\<main's initOUT\><<<
img_alt = m_alloc(char, (int) 7);
-(IGNORED) strcpy((char *) img_alt, (char *) "\"alt=\"" );
+(IGNORED) strcpy((char *) img_alt, "\"alt=\"" );
>>>
@@ -13177,7 +13181,7 @@
\<get tex4ht.env in dos\><<<
`[
-char *get_env_dir(progname)
+static char *get_env_dir(progname)
U_CHAR *progname
;{ int i;
@@ -13190,7 +13194,7 @@
p = (char *) malloc(i+12);
if(p == NULL) return NULL; `%Space for new extention after dot`%
strncpy(p, progname, i+1); `%Copy up to slash`%
- (IGNORED) strcpy((char *) &p[i+1], (char *) "tex4ht.env"); `%Append new extention`%
+ (IGNORED) strcpy((char *) &p[i+1], "tex4ht.env"); `%Append new extention`%
return p;
}
>>>
@@ -13232,14 +13236,14 @@
\EndList
\<header functions\><<<
-static char* get_script( ARG_III(char *, U_CHAR *, int) );
+static char* get_script( ARG_III(char *, const U_CHAR *, int) );
>>>
\<functions\><<<
`[
static char* get_script(name, inln,x)
- U_CHAR * name`;
- U_CHAR * inln`;
+ char * name`;
+ const U_CHAR * inln`;
int x
;{
@@ -13248,7 +13252,7 @@
(IGNORED) fseek(dot_file, 0L, `<abs file addr`>);
if( search_dot_file( x ) ){
`<read x-script from dot file`>
- } else {(IGNORED) strcpy((char *) str, (char *) inln); }
+ } else {(IGNORED) strcpy((char *) str, inln); }
ch = m_alloc(char, (int) strlen((char *) str)+2);
(IGNORED) strcpy((char *) ch, (char *) str);
return ch;
@@ -13520,13 +13524,13 @@
\<header functions\><<<
-static struct env_var_rec * get_env_var( ARG_I(char *) );
+static struct env_var_rec * get_env_var( ARG_I(const char *) );
>>>
\<functions\><<<
`[
static struct env_var_rec * get_env_var( env_var )
- char *env_var
+ const char *env_var
;{ U_CHAR *TEX4HTTFM, *from;
struct env_var_rec *tfm_dirs, *p;
int env_var_len;
@@ -13629,7 +13633,7 @@
cur_cache_font = m_alloc(struct cache_font_rec, 1);
`<init new cache list`>
cur_cache_font->dir = m_alloc(char, n+1);
- (IGNORED) strcpy((char *) cur_cache_font->dir, (char *) dir);
+ (IGNORED) strcpy((char *) cur_cache_font->dir, dir);
if( !cache_font ){
cur_cache_font->next = cache_font;
cache_font = cur_cache_font;
@@ -13911,8 +13915,8 @@
\<insert file name\><<<
file_entry = m_alloc(struct cache_file_rec, 1);
-file_entry->file = m_alloc(char, strlen((char *) name)+1);
-(IGNORED) strcpy((char *) file_entry->file, (char *) name);
+file_entry->file = m_alloc(char, strlen(name)+1);
+(IGNORED) strcpy((char *) file_entry->file, name);
if( ! cur_cache_font->cache_file ){
cur_cache_font->cache_file = file_entry;
file_entry->next = (struct cache_file_rec *) 0;
@@ -14125,7 +14129,7 @@
(IGNORED) strcpy((char *) p, (char *) tex4ht_fls_name+1);
(IGNORED) sprintf(files_cache,"%s%s", HOME_DIR, p);
} else {
- (IGNORED) strcpy((char *) files_cache, (char *) "tex4ht.fls");
+ (IGNORED) strcpy((char *) files_cache, "tex4ht.fls");
}
tex4ht_fls_name = files_cache;
}
@@ -14380,7 +14384,7 @@
*export_str = '\0';
`<set the exported list`>
if( (int) strlen((char *) export_str) > 0 ){
- (IGNORED) strcpy((char *) str, (char *) "%%12");
+ (IGNORED) strcpy((char *) str, "%%12");
export_str = (char *) r_alloc((void *) export_str,
(int) strlen((char *) export_str) + (int) strlen((char *) str) + 1 );
postfix = str - 1;
@@ -14499,7 +14503,7 @@
export_str = (char *) r_alloc((void *) export_str,
(int) strlen((char *) export_str) + (int) strlen((char *) q) + 2);
if( (int) strlen((char *) export_str) > 0 ){
- (IGNORED) strcat((char *) export_str, (char *) ",");
+ (IGNORED) strcat((char *) export_str, ",");
}
(IGNORED) strcat((char *) export_str, (char *) q);
} } }
@@ -14549,7 +14553,7 @@
*export_str = (char *) r_alloc((void *) *export_str,
(int) strlen((char *) *export_str) + (int) strlen((char *) str) + 2 );
if( (int) strlen((char *) *export_str) > 0 ){
- (IGNORED) strcat((char *) *export_str, (char *) ",");
+ (IGNORED) strcat((char *) *export_str, ",");
}
(IGNORED) strcat((char *) *export_str, (char *) str);
}
@@ -14962,9 +14966,9 @@
\<tfmfile = kpathsea tfm file\><<<
char s [256];
-(IGNORED) strcpy((char *) s, (char *) "kpsewhich ");
-(IGNORED) strcat((char *) s, (char *) file_name);
-(IGNORED) strcat((char *) s, (char *) " > tex4ht.tmp ");
+(IGNORED) strcpy(s, "kpsewhich ");
+(IGNORED) strcat(s, file_name);
+(IGNORED) strcat(s, " > tex4ht.tmp ");
if( system(s) == 0 ){
`<fileaddr = read tex4ht.tmp`>
tfmfile = kpse_find_file (fileaddr, kpse_program_text_format, 0);
@@ -15239,7 +15243,7 @@
in the dot file.
\<header functions\><<<
-static FILE* search_in_dot_file( ARG_IV( int, U_CHAR *, U_CHAR *,
+static FILE* search_in_dot_file( ARG_IV( int, const U_CHAR *, const U_CHAR *,
struct env_var_rec *) );
>>>
@@ -15247,8 +15251,8 @@
`[
static FILE* search_in_dot_file( typ, name, flags, env_dirs)
int typ`;
- U_CHAR *name`;
- U_CHAR *flags`;
+ const U_CHAR *name`;
+ const U_CHAR *flags`;
struct env_var_rec *env_dirs
;{ U_CHAR *ch, dir[256];
@@ -15284,16 +15288,16 @@
\<header functions\><<<
-static FILE* search_file_base( ARG_IV( U_CHAR *, U_CHAR *, U_CHAR *,
+static FILE* search_file_base( ARG_IV( const U_CHAR *, const U_CHAR *, const U_CHAR *,
struct env_var_rec *) );
>>>
\<functions\><<<
`[
static FILE* search_file_base( name, dir, flags, env_dirs)
- U_CHAR *name`;
- U_CHAR *dir`;
- U_CHAR *flags`;
+ const U_CHAR *name`;
+ const U_CHAR *dir`;
+ const U_CHAR *flags`;
struct env_var_rec *env_dirs
;{ U_CHAR *p;
@@ -15316,18 +15320,18 @@
\<header functions\><<<
-static char * abs_addr( ARG_II( U_CHAR *, U_CHAR *) );
+static char * abs_addr( ARG_II( const U_CHAR *, const U_CHAR *) );
>>>
\<functions\><<<
`[
static char * abs_addr( dir, base)
- U_CHAR *dir`;
- U_CHAR *base
+ const U_CHAR *dir`;
+ const U_CHAR *base
;{ U_CHAR *p;
- p = m_alloc(char, (int) strlen((char *) dir ) +
- (base? (int) strlen((char *) base ):0) +
+ p = m_alloc(char, (int) strlen( dir ) +
+ (base? (int) strlen( base ):0) +
(int) strlen((char *) HOME_DIR ) + 1 );
*p = '\0';
if( (*(dir+1) == '~') && base ){
@@ -15357,22 +15361,22 @@
\<header functions\><<<
-static FILE* search_file( ARG_III(char *, U_CHAR *, U_CHAR *) );
+static FILE* search_file( ARG_III(const char *, const U_CHAR *, const U_CHAR *) );
>>>
\<functions\><<<
`[
static FILE* search_file( name, dir, flags )
- U_CHAR *name`;
- U_CHAR *dir`;
- U_CHAR *flags
+ const char *name`;
+ const U_CHAR *dir`;
+ const U_CHAR *flags
;{ FILE* file;
U_CHAR str[256];
int i;
BOOL subs;
`<search file in cur dir`>
- (IGNORED) strcpy((char *) str, (char *) dir);
+ (IGNORED) strcpy((char *) str, dir);
i = (int) strlen((char *) str) - 1;
subs = str[i] == '!';
if( subs ) str[i] = '\0'; else i++;
@@ -15417,13 +15421,13 @@
\<header functions\><<<
-static void add_to_cache( ARG_III(char*,char*,int) );
+static void add_to_cache( ARG_III(const char*,const char*,int) );
>>>
\<functions\><<<
`[
static void add_to_cache(dir,name,n)
- char* dir`; char* name`; int n
+ const char* dir`; const char* name`; int n
;{
struct cache_font_rec *cur_cache_font;
@@ -15438,20 +15442,20 @@
\SubSection{Search in SubDirectories}
\<header functions\><<<
-static FILE* search_file_ext( ARG_III(char *, U_CHAR *, U_CHAR *) );
+static FILE* search_file_ext( ARG_III(const char *, const U_CHAR *, const U_CHAR *) );
>>>
\<functions\><<<
`[
static FILE* search_file_ext( name, dir, flags )
- U_CHAR *name`;
- U_CHAR *dir`;
- U_CHAR *flags
+ const char *name`;
+ const U_CHAR *dir`;
+ const U_CHAR *flags
;{ U_CHAR str[256];
FILE* file;
int n;
- n = (int) strlen((char *) dir);
+ n = (int) strlen(dir);
(IGNORED) sprintf(str,
#if defined(DOS_WIN32) || defined(__DJGPP__)
(( dir[n-1] == '/') || ( dir[n-1] == '\\'))
@@ -15514,7 +15518,7 @@
\<header functions\><<<
#if defined(DOS_WIN32) || defined(__DJGPP__)
- static BOOL is_forward_slash( ARG_I(char*) );
+ static BOOL is_forward_slash( ARG_I(const char*) );
#endif
>>>
@@ -15522,7 +15526,7 @@
#if defined(DOS_WIN32) || defined(__DJGPP__)
`[
static BOOL is_forward_slash(str)
- char* str
+ const char* str
;{
while( *str ){ if( *(str++) == '/' ) { return TRUE; } }
return FALSE;
@@ -15737,20 +15741,20 @@
\<header functions\><<<
-static FILE* f_open_pathed_filename( ARG_II(char*,char*) );
+static FILE* f_open_pathed_filename( ARG_II(const char*,const char*) );
>>>
\<functions\><<<
`[
static FILE* f_open_pathed_filename( name, flags )
- char* name `;
- char* flags
+ const char* name `;
+ const char* flags
;{ FILE* file;
U_CHAR *str;
file = NULL;
if( *name == '~' ){
if( HOME_DIR ){
- str = m_alloc(char, strlen((char *) HOME_DIR)+strlen((char *) name));
+ str = m_alloc(char, strlen((char *) HOME_DIR)+strlen(name));
(IGNORED) sprintf(str,"%s%s", HOME_DIR, name+1);
file = f_open(str,flags);
free((void *) str);
@@ -16579,12 +16583,12 @@
\<header functions\><<<
-static void print_f( ARG_I(char*) );
+static void print_f( ARG_I(const char*) );
>>>
\<functions\><<<
`[
-static void print_f(str) char* str
+static void print_f(str) const char* str
;{
`<open output file`>
if( ch_map_flag ){
@@ -16599,12 +16603,12 @@
\<header functions\><<<
-static void print_f_4ht( ARG_I(char*) );
+static void print_f_4ht( ARG_I(const char*) );
>>>
\<functions\><<<
`[
-static void print_f_4ht(str) char* str
+static void print_f_4ht(str) const char* str
;{
`<open output file`>
if( ch_map_flag ){
@@ -16836,7 +16840,7 @@
>>>
\<vars\><<<
-static U_CHAR *warn_err_mssg[]={ `<warn and err messages`> "" };
+static const U_CHAR *warn_err_mssg[]={ `<warn and err messages`> "" };
>>>
@@ -16899,14 +16903,14 @@
\<header functions\><<<
-static void warn_i_str( ARG_II(int,char *) );
+static void warn_i_str( ARG_II(int,const char *) );
>>>
\<functions\><<<
`[
static void warn_i_str(n,str)
int n`;
- U_CHAR *str
+ const char *str
;{
(IGNORED) fprintf(stderr,"--- warning --- ");
@@ -16919,15 +16923,15 @@
\<header functions\><<<
-static void warn_i_str2( ARG_III(int,char *,char *) );
+static void warn_i_str2( ARG_III(int,const char *,const char *) );
>>>
\<functions\><<<
`[
static void warn_i_str2(n,str1,str2)
int n`;
- U_CHAR *str1`;
- U_CHAR *str2
+ const char *str1`;
+ const char *str2
;{ (IGNORED) fprintf(stderr,"--- warning --- ");
(IGNORED) fprintf(stderr,warn_err_mssg[n], str1,str2);
Modified: trunk/lit/tex4ht-t4ht.tex
===================================================================
--- trunk/lit/tex4ht-t4ht.tex 2010-11-17 18:38:02 UTC (rev 63)
+++ trunk/lit/tex4ht-t4ht.tex 2010-11-17 18:39:45 UTC (rev 64)
@@ -1293,7 +1293,7 @@
\<translate symbol gifs\><<<
Q_CHAR filename[255];
FILE* file;
-(IGNORED) strcpy((char *) filename, (char *) "");
+(IGNORED) strcpy((char *) filename, "");
if( dir && !bitmaps_no_dm ){ (IGNORED) strct(filename, dir); }
(IGNORED) strct(filename, match[3]);
file = fopen(filename, READ_TEXT_FLAGS);
@@ -1376,20 +1376,21 @@
\<header functions\><<<
static void execute_script(
- ARG_V(struct script_struct*,Q_CHAR *,char *,Q_CHAR *,Q_CHAR *) );
+ ARG_V(struct script_struct*,const Q_CHAR *,const Q_CHAR *,const Q_CHAR *,const Q_CHAR *) );
>>>
\<functions\><<<
`[
static void execute_script(script,match_1,match_2,match_3,match_4)
struct script_struct* script`;
- Q_CHAR * match_1`;
- Q_CHAR * match_2`;
- Q_CHAR * match_3`;
- Q_CHAR * match_4
+ const Q_CHAR * match_1`;
+ const Q_CHAR * match_2`;
+ const Q_CHAR * match_3`;
+ const Q_CHAR * match_4
;{ struct script_struct* temp;
- Q_CHAR *p, *q, *t;
+ Q_CHAR *p, *q;
+ const Q_CHAR *t;
`<texmf := ...`>
temp = script; system_return = 0;
while( temp ){
@@ -1455,7 +1456,7 @@
\<texmf := ...\><<<
#ifdef KPATHSEA
-char * texmf = (char *) kpse_var_value( "SELFAUTOPARENT" );
+const char * texmf = kpse_var_value( "SELFAUTOPARENT" );
#endif
>>>
@@ -1541,9 +1542,9 @@
*old_script,
*new_script;
Q_CHAR *command, *ext;
- if( script == (struct script_struct *) 0 ){
- return (struct script_struct *) 0;
- }
+ filtered_script = NULL_SCRIPT;
+ if( script == NULL_SCRIPT )
+ return filtered_script;
old_script = script;
command = old_script->command;
if( *command != '.' ){
@@ -1555,15 +1556,15 @@
>>>
\<script until dot\><<<
-new_script = (struct script_struct *) 0;
-while( old_script != (struct script_struct *) 0 ){
+new_script = NULL_SCRIPT;
+while( old_script != NULL_SCRIPT ){
command = old_script->command;
if( *command == '.' ){ return filtered_script; }
scr = (struct script_struct *)
m_alloc(struct script_struct, (int) 1);
scr->command = old_script->command;
- scr->next = (struct script_struct *) 0;
- if( new_script == (struct script_struct *) 0 ){
+ scr->next = NULL_SCRIPT;
+ if( new_script == NULL_SCRIPT ){
filtered_script = new_script = scr;
} else {
new_script = new_script->next = scr;
@@ -1576,8 +1577,8 @@
\<script from dot\><<<
`<ext = file ext`>
while( TRUE ){
- if( old_script == (struct script_struct *) 0 ){
- return (struct script_struct *) 0;
+ if( old_script == NULL_SCRIPT ){
+ return NULL_SCRIPT;
}
command = old_script->command;
if(*command != '.') {
@@ -1611,7 +1612,7 @@
struct script_struct *script
;{
struct script_struct *temp;
- while( script != (struct script_struct *) 0 ){
+ while( script != NULL_SCRIPT ){
temp = script;
script = script->next;
free( temp );
@@ -1996,11 +1997,11 @@
\<find file records\><<<
file_name = match[1];
*(file_name + (int) strlen((char *) file_name) - 1) = '\0';
-strcpy((char *) file_mode, (char *) WRITE_TEXT_FLAGS);
+strcpy((char *) file_mode, WRITE_TEXT_FLAGS);
for(i=1; i<=2; i++){
`<search CopyTo file`>
file_name = match[5];
- strcpy((char *) file_mode, (char *) `<CopyTo read flags`>);
+ strcpy((char *) file_mode, `<CopyTo read flags`>);
}
>>>
@@ -2049,7 +2050,7 @@
\<CopyTo vars\><<<
Q_CHAR *file_name, file_mode[5];
-int i, start_loc, end_loc, addr;
+int i, start_loc, end_loc, addr = 0;
char rec_op, *ch;
static struct files_rec *to_rec, *from_rec,
*opened_files = (struct files_rec *) 0,
@@ -2372,7 +2373,7 @@
status = scan_until_end_str("", 1, status, lg_file);
`<remove leading spaces`>
if( status ){ Q_CHAR *key, *body, *media;
- body = key = match[1];
+ media = body = key = match[1];
`<process htfcss line`>
} }
}
@@ -2401,7 +2402,9 @@
`<extract media info`>
if( *body ){
if( *key ){ `<add new htfcss rec`> }
+#if 0 /* unreachable */
else if( last_rec ){ `<append prev htfcss rec`> }
+#endif /* 0, unreachable */
}
>>>
@@ -3151,7 +3154,7 @@
(IGNORED) printf("tex4ht.env?\n");
}
file = f_open("tex4ht.env", READ_TEXT_FLAGS);
- (IGNORED) strcpy((char *) &env_loc[0], (char *) "tex4ht.env");
+ (IGNORED) strcpy((char *) &env_loc[0], "tex4ht.env");
if( debug && file ){
(IGNORED) printf(".......Open: ./tex4ht.env\n"); }
}
@@ -3203,7 +3206,7 @@
(IGNORED) printf(".tex4ht?\n");
}
file = f_open(".tex4ht", READ_TEXT_FLAGS);
- (IGNORED) strcpy((char *) &env_loc[0], (char *) ".tex4ht");
+ (IGNORED) strcpy((char *) &env_loc[0], ".tex4ht");
if( debug && file ){
(IGNORED) printf(".......Open: ./.tex4ht\n"); }
}
@@ -3415,7 +3418,7 @@
(IGNORED) printf("C:/tex4ht.env?\n");
}
file = f_open("C:/tex4ht.env",READ_TEXT_FLAGS);
- (IGNORED) strcpy((char *) &env_loc[0], (char *) "C:/tex4ht.env");
+ (IGNORED) strcpy((char *) &env_loc[0], "C:/tex4ht.env");
if( debug && file ){
(IGNORED) printf(".......Open: C:/tex4ht.env\n"); }
}
@@ -3577,7 +3580,7 @@
\<get tex4ht.env in dos\><<<
`[
-char *get_env_dir(progname)
+static char *get_env_dir(progname)
Q_CHAR *progname
;{ int i;
@@ -3591,7 +3594,7 @@
if(p == NULL) return NULL; `%Space for new extention after dot`%
strncpy(p, progname, i+1); `%Copy up to slash`%
(IGNORED) strcpy((char *) &p[i+1],
- (char *) "tex4ht.env"); `%Append new extention`%
+ "tex4ht.env"); `%Append new extention`%
return p;
}
>>>
@@ -3621,14 +3624,14 @@
\<header functions\><<<
-static FILE* f_open( ARG_II(char*,char*) );
+static FILE* f_open( ARG_II(const char*,const char*) );
>>>
\<functions\><<<
`[
static FILE* f_open( name, flags )
- char* name `;
- char* flags
+ const char* name `;
+ const char* flags
;{ FILE* file;
if( (file = fopen(name,flags) ) != NULL ) {
(IGNORED) printf("(%s)\n",name);
@@ -3642,19 +3645,19 @@
\<header functions\><<<
-static FILE* f_home_open( ARG_II(char*,char*) );
+static FILE* f_home_open( ARG_II(const char*,const char*) );
>>>
\<functions\><<<
`[
static FILE* f_home_open( name, flags )
- char* name `;
- char* flags
+ const char* name `;
+ const char* flags
;{ FILE* file;
U_CHAR *str;
if( *name == '~' ){
if( HOME_DIR ){
- str = m_alloc(char, strlen((char *) HOME_DIR)+strlen((char *) name));
+ str = m_alloc(char, strlen((char *) HOME_DIR)+strlen(name));
(IGNORED) sprintf(str,"%s%s", HOME_DIR, name+1);
file = f_open(str,flags);
free((void *) str);
@@ -3672,24 +3675,24 @@
\SubSection{General}
\<header functions\><<<
-static FILE* open_file( ARG_II(C_CHAR *, C_CHAR *) );
+static FILE* open_file( ARG_II(const C_CHAR *, const C_CHAR *) );
>>>
\<functions\><<<
`[
static FILE* open_file(name,ext)
- Q_CHAR *name`; Q_CHAR *ext
+ const C_CHAR *name`; const C_CHAR *ext
;{ FILE* file;
C_CHAR filename[255], *p;
if( eq_str( ext,LG_EXT ) ) {
(IGNORED) strcpy((char *) filename, (char *) job_name);
(IGNORED) strct(filename, ext);
} else {
- (IGNORED) strcpy((char *) filename, (char *) name );
+ (IGNORED) strcpy((char *) filename, name );
p = filename;
while( TRUE ){
if( *p == '.' ){ break; }
- if( *p == '\0' ){ (IGNORED) strcpy((char *) p, (char *) ext); break; }
+ if( *p == '\0' ){ (IGNORED) strcpy((char *) p, ext); break; }
p++;
}
}
@@ -3884,14 +3887,14 @@
\<header functions\><<<
-static void warn_i_str( ARG_II(int,Q_CHAR *) );
+static void warn_i_str( ARG_II(int,const Q_CHAR *) );
>>>
\<functions\><<<
`[
static void warn_i_str(n,str)
int n`;
- Q_CHAR *str
+ const Q_CHAR *str
;{ (IGNORED) fprintf(stderr,"--- warning --- ");
(IGNORED) fprintf(stderr,warn_err_mssg[n], str);
@@ -3909,7 +3912,7 @@
\<vars\><<<
-static C_CHAR *warn_err_mssg[]={ `<warn and err messages`> "" };
+static const C_CHAR *warn_err_mssg[]={ `<warn and err messages`> "" };
>>>
@@ -4157,18 +4160,18 @@
\`'char *strcat( ARG_II(C_CHAR *, const Q_CHAR *) );'.
\<header functions\><<<
-static void strct( ARG_II(C_CHAR *, C_CHAR *) );
+static void strct( ARG_II(C_CHAR *, const C_CHAR *) );
>>>
\<functions\><<<
`[
static void strct( str1, str2 )
- Q_CHAR * str1`;
- Q_CHAR * str2
+ C_CHAR * str1`;
+ const C_CHAR * str2
;{ Q_CHAR * ch;
ch = str1 + (int) strlen((char *) str1);
- (IGNORED) strcpy((char *) ch, (char *) str2 );
+ (IGNORED) strcpy((char *) ch, str2 );
}
>>>
@@ -4287,13 +4290,13 @@
The \''_until' functions place in ''match[i]' the string found.
\<header functions\><<<
-static BOOL scan_until_end_str( ARG_IV(C_CHAR *, int, BOOL, FILE *) );
+static BOOL scan_until_end_str( ARG_IV(const C_CHAR *, int, BOOL, FILE *) );
>>>
\<functions\><<<
`[
static BOOL scan_until_end_str(str,n,flag,file)
- Q_CHAR *str`;
+ const C_CHAR *str`;
int n`;
BOOL flag`;
FILE* file
@@ -4312,7 +4315,7 @@
i++;
}
p[i] = '\0';
- i -= (int) strlen((char *) str);
+ i -= (int) strlen(str);
if( i>= 0 ){ return eq_str(p+i,str); }
return FALSE;
}
@@ -4337,13 +4340,13 @@
\<header functions\><<<
-static BOOL scan_until_str( ARG_IV(C_CHAR *, int, BOOL, FILE *) );
+static BOOL scan_until_str( ARG_IV(const C_CHAR *, int, BOOL, FILE *) );
>>>
\<functions\><<<
`[
static BOOL scan_until_str(str,n,flag,file)
- Q_CHAR *str`;
+ const C_CHAR *str`;
int n`;
BOOL flag`;
FILE* file
@@ -4360,7 +4363,7 @@
r_alloc((void *) match[n], (size_t) max_match[n]);
}
p[i++] = ch;
- j = i - (int) strlen((char *) str);
+ j = i - (int) strlen(str);
if( j>= 0 ){
p[i] = '\0';
if( eq_str(p+j,str) ) { return TRUE; }
@@ -4375,16 +4378,16 @@
\<header functions\><<<
-static BOOL scan_str( ARG_III(C_CHAR *, BOOL, FILE *) );
+static BOOL scan_str( ARG_III(const C_CHAR *, BOOL, FILE *) );
>>>
\<functions\><<<
`[
static BOOL scan_str(str,flag,file)
- Q_CHAR *str`;
+ const C_CHAR *str`;
BOOL flag`;
FILE* file
-;{ Q_CHAR *p;
+;{ const Q_CHAR *p;
int temp_eoln_ch;
if( !flag ) { return flag; }
p = str;
More information about the tex4ht-commits
mailing list