--- /dev/null
+HYTECH-INTERNATIONAL BV\r
+CMX/UZI TESTRELEASE FOR SOFTWARE DEPARTMENT 030523SD\r
+\r
+MANIFEST\r
+\r
+-rw-r--r-- 1 nick users 1561863 May 23 17:23 uzipatch.zip\r
+\r
+Please download the files for this release from:\r
+http://www.hytechscales.com/release/nld/test/030523SD\r
+\r
+INTRODUCTION\r
+\r
+Improved backward compatibility support for old style fonts built by MAKCHR.\r
+This release should be installed on top of the previous 030519SD release.\r
+\r
+INSTALLATION PROCEDURE\r
+\r
+1. You must already have installed the "/uzi" folder from "uzi.zip" as\r
+described in the notes for the earlier release, "030512SD test readme.txt".\r
+\r
+2. You must already have installed the revised folders from "uzipatch.zip" as\r
+described in the notes for the earlier release, "030519SD test readme.txt".\r
+\r
+3. Remove the folder "/uzi/src/mkfont", eg. by renaming to "/uzi/src/mkfont$".\r
+\r
+4. Remove the folder "/uzi/src/font", eg. by renaming to "/uzi/src/font$".\r
+\r
+5. Remove the folder "/uzi/src/bin", eg. by renaming to "/uzi/src/bin$".\r
+\r
+6. Unpack the "uzipatch.zip" with a destination folder of "/uzi". (If you are\r
+using a Windows based unzipping tool, this should read "c:\uzi" instead).\r
+\r
+7. You must then execute the following commands to rebuild your Flash card:\r
+ cd \uzi\src\font\r
+ n.bat\r
+ cd \uzi\bin\r
+ n.bat\r
+\r
+DETAILS OF BACKWARD COMPATIBILITY SUPPORT\r
+\r
+For a Pitney-Bowes demonstration we wish to use the earlier fonts, as released\r
+to TPG Post in the earlier software. These fonts are built using the BASIC\r
+"MAKCHR" utility, which is now available in "/uzi/src/bin" for general usage.\r
+\r
+Nick has taken the original font sources from the current TPG release. These\r
+are in the form of "*.pcx" files, and thus cannot be built using "bmp2chs" as\r
+is recommended for new development. Instead we run "MAKCHR" and rename its\r
+output to "*.chs". We now have "/uzi/src/font/xmakchr.bat" to automate this.\r
+\r
+Once the fonts have been converted via "xmakchr.bat", they can be included in\r
+font building scripts just like any other font. Please see Nick's revised file\r
+"/uzi/src/font/apibus.txt" for a demonstration of how to do this. (This will\r
+build a sensible set of "old fonts" and so it probably doesn't need to change).\r
+\r
+The above changes are probably adequate to solve Joost's issues, but Nick has\r
+also provided a simplified interface to the font-widths, which will hopefully\r
+speed up Joost's development. Please note that the simplified interface should\r
+NOT be used for new development. Instead it's just a quick and dirty hack!!!\r
+\r
+To use the new simplified interface to the font-width arrays, you need to run\r
+Nick's new utility "/uzi/src/bin/hfmwidth.exe". The syntax is something like:\r
+\r
+cd \uzi\src\font\r
+hfmwidth apibus.hfm set00nld.c 0 1\r
+\r
+This means that a certain data table (the width table for device 0, slot 1),\r
+should be extracted from the binary-format "apibus.hfm" font description file,\r
+and converted to a form which can be directly included into your program.\r
+\r
+Nick has written all the "hfmwidth" commands necessary to convert the sensible\r
+set of "old fonts" into their width tables. Please see the revised file\r
+"/uzi/src/font/n.bat" to see what these steps are. The net result is found as\r
+"/uzi/src/font/set??nld.c" and these can be copied directly into your folder.\r
+\r
+For an example of how the "set??nld.c" files can be incoporated into your code,\r
+please see Nick's demonstration program "/uzi/src/font/wid-demo.c". This has\r
+also been built for you, please see "/uzi/src/font/wid-demo.exe". This program\r
+is meant to be executed directly from your command prompt to verify the tables.\r
+\r
+I suggest that you cut-and-paste the "wid-demo.c" code directly into your main\r
+file. Of course you can delete all the scaffolding ie. processing of argc and\r
+argv and printing of messages. You will then be left with a very simple and\r
+direct means of calculating the width of a string. The tables are #included.\r
+\r
# apibus.txt\r
\r
-# bmp2txt infile.bmp [outfile.txt]\r
-bmp2txt sans07r.bmp\r
-bmp2txt sans07b.bmp\r
-bmp2txt sans09r.bmp\r
-bmp2txt sans12r.bmp\r
-bmp2txt sans16r.bmp\r
-bmp2txt sans07c.bmp\r
-\r
-# txt2chs infile.txt [outfile.chs] x_space y_space\r
-txt2chs sans07r.txt 1 3\r
-txt2chs sans07b.txt 1 3\r
-txt2chs sans09r.txt 1 4\r
-txt2chs sans12r.txt 2 5\r
-txt2chs sans16r.txt 2 7\r
-txt2chs sans07c.txt 1 3\r
-\r
# chs2cmd infile.chs [outfile.cmd] slot\r
-chs2cmd sans07r.chs lcd0.cmd 1\r
-chs2cmd sans07b.chs lcd0.cmd 2\r
-chs2cmd sans09r.chs lcd0.cmd 3\r
-chs2cmd sans12r.chs lcd0.cmd 4\r
-chs2cmd sans16r.chs lcd0.cmd 5\r
-chs2cmd sans07c.chs lcd0.cmd 6\r
-chs2cmd sans07r.chs lcd1.cmd 1\r
-chs2cmd sans07b.chs lcd1.cmd 2\r
-chs2cmd sans09r.chs lcd1.cmd 3\r
-chs2cmd sans12r.chs lcd1.cmd 4\r
-chs2cmd sans16r.chs lcd1.cmd 5\r
+chs2cmd set00nld.chs lcd0.cmd 0\r
+chs2cmd set01nld.chs lcd0.cmd 1\r
+chs2cmd set02nld.chs lcd0.cmd 2\r
+chs2cmd set03nld.chs lcd0.cmd 3\r
+chs2cmd set04nld.chs lcd0.cmd 4\r
+chs2cmd set00nld.chs lcd1.cmd 0\r
+chs2cmd set01nld.chs lcd1.cmd 1\r
+chs2cmd set02nld.chs lcd1.cmd 2\r
+chs2cmd set03nld.chs lcd1.cmd 3\r
+chs2cmd set04nld.chs lcd1.cmd 4\r
\r
# chs2hfm infile.chs device slot family style\r
-chs2hfm sans07r.chs 0 1 sans regular\r
-chs2hfm sans07b.chs 0 2 sans bold\r
-chs2hfm sans09r.chs 0 3 sans regular\r
-chs2hfm sans12r.chs 0 4 sans regular\r
-chs2hfm sans16r.chs 0 5 sans regular\r
-chs2hfm sans07c.chs 0 6 sans condensed\r
-chs2hfm sans07r.chs 1 1 sans regular\r
-chs2hfm sans07b.chs 1 2 sans bold\r
-chs2hfm sans09r.chs 1 3 sans regular\r
-chs2hfm sans12r.chs 1 4 sans regular\r
-chs2hfm sans16r.chs 1 5 sans regular\r
+chs2hfm set00nld.chs 0 0 sans regular\r
+chs2hfm set01nld.chs 0 1 sans bold\r
+chs2hfm set02nld.chs 0 2 sans regular\r
+chs2hfm set03nld.chs 0 3 sans condensed\r
+chs2hfm set04nld.chs 0 4 sans regular\r
+chs2hfm set00nld.chs 1 0 sans regular\r
+chs2hfm set01nld.chs 1 1 sans bold\r
+chs2hfm set02nld.chs 1 2 sans regular\r
+chs2hfm set03nld.chs 1 3 sans condensed\r
+chs2hfm set04nld.chs 1 4 sans regular\r
\r
hfmtool apibus.txt\r
+@if errorlevel 1 goto failure\r
\r
copy lcd0.cmd ..\..\bin\font\r
copy lcd1.cmd ..\..\bin\font\r
copy apibus.hfm ..\..\bin\font\r
\r
+hfmwidth apibus.hfm set00nld.c 0 0\r
+@if errorlevel 1 goto failure\r
+\r
+hfmwidth apibus.hfm set01nld.c 0 1\r
+@if errorlevel 1 goto failure\r
+\r
+hfmwidth apibus.hfm set02nld.c 0 2\r
+@if errorlevel 1 goto failure\r
+\r
+hfmwidth apibus.hfm set03nld.c 0 3\r
+@if errorlevel 1 goto failure\r
+\r
+hfmwidth apibus.hfm set04nld.c 0 4\r
+@if errorlevel 1 goto failure\r
+\r
+cl -Zi -I. wid-demo.c\r
+@if errorlevel 1 goto failure\r
+\r
+@echo SUCCESS\r
+@goto done\r
+:failure\r
+@echo FAILURE\r
+:done\r
+\r
--- /dev/null
+/* set00nld.c generated from apibus.hfm, do not edit! */\r
+\r
+0x06,0x01,0x02,0x03,0x04,0xfc,0xfd,0xfe,\r
+0xff,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x07,0x06,0x0c,0xf4,0x06,0x06,\r
+0x06,0x02,0x04,0x06,0x06,0x06,0x06,0x03,\r
+0x04,0x04,0x06,0x06,0x03,0x06,0x03,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x03,0x03,0x05,0x06,0x05,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x02,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x04,0x06,0x04,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x02,0x05,0x05,0x03,0x06,0x06,0x06,\r
+0x06,0x06,0x05,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x05,0x02,0x05,0x07,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x03,0x06,0x03,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x03,0x07,0x0a,0x09,0x06,0x07,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,\r
+0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06\r
+\r
--- /dev/null
+/* set01nld.c generated from apibus.hfm, do not edit! */\r
+\r
+0x08,0x01,0x02,0x03,0x04,0xfc,0xfd,0xfe,\r
+0xff,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x09,0x08,0x0c,0xf4,0x08,0x08,\r
+0x08,0x04,0x07,0x09,0x08,0x09,0x09,0x05,\r
+0x06,0x06,0x09,0x08,0x05,0x08,0x04,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x04,0x05,0x06,0x08,0x06,0x08,\r
+0x09,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x04,0x08,0x08,0x08,0x09,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x09,0x09,\r
+0x08,0x08,0x08,0x06,0x08,0x06,0x09,0x01,\r
+0x05,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x04,0x06,0x08,0x05,0x09,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x09,\r
+0x08,0x08,0x08,0x08,0x04,0x08,0x09,0x09,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x05,0x08,0x04,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x04,0x09,0x0b,0x0a,0x08,0x0a,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,\r
+0x08,0x08,0x08,0x08,0x08,0x08,0xe2,0x08\r
+\r
--- /dev/null
+/* set02nld.c generated from apibus.hfm, do not edit! */\r
+\r
+0x0a,0x01,0x02,0x03,0x04,0xf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0x0a,0x0a,0x05,0x0a,0x04,0x09,\r
+0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,\r
+0x0a,0x0a,0x04,0x0a,0x0b,0x0a,0x09,0x0c,\r
+0x14,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,\r
+0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,\r
+0x11,0x0a,0x0a,0x0a,0x18,0xca,0x0b,0x0a,\r
+0x0a,0x13,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a\r
+\r
--- /dev/null
+/* set03nld.c generated from apibus.hfm, do not edit! */\r
+\r
+0x04,0x01,0x02,0x03,0x04,0xfc,0xfd,0xfe,\r
+0xff,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x06,0x04,0x0c,0xf4,0x04,0x05,\r
+0x02,0x02,0x04,0x06,0x04,0x04,0x06,0x03,\r
+0x03,0x03,0x06,0x04,0x03,0x04,0x02,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x02,0x03,0x03,0x04,0x03,0x04,\r
+0x05,0x05,0x05,0x05,0x05,0x04,0x04,0x05,\r
+0x05,0x02,0x05,0x05,0x04,0x06,0x05,0x05,\r
+0x05,0x05,0x05,0x05,0x04,0x05,0x05,0x06,\r
+0x04,0x04,0x04,0x03,0x04,0x03,0x05,0x04,\r
+0x03,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x02,0x03,0x04,0x02,0x06,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x06,\r
+0x04,0x04,0x04,0x04,0x02,0x04,0x05,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x02,0x04,0x04,0x05,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x05,0x05,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x02,0x04,0x04,0x04,0x05,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,\r
+0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04\r
+\r
--- /dev/null
+/* set04nld.c generated from apibus.hfm, do not edit! */\r
+\r
+0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,\r
+0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,\r
+0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,\r
+0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,\r
+0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,\r
+0x1c,0x1c,0x1c,0x1c,0x1c,0x1a,0x08,0x1c,\r
+0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,\r
+0x1e,0x1e,0x1c,0x1c,0x1c,0x1e,0x1c,0x1c,\r
+0x1c,0x28,0x1c,0x1c,0x1c,0x21,0x1c,0x29,\r
+0x1c,0x1c,0x1c,0x1c,0x1d,0x1c,0x1c,0x29,\r
+0x1c,0x1c,0x27,0x1c,0x1c,0x1c,0x29,0x1c,\r
+0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1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\r
+#include "set02nld.c"\r
+ },\r
+ {\r
+#include "set03nld.c"\r
+ },\r
+ {\r
+#include "set04nld.c"\r
+ }\r
+ };\r
+\r
+int main(int argc, char **argv)\r
+ {\r
+ int slot, width;\r
+ char *text, *p;\r
+\r
+ if (argc < 3)\r
+ {\r
+ printf("usage: wid-demo slot string\n");\r
+ return 1;\r
+ }\r
+\r
+ slot = atoi(argv[1]);\r
+ text = argv[2];\r
+\r
+ if (slot < 0 || slot > 4)\r
+ {\r
+ printf("Slot must be in the range 0 thru 4\n");\r
+ return 1;\r
+ }\r
+\r
+ p = text;\r
+ width = 0;\r
+ while (*p)\r
+ {\r
+ width += widths[slot][*p++];\r
+ }\r
+\r
+ printf("Width in character set %d of \"%s\" is %d\n",\r
+ slot, text, width);\r
+ return 0;\r
+ }\r
+\r
--- /dev/null
+makchr set00nld\r
+del set00nld.chs\r
+ren chset00.win set00nld.chs\r
+\r
+makchr set01nld\r
+del set01nld.chs\r
+ren chset01.win set01nld.chs\r
+\r
+makchr set02nld\r
+del set02nld.chs\r
+ren chset02.win set02nld.chs\r
+\r
+makchr set03nld\r
+del set03nld.chs\r
+ren chset03.win set03nld.chs\r
+\r
+makchr set04nld\r
+del set04nld.chs\r
+ren chset04.win set04nld.chs\r
+\r
+del makchr.log\r
+\r
--- /dev/null
+/* hfmwidth.c by Nick for Hytech Font Manager system */\r
+\r
+/* ------------------------------------------------------------------------- */\r
+/* header and preprocessor directives */\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#ifndef DEBUG\r
+#define DEBUG 0\r
+#endif\r
+\r
+#include "hfmlib.h"\r
+\r
+#ifndef TRUE\r
+#define TRUE 1\r
+#endif\r
+\r
+#ifndef FALSE\r
+#define FALSE 0\r
+#endif\r
+\r
+#define LINE_MAX 0x200\r
+\r
+/* ------------------------------------------------------------------------- */\r
+/* function prototypes */\r
+\r
+int main(int argc, char **argv);\r
+\r
+/* ------------------------------------------------------------------------- */\r
+/* global variables */\r
+\r
+char buffer[0x100];\r
+\r
+/* ------------------------------------------------------------------------- */\r
+\r
+int main(int argc, char **argv)\r
+ {\r
+ int i, j;\r
+ char *infile, *outfile;\r
+ FILE *fileout;\r
+ int device, slot;\r
+ hfm_slot_t *hfmsl;\r
+ char line[LINE_MAX];\r
+\r
+ if (argc < 5)\r
+ {\r
+ printf("usage: hfmwidth infile.hfm outfile.c device slot\n");\r
+ return 1;\r
+ }\r
+\r
+ infile = argv[1];\r
+ outfile = argv[2];\r
+ device = atoi(argv[3]);\r
+ slot = atoi(argv[4]);\r
+\r
+ if (hfm_load(infile) == FALSE)\r
+ {\r
+ return 1;\r
+ }\r
+\r
+ fileout = fopen(outfile, "w");\r
+ if (fileout == NULL)\r
+ {\r
+ hfm_free();\r
+ fprintf(stderr, "can't create: ");\r
+ perror(outfile);\r
+ return 1;\r
+ }\r
+\r
+ hfmsl = hfm_locate(device, slot);\r
+ if (hfmsl == NULL)\r
+ {\r
+ hfm_free();\r
+ fprintf(stderr, "hfm_locate(%d, %d) returns NULL\n",\r
+ device, slot);\r
+ return 1;\r
+ }\r
+\r
+ printf("Device %d slot %d: "\r
+ " range=%d,%d"\r
+ " width=0x%04x bitmap=0x%04x"\r
+ " total=%d,%d space=%d,%d\n",\r
+ device, slot,\r
+ hfmsl->hfmsl_char_first,\r
+ hfmsl->hfmsl_char_count,\r
+ hfmsl->hfmsl_width_table,\r
+ hfmsl->hfmsl_bitmap_table,\r
+ hfmsl->hfmsl_x_total,\r
+ hfmsl->hfmsl_y_total,\r
+ hfmsl->hfmsl_x_space,\r
+ hfmsl->hfmsl_y_space);\r
+\r
+ /* fill out the table with the standard cell width */\r
+ memset(buffer, hfmsl->hfmsl_x_total, 0x100);\r
+\r
+ /* copy in those widths which are not the standard */\r
+ memcpy(buffer + hfmsl->hfmsl_char_first,\r
+ HFM_DEREF(hfm, hfmsl->hfmsl_width_table),\r
+ hfmsl->hfmsl_char_count);\r
+\r
+ strcpy(line, "/* ");\r
+ strcat(line, outfile);\r
+ strcat(line, " generated from ");\r
+ strcat(line, infile);\r
+ strcat(line, ", do not edit! */\n");\r
+ fputs(line, fileout);\r
+\r
+ *line = 0; /* causes a blank line to be written at start */\r
+\r
+ j = 0;\r
+ while (j < 0x100)\r
+ {\r
+ strcat(line, "\n");\r
+ fputs(line, fileout);\r
+\r
+ *line = 0;\r
+ for (i = 0; i < 8; i++)\r
+ {\r
+ sprintf(&line[i*5], "0x%02x,", buffer[j++] & 0xff);\r
+ }\r
+ }\r
+\r
+ if (*line)\r
+ {\r
+ line[strlen(line)-1] = 0; /* kill trailing comma */\r
+ strcat(line, "\n");\r
+ fputs(line, fileout);\r
+\r
+ *line = 0; /* causes a blank line to be written at end */\r
+ }\r
+\r
+ strcat(line, "\n");\r
+ fputs(line, fileout);\r
+\r
+ fclose(fileout);\r
+\r
+ hfm_free();\r
+ return 0;\r
+ }\r
+\r
+/* ------------------------------------------------------------------------- */\r
+\r
-cl -Zi -TP -I. -DDEBUG=0 hfmdump.c hfmlib.c\r
+cl -Zi -I. -DDEBUG=0 -Tp hfmdump.c -Tp hfmlib.c\r
@if errorlevel 1 goto failure\r
copy hfmdump.exe ..\bin\r
\r
+cl -Zi -I. -DDEBUG=0 -Tp hfmwidth.c hfmlib.obj\r
+@if errorlevel 1 goto failure\r
+copy hfmwidth.exe ..\bin\r
+\r
+goto success\r
+\r
cl -Zi -I. -DDEBUG=0 hfmtool.cpp hfmlib.obj bmp2txt.cpp txt2chs.cpp chs2cmd.cpp hystring.cpp hycache.cpp hylist.cpp hyimage.cpp hyfile.cpp hyfs.cpp hymb.cpp\r
@if errorlevel 1 goto failure\r
copy hfmtool.exe ..\bin\r