summaryrefslogtreecommitdiff
path: root/Build/source/texk/cjkutils/hbf2gf
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/cjkutils/hbf2gf')
-rw-r--r--Build/source/texk/cjkutils/hbf2gf/Makefile.in1
-rw-r--r--Build/source/texk/cjkutils/hbf2gf/c-auto.in11
-rw-r--r--Build/source/texk/cjkutils/hbf2gf/hbf.c213
-rw-r--r--Build/source/texk/cjkutils/hbf2gf/hbf2gf.c332
-rw-r--r--Build/source/texk/cjkutils/hbf2gf/hbf2gf.dvibin185288 -> 182440 bytes
-rw-r--r--Build/source/texk/cjkutils/hbf2gf/hbf2gf.idx17
-rw-r--r--Build/source/texk/cjkutils/hbf2gf/hbf2gf.tex142
-rw-r--r--Build/source/texk/cjkutils/hbf2gf/hbf2gf.w130
8 files changed, 295 insertions, 551 deletions
diff --git a/Build/source/texk/cjkutils/hbf2gf/Makefile.in b/Build/source/texk/cjkutils/hbf2gf/Makefile.in
index d1e4b0bc840..3297211dd61 100644
--- a/Build/source/texk/cjkutils/hbf2gf/Makefile.in
+++ b/Build/source/texk/cjkutils/hbf2gf/Makefile.in
@@ -158,6 +158,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
diff --git a/Build/source/texk/cjkutils/hbf2gf/c-auto.in b/Build/source/texk/cjkutils/hbf2gf/c-auto.in
index c34b3366433..f754b6badb5 100644
--- a/Build/source/texk/cjkutils/hbf2gf/c-auto.in
+++ b/Build/source/texk/cjkutils/hbf2gf/c-auto.in
@@ -55,6 +55,12 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have the `mktemp' function. */
+#undef HAVE_MKTEMP
+
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
@@ -104,7 +110,7 @@
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
-/* Define to 1 if `st_mtim' is member of `struct stat'. */
+/* Define to 1 if `struct stat' is a member of `st_mtim'. */
#undef HAVE_STRUCT_STAT_ST_MTIM
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
@@ -149,6 +155,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
/* Define to the version of this package. */
#undef PACKAGE_VERSION
diff --git a/Build/source/texk/cjkutils/hbf2gf/hbf.c b/Build/source/texk/cjkutils/hbf2gf/hbf.c
index b55f7e8a401..6056555d704 100644
--- a/Build/source/texk/cjkutils/hbf2gf/hbf.c
+++ b/Build/source/texk/cjkutils/hbf2gf/hbf.c
@@ -283,16 +283,14 @@ eprintf(fmt, x1, x2, x3, x4, x5, x6, x7, x8, x9)
#endif /* __STDC__ */
static void
-clear_bbox(bbox)
- HBF_BBOX *bbox;
+clear_bbox(HBF_BBOX *bbox)
{
bbox->hbf_width = bbox->hbf_height = 0;
bbox->hbf_xDisplacement = bbox->hbf_yDisplacement = 0;
}
static void
-clear_record(hbf)
- HBF_STRUCT *hbf;
+clear_record(HBF_STRUCT *hbf)
{
clear_bbox(&(hbf->public.hbf_bitmap_bbox));
clear_bbox(&(hbf->public.hbf_font_bbox));
@@ -309,10 +307,7 @@ clear_record(hbf)
*/
static void
-add_b2r(last_b2r, start, finish)
-reg B2_RANGE **last_b2r;
- int start;
- int finish;
+add_b2r(reg B2_RANGE **last_b2r, int start, int finish)
{
reg B2_RANGE *b2r;
@@ -326,9 +321,7 @@ reg B2_RANGE *b2r;
}
static CHAR_INDEX
-b2_pos(hbf, code)
- HBF_STRUCT *hbf;
- HBF_CHAR code;
+b2_pos(HBF_STRUCT *hbf, HBF_CHAR code)
{
reg B2_RANGE *b2r;
reg unsigned c;
@@ -345,8 +338,7 @@ reg CHAR_INDEX pos;
}
static int
-b2_size(b2r)
-reg B2_RANGE *b2r;
+b2_size(reg B2_RANGE *b2r)
{
reg int size;
@@ -358,9 +350,7 @@ reg int size;
/* map a position to a character code */
static long
-code_of(hbf, pos)
- HBF_STRUCT *hbf;
- long pos;
+code_of(HBF_STRUCT *hbf, long pos)
{
long code;
int residue;
@@ -382,9 +372,7 @@ reg B2_RANGE *b2r;
*/
static bool
-match(lp, sp)
-reg const char *lp;
-reg const char *sp;
+match(reg const char *lp, reg const char *sp)
{
while (*lp == *sp && *sp != '\0') {
lp++;
@@ -395,8 +383,7 @@ reg const char *sp;
#ifdef NO_STRDUP
char *
-strdup(s)
- const char *s;
+strdup(const char *s)
{
char *new_s;
@@ -411,9 +398,7 @@ strdup(s)
*/
static void
-add_property(hbf, lp)
-reg HBF_STRUCT *hbf;
-reg const char *lp;
+add_property(reg HBF_STRUCT *hbf, const char *lp)
{
reg PROPERTY *prop;
char tmp[MAXLINE];
@@ -454,9 +439,7 @@ reg char *tp;
}
const char *
-hbfProperty(hbfFile, propName)
- HBF *hbfFile;
- const char *propName;
+hbfProperty(HBF *hbfFile, const char *propName)
{
reg HBF_STRUCT *hbf;
reg PROPERTY *prop;
@@ -473,20 +456,15 @@ reg PROPERTY *prop;
*/
const char *
-HBF_GetProperty(handle, propertyName)
- HBF *handle;
- const char *propertyName;
+HBF_GetProperty(HBF *handle, const char *propertyName)
{
return hbfProperty(handle, propertyName);
}
int
-HBF_GetFontBoundingBox(handle, width, height, xDisplacement, yDisplacement)
- HBF_Handle handle;
- unsigned int *width;
- unsigned int *height;
- int *xDisplacement;
- int *yDisplacement;
+HBF_GetFontBoundingBox(HBF_Handle handle,
+ unsigned int *width, unsigned int *height,
+ int *xDisplacement, int *yDisplacement)
{
if (width != NULL)
*width = hbfFontBBox(handle)->hbf_width;
@@ -500,12 +478,9 @@ HBF_GetFontBoundingBox(handle, width, height, xDisplacement, yDisplacement)
}
int
-HBF_GetBitmapBoundingBox(handle, width, height, xDisplacement, yDisplacement)
- HBF_Handle handle;
- unsigned int *width;
- unsigned int *height;
- int *xDisplacement;
- int *yDisplacement;
+HBF_GetBitmapBoundingBox(HBF_Handle handle,
+ unsigned int *width, unsigned int *height,
+ int *xDisplacement, int *yDisplacement)
{
if (width != NULL)
*width = hbfBitmapBBox(handle)->hbf_width;
@@ -522,10 +497,9 @@ HBF_GetBitmapBoundingBox(handle, width, height, xDisplacement, yDisplacement)
* Prepend a directory to a relative filename.
*/
static char *
-concat(dir, dirlen, stem)
- const char *dir; /* not necessarily null-terminated */
- int dirlen; /* number of significant chars in dir */
- const char *stem; /* relative filename */
+concat(const char *dir, /* not necessarily null-terminated */
+ int dirlen, /* number of significant chars in dir */
+ const char *stem) /* relative filename */
{
char *fullname;
@@ -570,9 +544,7 @@ concat(dir, dirlen, stem)
* containing the HBF file.
*/
static char *
-expand_filename(name, hbf_name)
- const char *name;
- const char *hbf_name;
+expand_filename(const char *name, const char *hbf_name)
{
#ifdef unix
reg char *s;
@@ -639,9 +611,7 @@ reg int size;
}
static BM_FILE *
-find_file(hbf, filename)
- HBF_STRUCT *hbf;
- const char *filename;
+find_file(HBF_STRUCT *hbf, const char *filename)
{
BM_FILE **fp;
reg BM_FILE *file;
@@ -721,9 +691,7 @@ reg BM_FILE *file;
#define GRAIN_SIZE 512
static bool
-read_bitmap_file(bmf, f)
- BM_FILE *bmf;
- FILE *f;
+read_bitmap_file(BM_FILE *bmf, FILE *f)
{
byte *contents, *cp;
long size;
@@ -760,9 +728,7 @@ read_bitmap_file(bmf, f)
/* check that a code range fits within its bitmap file */
static bool
-too_short(hbf, cp)
- HBF_STRUCT *hbf;
- CODE_RANGE *cp;
+too_short(HBF_STRUCT *hbf, CODE_RANGE *cp)
{
int bm_size;
long offset, end_offset;
@@ -796,9 +762,7 @@ too_short(hbf, cp)
}
static const char *
-skip_word(n, s)
- int n;
- const char *s;
+skip_word(int n, const char *s)
{
for ( ; n > 0; n--) {
while (*s != '\0' && ! isspace(*s))
@@ -811,9 +775,7 @@ skip_word(n, s)
/* optional keywords at the end of a CODE_RANGE line */
static void
-parse_keywords(cp, s)
- CODE_RANGE *cp;
- const char *s;
+parse_keywords(CODE_RANGE *cp, const char *s)
{
for (s = skip_word(4, s) ; *s != '\0'; s = skip_word(1, s)) {
switch (*s) {
@@ -829,9 +791,7 @@ parse_keywords(cp, s)
}
static bool
-add_code_range(hbf, line)
- HBF_STRUCT *hbf;
- const char *line;
+add_code_range(HBF_STRUCT *hbf, const char *line)
{
CODE_RANGE *cp;
CODE_RANGE **cpp;
@@ -896,10 +856,7 @@ add_code_range(hbf, line)
/* get line, truncating to len, and trimming trailing spaces */
static bool
-get_line(buf, len, f)
- char *buf;
- int len;
- FILE *f;
+get_line(char *buf, int len, FILE *f)
{
int c;
char *bp;
@@ -926,10 +883,7 @@ get_line(buf, len, f)
/* get next non-COMMENT line */
static bool
-get_text_line(buf, len, f)
- char *buf;
- int len;
- FILE *f;
+get_text_line(char *buf, int len, FILE *f)
{
while (get_line(buf, len, f))
if (*buf != '\0' && ! match(buf, "COMMENT"))
@@ -938,10 +892,7 @@ get_text_line(buf, len, f)
}
static bool
-get_property(line, keyword, hbf)
- const char *line;
- const char *keyword;
- HBF_STRUCT *hbf;
+get_property(const char *line, const char *keyword, HBF_STRUCT *hbf)
{
if (! match(line, keyword)) {
eprintf("%s expected", keyword);
@@ -952,10 +903,7 @@ get_property(line, keyword, hbf)
}
static bool
-get_bbox(line, keyword, bbox)
- const char *line;
- const char *keyword;
- HBF_BBOX *bbox;
+get_bbox(const char *line, const char *keyword, HBF_BBOX *bbox)
{
int w, h, xd, yd;
@@ -995,9 +943,7 @@ get_bbox(line, keyword, bbox)
*/
static bool
-parse_file(f, hbf)
- FILE *f;
-reg HBF_STRUCT *hbf;
+parse_file(FILE *f, reg HBF_STRUCT *hbf)
{
char line[MAXLINE];
int start, finish;
@@ -1091,10 +1037,7 @@ reg HBF_STRUCT *hbf;
}
static FILE *
-path_open(path, filename, fullp)
- const char *path;
- const char *filename;
- char **fullp;
+path_open(const char *path, const char *filename, char **fullp)
{
if (LocalFileName(filename) && path != NULL) {
#ifdef PATH_DELIMITER
@@ -1128,9 +1071,7 @@ path_open(path, filename, fullp)
}
static bool
-real_open(filename, hbf)
- const char *filename;
-reg HBF_STRUCT *hbf;
+real_open(const char *filename, reg HBF_STRUCT *hbf)
{
FILE *f;
@@ -1148,8 +1089,7 @@ reg HBF_STRUCT *hbf;
}
HBF *
-hbfOpen(filename)
- const char *filename;
+hbfOpen(const char *filename)
{
reg HBF_STRUCT *hbf;
@@ -1165,9 +1105,7 @@ reg HBF_STRUCT *hbf;
}
int
-HBF_OpenFont(filename, ptrHandleStorage)
- const char *filename;
- HBF **ptrHandleStorage;
+HBF_OpenFont(const char *filename, HBF **ptrHandleStorage)
{
return (*ptrHandleStorage = hbfOpen(filename)) == NULL ? -1 : 0;
}
@@ -1177,8 +1115,7 @@ HBF_OpenFont(filename, ptrHandleStorage)
*/
int
-HBF_CloseFont(hbfFile)
- HBF *hbfFile;
+HBF_CloseFont(HBF *hbfFile)
{
reg HBF_STRUCT *hbf;
PROPERTY *prop_ptr, *prop_next;
@@ -1239,8 +1176,7 @@ reg HBF_STRUCT *hbf;
}
void
-hbfClose(hbfFile)
- HBF *hbfFile;
+hbfClose(HBF *hbfFile)
{
(void)HBF_CloseFont(hbfFile);
}
@@ -1250,18 +1186,13 @@ hbfClose(hbfFile)
*/
const byte *
-hbfGetBitmap(hbf, code)
- HBF *hbf;
- HBF_CHAR code;
+hbfGetBitmap(HBF *hbf, HBF_CHAR code)
{
return get_bitmap((HBF_STRUCT *)hbf, code, (byte *)NULL);
}
int
-HBF_GetBitmap(hbf, code, buffer)
- HBF *hbf;
- HBF_CHAR code;
- byte *buffer;
+HBF_GetBitmap(HBF *hbf, HBF_CHAR code, byte *buffer)
{
return get_bitmap((HBF_STRUCT *)hbf, code, buffer) == NULL ? -1 : 0;
}
@@ -1271,10 +1202,7 @@ HBF_GetBitmap(hbf, code, buffer)
* If buffer is non-null, it must be used.
*/
static const byte *
-get_bitmap(hbf, code, buffer)
-reg HBF_STRUCT *hbf;
- HBF_CHAR code;
- byte *buffer;
+get_bitmap(reg HBF_STRUCT *hbf, HBF_CHAR code, byte *buffer)
{
CHAR_INDEX pos, b2pos;
reg CODE_RANGE *cp;
@@ -1331,8 +1259,7 @@ reg CODE_RANGE *cp;
}
static byte *
-local_buffer(hbf)
- HBF_STRUCT *hbf;
+local_buffer(HBF_STRUCT *hbf)
{
if (hbf->bitmap_buffer == NULL &&
(hbf->bitmap_buffer = (byte *)malloc(HBF_BitmapSize(&(hbf->public)))) == NULL) {
@@ -1343,9 +1270,7 @@ local_buffer(hbf)
}
static void
-invert(buffer, length)
- byte *buffer;
- unsigned int length;
+invert(byte *buffer, unsigned int length)
{
for ( ; length > 0; length--)
*buffer++ ^= 0xff;
@@ -1353,10 +1278,7 @@ invert(buffer, length)
#ifdef IN_MEMORY
static bool
-copy_transposed(hbf, bitmap, source)
- HBF *hbf;
-reg byte *bitmap;
-reg const byte *source;
+copy_transposed(HBF *hbf, reg byte *bitmap, reg const byte *source)
{
reg byte *pos;
reg byte *bm_end;
@@ -1402,10 +1324,7 @@ end_column:
}
#else /* ! IN_MEMORY */
static bool
-get_transposed(hbf, f, bitmap)
- HBF *hbf;
- FILE *f;
-reg byte *bitmap;
+get_transposed(HBF *hbf, FILE *f, reg byte *bitmap)
{
reg byte *pos;
reg byte *bm_end;
@@ -1456,9 +1375,7 @@ end_column:
* Call function on each valid code in ascending order.
*/
void
-hbfForEach(hbfFile, func)
-reg HBF *hbfFile;
-reg void (*func)_((HBF *sameHbfFile, HBF_CHAR code));
+hbfForEach(reg HBF *hbfFile, void (*func)(HBF *, HBF_CHAR))
{
HBF_STRUCT *hbf;
CODE_RANGE *cp;
@@ -1493,15 +1410,13 @@ reg unsigned finish;
}
const char *
-hbfFileName(hbf)
- HBF *hbf;
+hbfFileName(HBF *hbf)
{
return ((HBF_STRUCT *)hbf)->filename;
}
long
-hbfChars(hbfFile)
- HBF *hbfFile;
+hbfChars(HBF *hbfFile)
{
HBF_STRUCT *hbf;
CODE_RANGE *cp;
@@ -1527,8 +1442,7 @@ hbfChars(hbfFile)
#endif
HBF_BBOX *
-hbfBitmapBBox(hbf)
- HBF *hbf;
+hbfBitmapBBox(HBF *hbf)
{
return &(hbf->hbf_bitmap_bbox);
}
@@ -1538,52 +1452,45 @@ hbfBitmapBBox(hbf)
#endif
HBF_BBOX *
-hbfFontBBox(hbf)
- HBF *hbf;
+hbfFontBBox(HBF *hbf)
{
return &(hbf->hbf_font_bbox);
}
const void *
-hbfGetByte2Range(hbfFile, b2r_pointer, startp, finishp)
- HBF *hbfFile;
- const void *b2r_pointer;
- byte *startp;
- byte *finishp;
+hbfGetByte2Range(HBF *hbfFile, const void *b2r_pointer,
+ byte *startp, byte *finishp)
{
HBF_STRUCT *hbf;
- B2_RANGE *b2r;
+ const B2_RANGE *b2r;
hbf = (HBF_STRUCT *)hbfFile;
if (b2r_pointer == NULL)
b2r = hbf->byte_2_range;
else
- b2r = ((B2_RANGE *)b2r_pointer)->b2r_next;
+ b2r = ((const B2_RANGE *)b2r_pointer)->b2r_next;
if(b2r == NULL)
return NULL;
*startp = b2r->b2r_start;
*finishp = b2r->b2r_finish;
- return (void *)b2r;
+ return (const void *)b2r;
}
const void *
-hbfGetCodeRange(hbfFile, code_pointer, startp, finishp)
- HBF *hbfFile;
- const void *code_pointer;
- HBF_CHAR *startp;
- HBF_CHAR *finishp;
+hbfGetCodeRange(HBF *hbfFile, const void *code_pointer,
+ HBF_CHAR *startp, HBF_CHAR *finishp)
{
HBF_STRUCT *hbf;
- CODE_RANGE *cp;
+ const CODE_RANGE *cp;
hbf = (HBF_STRUCT *)hbfFile;
if (code_pointer == NULL)
cp = hbf->code_range;
else
- cp = ((CODE_RANGE *)code_pointer)->code_next;
+ cp = ((const CODE_RANGE *)code_pointer)->code_next;
if(cp == NULL)
return NULL;
*startp = cp->code_start;
*finishp = cp->code_finish;
- return (void *)cp;
+ return (const void *)cp;
}
diff --git a/Build/source/texk/cjkutils/hbf2gf/hbf2gf.c b/Build/source/texk/cjkutils/hbf2gf/hbf2gf.c
index 9aa366e7790..5ff4bf891a8 100644
--- a/Build/source/texk/cjkutils/hbf2gf/hbf2gf.c
+++ b/Build/source/texk/cjkutils/hbf2gf/hbf2gf.c
@@ -10,7 +10,7 @@
#define FILE_NAME_LENGTH 1024 \
\
-#define VERSION \
+#define HBF2GF_VERSION \
"\n" \
"Copyright (C) 1996-1999 Werner Lemberg.\n" \
"There is NO warranty. You may redistribute this software\n" \
@@ -100,11 +100,14 @@
#define VALID_SUBCODE 1 \
/*4:*/
-#line 193 "hbf2gf.w"
+#line 191 "hbf2gf.w"
/*10:*/
-#line 413 "hbf2gf.w"
+#line 408 "hbf2gf.w"
+#ifdef HAVE_CONFIG_H
+#include "c-auto.h"
+#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -118,16 +121,10 @@
/*:10*//*69:*/
-#line 2483 "hbf2gf.w"
+#line 2469 "hbf2gf.w"
#if defined(HAVE_LIBKPATHSEA)
-#ifdef VERY_OLD_KPATHSEA
-#include "kpathsea/proginit.h"
-#include "kpathsea/progname.h"
-#include "kpathsea/tex-glyph.h"
-#else
#include "kpathsea/kpathsea.h"
-#endif
#elif defined(HAVE_EMTEXDIR)
#include "emtexdir.h"
@@ -137,46 +134,46 @@
#endif
/*:69*/
-#line 194 "hbf2gf.w"
+#line 192 "hbf2gf.w"
/*11:*/
-#line 431 "hbf2gf.w"
+#line 429 "hbf2gf.w"
void write_file(void);
/*:11*//*13:*/
-#line 493 "hbf2gf.w"
+#line 491 "hbf2gf.w"
void write_pre(void);
/*:13*//*16:*/
-#line 581 "hbf2gf.w"
+#line 579 "hbf2gf.w"
void write_data(void);
/*:16*//*20:*/
-#line 692 "hbf2gf.w"
+#line 690 "hbf2gf.w"
void write_post(void);
/*:20*//*25:*/
-#line 836 "hbf2gf.w"
+#line 834 "hbf2gf.w"
void fputl(long,FILE*);
/*:25*//*29:*/
-#line 999 "hbf2gf.w"
+#line 994 "hbf2gf.w"
void make_pixel_array(void);
/*:29*//*36:*/
-#line 1227 "hbf2gf.w"
+#line 1222 "hbf2gf.w"
#ifdef __GNUC__
__inline__
@@ -185,7 +182,7 @@ void read_row(unsigned char*);
/*:36*//*39:*/
-#line 1279 "hbf2gf.w"
+#line 1272 "hbf2gf.w"
#ifdef __GNUC__
__inline__
@@ -194,55 +191,55 @@ void write_row(unsigned char*);
/*:39*//*41:*/
-#line 1334 "hbf2gf.w"
+#line 1325 "hbf2gf.w"
void write_coding(void);
/*:41*//*45:*/
-#line 1495 "hbf2gf.w"
+#line 1486 "hbf2gf.w"
void write_pl(void);
/*:45*//*47:*/
-#line 1592 "hbf2gf.w"
+#line 1583 "hbf2gf.w"
void write_ovp(void);
/*:47*//*50:*/
-#line 1737 "hbf2gf.w"
+#line 1728 "hbf2gf.w"
void write_job(void);
/*:50*//*54:*/
-#line 1986 "hbf2gf.w"
+#line 1977 "hbf2gf.w"
void read_config(void);
/*:54*//*64:*/
-#line 2317 "hbf2gf.w"
+#line 2308 "hbf2gf.w"
-int fsearch(char*);
+int fsearch(const char*);
/*:64*//*67:*/
-#line 2457 "hbf2gf.w"
+#line 2447 "hbf2gf.w"
-void config_error(char*);
+void config_error(const char*);
/*:67*//*71:*/
-#line 2517 "hbf2gf.w"
+#line 2490 "hbf2gf.w"
-char*TeX_search_version(void);
+const char*TeX_search_version(void);
/*:71*//*74:*/
-#line 2552 "hbf2gf.w"
+#line 2525 "hbf2gf.w"
#ifdef HAVE_EMTEXDIR
extern int setup_list(struct emtex_dir*,char*,const char*,unsigned);
@@ -252,17 +249,17 @@ char*file_find(char*,struct emtex_dir*);
/*:74*//*79:*/
-#line 2649 "hbf2gf.w"
+#line 2613 "hbf2gf.w"
char*TeX_search_cfg_file(char*);
char*TeX_search_hbf_file(char*);
/*:79*/
-#line 195 "hbf2gf.w"
+#line 193 "hbf2gf.w"
/*2:*/
-#line 129 "hbf2gf.w"
+#line 127 "hbf2gf.w"
int nmb_files= -1;
int unicode= FALSE;
@@ -303,7 +300,7 @@ int end_of_file= FALSE;
/*:2*//*15:*/
-#line 540 "hbf2gf.w"
+#line 538 "hbf2gf.w"
long char_adr[256];
long*char_adr_p;
@@ -345,7 +342,7 @@ int dot_count;
/*:15*//*19:*/
-#line 669 "hbf2gf.w"
+#line 667 "hbf2gf.w"
char coding[STRING_LENGTH+1];
char comment[STRING_LENGTH+1];
@@ -364,12 +361,12 @@ double ppp_y;
/*:19*//*27:*/
-#line 876 "hbf2gf.w"
+#line 871 "hbf2gf.w"
HBF_CHAR code;
const unsigned char*bitmap;
-unsigned char*bP;
+const unsigned char*bP;
unsigned char out_char[MAX_CHAR_SIZE*MAX_CHAR_SIZE+1];
@@ -387,13 +384,13 @@ long s_mag_x,s_mag_y,s_slant;
/*:27*//*38:*/
-#line 1274 "hbf2gf.w"
+#line 1267 "hbf2gf.w"
int threshold= 128;
/*:38*//*49:*/
-#line 1726 "hbf2gf.w"
+#line 1717 "hbf2gf.w"
char job_extension[EXTENSION_LENGTH+1];
char rm_command[STRING_LENGTH+1];
@@ -405,13 +402,13 @@ int ofm_file= FALSE;
/*:49*//*53:*/
-#line 1981 "hbf2gf.w"
+#line 1972 "hbf2gf.w"
char Buffer[STRING_LENGTH+1];
/*:53*//*58:*/
-#line 2099 "hbf2gf.w"
+#line 2090 "hbf2gf.w"
int offset_x;
int offset_y;
@@ -420,13 +417,13 @@ HBF_CHAR user_min_char;
int have_min_char= FALSE;
/*:58*//*60:*/
-#line 2256 "hbf2gf.w"
+#line 2247 "hbf2gf.w"
HBF_CHAR min_char,max_char;
/*:60*//*62:*/
-#line 2283 "hbf2gf.w"
+#line 2274 "hbf2gf.w"
char b2_codes[256];
unsigned char min_2_byte,max_2_byte;
@@ -434,16 +431,9 @@ int nmb_2_bytes= 0;
/*:62*//*70:*/
-#line 2501 "hbf2gf.w"
+#line 2481 "hbf2gf.w"
-#if defined(HAVE_LIBKPATHSEA)
-#ifdef KPSEDLL
-
-extern KPSEDLL char*kpathsea_version_string;
-#else
-extern DllImport char*kpathsea_version_string;
-#endif
-#elif defined(HAVE_EMTEXDIR)
+#if defined(HAVE_EMTEXDIR)
char emtex_version_string[]= "emTeXdir";
#elif !defined(HAVE_MIKTEX)
char no_version_string[]= "no search library";
@@ -451,7 +441,7 @@ char no_version_string[]= "no search library";
/*:70*//*73:*/
-#line 2545 "hbf2gf.w"
+#line 2518 "hbf2gf.w"
#ifdef HAVE_EMTEXDIR
struct emtex_dir cfg_path,hbf_path;
@@ -459,37 +449,25 @@ struct emtex_dir cfg_path,hbf_path;
/*:73*//*76:*/
-#line 2591 "hbf2gf.w"
+#line 2564 "hbf2gf.w"
char name_buffer[FILE_NAME_LENGTH+1];
/*:76*/
-#line 196 "hbf2gf.w"
-
+#line 194 "hbf2gf.w"
-int main(argc,argv)
-int argc;
-char*argv[];
+int main(int argc,char*argv[])
{char*p;
/*78:*/
-#line 2613 "hbf2gf.w"
+#line 2586 "hbf2gf.w"
#if defined(HAVE_LIBKPATHSEA)
-#ifdef OLD_KPATHSEA
-kpse_set_progname(argv[0]);
-#else
kpse_set_program_name(argv[0],"hbf2gf");
-#endif
-
-#ifdef VERY_OLD_KPATHSEA
-kpse_init_prog("HBF2GF",300,"cx",true,"cmr10");
-#else
kpse_init_prog("HBF2GF",300,"cx","cmr10");
-#endif
#elif defined(HAVE_EMTEXDIR)
if(!dir_setup(&cfg_path,"HBFCFG",NULL,EDS_BANG))
@@ -506,16 +484,16 @@ exit(1);
/*:78*/
-#line 205 "hbf2gf.w"
+#line 200 "hbf2gf.w"
/*7:*/
-#line 312 "hbf2gf.w"
+#line 307 "hbf2gf.w"
if(argc==2)
{if(strcmp(argv[1],"--help")==0)
/*6:*/
-#line 293 "hbf2gf.w"
+#line 288 "hbf2gf.w"
{printf(USAGE);
exit(0);
@@ -523,22 +501,22 @@ exit(0);
/*:6*/
-#line 315 "hbf2gf.w"
+#line 310 "hbf2gf.w"
else if(strcmp(argv[1],"--version")==0)
/*5:*/
-#line 266 "hbf2gf.w"
+#line 261 "hbf2gf.w"
{printf("\n");
printf(banner);
printf(" (%s)\n",TeX_search_version());
-printf(VERSION);
+printf(HBF2GF_VERSION);
exit(0);
}
/*:5*/
-#line 317 "hbf2gf.w"
+#line 312 "hbf2gf.w"
}
@@ -576,7 +554,7 @@ exit(1);
/*:7*/
-#line 207 "hbf2gf.w"
+#line 202 "hbf2gf.w"
if(!quiet)
@@ -605,7 +583,7 @@ read_config();
if(mf_like)
/*8:*/
-#line 357 "hbf2gf.w"
+#line 352 "hbf2gf.w"
{if(unicode)
file_number= (int)strtol(&argv[1][strlen(argv[1])-2],
@@ -633,11 +611,11 @@ y_scale= (double)x_resolution/y_scale;
/*:8*/
-#line 234 "hbf2gf.w"
+#line 229 "hbf2gf.w"
/*28:*/
-#line 908 "hbf2gf.w"
+#line 903 "hbf2gf.w"
{int col,offset;
@@ -720,11 +698,11 @@ s_slant= slant*SCALE;
/*:28*/
-#line 236 "hbf2gf.w"
+#line 231 "hbf2gf.w"
/*9:*/
-#line 392 "hbf2gf.w"
+#line 387 "hbf2gf.w"
{int j,max_numb;
@@ -746,7 +724,7 @@ nmb_files= j;
/*:9*/
-#line 238 "hbf2gf.w"
+#line 233 "hbf2gf.w"
if(tfm_files)
@@ -764,7 +742,7 @@ return 0;
/*:4*//*12:*/
-#line 439 "hbf2gf.w"
+#line 437 "hbf2gf.w"
void write_file(void)
{char output_file[FILE_NAME_LENGTH+1];
@@ -808,7 +786,7 @@ write_data();
/*:12*//*14:*/
-#line 500 "hbf2gf.w"
+#line 498 "hbf2gf.w"
void write_pre(void)
{char out_s[40],s[20];
@@ -831,7 +809,7 @@ fputs(out_s,out);
/*:14*//*17:*/
-#line 586 "hbf2gf.w"
+#line 584 "hbf2gf.w"
void write_data(void)
{dot_count= 0;
@@ -839,7 +817,7 @@ char_adr_p= char_adr;
for(last_char= 0;(last_char<256)&&!end_of_file;last_char++)
/*18:*/
-#line 611 "hbf2gf.w"
+#line 609 "hbf2gf.w"
{if(dot_count++%10==0)
if(pk_files&&!quiet)
@@ -883,13 +861,13 @@ fputc(EOC,out);
/*:18*/
-#line 592 "hbf2gf.w"
+#line 590 "hbf2gf.w"
}
/*:17*//*21:*/
-#line 697 "hbf2gf.w"
+#line 695 "hbf2gf.w"
void write_post(void)
{long special_adr;
@@ -917,7 +895,7 @@ tfm_width= (tfm_output_size_x+2*tfm_offset_x)*_2_20;
/*22:*/
-#line 743 "hbf2gf.w"
+#line 741 "hbf2gf.w"
special_adr= ftell(out);
@@ -935,10 +913,10 @@ fputs(comment,out);
/*:22*/
-#line 723 "hbf2gf.w"
+#line 721 "hbf2gf.w"
/*23:*/
-#line 772 "hbf2gf.w"
+#line 770 "hbf2gf.w"
post_adr= ftell(out);
fputc(POST,out);
@@ -977,10 +955,10 @@ fputl(*char_adr_p++,out);
/*:23*/
-#line 724 "hbf2gf.w"
+#line 722 "hbf2gf.w"
/*24:*/
-#line 823 "hbf2gf.w"
+#line 821 "hbf2gf.w"
fputc(POSTPOST,out);
fputl(post_adr,out);
@@ -992,18 +970,15 @@ fputc(POSTPOST_ID,out);
/*:24*/
-#line 725 "hbf2gf.w"
+#line 723 "hbf2gf.w"
}
/*:21*//*26:*/
-#line 841 "hbf2gf.w"
-
-void fputl(num,f)
-long num;
-FILE*f;
+#line 839 "hbf2gf.w"
+void fputl(long num,FILE*f)
{fputc(num>>24,f);
fputc(num>>16,f);
fputc(num>>8,f);
@@ -1012,7 +987,7 @@ fputc(num,f);
/*:26*//*30:*/
-#line 1004 "hbf2gf.w"
+#line 999 "hbf2gf.w"
void make_pixel_array(void)
{unsigned char*prP;
@@ -1043,14 +1018,14 @@ again:
if(b2_codes[code&0xFF])
{if(pk_files)
{bitmap= hbfGetBitmap(hbf,code);
-bP= (unsigned char*)bitmap;
+bP= bitmap;
if(!bitmap)
empty_char= TRUE;
else
/*31:*/
-#line 1063 "hbf2gf.w"
+#line 1058 "hbf2gf.w"
{if(pk_output_size_y==input_size_y)
temp_prP= prP;
@@ -1058,7 +1033,7 @@ temp_prP= prP;
curr_row= input_size_y-1;
for(row= 0;row<pk_output_size_y;++row)
{/*32:*/
-#line 1077 "hbf2gf.w"
+#line 1072 "hbf2gf.w"
if(pk_output_size_y==input_size_y)
@@ -1080,7 +1055,7 @@ need_to_read_row= 1;
}
/*33:*/
-#line 1104 "hbf2gf.w"
+#line 1099 "hbf2gf.w"
if(need_to_read_row)
if(rows_read<input_size_y)
@@ -1112,16 +1087,16 @@ frac_row_to_fill= SCALE;
/*:33*/
-#line 1097 "hbf2gf.w"
+#line 1092 "hbf2gf.w"
}
/*:32*/
-#line 1069 "hbf2gf.w"
+#line 1064 "hbf2gf.w"
/*34:*/
-#line 1145 "hbf2gf.w"
+#line 1140 "hbf2gf.w"
if(pk_width==input_size_x&&s_slant==0)
@@ -1176,7 +1151,7 @@ frac_col_to_fill-= frac_col_left;
}
/*35:*/
-#line 1203 "hbf2gf.w"
+#line 1198 "hbf2gf.w"
if(frac_col_to_fill> 0)
{--xP;
@@ -1196,20 +1171,20 @@ write_row(new_prP);
/*:35*/
-#line 1198 "hbf2gf.w"
+#line 1193 "hbf2gf.w"
}
/*:34*/
-#line 1071 "hbf2gf.w"
+#line 1066 "hbf2gf.w"
}
}
/*:31*/
-#line 1040 "hbf2gf.w"
+#line 1035 "hbf2gf.w"
}
}
@@ -1233,14 +1208,12 @@ goto again;
/*:30*//*37:*/
-#line 1235 "hbf2gf.w"
+#line 1230 "hbf2gf.w"
#ifdef __GNUC__
__inline__
#endif
-void read_row(pixelrow)
-unsigned char*pixelrow;
-
+void read_row(unsigned char*pixelrow)
{register int col,bitshift,offset;
register unsigned char*xP;
register unsigned char item= 0;
@@ -1248,7 +1221,7 @@ register unsigned char item= 0;
if(rotation)
{bitshift= 7-(curr_row%8);
offset= (input_size_y+7)/8;
-bP= (unsigned char*)bitmap+curr_row/8;
+bP= bitmap+curr_row/8;
for(col= 0,xP= pixelrow;col<input_size_x;++col,++xP)
{*xP= ((*bP>>bitshift)&1)==1?PIXEL_MAXVAL:0;
bP+= offset;
@@ -1270,14 +1243,12 @@ bitshift= 7;
/*:37*//*40:*/
-#line 1287 "hbf2gf.w"
+#line 1280 "hbf2gf.w"
#ifdef __GNUC__
__inline__
#endif
-void write_row(pixelrow)
-unsigned char*pixelrow;
-
+void write_row(unsigned char*pixelrow)
{register int col;
register unsigned char*xP;
@@ -1288,7 +1259,7 @@ for(col= 0,xP= pixelrow;col<pk_output_size_x;++col,++xP)
/*:40*//*42:*/
-#line 1342 "hbf2gf.w"
+#line 1333 "hbf2gf.w"
void write_coding(void)
{register int count,skip;
@@ -1305,7 +1276,7 @@ goto start;
while(y<pk_output_size_y)
{/*43:*/
-#line 1366 "hbf2gf.w"
+#line 1357 "hbf2gf.w"
count= 0;
x= 0;
@@ -1374,11 +1345,11 @@ continue;
/*:43*/
-#line 1357 "hbf2gf.w"
+#line 1348 "hbf2gf.w"
start:
/*44:*/
-#line 1434 "hbf2gf.w"
+#line 1425 "hbf2gf.w"
while(x<pk_output_size_x)
{if(*cp==paint)
@@ -1419,7 +1390,7 @@ paint= WHITE;
/*:44*/
-#line 1359 "hbf2gf.w"
+#line 1350 "hbf2gf.w"
y++;
}
@@ -1427,7 +1398,7 @@ y++;
/*:42*//*46:*/
-#line 1500 "hbf2gf.w"
+#line 1491 "hbf2gf.w"
void write_pl(void)
{int i,pos;
@@ -1517,7 +1488,7 @@ fclose(out);
/*:46*//*48:*/
-#line 1597 "hbf2gf.w"
+#line 1588 "hbf2gf.w"
void write_ovp(void)
{int c,i,nmb_subfonts,remainder,count,pos;
@@ -1632,7 +1603,7 @@ fclose(out);
/*:48*//*51:*/
-#line 1742 "hbf2gf.w"
+#line 1733 "hbf2gf.w"
void write_job(void)
{FILE*out;
@@ -1718,7 +1689,7 @@ fclose(out);
/*:51*//*55:*/
-#line 1994 "hbf2gf.w"
+#line 1985 "hbf2gf.w"
void read_config(void)
{HBF_BBOX*boxp;
@@ -1726,7 +1697,7 @@ char*real_config_file;
/*56:*/
-#line 2046 "hbf2gf.w"
+#line 2037 "hbf2gf.w"
{int i,lastext= -1;
@@ -1744,7 +1715,7 @@ strcat(config_file,".cfg");
/*:56*/
-#line 2000 "hbf2gf.w"
+#line 1991 "hbf2gf.w"
real_config_file= TeX_search_cfg_file(config_file);
@@ -1779,7 +1750,7 @@ exit(0);
}
/*57:*/
-#line 2063 "hbf2gf.w"
+#line 2054 "hbf2gf.w"
{char hbf_header[STRING_LENGTH+1];
char*real_hbf_header;
@@ -1816,10 +1787,10 @@ strcpy(output_name,Buffer);
/*:57*/
-#line 2033 "hbf2gf.w"
+#line 2024 "hbf2gf.w"
/*59:*/
-#line 2107 "hbf2gf.w"
+#line 2098 "hbf2gf.w"
{if(fsearch("nmb_files"))
nmb_files= atoi(Buffer);
@@ -1961,11 +1932,11 @@ job_extension[EXTENSION_LENGTH]= '\0';
/*:59*/
-#line 2034 "hbf2gf.w"
+#line 2025 "hbf2gf.w"
/*61:*/
-#line 2261 "hbf2gf.w"
+#line 2252 "hbf2gf.w"
{const void*cp;
HBF_CHAR dummy;
@@ -1980,10 +1951,10 @@ min_char= user_min_char;
/*:61*/
-#line 2036 "hbf2gf.w"
+#line 2027 "hbf2gf.w"
/*63:*/
-#line 2290 "hbf2gf.w"
+#line 2281 "hbf2gf.w"
{const void*b2r;
unsigned char dummy;
@@ -2006,7 +1977,7 @@ nmb_2_bytes++;
/*:63*/
-#line 2037 "hbf2gf.w"
+#line 2028 "hbf2gf.w"
fclose(config);
@@ -2014,12 +1985,11 @@ fclose(config);
/*:55*//*65:*/
-#line 2322 "hbf2gf.w"
-
-int fsearch(search_string)
-char*search_string;
+#line 2313 "hbf2gf.w"
+int fsearch(const char*search_string)
{char*P,p;
+const char*Q;
char temp_buffer[STRING_LENGTH+1];
char env_name[STRING_LENGTH+1];
char*env_p;
@@ -2031,8 +2001,8 @@ int count= STRING_LENGTH;
rewind(config);
do
-{P= search_string;
-p= tolower(*P);
+{Q= search_string;
+p= tolower(*Q);
Ch= fgetc(config);
ch= tolower(Ch);
while(!(ch==p&&old_ch=='\n')&&Ch!=EOF)
@@ -2044,12 +2014,12 @@ ch= tolower(Ch);
}
for(;;)
-{if(*(++P)=='\0')
+{if(*(++Q)=='\0')
if((Ch= fgetc(config))==' '||Ch=='\t')
goto success;
Ch= fgetc(config);
-if(tolower(Ch)!=tolower(*P))
+if(tolower(Ch)!=tolower(*Q))
break;
}
}
@@ -2071,7 +2041,7 @@ Ch= fgetc(config);
if(*temp_buffer)
/*66:*/
-#line 2402 "hbf2gf.w"
+#line 2392 "hbf2gf.w"
{P= temp_buffer;
Buf_p= Buffer;
@@ -2124,7 +2094,7 @@ count--;
/*:66*/
-#line 2377 "hbf2gf.w"
+#line 2367 "hbf2gf.w"
else
*Buffer= '\0';
@@ -2134,11 +2104,9 @@ return(*Buffer)?1:0;
/*:65*//*68:*/
-#line 2462 "hbf2gf.w"
-
-void config_error(message)
-char*message;
+#line 2452 "hbf2gf.w"
+void config_error(const char*message)
{fprintf(stderr,"Couldn't find `%s' entry in configuration file\n",
message);
exit(1);
@@ -2147,9 +2115,9 @@ exit(1);
/*:68*//*72:*/
-#line 2522 "hbf2gf.w"
+#line 2495 "hbf2gf.w"
-char*TeX_search_version(void)
+const char*TeX_search_version(void)
{
#if defined(HAVE_LIBKPATHSEA)
return kpathsea_version_string;
@@ -2169,7 +2137,7 @@ return no_version_string;
/*:72*//*75:*/
-#line 2564 "hbf2gf.w"
+#line 2537 "hbf2gf.w"
#ifdef HAVE_EMTEXDIR
int dir_setup(ed,env,dir,flags)
@@ -2197,7 +2165,7 @@ return TRUE;
/*:75*//*77:*/
-#line 2596 "hbf2gf.w"
+#line 2569 "hbf2gf.w"
char*file_find(name,list)
char*name;
@@ -2212,56 +2180,34 @@ return NULL;
/*:77*//*80:*/
-#line 2655 "hbf2gf.w"
+#line 2619 "hbf2gf.w"
#if defined(HAVE_LIBKPATHSEA)
-char*TeX_search_cfg_file(name)
-char*name;
-
+char*TeX_search_cfg_file(char*name)
{
-#ifdef OLD_KPATHSEA
-return kpse_find_file(name,kpse_dvips_config_format,TRUE);
-#else
return kpse_find_file(name,kpse_program_text_format,TRUE);
-#endif
}
-char*TeX_search_hbf_file(name)
-char*name;
-
+char*TeX_search_hbf_file(char*name)
{
-#ifdef VERY_OLD_KPATHSEA
-return kpse_find_file(name,kpse_dvips_header_format,TRUE);
-#else
-#ifndef KPSEDLL
-return kpse_find_file(name,kpse_type1_format,TRUE);
-#else
return kpse_find_file(name,kpse_miscfonts_format,TRUE);
-#endif
-#endif
}
#elif defined(HAVE_EMTEXDIR)
-char*TeX_search_cfg_file(name)
-char*name;
-
+char*TeX_search_cfg_file(char*name)
{return file_find(name,&cfg_path);
}
-char*TeX_search_hbf_file(name)
-char*name;
-
+char*TeX_search_hbf_file(char*name)
{return file_find(name,&hbf_path);
}
#elif defined(HAVE_MIKTEX)
-char*TeX_search_cfg_file(name)
-char*name;
-
+char*TeX_search_cfg_file(char*name)
{char result[_MAX_PATH];
if(!miktex_find_input_file("hbf2gf",*name,result))
@@ -2270,9 +2216,7 @@ return strdup(result);
}
-char*TeX_search_hbf_file(name)
-char*name;
-
+char*TeX_search_hbf_file(char*name)
{char result[_MAX_PATH];
@@ -2283,16 +2227,12 @@ return strdup(result);
#else
-char*TeX_search_cfg_file(name)
-char*name;
-
+char*TeX_search_cfg_file(char*name)
{return name;
}
-char*TeX_search_hbf_file(name)
-char*name;
-
+char*TeX_search_hbf_file(char*name)
{return name;
}
#endif
diff --git a/Build/source/texk/cjkutils/hbf2gf/hbf2gf.dvi b/Build/source/texk/cjkutils/hbf2gf/hbf2gf.dvi
index ce8bdd4663b..8eb81e334d7 100644
--- a/Build/source/texk/cjkutils/hbf2gf/hbf2gf.dvi
+++ b/Build/source/texk/cjkutils/hbf2gf/hbf2gf.dvi
Binary files differ
diff --git a/Build/source/texk/cjkutils/hbf2gf/hbf2gf.idx b/Build/source/texk/cjkutils/hbf2gf/hbf2gf.idx
index 80a4c63f303..fdf1ac2a8d1 100644
--- a/Build/source/texk/cjkutils/hbf2gf/hbf2gf.idx
+++ b/Build/source/texk/cjkutils/hbf2gf/hbf2gf.idx
@@ -47,7 +47,6 @@
\I\\{designsize}, \[21], 23.
\I\\{dir}, \[75].
\I\\{dir\_setup}, \[74], \[75], 78.
-\I\&{DllImport}, 70.
\I\\{dot\_count}, \[15], 17, 18.
\I\\{dpi\_x}, \[19], 21, 28, 51, 59.
\I\\{dpi\_y}, \[19], 21, 28, 59.
@@ -98,8 +97,9 @@
\I\\{grayrow}, \[27], 28, 30.
\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\_LIBKPATHSEA}, 69, 70, 72, 78, 80.
+\I\.{HAVE\_LIBKPATHSEA}, 69, 72, 78, 80.
\I\.{HAVE\_MIKTEX}, 69, 70, 72, 80.
\I\\{have\_min\_char}, \[58], 59, 61.
\I\&{HBF}, 2.
@@ -120,6 +120,7 @@
\I\\{hbfGetCodeRange}, 60, 61.
\I\\{hbfOpen}, 57.
\I\\{hbfProperty}, 57.
+\I\.{HBF2GF\_VERSION}, \[5].
\I\\{header}, \[13], 14.
\I\|{i}, \[21], \[46], \[48], \[51], \[56], \[63].
\I\\{input\_size\_x}, \[15], 28, 32, 33, 34, 36, 37, 57.
@@ -129,17 +130,12 @@
\I\\{item}, \[37].
\I\|{j}, \[9], \[51].
\I\\{job\_extension}, \[49], 51, 59.
-\I\\{kpathsea\_version\_string}, \[70], 72.
-\I\\{kpse\_dvips\_config\_format}, 80.
-\I\\{kpse\_dvips\_header\_format}, 80.
+\I\\{kpathsea\_version\_string}, 72.
\I\\{kpse\_find\_file}, 80.
\I\\{kpse\_init\_prog}, 78.
\I\\{kpse\_miscfonts\_format}, 80.
\I\\{kpse\_program\_text\_format}, 80.
-\I\\{kpse\_set\_progname}, 78.
\I\\{kpse\_set\_program\_name}, 78.
-\I\\{kpse\_type1\_format}, 80.
-\I\&{KPSEDLL}, 70, 80.
\I\|{l}, \[4].
\I\\{last\_char}, \[15], 17, 18, 23.
\I\\{lastext}, \[56].
@@ -185,7 +181,6 @@
\I\\{ofm\_file}, 4, \[49], 51, 59.
\I\\{ofm\_header}, \[48].
\I\\{old\_ch}, \[65].
-\I\.{OLD\_KPATHSEA}, 69, 78, 80.
\I\\{out}, \[2], 12, 14, 18, 22, 23, 24, 43, 44, 46, 48, \[51].
\I\\{out\_char}, \[27], 30, 42, 43.
\I\\{out\_char\_p}, \[27], 30, 40.
@@ -228,6 +223,7 @@
\I\.{PRINTER\_MIN\_RES\_Y}, \[53], 59.
\I\\{printf}, 4, 5, 6, 12, 18, 46, 48, 51, 55.
\I\\{prP}, \[30], 31, 32, 33.
+\I\|{Q}, \[65].
\I\\{quiet}, \[2], 4, 7, 12, 18, 46, 48, 51, 55.
\I\.{READ\_BIN}, \[2].
\I\\{read\_config}, 4, \[54], \[55].
@@ -299,7 +295,6 @@
\I\.{TM\_IN\_SYS\_TIME}, 10.
\I\\{tmp}, \[28].
\I\\{tolower}, 65.
-\I\\{true}, 78.
\I\.{TRUE}, \[2], 4, 7, 9, 30, 59, 75, 80.
\I\\{unicode}, \[2], 8, 9, 12, 28, 46, 51, 59.
\I\.{USAGE}, \[6].
@@ -307,8 +302,6 @@
\I\\{user\_min\_char}, \[58], 59, 61.
\I\\{val}, \[75].
\I\.{VALID\_SUBCODE}, 48, \[62], 63.
-\I\.{VERSION}, \[5].
-\I\.{VERY\_OLD\_KPATHSEA}, 69, 78, 80.
\I\.{WHITE}, \[27], 42, 44.
\I\.{WRITE\_BIN}, \[2], 12.
\I\\{write\_coding}, 18, \[41], \[42].
diff --git a/Build/source/texk/cjkutils/hbf2gf/hbf2gf.tex b/Build/source/texk/cjkutils/hbf2gf/hbf2gf.tex
index 0f5c79f4d3e..c637786b20e 100644
--- a/Build/source/texk/cjkutils/hbf2gf/hbf2gf.tex
+++ b/Build/source/texk/cjkutils/hbf2gf/hbf2gf.tex
@@ -193,9 +193,8 @@ variables, \PB{\\{write\_file}(\,)} writes the \.{GF} files, \PB{\\{write\_pl}(%
\Y\B\X10:Include files\X\6
\X11:Prototypes\X\6
\X2:Global variables\X\7
-\&{int} ${}\\{main}(\\{argc},\39\\{argv}){}$\1\1\6
-\&{int} \\{argc};\C{ argument count }\6
-\&{char} ${}{*}\\{argv}[\,]{}$;\C{ argument values }\2\2\6
+\&{int} \\{main}(\&{int} \\{argc}${},\39{}$\&{char} ${}{*}\\{argv}[\,]){}$\1\1%
+\2\2\6
${}\{{}$\1\6
\&{char} ${}{*}\|p;{}$\7
\X78:Initialize \TeX\ file searching\X\7
@@ -238,7 +237,7 @@ ${}\\{mf\_like}\K\.{TRUE};{}$\6
\fi
\M{5}
-\Y\B\4\D$\.{VERSION}$ \6
+\Y\B\4\D$\.{HBF2GF\_VERSION}$ \6
\.{"\\n"}\6
\.{"Copyright\ (C)\ 1996-}\)\.{1999\ Werner\ Lemberg.}\)\.{\\n"}\6
\.{"There\ is\ NO\ warrant}\)\.{y.\ \ You\ may\ redistri}\)\.{bute\ this\
@@ -255,7 +254,7 @@ ${}\{{}$\1\6
\\{printf}(\.{"\\n"});\6
\\{printf}(\\{banner});\6
${}\\{printf}(\.{"\ (\%s)\\n"},\39\\{TeX\_search\_version}(\,));{}$\6
-\\{printf}(\.{VERSION});\6
+\\{printf}(\.{HBF2GF\_VERSION});\6
\\{exit}(\T{0});\6
\4${}\}{}$\2\par
\U7.\fi
@@ -424,6 +423,9 @@ ${}\\{nmb\_files}\K\|j{}$;\C{ the real number of output font files }\6
\M{10}
\Y\B\4\X10:Include files\X${}\E{}$\6
+\8\#\&{ifdef} \.{HAVE\_CONFIG\_H}\6
+\8\#\&{include} \.{"c-auto.h"}\6
+\8\#\&{endif}\6
\8\#\&{include} \.{<ctype.h>}\6
\8\#\&{include} \.{<stdio.h>}\6
\8\#\&{include} \.{<stdlib.h>}\6
@@ -873,9 +875,8 @@ ${}\\{fputc}(\.{POSTPOST\_ID},\39\\{out}){}$;\2\par
\fi
\M{26}
-\Y\B\&{void} ${}\\{fputl}(\\{num},\39\|f){}$\1\1\6
-\&{long} \\{num};\6
-\&{FILE} ${}{*}\|f;\2\2{}$\6
+\Y\B\&{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
@@ -916,7 +917,7 @@ immediately.
\&{HBF\_CHAR} \\{code};\6
\&{const} \&{unsigned} \&{char} ${}{*}\\{bitmap}{}$;\C{ a proper input bitmap
array will be allocated by the HBF API }\6
-\&{unsigned} \&{char} ${}{*}\\{bP}{}$;\7
+\&{const} \&{unsigned} \&{char} ${}{*}\\{bP}{}$;\7
\&{unsigned} \&{char} ${}\\{out\_char}[\.{MAX\_CHAR\_SIZE}*\.{MAX\_CHAR\_SIZE}+%
\T{1}]{}$;\C{ the output bitmap array }\6
\&{unsigned} \&{char} ${}{*}\\{out\_char\_p}{}$;\7
@@ -1073,8 +1074,7 @@ ${}\{{}$\1\6
\&{if} (\\{pk\_files})\5
${}\{{}$\1\6
${}\\{bitmap}\K\\{hbfGetBitmap}(\\{hbf},\39\\{code});{}$\6
-${}\\{bP}\K{}$(\&{unsigned} \&{char} ${}{*}){}$ \\{bitmap};\C{ will be
-increased by \PB{\\{read\_row}(\,)} }\7
+${}\\{bP}\K\\{bitmap}{}$;\C{ will be increased by \PB{\\{read\_row}(\,)} }\7
\&{if} ${}(\R\\{bitmap}){}$\1\5
${}\\{empty\_char}\K\.{TRUE};{}$\2\6
\&{else}\1\5
@@ -1282,8 +1282,7 @@ glyph).
\Y\B\8\#\&{ifdef} \.{\_\_GNUC\_\_}\6
\&{\_\_inline\_\_}\6
\8\#\&{endif}\6
-\&{void} \\{read\_row}(\\{pixelrow})\1\1\6
-\&{unsigned} \&{char} ${}{*}\\{pixelrow};\2\2{}$\6
+\&{void} \\{read\_row}(\&{unsigned} \&{char} ${}{*}\\{pixelrow}){}$\1\1\2\2\6
${}\{{}$\1\6
\&{register} \&{int} \\{col}${},{}$ \\{bitshift}${},{}$ \\{offset};\6
\&{register} \&{unsigned} \&{char} ${}{*}\\{xP};{}$\6
@@ -1292,8 +1291,7 @@ ${}\{{}$\1\6
${}\{{}$\1\6
${}\\{bitshift}\K\T{7}-(\\{curr\_row}\MOD\T{8});{}$\6
${}\\{offset}\K(\\{input\_size\_y}+\T{7})/\T{8};{}$\6
-${}\\{bP}\K{}$(\&{unsigned} \&{char} ${}{*}){}$ \\{bitmap}${}+\\{curr\_row}/%
-\T{8};{}$\6
+${}\\{bP}\K\\{bitmap}+\\{curr\_row}/\T{8};{}$\6
\&{for} ${}(\\{col}\K\T{0},\39\\{xP}\K\\{pixelrow};{}$ ${}\\{col}<\\{input%
\_size\_x};{}$ ${}\PP\\{col},\39\PP\\{xP}){}$\5
${}\{{}$\1\6
@@ -1342,8 +1340,7 @@ threshold.
\Y\B\8\#\&{ifdef} \.{\_\_GNUC\_\_}\6
\&{\_\_inline\_\_}\6
\8\#\&{endif}\6
-\&{void} \\{write\_row}(\\{pixelrow})\1\1\6
-\&{unsigned} \&{char} ${}{*}\\{pixelrow};\2\2{}$\6
+\&{void} \\{write\_row}(\&{unsigned} \&{char} ${}{*}\\{pixelrow}){}$\1\1\2\2\6
${}\{{}$\1\6
\&{register} \&{int} \\{col};\6
\&{register} \&{unsigned} \&{char} ${}{*}\\{xP};{}$\7
@@ -2413,14 +2410,15 @@ fills
\PB{\\{Buffer}} if existent. \PB{\\{fsearch}(\,)} returns~1 on success.
\Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6
-\&{int} \\{fsearch}(\&{char} ${}{*}){}$;\par
+\&{int} \\{fsearch}(\&{const} \&{char} ${}{*}){}$;\par
\fi
\M{65}
-\Y\B\&{int} \\{fsearch}(\\{search\_string})\1\1\6
-\&{char} ${}{*}\\{search\_string};\2\2{}$\6
+\Y\B\&{int} \\{fsearch}(\&{const} \&{char} ${}{*}\\{search\_string}){}$\1\1\2\2%
+\6
${}\{{}$\1\6
\&{char} ${}{*}\|P,{}$ \|p;\6
+\&{const} \&{char} ${}{*}\|Q;{}$\6
\&{char} ${}\\{temp\_buffer}[\.{STRING\_LENGTH}+\T{1}];{}$\6
\&{char} ${}\\{env\_name}[\.{STRING\_LENGTH}+\T{1}];{}$\6
\&{char} ${}{*}\\{env\_p};{}$\6
@@ -2431,8 +2429,8 @@ ${}\{{}$\1\6
\\{rewind}(\\{config});\C{ we start at offset~0 }\7
\&{do}\5
${}\{{}$\1\6
-${}\|P\K\\{search\_string};{}$\6
-${}\|p\K\\{tolower}({*}\|P);{}$\6
+${}\|Q\K\\{search\_string};{}$\6
+${}\|p\K\\{tolower}({*}\|Q);{}$\6
${}\\{Ch}\K\\{fgetc}(\\{config});{}$\6
${}\\{ch}\K\\{tolower}(\\{Ch});{}$\6
\&{while} ${}(\R(\\{ch}\E\|p\W\\{old\_ch}\E\.{'\\n'})\W\\{Ch}\I\.{EOF}{}$)\C{
@@ -2445,12 +2443,12 @@ ${}\\{ch}\K\\{tolower}(\\{Ch});{}$\6
\4${}\}{}$\2\7
\&{for} ( ; ; \,)\5
${}\{{}$\1\6
-\&{if} ${}({*}(\PP\|P)\E\.{'\\0'}){}$\1\6
+\&{if} ${}({*}(\PP\|Q)\E\.{'\\0'}){}$\1\6
\&{if} ${}((\\{Ch}\K\\{fgetc}(\\{config}))\E\.{'\ '}\V\\{Ch}\E\.{'\\t'}{}$)\C{
there must be a space or a tab stop after the keyword }\1\6
\&{goto} \\{success};\2\2\6
${}\\{Ch}\K\\{fgetc}(\\{config});{}$\6
-\&{if} ${}(\\{tolower}(\\{Ch})\I\\{tolower}({*}\|P)){}$\1\5
+\&{if} ${}(\\{tolower}(\\{Ch})\I\\{tolower}({*}\|Q)){}$\1\5
\&{break};\2\6
\4${}\}{}$\2\6
\4${}\}{}$\2\5
@@ -2562,12 +2560,12 @@ error
message.
\Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6
-\&{void} \\{config\_error}(\&{char} ${}{*}){}$;\par
+\&{void} \\{config\_error}(\&{const} \&{char} ${}{*}){}$;\par
\fi
\M{68}
-\Y\B\&{void} \\{config\_error}(\\{message})\1\1\6
-\&{char} ${}{*}\\{message};\2\2{}$\6
+\Y\B\&{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
@@ -2579,25 +2577,14 @@ configurati}\)\.{on\ file\\n"},\39\\{message});{}$\6
We support three searching engines: emtexdir, kpathsea, and MiKTeX (which is
a Win32 port of kpathsea). For emtexdir, define \PB{\.{HAVE\_EMTEXDIR}} while
-compiling. For kpathsea, define \PB{\.{HAVE\_LIBKPATHSEA}}. If you have a
-version of
-kpathsea older than~3.2, define \PB{\.{OLD\_KPATHSEA}} additionally. For
-kpathsea
-older than~3.0, \PB{\.{VERY\_OLD\_KPATHSEA}} must be also set. For MikTeX,
-define
+compiling. For kpathsea, define \PB{\.{HAVE\_LIBKPATHSEA}}. For MikTeX, define
\PB{\.{HAVE\_MIKTEX}}. If none of these macros is defined, a simple \PB{%
\\{fopen}(\,)} will
be used instead.
\Y\B\4\X10:Include files\X${}\mathrel+\E{}$\6
\8\#\&{if} \&{defined} (\.{HAVE\_LIBKPATHSEA})\6
-\8\#\&{ifdef} \.{VERY\_OLD\_KPATHSEA}\6
-\8\#\&{include} \.{"kpathsea/proginit.h}\)\.{"}\6
-\8\#\&{include} \.{"kpathsea/progname.h}\)\.{"}\6
-\8\#\&{include} \.{"kpathsea/tex-glyph.}\)\.{h"}\6
-\8\#\&{else}\6
\8\#\&{include} \.{"kpathsea/kpathsea.h}\)\.{"}\6
-\8\#\&{endif}\7
\8\#\&{elif} \&{defined} (\.{HAVE\_EMTEXDIR})\6
\8\#\&{include} \.{"emtexdir.h"}\6
\8\#\&{elif} \&{defined} (\.{HAVE\_MIKTEX})\6
@@ -2607,13 +2594,7 @@ be used instead.
\M{70}
\Y\B\4\X2:Global variables\X${}\mathrel+\E{}$\6
-\8\#\&{if} \&{defined} (\.{HAVE\_LIBKPATHSEA})\6
-\8\#\&{ifdef} \&{KPSEDLL} \C{ this is kpathsea 3.3 and newer }\6
-\&{extern} \&{KPSEDLL} \&{char} ${}{*}\\{kpathsea\_version\_string};{}$\6
-\8\#\&{else}\6
-\&{extern} \&{DllImport} \&{char} ${}{*}\\{kpathsea\_version\_string};{}$\6
-\8\#\&{endif}\6
-\8\#\&{elif} \&{defined} (\.{HAVE\_EMTEXDIR})\6
+\8\#\&{if} \&{defined} (\.{HAVE\_EMTEXDIR})\6
\&{char} \\{emtex\_version\_string}[\,]${}\K\.{"emTeXdir"};{}$\6
\8\#\&{elif} ${}\R{}$\&{defined} (\.{HAVE\_MIKTEX})\6
\&{char} \\{no\_version\_string}[\,]${}\K\.{"no\ search\ library"};{}$\6
@@ -2622,11 +2603,11 @@ be used instead.
\M{71}
\Y\B\4\X11:Prototypes\X${}\mathrel+\E{}$\6
-\&{char} ${}{*}\\{TeX\_search\_version}(\&{void}){}$;\par
+\&{const} \&{char} ${}{*}\\{TeX\_search\_version}(\&{void}){}$;\par
\fi
\M{72}
-\Y\B\&{char} ${}{*}\\{TeX\_search\_version}(\&{void}){}$\1\1\2\2\6
+\Y\B\&{const} \&{char} ${}{*}\\{TeX\_search\_version}(\&{void}){}$\1\1\2\2\6
${}\{{}$\6
\8\#\&{if} \&{defined} (\.{HAVE\_LIBKPATHSEA})\1\6
\&{return} \\{kpathsea\_version\_string};\6
@@ -2715,18 +2696,9 @@ configuration resp.\ HBF header files.
\Y\B\4\X78:Initialize \TeX\ file searching\X${}\E{}$\6
\8\#\&{if} \&{defined} (\.{HAVE\_LIBKPATHSEA})\6
-\8\#\&{ifdef} \.{OLD\_KPATHSEA}\6
-\\{kpse\_set\_progname}(\\{argv}[\T{0}]);\6
-\8\#\&{else}\6
-${}\\{kpse\_set\_program\_name}(\\{argv}[\T{0}],\39\.{"hbf2gf"});{}$\6
-\8\#\&{endif}\7
-\8\#\&{ifdef} \.{VERY\_OLD\_KPATHSEA}\6
-${}\\{kpse\_init\_prog}(\.{"HBF2GF"},\39\T{300},\39\.{"cx"},\39\\{true},\39%
-\.{"cmr10"});{}$\6
-\8\#\&{else}\6
+$\\{kpse\_set\_program\_name}(\\{argv}[\T{0}],\39\.{"hbf2gf"});{}$\6
${}\\{kpse\_init\_prog}(\.{"HBF2GF"},\39\T{300},\39\.{"cx"},\39\.{"cmr10"}){}$;%
\7
-\8\#\&{endif}\7
\8\#\&{elif} \&{defined} (\.{HAVE\_EMTEXDIR})\6
\&{if} ${}(\R\\{dir\_setup}({\AND}\\{cfg\_path},\39\.{"HBFCFG"},\39\NULL,\39%
\.{EDS\_BANG})){}$\5
@@ -2760,46 +2732,32 @@ versions, and within \.{HBF2GFINPUTS} for new versions.
\M{80}
\Y\B\8\#\&{if} \&{defined} (\.{HAVE\_LIBKPATHSEA})\6
-\&{char} ${}{*}\\{TeX\_search\_cfg\_file}(\\{name}){}$\1\1\6
-\&{char} ${}{*}\\{name};\2\2{}$\6
-${}\{{}$\6
-\8\#\&{ifdef} \.{OLD\_KPATHSEA}\1\6
-\&{return} \\{kpse\_find\_file}${}(\\{name},\39\\{kpse\_dvips\_config\_format},%
-\39\.{TRUE});{}$\6
-\8\#\&{else}\6
+\&{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
-\8\#\&{endif}\6
\4${}\}{}$\2\7
-\&{char} ${}{*}\\{TeX\_search\_hbf\_file}(\\{name}){}$\1\1\6
-\&{char} ${}{*}\\{name};$ $\{{}$\6
-\8\#\&{ifdef} \.{VERY\_OLD\_KPATHSEA}\6
-\&{return} \\{kpse\_find\_file}${}(\\{name},\39\\{kpse\_dvips\_header\_format},%
-\39\.{TRUE});{}$\6
-\8\#\&{else}\6
-\8\#\&{ifndef} \&{KPSEDLL} \6
-\&{return} \\{kpse\_find\_file}${}(\\{name},\39\\{kpse\_type1\_format},\39%
-\.{TRUE});{}$\6
-\8\#\&{else}\6
+\&{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
-\8\#\&{endif}\6
-\8\#\&{endif}\6
-$\}{}$\7
-\8\#\&{elif} \&{defined} (\.{HAVE\_EMTEXDIR})\6
-\&{char} ${}{*}\\{TeX\_search\_cfg\_file}(\\{name}){}$\1\1\6
-\&{char} ${}{*}\\{name};\2\2{}$\6
+\4${}\}{}$\2\7
+\8\#\&{elif} \&{defined} (\.{HAVE\_EMTEXDIR})\7
+\&{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}(\\{name}){}$\1\1\6
-\&{char} ${}{*}\\{name};\2\2{}$\6
+\&{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}(\\{name}){}$\1\1\6
-\&{char} ${}{*}\\{name};\2\2{}$\6
+\&{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%
@@ -2807,8 +2765,8 @@ ${}\{{}$\1\6
\&{return} \T{0};\2\6
\&{return} \\{strdup}(\\{result});\6
\4${}\}{}$\2\7
-\&{char} ${}{*}\\{TeX\_search\_hbf\_file}(\\{name}){}$\1\1\6
-\&{char} ${}{*}\\{name};\2\2{}$\6
+\&{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
@@ -2816,13 +2774,13 @@ ${}\{{}$\1\6
\&{return} \\{strdup}(\\{result});\6
\4${}\}{}$\2\7
\8\#\&{else}\7
-\&{char} ${}{*}\\{TeX\_search\_cfg\_file}(\\{name}){}$\1\1\6
-\&{char} ${}{*}\\{name};\2\2{}$\6
+\&{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}(\\{name}){}$\1\1\6
-\&{char} ${}{*}\\{name};\2\2{}$\6
+\&{char} ${}{*}{}$\\{TeX\_search\_hbf\_file}(\&{char} ${}{*}\\{name}){}$\1\1\2%
+\2\6
${}\{{}$\1\6
\&{return} \\{name};\6
\4${}\}{}$\2\6
diff --git a/Build/source/texk/cjkutils/hbf2gf/hbf2gf.w b/Build/source/texk/cjkutils/hbf2gf/hbf2gf.w
index 4591e55a8ab..19a6cb6425b 100644
--- a/Build/source/texk/cjkutils/hbf2gf/hbf2gf.w
+++ b/Build/source/texk/cjkutils/hbf2gf/hbf2gf.w
@@ -71,8 +71,6 @@
@s HBF_BBOX int
@s __inline__ int
-@s DllImport int
-@s KPSEDLL int
@* Introduction.
@@ -196,10 +194,7 @@ variables, |write_file()| writes the \.{GF} files, |write_pl()| and
@<Global variables@>@;@#
-int main(argc, argv)
- int argc; /* argument count */
- char *argv[]; /* argument values */
-
+int main(int argc, char *argv[])
{char *p;
@<Initialize \TeX\ file searching@>@;@#
@@ -252,7 +247,7 @@ int main(argc, argv)
@
-@d VERSION @/
+@d HBF2GF_VERSION @/
"\n"@/
"Copyright (C) 1996-1999 Werner Lemberg.\n"@/
"There is NO warranty. You may redistribute this software\n"@/
@@ -267,7 +262,7 @@ int main(argc, argv)
{printf("\n");
printf(banner);
printf(" (%s)\n", TeX_search_version());
- printf(VERSION);
+ printf(HBF2GF_VERSION);
exit(0);
}
@@ -411,6 +406,9 @@ and |max_numb| will be set to~|1|.
@
@<Include files@>=
+#ifdef HAVE_CONFIG_H
+#include "c-auto.h"
+#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -839,10 +837,7 @@ void fputl(long, FILE *);
@
@c
-void fputl(num, f)
- long num;
- FILE *f;
-
+void fputl(long num, FILE *f)
{fputc(num >> 24, f);
fputc(num >> 16, f);
fputc(num >> 8, f);
@@ -877,7 +872,7 @@ immediately.
HBF_CHAR code;
const unsigned char *bitmap;
/* a proper input bitmap array will be allocated by the HBF API */
-unsigned char *bP;@#
+const unsigned char *bP;@#
unsigned char out_char[MAX_CHAR_SIZE * MAX_CHAR_SIZE + 1];
/* the output bitmap array */
@@ -1031,7 +1026,7 @@ again:
if(b2_codes[code & 0xFF]) /* a valid second byte? */
{if(pk_files)
{bitmap = hbfGetBitmap(hbf, code);
- bP = (unsigned char *)bitmap;
+ bP = bitmap;
/* will be increased by |read_row()| */@#
if(!bitmap)
@@ -1236,9 +1231,7 @@ void read_row(unsigned char *);
#ifdef __GNUC__
__inline__
#endif
-void read_row(pixelrow)
- unsigned char *pixelrow;
-
+void read_row(unsigned char *pixelrow)
{register int col, bitshift, offset;
register unsigned char *xP;
register unsigned char item = 0;
@@ -1246,7 +1239,7 @@ void read_row(pixelrow)
if(rotation)
{bitshift = 7 - (curr_row % 8);
offset = (input_size_y + 7) / 8;
- bP = (unsigned char *)bitmap + curr_row / 8;
+ bP = bitmap + curr_row / 8;
for(col = 0, xP = pixelrow; col < input_size_x; ++col, ++xP)
{*xP = ((*bP >> bitshift) & 1) == 1 ? PIXEL_MAXVAL : 0;
bP += offset;
@@ -1288,9 +1281,7 @@ void write_row(unsigned char *);
#ifdef __GNUC__
__inline__
#endif
-void write_row(pixelrow)
- unsigned char *pixelrow;
-
+void write_row(unsigned char *pixelrow)
{register int col;
register unsigned char *xP;
@@ -2315,15 +2306,14 @@ character (|'\n'|). It also checks the presence of a parameter and fills
|Buffer| if existent. |fsearch()| returns~1 on success.
@<Prototypes@>=
-int fsearch(char *);
+int fsearch(const char *);
@
@c
-int fsearch(search_string)
- char *search_string;
-
+int fsearch(const char *search_string)
{char *P, p;
+ const char *Q;
char temp_buffer[STRING_LENGTH + 1];
char env_name[STRING_LENGTH + 1];
char *env_p;
@@ -2335,8 +2325,8 @@ int fsearch(search_string)
rewind(config); /* we start at offset~0 */@#
do
- {P = search_string;
- p = tolower(*P);
+ {Q = search_string;
+ p = tolower(*Q);
Ch = fgetc(config);
ch = tolower(Ch);
while(!(ch == p && old_ch == '\n') && Ch != EOF)
@@ -2348,12 +2338,12 @@ int fsearch(search_string)
}@#
for(;;)
- {if(*(++P) == '\0')
+ {if(*(++Q) == '\0')
if((Ch = fgetc(config)) == ' ' || Ch == '\t')
/* there must be a space or a tab stop after the keyword */
goto success;
Ch = fgetc(config);
- if(tolower(Ch) != tolower(*P))
+ if(tolower(Ch) != tolower(*Q))
break;
}
}
@@ -2455,14 +2445,12 @@ If an error occurs, |config_error()| will leave the program with an error
message.
@<Prototypes@>=
-void config_error(char *);
+void config_error(const char *);
@
@c
-void config_error(message)
- char *message;
-
+void config_error(const char *message)
{fprintf(stderr, "Couldn't find `%s' entry in configuration file\n",
message);
exit(1);
@@ -2474,21 +2462,13 @@ void config_error(message)
We support three searching engines: emtexdir, kpathsea, and MiKTeX (which is
a Win32 port of kpathsea). For emtexdir, define |HAVE_EMTEXDIR| while
-compiling. For kpathsea, define |HAVE_LIBKPATHSEA|. If you have a version of
-kpathsea older than~3.2, define |OLD_KPATHSEA| additionally. For kpathsea
-older than~3.0, |VERY_OLD_KPATHSEA| must be also set. For MikTeX, define
+compiling. For kpathsea, define |HAVE_LIBKPATHSEA|. For MikTeX, define
|HAVE_MIKTEX|. If none of these macros is defined, a simple |fopen()| will
be used instead.
@<Include files@>=
#if defined(HAVE_LIBKPATHSEA)
-#ifdef VERY_OLD_KPATHSEA
-#include "kpathsea/proginit.h"
-#include "kpathsea/progname.h"
-#include "kpathsea/tex-glyph.h"
-#else
#include "kpathsea/kpathsea.h"
-#endif@#
#elif defined(HAVE_EMTEXDIR)
#include "emtexdir.h"
@@ -2499,14 +2479,7 @@ be used instead.
@
@<Global variables@>=
-#if defined(HAVE_LIBKPATHSEA)
-#ifdef KPSEDLL
-/* this is kpathsea 3.3 and newer */
-extern KPSEDLL char *kpathsea_version_string;
-#else
-extern DllImport char *kpathsea_version_string;
-#endif
-#elif defined(HAVE_EMTEXDIR)
+#if defined(HAVE_EMTEXDIR)
char emtex_version_string[] = "emTeXdir";
#elif !defined(HAVE_MIKTEX)
char no_version_string[] = "no search library";
@@ -2515,12 +2488,12 @@ char no_version_string[] = "no search library";
@
@<Prototypes@>=
-char *TeX_search_version(void);
+const char *TeX_search_version(void);
@
@c
-char *TeX_search_version(void)
+const char *TeX_search_version(void)
{
#if defined(HAVE_LIBKPATHSEA)
return kpathsea_version_string;
@@ -2612,17 +2585,8 @@ configuration resp.\ HBF header files.
@<Initialize \TeX\ file searching@>=
#if defined(HAVE_LIBKPATHSEA)
-#ifdef OLD_KPATHSEA
- kpse_set_progname(argv[0]);
-#else
kpse_set_program_name(argv[0], "hbf2gf");
-#endif@#
-
-#ifdef VERY_OLD_KPATHSEA
- kpse_init_prog("HBF2GF", 300, "cx", true, "cmr10");
-#else
kpse_init_prog("HBF2GF", 300, "cx", "cmr10");@#
-#endif@#
#elif defined(HAVE_EMTEXDIR)
if(!dir_setup(&cfg_path, "HBFCFG", NULL, EDS_BANG))
@@ -2654,53 +2618,31 @@ char *TeX_search_hbf_file(char *);
@
@c
#if defined(HAVE_LIBKPATHSEA)
-char *TeX_search_cfg_file(name)
- char *name;
-
+char *TeX_search_cfg_file(char *name)
{
-#ifdef OLD_KPATHSEA
- return kpse_find_file(name, kpse_dvips_config_format, TRUE);
-#else
return kpse_find_file(name, kpse_program_text_format, TRUE);
-#endif
}@#
-char *TeX_search_hbf_file(name)
- char *name;
-
+char *TeX_search_hbf_file(char *name)
{
-#ifdef VERY_OLD_KPATHSEA
- return kpse_find_file(name, kpse_dvips_header_format, TRUE);
-#else
-#ifndef KPSEDLL
- return kpse_find_file(name, kpse_type1_format, TRUE);
-#else
return kpse_find_file(name, kpse_miscfonts_format, TRUE);
-#endif
-#endif
}@#
#elif defined(HAVE_EMTEXDIR)
-char *TeX_search_cfg_file(name)
- char *name;
-
+char *TeX_search_cfg_file(char *name)
{return file_find(name, &cfg_path);
}@#
-char *TeX_search_hbf_file(name)
- char *name;
-
+char *TeX_search_hbf_file(char *name)
{return file_find(name, &hbf_path);
}@#
#elif defined(HAVE_MIKTEX)
-char *TeX_search_cfg_file(name)
- char *name;
-
+char *TeX_search_cfg_file(char *name)
{char result[_MAX_PATH];
if (!miktex_find_input_file("hbf2gf", *name, result))
@@ -2709,9 +2651,7 @@ char *TeX_search_cfg_file(name)
}@#
-char *TeX_search_hbf_file(name)
- char *name;
-
+char *TeX_search_hbf_file(char *name)
{char result[_MAX_PATH];
@@ -2722,16 +2662,12 @@ char *TeX_search_hbf_file(name)
#else
-char *TeX_search_cfg_file(name)
- char *name;
-
+char *TeX_search_cfg_file(char *name)
{return name;
}@#
-char *TeX_search_hbf_file(name)
- char *name;
-
+char *TeX_search_hbf_file(char *name)
{return name;
}
#endif