diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-05-20 12:42:23 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-05-20 12:42:23 +0000 |
commit | 5110b6289caca7a00288f53794e99b75d976ae9e (patch) | |
tree | 14c457f2ef4e4bd45df829e319ab9c8754ee1acd | |
parent | 4a0b3e0795ff26c3ad05eebcd302499751a85533 (diff) |
cjkutils: Build fix for 64-bit Mac OS X 10.7.3 with clang
git-svn-id: svn://tug.org/texlive/trunk@26503 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/cjkutils/cjkutils-4.8.3-PATCHES/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/texk/cjkutils/cjkutils-4.8.3-PATCHES/patch-01-static | 373 | ||||
-rw-r--r-- | Build/source/texk/cjkutils/cjkutils-4.8.3/hbf2gf/hbf2gf.w | 92 | ||||
-rw-r--r-- | Build/source/texk/cjkutils/hbf2gf.c | 194 | ||||
-rw-r--r-- | Build/source/texk/cjkutils/hbf2gf.dvi | bin | 183712 -> 184396 bytes | |||
-rw-r--r-- | Build/source/texk/cjkutils/hbf2gf.idx | 2 | ||||
-rw-r--r-- | Build/source/texk/cjkutils/hbf2gf.tex | 128 |
7 files changed, 601 insertions, 195 deletions
diff --git a/Build/source/texk/cjkutils/cjkutils-4.8.3-PATCHES/ChangeLog b/Build/source/texk/cjkutils/cjkutils-4.8.3-PATCHES/ChangeLog index be7e61a186e..c6b678cd7d8 100644 --- a/Build/source/texk/cjkutils/cjkutils-4.8.3-PATCHES/ChangeLog +++ b/Build/source/texk/cjkutils/cjkutils-4.8.3-PATCHES/ChangeLog @@ -1,3 +1,10 @@ +2012-05-20 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-01-static (new): Build fix for 64-bit Mac OS X 10.7.3. + Clang does not like non-static inline functions as used here. + While at it, all local functions are declared static. + Do not extend #ifdef HAVE_EMTEXDIR...#endif over several sections. + 2012-05-11 Peter Breitenlohner <peb@mppmu.mpg.de> Imported cjk-4.8.3/utils source tree from: diff --git a/Build/source/texk/cjkutils/cjkutils-4.8.3-PATCHES/patch-01-static b/Build/source/texk/cjkutils/cjkutils-4.8.3-PATCHES/patch-01-static new file mode 100644 index 00000000000..f0bfeba60ba --- /dev/null +++ b/Build/source/texk/cjkutils/cjkutils-4.8.3-PATCHES/patch-01-static @@ -0,0 +1,373 @@ + Clang does not like non-static inline functions as used here. + While at it, all local functions are declared static. + + Do not extend #ifdef HAVE_EMTEXDIR...#endif over several sections. + +diff -ur cjkutils-4.8.3.orig/hbf2gf/hbf2gf.w cjkutils-4.8.3/hbf2gf/hbf2gf.w +--- cjkutils-4.8.3.orig/hbf2gf/hbf2gf.w 2012-05-07 00:00:00.000000000 +0200 ++++ cjkutils-4.8.3/hbf2gf/hbf2gf.w 2012-05-20 14:09:25.143819152 +0200 +@@ -427,7 +427,7 @@ + functions |write_pre()|, |write_data()|, and |write_post()| handle this. + + @<Prototypes@>= +-void write_file(void); ++static void write_file(void); + + + @ +@@ -435,7 +435,7 @@ + the \.{-n} option isn't specified; otherwise only `\.{.gf}' will be appended. + + @c +-void write_file(void) ++static void write_file(void) + {char output_file[FILE_NAME_LENGTH + 1]; + + +@@ -489,14 +489,14 @@ + @d header " hbf2gf output " + + @<Prototypes@>= +-void write_pre(void); ++static void write_pre(void); + + + @ + @s tm int + + @c +-void write_pre(void) ++static void write_pre(void) + {char out_s[40], s[20]; + time_t secs_now; + struct tm *time_now; +@@ -577,12 +577,12 @@ + + @ + @<Prototypes@>= +-void write_data(void); ++static void write_data(void); + + + @ + @c +-void write_data(void) ++static void write_data(void) + {dot_count = 0; + char_adr_p = char_adr;@# + +@@ -688,12 +688,12 @@ + \TeX\ defines that 72.27~points are exactly 1~inch. + + @<Prototypes@>= +-void write_post(void); ++static void write_post(void); + + + @ + @c +-void write_post(void) ++static void write_post(void) + {long special_adr; + long post_adr;@# + +@@ -832,12 +832,12 @@ + \TeX\ wants the most significant byte first. + + @<Prototypes@>= +-void fputl(long, FILE *); ++static void fputl(long, FILE *); + + + @ + @c +-void fputl(long num, FILE *f) ++static void fputl(long num, FILE *f) + {fputc(num >> 24, f); + fputc(num >> 16, f); + fputc(num >> 8, f); +@@ -992,12 +992,12 @@ + + + @<Prototypes@>= +-void make_pixel_array(void); ++static void make_pixel_array(void); + + + @ + @c +-void make_pixel_array(void) ++static void make_pixel_array(void) + {unsigned char *prP; + unsigned char *temp_prP; + unsigned char *new_prP; +@@ -1220,6 +1220,7 @@ + glyph). + + @<Prototypes@>= ++static + #ifdef __GNUC__ + __inline__ + #endif +@@ -1228,6 +1229,7 @@ + + @ + @c ++static + #ifdef __GNUC__ + __inline__ + #endif +@@ -1270,6 +1272,7 @@ + + @ + @<Prototypes@>= ++static + #ifdef __GNUC__ + __inline__ + #endif +@@ -1278,6 +1281,7 @@ + + @ + @c ++static + #ifdef __GNUC__ + __inline__ + #endif +@@ -1323,7 +1327,7 @@ + @d NOOP 244 /* not used */ + + @<Prototypes@>= +-void write_coding(void); ++static void write_coding(void); + + + @ +@@ -1331,7 +1335,7 @@ + ``Unreachable code $\ldots$'' or something similar. + + @c +-void write_coding(void) ++static void write_coding(void) + {register int count, skip; + register unsigned char paint; + register int x, y; +@@ -1484,12 +1488,12 @@ + single bytes and use the \.{HEADER} command repeatedly. + + @<Prototypes@>= +-void write_pl(void); ++static void write_pl(void); + + + @ + @c +-void write_pl(void) ++static void write_pl(void) + {int i, pos; + char output_file[FILE_NAME_LENGTH + 1]; + long t, sc; +@@ -1581,12 +1585,12 @@ + of the subfonts back to the original encoding positions. + + @<Prototypes@>= +-void write_ovp(void); ++static void write_ovp(void); + + + @ + @c +-void write_ovp(void) ++static void write_ovp(void) + {int c, i, nmb_subfonts, remainder, count, pos; + char output_file[FILE_NAME_LENGTH + 1]; + long t, sc; +@@ -1726,12 +1730,12 @@ + + @ + @<Prototypes@>= +-void write_job(void); ++static void write_job(void); + + + @ + @c +-void write_job(void) ++static void write_job(void) + {FILE *out; + int i, j; + char buffer[FILE_NAME_LENGTH + 1]; +@@ -1975,7 +1979,7 @@ + + @ + @<Prototypes@>= +-void read_config(void); ++static void read_config(void); + + + @ +@@ -1983,7 +1987,7 @@ + isn't a HBF font at all. + + @c +-void read_config(void) ++static void read_config(void) + {HBF_BBOX *boxp; + char *real_config_file; + +@@ -2306,12 +2310,12 @@ + |Buffer| if existent. |fsearch()| returns~1 on success. + + @<Prototypes@>= +-int fsearch(const char *); ++static int fsearch(const char *); + + + @ + @c +-int fsearch(const char *search_string) ++static int fsearch(const char *search_string) + {char *P, p; + const char *Q; + char temp_buffer[STRING_LENGTH + 1]; +@@ -2445,12 +2449,12 @@ + message. + + @<Prototypes@>= +-void config_error(const char *); ++static void config_error(const char *); + + + @ + @c +-void config_error(const char *message) ++static void config_error(const char *message) + {fprintf(stderr, "Couldn't find `%s' entry in configuration file\n", + message); + exit(1); +@@ -2488,12 +2492,12 @@ + + @ + @<Prototypes@>= +-const char *TeX_search_version(void); ++static const char *TeX_search_version(void); + + + @ + @c +-const char *TeX_search_version(void) ++static const char *TeX_search_version(void) + { + #if defined(HAVE_LIBKPATHSEA) + return kpathsea_version_string; +@@ -2525,8 +2529,8 @@ + @<Prototypes@>= + #ifdef HAVE_EMTEXDIR + extern int setup_list(struct emtex_dir *, char *, const char *, unsigned); +-int dir_setup(struct emtex_dir *, const char *, const char *, unsigned); +-char *file_find(char *, struct emtex_dir *); ++static int dir_setup(struct emtex_dir *, const char *, const char *, unsigned); ++static char *file_find(char *, struct emtex_dir *); + #endif + + +@@ -2536,7 +2540,7 @@ + + @c + #ifdef HAVE_EMTEXDIR +-int dir_setup(ed, env, dir, flags) ++static int dir_setup(ed, env, dir, flags) + struct emtex_dir *ed; + const char *env; + const char *dir; +@@ -2558,16 +2562,20 @@ + + return TRUE; + } ++#endif + + + @ + @<Global variables@>= ++#ifdef HAVE_EMTEXDIR + char name_buffer[FILE_NAME_LENGTH + 1]; ++#endif + + + @ + @c +-char *file_find(name, list) ++#ifdef HAVE_EMTEXDIR ++static char *file_find(name, list) + char *name; + struct emtex_dir *list; + +@@ -2611,38 +2619,38 @@ + versions, and within \.{HBF2GFINPUTS} for new versions. + + @<Prototypes@>= +-char *TeX_search_cfg_file(char *); +-char *TeX_search_hbf_file(char *); ++static char *TeX_search_cfg_file(char *); ++static char *TeX_search_hbf_file(char *); + + + @ + @c + #if defined(HAVE_LIBKPATHSEA) +-char *TeX_search_cfg_file(char *name) ++static char *TeX_search_cfg_file(char *name) + { + return kpse_find_file(name, kpse_program_text_format, TRUE); + }@# + + +-char *TeX_search_hbf_file(char *name) ++static char *TeX_search_hbf_file(char *name) + { + return kpse_find_file(name, kpse_miscfonts_format, TRUE); + }@# + + + #elif defined(HAVE_EMTEXDIR) +-char *TeX_search_cfg_file(char *name) ++static char *TeX_search_cfg_file(char *name) + {return file_find(name, &cfg_path); + }@# + + +-char *TeX_search_hbf_file(char *name) ++static char *TeX_search_hbf_file(char *name) + {return file_find(name, &hbf_path); + }@# + + + #elif defined(HAVE_MIKTEX) +-char *TeX_search_cfg_file(char *name) ++static char *TeX_search_cfg_file(char *name) + {char result[_MAX_PATH]; + + if (!miktex_find_input_file("hbf2gf", *name, result)) +@@ -2651,7 +2659,7 @@ + }@# + + +-char *TeX_search_hbf_file(char *name) ++static char *TeX_search_hbf_file(char *name) + {char result[_MAX_PATH]; + + +@@ -2662,12 +2670,12 @@ + + + #else +-char *TeX_search_cfg_file(char *name) ++static char *TeX_search_cfg_file(char *name) + {return name; + }@# + + +-char *TeX_search_hbf_file(char *name) ++static char *TeX_search_hbf_file(char *name) + {return name; + } + #endif diff --git a/Build/source/texk/cjkutils/cjkutils-4.8.3/hbf2gf/hbf2gf.w b/Build/source/texk/cjkutils/cjkutils-4.8.3/hbf2gf/hbf2gf.w index c8155fa2ad0..ca4f3f0856d 100644 --- a/Build/source/texk/cjkutils/cjkutils-4.8.3/hbf2gf/hbf2gf.w +++ b/Build/source/texk/cjkutils/cjkutils-4.8.3/hbf2gf/hbf2gf.w @@ -427,7 +427,7 @@ consists of three sections: a preamble, a data section, and a postamble. The functions |write_pre()|, |write_data()|, and |write_post()| handle this. @<Prototypes@>= -void write_file(void); +static void write_file(void); @ @@ -435,7 +435,7 @@ In \mf-like mode we create font file name extensions similar to \mf\ if the \.{-n} option isn't specified; otherwise only `\.{.gf}' will be appended. @c -void write_file(void) +static void write_file(void) {char output_file[FILE_NAME_LENGTH + 1]; @@ -489,14 +489,14 @@ no terminating NULL byte. @d header " hbf2gf output " @<Prototypes@>= -void write_pre(void); +static void write_pre(void); @ @s tm int @c -void write_pre(void) +static void write_pre(void) {char out_s[40], s[20]; time_t secs_now; struct tm *time_now; @@ -577,12 +577,12 @@ int dot_count; /* this counts the processed characters; @ @<Prototypes@>= -void write_data(void); +static void write_data(void); @ @c -void write_data(void) +static void write_data(void) {dot_count = 0; char_adr_p = char_adr;@# @@ -688,12 +688,12 @@ and configuration file also. \TeX\ defines that 72.27~points are exactly 1~inch. @<Prototypes@>= -void write_post(void); +static void write_post(void); @ @c -void write_post(void) +static void write_post(void) {long special_adr; long post_adr;@# @@ -832,12 +832,12 @@ addresses describe the whole file. \TeX\ wants the most significant byte first. @<Prototypes@>= -void fputl(long, FILE *); +static void fputl(long, FILE *); @ @c -void fputl(long num, FILE *f) +static void fputl(long num, FILE *f) {fputc(num >> 24, f); fputc(num >> 16, f); fputc(num >> 8, f); @@ -992,12 +992,12 @@ result into an output array. @<Prototypes@>= -void make_pixel_array(void); +static void make_pixel_array(void); @ @c -void make_pixel_array(void) +static void make_pixel_array(void) {unsigned char *prP; unsigned char *temp_prP; unsigned char *new_prP; @@ -1220,6 +1220,7 @@ that in this case |input_size_x| already reflects the width of the rotated glyph). @<Prototypes@>= +static #ifdef __GNUC__ __inline__ #endif @@ -1228,6 +1229,7 @@ void read_row(unsigned char *); @ @c +static #ifdef __GNUC__ __inline__ #endif @@ -1270,6 +1272,7 @@ int threshold = 128; @ @<Prototypes@>= +static #ifdef __GNUC__ __inline__ #endif @@ -1278,6 +1281,7 @@ void write_row(unsigned char *); @ @c +static #ifdef __GNUC__ __inline__ #endif @@ -1323,7 +1327,7 @@ For further details please refer to ``\mf---the program''. @d NOOP 244 /* not used */ @<Prototypes@>= -void write_coding(void); +static void write_coding(void); @ @@ -1331,7 +1335,7 @@ The |goto start| instruction causes some compilers to complain about ``Unreachable code $\ldots$'' or something similar. @c -void write_coding(void) +static void write_coding(void) {register int count, skip; register unsigned char paint; register int x, y; @@ -1484,12 +1488,12 @@ To have an identification string in the \.{TFM} file, we split it into single bytes and use the \.{HEADER} command repeatedly. @<Prototypes@>= -void write_pl(void); +static void write_pl(void); @ @c -void write_pl(void) +static void write_pl(void) {int i, pos; char output_file[FILE_NAME_LENGTH + 1]; long t, sc; @@ -1581,12 +1585,12 @@ The following is very similar to |write_pl()|; we simply map the glyphs of the subfonts back to the original encoding positions. @<Prototypes@>= -void write_ovp(void); +static void write_ovp(void); @ @c -void write_ovp(void) +static void write_ovp(void) {int c, i, nmb_subfonts, remainder, count, pos; char output_file[FILE_NAME_LENGTH + 1]; long t, sc; @@ -1726,12 +1730,12 @@ int ofm_file = FALSE; @ @<Prototypes@>= -void write_job(void); +static void write_job(void); @ @c -void write_job(void) +static void write_job(void) {FILE *out; int i, j; char buffer[FILE_NAME_LENGTH + 1]; @@ -1975,7 +1979,7 @@ char Buffer[STRING_LENGTH + 1]; @ @<Prototypes@>= -void read_config(void); +static void read_config(void); @ @@ -1983,7 +1987,7 @@ If |config_file| isn't found in \mf-like mode we assume that the font isn't a HBF font at all. @c -void read_config(void) +static void read_config(void) {HBF_BBOX *boxp; char *real_config_file; @@ -2306,12 +2310,12 @@ character (|'\n'|). It also checks the presence of a parameter and fills |Buffer| if existent. |fsearch()| returns~1 on success. @<Prototypes@>= -int fsearch(const char *); +static int fsearch(const char *); @ @c -int fsearch(const char *search_string) +static int fsearch(const char *search_string) {char *P, p; const char *Q; char temp_buffer[STRING_LENGTH + 1]; @@ -2445,12 +2449,12 @@ If an error occurs, |config_error()| will leave the program with an error message. @<Prototypes@>= -void config_error(const char *); +static void config_error(const char *); @ @c -void config_error(const char *message) +static void config_error(const char *message) {fprintf(stderr, "Couldn't find `%s' entry in configuration file\n", message); exit(1); @@ -2488,12 +2492,12 @@ char no_version_string[] = "no search library"; @ @<Prototypes@>= -const char *TeX_search_version(void); +static const char *TeX_search_version(void); @ @c -const char *TeX_search_version(void) +static const char *TeX_search_version(void) { #if defined(HAVE_LIBKPATHSEA) return kpathsea_version_string; @@ -2525,8 +2529,8 @@ struct emtex_dir cfg_path, hbf_path; @<Prototypes@>= #ifdef HAVE_EMTEXDIR extern int setup_list(struct emtex_dir *, char *, const char *, unsigned); -int dir_setup(struct emtex_dir *, const char *, const char *, unsigned); -char *file_find(char *, struct emtex_dir *); +static int dir_setup(struct emtex_dir *, const char *, const char *, unsigned); +static char *file_find(char *, struct emtex_dir *); #endif @@ -2536,7 +2540,7 @@ output a warning in case the environment variable |env| isn't set properly. @c #ifdef HAVE_EMTEXDIR -int dir_setup(ed, env, dir, flags) +static int dir_setup(ed, env, dir, flags) struct emtex_dir *ed; const char *env; const char *dir; @@ -2558,16 +2562,20 @@ int dir_setup(ed, env, dir, flags) return TRUE; } +#endif @ @<Global variables@>= +#ifdef HAVE_EMTEXDIR char name_buffer[FILE_NAME_LENGTH + 1]; +#endif @ @c -char *file_find(name, list) +#ifdef HAVE_EMTEXDIR +static char *file_find(name, list) char *name; struct emtex_dir *list; @@ -2611,38 +2619,38 @@ are searched in the path specified within \.{TEXCONFIG} for old kpathsea versions, and within \.{HBF2GFINPUTS} for new versions. @<Prototypes@>= -char *TeX_search_cfg_file(char *); -char *TeX_search_hbf_file(char *); +static char *TeX_search_cfg_file(char *); +static char *TeX_search_hbf_file(char *); @ @c #if defined(HAVE_LIBKPATHSEA) -char *TeX_search_cfg_file(char *name) +static char *TeX_search_cfg_file(char *name) { return kpse_find_file(name, kpse_program_text_format, TRUE); }@# -char *TeX_search_hbf_file(char *name) +static char *TeX_search_hbf_file(char *name) { return kpse_find_file(name, kpse_miscfonts_format, TRUE); }@# #elif defined(HAVE_EMTEXDIR) -char *TeX_search_cfg_file(char *name) +static char *TeX_search_cfg_file(char *name) {return file_find(name, &cfg_path); }@# -char *TeX_search_hbf_file(char *name) +static char *TeX_search_hbf_file(char *name) {return file_find(name, &hbf_path); }@# #elif defined(HAVE_MIKTEX) -char *TeX_search_cfg_file(char *name) +static char *TeX_search_cfg_file(char *name) {char result[_MAX_PATH]; if (!miktex_find_input_file("hbf2gf", *name, result)) @@ -2651,7 +2659,7 @@ char *TeX_search_cfg_file(char *name) }@# -char *TeX_search_hbf_file(char *name) +static char *TeX_search_hbf_file(char *name) {char result[_MAX_PATH]; @@ -2662,12 +2670,12 @@ char *TeX_search_hbf_file(char *name) #else -char *TeX_search_cfg_file(char *name) +static char *TeX_search_cfg_file(char *name) {return name; }@# -char *TeX_search_hbf_file(char *name) +static char *TeX_search_hbf_file(char *name) {return name; } #endif diff --git a/Build/source/texk/cjkutils/hbf2gf.c b/Build/source/texk/cjkutils/hbf2gf.c index 02973893f5e..7a39b24b2ec 100644 --- a/Build/source/texk/cjkutils/hbf2gf.c +++ b/Build/source/texk/cjkutils/hbf2gf.c @@ -121,7 +121,7 @@ /*:10*//*69:*/ -#line 2469 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2473 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" #if defined(HAVE_LIBKPATHSEA) #include "kpathsea/kpathsea.h" @@ -139,42 +139,43 @@ /*11:*/ #line 429 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_file(void); +static void write_file(void); /*:11*//*13:*/ #line 491 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_pre(void); +static void write_pre(void); /*:13*//*16:*/ #line 579 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_data(void); +static void write_data(void); /*:16*//*20:*/ #line 690 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_post(void); +static void write_post(void); /*:20*//*25:*/ #line 834 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void fputl(long,FILE*); +static void fputl(long,FILE*); /*:25*//*29:*/ #line 994 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void make_pixel_array(void); +static void make_pixel_array(void); /*:29*//*36:*/ #line 1222 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +static #ifdef __GNUC__ __inline__ #endif @@ -182,8 +183,9 @@ void read_row(unsigned char*); /*:36*//*39:*/ -#line 1272 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1274 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +static #ifdef __GNUC__ __inline__ #endif @@ -191,68 +193,68 @@ void write_row(unsigned char*); /*:39*//*41:*/ -#line 1325 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1329 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_coding(void); +static void write_coding(void); /*:41*//*45:*/ -#line 1486 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1490 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_pl(void); +static void write_pl(void); /*:45*//*47:*/ -#line 1583 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1587 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_ovp(void); +static void write_ovp(void); /*:47*//*50:*/ -#line 1728 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1732 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_job(void); +static void write_job(void); /*:50*//*54:*/ -#line 1977 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1981 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void read_config(void); +static void read_config(void); /*:54*//*64:*/ -#line 2308 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2312 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -int fsearch(const char*); +static int fsearch(const char*); /*:64*//*67:*/ -#line 2447 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2451 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void config_error(const char*); +static void config_error(const char*); /*:67*//*71:*/ -#line 2490 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2494 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -const char*TeX_search_version(void); +static const char*TeX_search_version(void); /*:71*//*74:*/ -#line 2525 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2529 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" #ifdef HAVE_EMTEXDIR extern int setup_list(struct emtex_dir*,char*,const char*,unsigned); -int dir_setup(struct emtex_dir*,const char*,const char*,unsigned); -char*file_find(char*,struct emtex_dir*); +static int dir_setup(struct emtex_dir*,const char*,const char*,unsigned); +static char*file_find(char*,struct emtex_dir*); #endif /*:74*//*79:*/ -#line 2613 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2621 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -char*TeX_search_cfg_file(char*); -char*TeX_search_hbf_file(char*); +static char*TeX_search_cfg_file(char*); +static char*TeX_search_hbf_file(char*); /*:79*/ @@ -384,13 +386,13 @@ long s_mag_x,s_mag_y,s_slant; /*:27*//*38:*/ -#line 1267 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1269 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" int threshold= 128; /*:38*//*49:*/ -#line 1717 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1721 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" char job_extension[EXTENSION_LENGTH+1]; char rm_command[STRING_LENGTH+1]; @@ -402,13 +404,13 @@ int ofm_file= FALSE; /*:49*//*53:*/ -#line 1972 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1976 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" char Buffer[STRING_LENGTH+1]; /*:53*//*58:*/ -#line 2090 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2094 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" int offset_x; int offset_y; @@ -417,13 +419,13 @@ HBF_CHAR user_min_char; int have_min_char= FALSE; /*:58*//*60:*/ -#line 2247 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2251 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" HBF_CHAR min_char,max_char; /*:60*//*62:*/ -#line 2274 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2278 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" char b2_codes[256]; unsigned char min_2_byte,max_2_byte; @@ -431,7 +433,7 @@ int nmb_2_bytes= 0; /*:62*//*70:*/ -#line 2481 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2485 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" #if defined(HAVE_EMTEXDIR) char emtex_version_string[]= "emTeXdir"; @@ -441,7 +443,7 @@ char no_version_string[]= "no search library"; /*:70*//*73:*/ -#line 2518 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2522 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" #ifdef HAVE_EMTEXDIR struct emtex_dir cfg_path,hbf_path; @@ -449,9 +451,11 @@ struct emtex_dir cfg_path,hbf_path; /*:73*//*76:*/ -#line 2564 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2569 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#ifdef HAVE_EMTEXDIR char name_buffer[FILE_NAME_LENGTH+1]; +#endif /*:76*/ @@ -463,7 +467,7 @@ int main(int argc,char*argv[]) {char*p; /*78:*/ -#line 2586 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2594 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" #if defined(HAVE_LIBKPATHSEA) kpse_set_program_name(argv[0],"hbf2gf"); @@ -744,7 +748,7 @@ return 0; /*:4*//*12:*/ #line 437 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_file(void) +static void write_file(void) {char output_file[FILE_NAME_LENGTH+1]; @@ -788,7 +792,7 @@ write_data(); /*:12*//*14:*/ #line 498 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_pre(void) +static void write_pre(void) {char out_s[40],s[20]; time_t secs_now; struct tm*time_now; @@ -811,7 +815,7 @@ fputs(out_s,out); /*:14*//*17:*/ #line 584 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_data(void) +static void write_data(void) {dot_count= 0; char_adr_p= char_adr; @@ -869,7 +873,7 @@ fputc(EOC,out); /*:17*//*21:*/ #line 695 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_post(void) +static void write_post(void) {long special_adr; long post_adr; @@ -978,7 +982,7 @@ fputc(POSTPOST_ID,out); /*:21*//*26:*/ #line 839 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void fputl(long num,FILE*f) +static void fputl(long num,FILE*f) {fputc(num>>24,f); fputc(num>>16,f); fputc(num>>8,f); @@ -989,7 +993,7 @@ fputc(num,f); /*:26*//*30:*/ #line 999 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void make_pixel_array(void) +static void make_pixel_array(void) {unsigned char*prP; unsigned char*temp_prP; unsigned char*new_prP; @@ -1208,8 +1212,9 @@ goto again; /*:30*//*37:*/ -#line 1230 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1231 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +static #ifdef __GNUC__ __inline__ #endif @@ -1243,8 +1248,9 @@ bitshift= 7; /*:37*//*40:*/ -#line 1280 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1283 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +static #ifdef __GNUC__ __inline__ #endif @@ -1259,9 +1265,9 @@ for(col= 0,xP= pixelrow;col<pk_output_size_x;++col,++xP) /*:40*//*42:*/ -#line 1333 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1337 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_coding(void) +static void write_coding(void) {register int count,skip; register unsigned char paint; register int x,y; @@ -1276,7 +1282,7 @@ goto start; while(y<pk_output_size_y) {/*43:*/ -#line 1357 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1361 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" count= 0; x= 0; @@ -1345,11 +1351,11 @@ continue; /*:43*/ -#line 1348 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1352 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" start: /*44:*/ -#line 1425 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1429 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" while(x<pk_output_size_x) {if(*cp==paint) @@ -1390,7 +1396,7 @@ paint= WHITE; /*:44*/ -#line 1350 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1354 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" y++; } @@ -1398,9 +1404,9 @@ y++; /*:42*//*46:*/ -#line 1491 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1495 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_pl(void) +static void write_pl(void) {int i,pos; char output_file[FILE_NAME_LENGTH+1]; long t,sc; @@ -1488,9 +1494,9 @@ fclose(out); /*:46*//*48:*/ -#line 1588 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1592 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_ovp(void) +static void write_ovp(void) {int c,i,nmb_subfonts,remainder,count,pos; char output_file[FILE_NAME_LENGTH+1]; long t,sc; @@ -1603,9 +1609,9 @@ fclose(out); /*:48*//*51:*/ -#line 1733 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1737 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void write_job(void) +static void write_job(void) {FILE*out; int i,j; char buffer[FILE_NAME_LENGTH+1]; @@ -1689,15 +1695,15 @@ fclose(out); /*:51*//*55:*/ -#line 1985 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1989 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void read_config(void) +static void read_config(void) {HBF_BBOX*boxp; char*real_config_file; /*56:*/ -#line 2037 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2041 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" {int i,lastext= -1; @@ -1715,7 +1721,7 @@ strcat(config_file,".cfg"); /*:56*/ -#line 1991 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 1995 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" real_config_file= TeX_search_cfg_file(config_file); @@ -1750,7 +1756,7 @@ exit(0); } /*57:*/ -#line 2054 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2058 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" {char hbf_header[STRING_LENGTH+1]; char*real_hbf_header; @@ -1787,10 +1793,10 @@ strcpy(output_name,Buffer); /*:57*/ -#line 2024 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2028 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" /*59:*/ -#line 2098 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2102 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" {if(fsearch("nmb_files")) nmb_files= atoi(Buffer); @@ -1932,11 +1938,11 @@ job_extension[EXTENSION_LENGTH]= '\0'; /*:59*/ -#line 2025 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2029 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" /*61:*/ -#line 2252 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2256 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" {const void*cp; HBF_CHAR dummy; @@ -1951,10 +1957,10 @@ min_char= user_min_char; /*:61*/ -#line 2027 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2031 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" /*63:*/ -#line 2281 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2285 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" {const void*b2r; unsigned char dummy; @@ -1977,7 +1983,7 @@ nmb_2_bytes++; /*:63*/ -#line 2028 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2032 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" fclose(config); @@ -1985,9 +1991,9 @@ fclose(config); /*:55*//*65:*/ -#line 2313 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2317 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -int fsearch(const char*search_string) +static int fsearch(const char*search_string) {char*P,p; const char*Q; char temp_buffer[STRING_LENGTH+1]; @@ -2041,7 +2047,7 @@ Ch= fgetc(config); if(*temp_buffer) /*66:*/ -#line 2392 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2396 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" {P= temp_buffer; Buf_p= Buffer; @@ -2094,7 +2100,7 @@ count--; /*:66*/ -#line 2367 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2371 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" else *Buffer= '\0'; @@ -2104,9 +2110,9 @@ return(*Buffer)?1:0; /*:65*//*68:*/ -#line 2452 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2456 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -void config_error(const char*message) +static void config_error(const char*message) {fprintf(stderr,"Couldn't find `%s' entry in configuration file\n", message); exit(1); @@ -2115,9 +2121,9 @@ exit(1); /*:68*//*72:*/ -#line 2495 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2499 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -const char*TeX_search_version(void) +static const char*TeX_search_version(void) { #if defined(HAVE_LIBKPATHSEA) return kpathsea_version_string; @@ -2137,10 +2143,10 @@ return no_version_string; /*:72*//*75:*/ -#line 2537 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2541 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" #ifdef HAVE_EMTEXDIR -int dir_setup(ed,env,dir,flags) +static int dir_setup(ed,env,dir,flags) struct emtex_dir*ed; const char*env; const char*dir; @@ -2162,12 +2168,14 @@ env); return TRUE; } +#endif /*:75*//*77:*/ -#line 2569 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2576 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" -char*file_find(name,list) +#ifdef HAVE_EMTEXDIR +static char*file_find(name,list) char*name; struct emtex_dir*list; @@ -2180,34 +2188,34 @@ return NULL; /*:77*//*80:*/ -#line 2619 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" +#line 2627 "./cjkutils-4.8.3/hbf2gf/hbf2gf.w" #if defined(HAVE_LIBKPATHSEA) -char*TeX_search_cfg_file(char*name) +static char*TeX_search_cfg_file(char*name) { return kpse_find_file(name,kpse_program_text_format,TRUE); } -char*TeX_search_hbf_file(char*name) +static char*TeX_search_hbf_file(char*name) { return kpse_find_file(name,kpse_miscfonts_format,TRUE); } #elif defined(HAVE_EMTEXDIR) -char*TeX_search_cfg_file(char*name) +static char*TeX_search_cfg_file(char*name) {return file_find(name,&cfg_path); } -char*TeX_search_hbf_file(char*name) +static char*TeX_search_hbf_file(char*name) {return file_find(name,&hbf_path); } #elif defined(HAVE_MIKTEX) -char*TeX_search_cfg_file(char*name) +static char*TeX_search_cfg_file(char*name) {char result[_MAX_PATH]; if(!miktex_find_input_file("hbf2gf",*name,result)) @@ -2216,7 +2224,7 @@ return strdup(result); } -char*TeX_search_hbf_file(char*name) +static char*TeX_search_hbf_file(char*name) {char result[_MAX_PATH]; @@ -2227,12 +2235,12 @@ return strdup(result); #else -char*TeX_search_cfg_file(char*name) +static char*TeX_search_cfg_file(char*name) {return name; } -char*TeX_search_hbf_file(char*name) +static char*TeX_search_hbf_file(char*name) {return name; } #endif diff --git a/Build/source/texk/cjkutils/hbf2gf.dvi b/Build/source/texk/cjkutils/hbf2gf.dvi Binary files differindex 9e50cedf2cc..48a6b494be9 100644 --- a/Build/source/texk/cjkutils/hbf2gf.dvi +++ b/Build/source/texk/cjkutils/hbf2gf.dvi diff --git a/Build/source/texk/cjkutils/hbf2gf.idx b/Build/source/texk/cjkutils/hbf2gf.idx index 7a9f86cc1cc..d7d56550c7d 100644 --- a/Build/source/texk/cjkutils/hbf2gf.idx +++ b/Build/source/texk/cjkutils/hbf2gf.idx @@ -98,7 +98,7 @@ \I\\{grP}, \[30], 32, 33. \I\.{HALFSCALE}, \[27], 28, 33, 34. \I\.{HAVE\_CONFIG\_H}, 10. -\I\.{HAVE\_EMTEXDIR}, 69, 70, 72, 73, 74, 75, 78, 80. +\I\.{HAVE\_EMTEXDIR}, 69, 70, 72, 73, 74, 75, 76, 77, 78, 80. \I\.{HAVE\_LIBKPATHSEA}, 69, 72, 78, 80. \I\.{HAVE\_MIKTEX}, 69, 70, 72, 80. \I\\{have\_min\_char}, \[58], 59, 61. diff --git a/Build/source/texk/cjkutils/hbf2gf.tex b/Build/source/texk/cjkutils/hbf2gf.tex index 5ea7cca08e1..02aeba3c2af 100644 --- a/Build/source/texk/cjkutils/hbf2gf.tex +++ b/Build/source/texk/cjkutils/hbf2gf.tex @@ -446,7 +446,7 @@ functions \PB{\\{write\_pre}(\,)}, \PB{\\{write\_data}(\,)}, and \PB{\\{write% \_post}(\,)} handle this. \Y\B\4\X11:Prototypes\X${}\E{}$\6 -\&{void} \\{write\_file}(\&{void});\par +\&{static} \&{void} \\{write\_file}(\&{void});\par \As13, 16, 20, 25, 29, 36, 39, 41, 45, 47, 50, 54, 64, 67, 71, 74\ETs79. \U4.\fi @@ -454,7 +454,7 @@ functions \PB{\\{write\_pre}(\,)}, \PB{\\{write\_data}(\,)}, and \PB{\\{write% In \mf-like mode we create font file name extensions similar to \mf\ if the \.{-n} option isn't specified; otherwise only `\.{.gf}' will be appended. -\Y\B\&{void} \\{write\_file}(\&{void})\1\1\2\2\6 +\Y\B\&{static} \&{void} \\{write\_file}(\&{void})\1\1\2\2\6 ${}\{{}$\1\6 \&{char} ${}\\{output\_file}[\.{FILE\_NAME\_LENGTH}+\T{1}];{}$\7 \&{if} (\\{pk\_files})\5 @@ -515,11 +515,11 @@ no terminating NULL byte. \B\4\D$\\{header}$ \5 \.{"\ hbf2gf\ output\ "}\par \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} \\{write\_pre}(\&{void});\par +\&{static} \&{void} \\{write\_pre}(\&{void});\par \fi \M{14} -\Y\B\&{void} \\{write\_pre}(\&{void})\1\1\2\2\6 +\Y\B\&{static} \&{void} \\{write\_pre}(\&{void})\1\1\2\2\6 ${}\{{}$\1\6 \&{char} \\{out\_s}[\T{40}]${},{}$ \|s[\T{20}];\6 \&{time\_t} \\{secs\_now};\6 @@ -601,11 +601,11 @@ empty }\6 \M{16} \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} \\{write\_data}(\&{void});\par +\&{static} \&{void} \\{write\_data}(\&{void});\par \fi \M{17} -\Y\B\&{void} \\{write\_data}(\&{void})\1\1\2\2\6 +\Y\B\&{static} \&{void} \\{write\_data}(\&{void})\1\1\2\2\6 ${}\{{}$\1\6 ${}\\{dot\_count}\K\T{0};{}$\6 ${}\\{char\_adr\_p}\K\\{char\_adr}{}$;\7 @@ -721,11 +721,11 @@ and configuration file also. \TeX\ defines that 72.27~points are exactly 1~inch. \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} \\{write\_post}(\&{void});\par +\&{static} \&{void} \\{write\_post}(\&{void});\par \fi \M{21} -\Y\B\&{void} \\{write\_post}(\&{void})\1\1\2\2\6 +\Y\B\&{static} \&{void} \\{write\_post}(\&{void})\1\1\2\2\6 ${}\{{}$\1\6 \&{long} \\{special\_adr};\6 \&{long} \\{post\_adr};\7 @@ -871,12 +871,12 @@ ${}\\{fputc}(\.{POSTPOST\_ID},\39\\{out}){}$;\2\par \TeX\ wants the most significant byte first. \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} ${}\\{fputl}(\&{long},\39{}$\&{FILE} ${}{*}){}$;\par +\&{static} \&{void} ${}\\{fputl}(\&{long},\39{}$\&{FILE} ${}{*}){}$;\par \fi \M{26} -\Y\B\&{void} \\{fputl}(\&{long} \\{num}${},\39{}$\&{FILE} ${}{*}\|f){}$\1\1\2\2% -\6 +\Y\B\&{static} \&{void} \\{fputl}(\&{long} \\{num}${},\39{}$\&{FILE} ${}{*}% +\|f){}$\1\1\2\2\6 ${}\{{}$\1\6 ${}\\{fputc}(\\{num}\GG\T{24},\39\|f);{}$\6 ${}\\{fputc}(\\{num}\GG\T{16},\39\|f);{}$\6 @@ -1044,11 +1044,11 @@ result into an output array. \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} \\{make\_pixel\_array}(\&{void});\par +\&{static} \&{void} \\{make\_pixel\_array}(\&{void});\par \fi \M{30} -\Y\B\&{void} \\{make\_pixel\_array}(\&{void})\1\1\2\2\6 +\Y\B\&{static} \&{void} \\{make\_pixel\_array}(\&{void})\1\1\2\2\6 ${}\{{}$\1\6 \&{unsigned} \&{char} ${}{*}\\{prP};{}$\6 \&{unsigned} \&{char} ${}{*}\\{temp\_prP};{}$\6 @@ -1272,6 +1272,7 @@ rotated glyph). \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 +\&{static}\6 \8\#\&{ifdef} \.{\_\_GNUC\_\_}\6 \&{\_\_inline\_\_}\6 \8\#\&{endif}\6 @@ -1279,7 +1280,8 @@ glyph). \fi \M{37} -\Y\B\8\#\&{ifdef} \.{\_\_GNUC\_\_}\6 +\Y\B\&{static}\6 +\8\#\&{ifdef} \.{\_\_GNUC\_\_}\6 \&{\_\_inline\_\_}\6 \8\#\&{endif}\6 \&{void} \\{read\_row}(\&{unsigned} \&{char} ${}{*}\\{pixelrow}){}$\1\1\2\2\6 @@ -1330,6 +1332,7 @@ threshold. \M{39} \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 +\&{static}\6 \8\#\&{ifdef} \.{\_\_GNUC\_\_}\6 \&{\_\_inline\_\_}\6 \8\#\&{endif}\6 @@ -1337,7 +1340,8 @@ threshold. \fi \M{40} -\Y\B\8\#\&{ifdef} \.{\_\_GNUC\_\_}\6 +\Y\B\&{static}\6 +\8\#\&{ifdef} \.{\_\_GNUC\_\_}\6 \&{\_\_inline\_\_}\6 \8\#\&{endif}\6 \&{void} \\{write\_row}(\&{unsigned} \&{char} ${}{*}\\{pixelrow}){}$\1\1\2\2\6 @@ -1392,14 +1396,14 @@ $((\|x)+\T{74}{}$)\C{ $0 \le x \le 164$ }\Y\par \B\4\D$\.{NOOP}$ \5 \T{244}\C{ not used }\par \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} \\{write\_coding}(\&{void});\par +\&{static} \&{void} \\{write\_coding}(\&{void});\par \fi \M{42} The \PB{\&{goto} \\{start}} instruction causes some compilers to complain about ``Unreachable code $\ldots$'' or something similar. -\Y\B\&{void} \\{write\_coding}(\&{void})\1\1\2\2\6 +\Y\B\&{static} \&{void} \\{write\_coding}(\&{void})\1\1\2\2\6 ${}\{{}$\1\6 \&{register} \&{int} \\{count}${},{}$ \\{skip};\6 \&{register} \&{unsigned} \&{char} \\{paint};\6 @@ -1569,11 +1573,11 @@ To have an identification string in the \.{TFM} file, we split it into single bytes and use the \.{HEADER} command repeatedly. \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} \\{write\_pl}(\&{void});\par +\&{static} \&{void} \\{write\_pl}(\&{void});\par \fi \M{46} -\Y\B\&{void} \\{write\_pl}(\&{void})\1\1\2\2\6 +\Y\B\&{static} \&{void} \\{write\_pl}(\&{void})\1\1\2\2\6 ${}\{{}$\1\6 \&{int} \|i${},{}$ \\{pos};\6 \&{char} ${}\\{output\_file}[\.{FILE\_NAME\_LENGTH}+\T{1}];{}$\6 @@ -1666,11 +1670,11 @@ glyphs of the subfonts back to the original encoding positions. \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} \\{write\_ovp}(\&{void});\par +\&{static} \&{void} \\{write\_ovp}(\&{void});\par \fi \M{48} -\Y\B\&{void} \\{write\_ovp}(\&{void})\1\1\2\2\6 +\Y\B\&{static} \&{void} \\{write\_ovp}(\&{void})\1\1\2\2\6 ${}\{{}$\1\6 \&{int} \|c${},{}$ \|i${},{}$ \\{nmb\_subfonts}${},{}$ \\{remainder}${},{}$ % \\{count}${},{}$ \\{pos};\6 @@ -1812,11 +1816,11 @@ is \M{50} \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} \\{write\_job}(\&{void});\par +\&{static} \&{void} \\{write\_job}(\&{void});\par \fi \M{51} -\Y\B\&{void} \\{write\_job}(\&{void})\1\1\2\2\6 +\Y\B\&{static} \&{void} \\{write\_job}(\&{void})\1\1\2\2\6 ${}\{{}$\1\6 \&{FILE} ${}{*}\\{out};{}$\6 \&{int} \|i${},{}$ \|j;\6 @@ -2069,14 +2073,14 @@ always be set to~\PB{\T{1}}; no job file will be created. \M{54} \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} \\{read\_config}(\&{void});\par +\&{static} \&{void} \\{read\_config}(\&{void});\par \fi \M{55} If \PB{\\{config\_file}} isn't found in \mf-like mode we assume that the font isn't a HBF font at all. -\Y\B\&{void} \\{read\_config}(\&{void})\1\1\2\2\6 +\Y\B\&{static} \&{void} \\{read\_config}(\&{void})\1\1\2\2\6 ${}\{{}$\1\6 \&{HBF\_BBOX} ${}{*}\\{boxp};{}$\6 \&{char} ${}{*}\\{real\_config\_file};{}$\7 @@ -2410,12 +2414,12 @@ fills \PB{\\{Buffer}} if existent. \PB{\\{fsearch}(\,)} returns~1 on success. \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{int} \\{fsearch}(\&{const} \&{char} ${}{*}){}$;\par +\&{static} \&{int} \\{fsearch}(\&{const} \&{char} ${}{*}){}$;\par \fi \M{65} -\Y\B\&{int} \\{fsearch}(\&{const} \&{char} ${}{*}\\{search\_string}){}$\1\1\2\2% -\6 +\Y\B\&{static} \&{int} \\{fsearch}(\&{const} \&{char} ${}{*}\\{search% +\_string}){}$\1\1\2\2\6 ${}\{{}$\1\6 \&{char} ${}{*}\|P,{}$ \|p;\6 \&{const} \&{char} ${}{*}\|Q;{}$\6 @@ -2560,12 +2564,12 @@ error message. \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{void} \\{config\_error}(\&{const} \&{char} ${}{*}){}$;\par +\&{static} \&{void} \\{config\_error}(\&{const} \&{char} ${}{*}){}$;\par \fi \M{68} -\Y\B\&{void} \\{config\_error}(\&{const} \&{char} ${}{*}\\{message}){}$\1\1\2\2% -\6 +\Y\B\&{static} \&{void} \\{config\_error}(\&{const} \&{char} ${}{*}% +\\{message}){}$\1\1\2\2\6 ${}\{{}$\1\6 ${}\\{fprintf}(\\{stderr},\39\.{"Couldn't\ find\ `\%s'\ }\)\.{entry\ in\ configurati}\)\.{on\ file\\n"},\39\\{message});{}$\6 @@ -2603,11 +2607,12 @@ be used instead. \M{71} \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{const} \&{char} ${}{*}\\{TeX\_search\_version}(\&{void}){}$;\par +\&{static} \&{const} \&{char} ${}{*}\\{TeX\_search\_version}(\&{void}){}$;\par \fi \M{72} -\Y\B\&{const} \&{char} ${}{*}\\{TeX\_search\_version}(\&{void}){}$\1\1\2\2\6 +\Y\B\&{static} \&{const} \&{char} ${}{*}\\{TeX\_search\_version}(\&{void}){}$\1% +\1\2\2\6 ${}\{{}$\6 \8\#\&{if} \&{defined} (\.{HAVE\_LIBKPATHSEA})\1\6 \&{return} \\{kpathsea\_version\_string};\6 @@ -2637,10 +2642,10 @@ ${}\\{miktex\_get\_miktex\_version\_string\_ex}(\\{buf}+\T{7},\39{}$\&{sizeof} \8\#\&{ifdef} \.{HAVE\_EMTEXDIR}\6 \&{extern} \&{int} \\{setup\_list}(\&{struct} \&{emtex\_dir} ${}{*},\39{}$% \&{char} ${}{*},\39{}$\&{const} \&{char} ${}{*},\39\&{unsigned});{}$\6 -\&{int} \\{dir\_setup}(\&{struct} \&{emtex\_dir} ${}{*},\39{}$\&{const} % -\&{char} ${}{*},\39{}$\&{const} \&{char} ${}{*},\39\&{unsigned});{}$\6 -\&{char} ${}{*}{}$\\{file\_find}(\&{char} ${}{*},\39{}$\&{struct} \&{emtex% -\_dir} ${}{*});{}$\6 +\&{static} \&{int} \\{dir\_setup}(\&{struct} \&{emtex\_dir} ${}{*},\39{}$% +\&{const} \&{char} ${}{*},\39{}$\&{const} \&{char} ${}{*},\39\&{unsigned});{}$\6 +\&{static} \&{char} ${}{*}{}$\\{file\_find}(\&{char} ${}{*},\39{}$\&{struct} % +\&{emtex\_dir} ${}{*});{}$\6 \8\#\&{endif}\par \fi @@ -2651,7 +2656,8 @@ output a warning in case the environment variable \PB{\\{env}} isn't set properly. \Y\B\8\#\&{ifdef} \.{HAVE\_EMTEXDIR}\6 -\&{int} ${}\\{dir\_setup}(\\{ed},\39\\{env},\39\\{dir},\39\\{flags}){}$\1\1\6 +\&{static} \&{int} ${}\\{dir\_setup}(\\{ed},\39\\{env},\39\\{dir},\39% +\\{flags}){}$\1\1\6 \&{struct} \&{emtex\_dir} ${}{*}\\{ed};{}$\6 \&{const} \&{char} ${}{*}\\{env};{}$\6 \&{const} \&{char} ${}{*}\\{dir};{}$\6 @@ -2669,16 +2675,20 @@ ${}\\{ed}\MG\\{list}\K\NULL{}$;\7 ${}\\{fprintf}(\\{stderr},\39\.{"Environment\ variabl}\)\.{e\ `\%s'\ not\ set;\ use\ }\)\.{current\ directory\\n"},\39\\{env}){}$;\2\7 \&{return} \.{TRUE};\6 -\4${}\}{}$\2\par +\4${}\}{}$\2\6 +\8\#\&{endif}\par \fi \M{76} \Y\B\4\X2:Global variables\X${}\mathrel+\E{}$\6 -\&{char} ${}\\{name\_buffer}[\.{FILE\_NAME\_LENGTH}+\T{1}]{}$;\par +\8\#\&{ifdef} \.{HAVE\_EMTEXDIR}\6 +\&{char} ${}\\{name\_buffer}[\.{FILE\_NAME\_LENGTH}+\T{1}];{}$\6 +\8\#\&{endif}\par \fi \M{77} -\Y\B\&{char} ${}{*}\\{file\_find}(\\{name},\39\\{list}){}$\1\1\6 +\Y\B\8\#\&{ifdef} \.{HAVE\_EMTEXDIR}\6 +\&{static} \&{char} ${}{*}\\{file\_find}(\\{name},\39\\{list}){}$\1\1\6 \&{char} ${}{*}\\{name};{}$\6 \&{struct} \&{emtex\_dir} ${}{*}\\{list};\2\2{}$\6 ${}\{{}$\1\6 @@ -2726,38 +2736,38 @@ are searched in the path specified within \.{TEXCONFIG} for old kpathsea versions, and within \.{HBF2GFINPUTS} for new versions. \Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6 -\&{char} ${}{*}{}$\\{TeX\_search\_cfg\_file}(\&{char} ${}{*});{}$\6 -\&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}){}$;\par +\&{static} \&{char} ${}{*}{}$\\{TeX\_search\_cfg\_file}(\&{char} ${}{*});{}$\6 +\&{static} \&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}){}$;\par \fi \M{80} \Y\B\8\#\&{if} \&{defined} (\.{HAVE\_LIBKPATHSEA})\6 -\&{char} ${}{*}{}$\\{TeX\_search\_cfg\_file}(\&{char} ${}{*}\\{name}){}$\1\1\2% -\2\6 +\&{static} \&{char} ${}{*}{}$\\{TeX\_search\_cfg\_file}(\&{char} ${}{*}% +\\{name}){}$\1\1\2\2\6 ${}\{{}$\1\6 \&{return} \\{kpse\_find\_file}${}(\\{name},\39\\{kpse\_program\_text\_format},% \39\.{TRUE});{}$\6 \4${}\}{}$\2\7 -\&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}\\{name}){}$\1\1\2% -\2\6 +\&{static} \&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}% +\\{name}){}$\1\1\2\2\6 ${}\{{}$\1\6 \&{return} \\{kpse\_find\_file}${}(\\{name},\39\\{kpse\_miscfonts\_format},\39% \.{TRUE});{}$\6 \4${}\}{}$\2\7 \8\#\&{elif} \&{defined} (\.{HAVE\_EMTEXDIR})\7 -\&{char} ${}{*}{}$\\{TeX\_search\_cfg\_file}(\&{char} ${}{*}\\{name}){}$\1\1\2% -\2\6 +\&{static} \&{char} ${}{*}{}$\\{TeX\_search\_cfg\_file}(\&{char} ${}{*}% +\\{name}){}$\1\1\2\2\6 ${}\{{}$\1\6 \&{return} \\{file\_find}${}(\\{name},\39{\AND}\\{cfg\_path});{}$\6 \4${}\}{}$\2\7 -\&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}\\{name}){}$\1\1\2% -\2\6 +\&{static} \&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}% +\\{name}){}$\1\1\2\2\6 ${}\{{}$\1\6 \&{return} \\{file\_find}${}(\\{name},\39{\AND}\\{hbf\_path});{}$\6 \4${}\}{}$\2\7 \8\#\&{elif} \&{defined} (\.{HAVE\_MIKTEX})\7 -\&{char} ${}{*}{}$\\{TeX\_search\_cfg\_file}(\&{char} ${}{*}\\{name}){}$\1\1\2% -\2\6 +\&{static} \&{char} ${}{*}{}$\\{TeX\_search\_cfg\_file}(\&{char} ${}{*}% +\\{name}){}$\1\1\2\2\6 ${}\{{}$\1\6 \&{char} \\{result}[\.{\_MAX\_PATH}];\7 \&{if} ${}(\R\\{miktex\_find\_input\_file}(\.{"hbf2gf"},\39{*}\\{name},\39% @@ -2765,8 +2775,8 @@ ${}\{{}$\1\6 \&{return} \T{0};\2\6 \&{return} \\{strdup}(\\{result});\6 \4${}\}{}$\2\7 -\&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}\\{name}){}$\1\1\2% -\2\6 +\&{static} \&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}% +\\{name}){}$\1\1\2\2\6 ${}\{{}$\1\6 \&{char} \\{result}[\.{\_MAX\_PATH}];\7 \&{if} ${}(\R\\{miktex\_find\_miscfont\_file}({*}\\{name},\39\\{result})){}$\1\5 @@ -2774,13 +2784,13 @@ ${}\{{}$\1\6 \&{return} \\{strdup}(\\{result});\6 \4${}\}{}$\2\7 \8\#\&{else}\7 -\&{char} ${}{*}{}$\\{TeX\_search\_cfg\_file}(\&{char} ${}{*}\\{name}){}$\1\1\2% -\2\6 +\&{static} \&{char} ${}{*}{}$\\{TeX\_search\_cfg\_file}(\&{char} ${}{*}% +\\{name}){}$\1\1\2\2\6 ${}\{{}$\1\6 \&{return} \\{name};\6 \4${}\}{}$\2\7 -\&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}\\{name}){}$\1\1\2% -\2\6 +\&{static} \&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}% +\\{name}){}$\1\1\2\2\6 ${}\{{}$\1\6 \&{return} \\{name};\6 \4${}\}{}$\2\6 |