diff options
Diffstat (limited to 'Build/source/texk/cjkutils/cjkutils-4.8.3/hbf2gf/hbf2gf.w')
-rw-r--r-- | Build/source/texk/cjkutils/cjkutils-4.8.3/hbf2gf/hbf2gf.w | 92 |
1 files changed, 50 insertions, 42 deletions
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 |