home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / dwnsrs59.zip / DOWNFNT.C < prev    next >
C/C++ Source or Header  |  1993-11-15  |  30KB  |  548 lines

  1. /* ============================================================= */
  2. /*  Rob Hamerling's MAXIMUS DOWNload file SORT and list utility. */
  3. /*  -> DOWNFNT.C                                                 */
  4. /*  -> Block font definitions and generation routine.            */
  5. /* ============================================================= */
  6.  
  7. #define INCL_BASE
  8. #define INCL_NOPMAPI
  9. #include <os2.h>
  10.  
  11. #include <ctype.h>
  12. #include <stdio.h>
  13. #include <string.h>
  14.  
  15. #include "downsort.h"
  16.  
  17. struct _b8_patt {                       /* 8 column font */
  18.         unsigned int c0:3, c1:3, c2:3, c3:3, c4:3, c5:3, c6:3, c7:3; };
  19. struct _b8x5 {                          /* all fonts defined as 8x5 */
  20.          char           c;              /* the character */
  21.          unsigned char  k;              /* number of active columns */
  22.          struct _b8_patt p[5];          /* 8 column x 5 lines pattern */
  23.            };
  24.  
  25. static struct _b8x5 f1[] = {            /* simple 5x3 font */
  26.     {'A',6, 1,2,2,2,1,0,0,0, 3,1,1,1,3,0,0,0, 3,0,0,0,3,0,0,0,
  27.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  28.     {'B',6, 3,2,2,2,1,0,0,0, 3,2,2,2,1,0,0,0, 3,1,1,1,2,0,0,0,
  29.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  30.     {'C',6, 1,2,2,2,1,0,0,0, 3,0,0,0,0,0,0,0, 2,1,1,1,2,0,0,0,
  31.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  32.     {'D',6, 3,2,2,2,1,0,0,0, 3,0,0,0,3,0,0,0, 3,1,1,1,2,0,0,0,
  33.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  34.     {'E',6, 3,2,2,2,2,0,0,0, 3,2,2,0,0,0,0,0, 3,1,1,1,1,0,0,0,
  35.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  36.     {'F',6, 3,2,2,2,2,0,0,0, 3,1,1,0,0,0,0,0, 3,0,0,0,0,0,0,0,
  37.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  38.     {'G',6, 1,2,2,2,1,0,0,0, 3,0,0,1,1,0,0,0, 2,1,1,1,2,0,0,0,
  39.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  40.     {'H',6, 3,0,0,0,3,0,0,0, 3,1,1,1,3,0,0,0, 3,0,0,0,3,0,0,0,
  41.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  42.     {'I',4, 2,3,2,0,0,0,0,0, 0,3,0,0,0,0,0,0, 1,3,1,0,0,0,0,0,
  43.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  44.     {'J',6, 0,2,2,2,3,0,0,0, 0,0,0,0,3,0,0,0, 2,1,1,1,2,0,0,0,
  45.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  46.     {'K',6, 3,0,0,1,2,0,0,0, 3,2,2,1,0,0,0,0, 3,0,0,0,3,0,0,0,
  47.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  48.     {'L',6, 3,0,0,0,0,0,0,0, 3,0,0,0,0,0,0,0, 3,1,1,1,1,0,0,0,
  49.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  50.     {'M',6, 3,1,0,1,3,0,0,0, 3,2,3,2,3,0,0,0, 3,0,0,0,3,0,0,0,
  51.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  52.     {'N',6, 3,1,0,0,3,0,0,0, 3,2,3,1,3,0,0,0, 3,0,0,2,3,0,0,0,
  53.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  54.     {'O',6, 1,2,2,2,1,0,0,0, 3,0,0,0,3,0,0,0, 2,1,1,1,2,0,0,0,
  55.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  56.     {'P',6, 3,2,2,2,1,0,0,0, 3,1,1,1,2,0,0,0, 3,0,0,0,0,0,0,0,
  57.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  58.     {'Q',6, 1,2,2,2,1,0,0,0, 3,0,1,0,3,0,0,0, 2,1,1,2,1,0,0,0,
  59.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  60.     {'R',6, 3,2,2,2,1,0,0,0, 3,1,1,1,2,0,0,0, 3,0,2,1,1,0,0,0,
  61.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  62.     {'S',6, 1,2,2,2,2,0,0,0, 0,2,2,2,1,0,0,0, 1,1,1,1,2,0,0,0,
  63.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  64.     {'T',6, 2,2,3,2,2,0,0,0, 0,0,3,0,0,0,0,0, 0,0,3,0,0,0,0,0,
  65.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  66.     {'U',6, 3,0,0,0,3,0,0,0, 3,0,0,0,3,0,0,0, 2,1,1,1,2,0,0,0,
  67.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  68.     {'V',6, 3,0,0,0,3,0,0,0, 3,1,0,1,3,0,0,0, 0,2,3,2,0,0,0,0,
  69.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  70.     {'W',6, 3,0,0,0,3,0,0,0, 3,0,1,0,3,0,0,0, 2,3,2,3,2,0,0,0,
  71.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  72.     {'X',6, 2,1,0,1,2,0,0,0, 0,0,3,0,0,0,0,0, 1,2,0,2,1,0,0,0,
  73.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  74.     {'Y',6, 3,0,0,0,3,0,0,0, 2,3,1,3,2,0,0,0, 0,0,3,0,0,0,0,0,
  75.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  76.     {'Z',6, 2,2,2,2,3,0,0,0, 0,1,2,2,0,0,0,0, 3,1,1,1,1,0,0,0,
  77.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  78.     {'0',6, 1,2,2,3,1,0,0,0, 3,0,3,0,3,0,0,0, 2,3,1,1,2,0,0,0,
  79.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  80.     {'1',4, 1,3,0,0,0,0,0,0, 0,3,0,0,0,0,0,0, 1,3,1,0,0,0,
  81.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  82.     {'2',6, 1,2,2,2,1,0,0,0, 0,1,1,1,2,0,0,0, 3,1,1,1,1,0,0,0,
  83.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  84.     {'3',6, 1,2,2,2,1,0,0,0, 0,0,2,2,1,0,0,0, 2,1,1,1,2,0,0,0,
  85.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  86.     {'4',6, 0,0,1,2,3,0,0,0, 1,2,0,0,3,0,0,0, 2,2,2,2,3,0,0,0,
  87.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  88.     {'5',6, 3,2,2,2,2,0,0,0, 2,2,2,2,1,0,0,0, 2,1,1,1,2,0,0,0,
  89.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  90.     {'6',6, 1,2,2,2,0,0,0,0, 3,2,2,2,1,0,0,0, 2,1,1,1,2,0,0,0,
  91.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  92.     {'7',6, 2,2,2,2,3,0,0,0, 0,0,1,2,0,0,0,0, 0,3,0,0,0,0,0,0,
  93.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  94.     {'8',6, 1,2,2,2,1,0,0,0, 1,2,2,2,1,0,0,0, 2,1,1,1,2,0,0,0,
  95.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  96.     {'9',6, 1,2,2,2,1,0,0,0, 2,1,1,1,3,0,0,0, 0,1,1,1,2,0,0,0,
  97.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  98.     {'_',6, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 1,1,1,1,1,0,0,0,
  99.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  100.     {'*',6, 1,0,1,0,1,0,0,0, 1,3,2,3,1,0,0,0, 1,2,3,2,1,0,0,0,
  101.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  102.     {'-',4, 0,0,0,0,0,0,0,0, 1,1,1,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  103.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  104.     {'|',2, 3,0,0,0,0,0,0,0, 3,0,0,0,0,0,0,0, 3,0,0,0,0,0,0,0,
  105.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  106.     {'.',2, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0,
  107.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  108.     {'(',4, 0,1,2,0,0,0,0,0, 3,0,0,0,0,0,0,0, 0,2,1,0,0,0,0,0,
  109.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  110.     {')',4, 2,1,0,0,0,0,0,0, 0,0,3,0,0,0,0,0, 1,2,0,0,0,0,0,0,
  111.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  112.     {'[',4, 3,2,2,0,0,0,0,0, 3,0,0,0,0,0,0,0, 3,1,1,0,0,0,0,0,
  113.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  114.     {']',4, 2,2,3,0,0,0,0,0, 0,0,3,0,0,0,0,0, 1,1,3,0,0,0,0,0,
  115.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  116.     {'/',6, 0,0,0,0,1,0,0,0, 0,0,1,2,0,0,0,0, 1,2,0,0,0,0,0,0,
  117.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  118.    {'\\',6, 1,0,0,0,0,0,0,0, 0,2,1,0,0,0,0,0, 0,0,0,2,1,0,0,0,
  119.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  120.     {'`',3, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  121.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  122.     {'~',6, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  123.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  124.     {' ',4, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  125.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  126.         };
  127.  
  128.   static struct _b8x5 f2[] = {          /* 7x5 pseudo stencil            */
  129.     {'A',8, 0,3,3,3,3,3,0,0, 3,3,0,0,0,3,3,0, 3,3,6,3,3,3,3,0,
  130.             3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0},
  131.     {'B',8, 3,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 3,3,6,3,3,3,0,0,
  132.             3,3,0,0,0,3,3,0, 3,3,6,3,3,3,0,0},
  133.     {'C',8, 0,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 3,3,0,0,0,0,0,0,
  134.             3,3,0,0,0,3,3,0, 0,3,6,3,3,3,0,0},
  135.     {'D',8, 3,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0,
  136.             3,3,0,0,0,3,3,0, 3,3,6,3,3,3,0,0},
  137.     {'E',8, 3,3,6,3,3,3,3,0, 3,3,0,0,0,0,0,0, 3,3,6,3,3,0,0,0,
  138.             3,3,0,0,0,0,0,0, 3,3,6,3,3,3,3,0},
  139.     {'F',8, 3,3,6,3,3,3,3,0, 3,3,0,0,0,0,0,0, 3,3,6,3,3,0,0,0,
  140.             3,3,0,0,0,0,0,0, 3,3,0,0,0,0,0,0},
  141.     {'G',8, 0,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 3,3,0,0,0,0,0,0,
  142.             3,3,0,0,2,3,3,0, 3,3,6,3,3,3,0,0},
  143.     {'H',8, 3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0, 3,3,6,3,3,3,3,0,
  144.             3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0},
  145.     {'I',6, 3,6,3,3,3,0,0,0, 0,6,3,3,0,0,0,0, 0,6,3,3,0,0,0,0,
  146.             0,6,3,3,0,0,0,0, 3,6,3,3,3,0,0,0},
  147.     {'J',8, 0,0,0,0,0,3,3,0, 0,0,0,0,0,3,3,0, 0,0,0,0,0,3,3,0,
  148.             3,6,0,0,0,3,3,0, 0,6,3,3,3,3,2,0},
  149.     {'K',8, 3,3,0,0,0,3,3,0, 3,3,0,3,3,0,0,0, 3,3,6,3,0,0,0,0,
  150.             3,3,0,3,3,0,0,0, 3,3,0,0,0,3,3,0},
  151.     {'L',8, 3,3,0,0,0,0,0,0, 3,3,0,0,0,0,0,0, 3,3,0,0,0,0,0,0,
  152.             3,3,0,0,0,0,0,0, 3,3,6,3,3,3,3,0},
  153.     {'M',8, 3,3,6,3,3,3,3,0, 3,3,0,3,0,3,3,0, 3,3,0,3,0,3,3,0,
  154.             3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0},
  155.     {'N',7, 3,3,6,3,3,3,0,0, 3,3,0,0,3,3,0,0, 3,3,0,0,3,3,0,0,
  156.             3,3,0,0,3,3,0,0, 3,3,0,0,3,3,0,0},
  157.     {'O',8, 0,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0,
  158.             3,3,0,0,0,3,3,0, 0,3,6,3,3,3,0,0},
  159.     {'P',8, 3,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 3,3,6,3,3,3,0,0,
  160.             3,3,0,0,0,0,0,0, 3,3,0,0,0,0,0,0},
  161.     {'Q',8, 0,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0,
  162.             3,3,0,0,3,3,0,0, 0,3,6,3,3,0,3,0},
  163.     {'R',8, 3,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 3,3,6,3,3,3,0,0,
  164.             3,3,0,3,0,0,0,0, 3,3,0,0,3,3,0,0},
  165.     {'S',8, 3,3,6,3,3,3,3,0, 3,3,0,0,0,0,0,0, 3,3,6,3,3,3,3,0,
  166.             0,0,0,0,0,3,3,0, 3,3,6,3,3,3,3,0},
  167.     {'T',8, 3,3,6,3,3,3,3,0, 0,0,6,3,3,0,0,0, 0,0,6,3,3,0,0,0,
  168.             0,0,6,3,3,0,0,0, 0,0,6,3,3,0,0,0},
  169.     {'U',8, 3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0,
  170.             3,3,0,0,0,3,3,0, 0,3,6,3,3,3,0,0},
  171.     {'V',8, 3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0,
  172.             0,3,6,0,3,3,0,0, 0,0,6,3,3,0,0,0},
  173.     {'W',8, 3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0, 3,3,0,3,0,3,3,0,
  174.             3,3,0,3,0,3,3,0, 0,3,6,3,3,3,0,0},
  175.     {'X',8, 3,3,0,0,0,3,3,0, 0,3,6,0,3,3,0,0, 0,0,6,3,3,0,0,0,
  176.             0,3,6,0,3,3,0,0, 3,3,0,0,0,3,3,0},
  177.     {'Y',8, 3,3,0,0,0,3,3,0, 3,3,0,0,0,3,3,0, 0,3,6,3,3,3,0,0,
  178.             0,0,0,3,3,0,0,0, 0,0,0,3,3,0,0,0},
  179.     {'Z',8, 3,6,3,3,3,3,3,0, 0,0,0,0,3,3,0,0, 0,0,0,3,3,0,0,0,
  180.             0,0,3,3,0,0,0,0, 3,6,3,3,3,3,3,0},
  181.     {'0',8, 0,6,3,3,3,3,0,0, 3,6,0,0,0,3,3,0, 3,6,0,3,0,3,3,0,
  182.             3,6,0,0,0,3,3,0, 0,6,3,3,3,3,0,0},
  183.     {'1',5, 3,3,3,0,0,0,0,0, 0,3,3,0,0,0,0,0, 0,3,3,0,0,0,0,0,
  184.             0,3,3,0,0,0,0,0, 3,3,3,3,0,0,0,0},
  185.     {'2',8, 3,3,6,3,3,3,0,0, 0,0,0,0,3,3,3,0, 3,3,6,3,3,3,0,0,
  186.             3,3,0,0,0,0,0,0, 3,3,6,3,3,3,3,0},
  187.     {'3',8, 0,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 0,0,0,0,3,3,0,0,
  188.             3,3,6,0,0,3,3,0, 0,3,6,3,3,3,0,0},
  189.     {'4',8, 3,3,0,0,3,3,0,0, 3,3,0,0,3,3,0,0, 3,3,6,3,3,3,3,0,
  190.             0,0,0,0,3,3,0,0, 0,0,0,0,3,3,0,0},
  191.     {'5',8, 3,3,6,3,3,3,3,0, 3,3,0,0,0,0,0,0, 3,3,6,3,3,3,0,0,
  192.             0,0,0,0,0,3,3,0, 3,3,6,3,3,3,0,0},
  193.     {'6',8, 0,6,3,3,3,3,0,0, 3,6,0,0,0,0,0,0, 3,6,3,3,3,3,0,0,
  194.             3,6,0,0,0,3,3,0, 0,6,3,3,3,3,0,0},
  195.     {'7',8, 3,6,3,3,3,3,0,0, 0,0,0,0,0,3,3,0, 0,0,0,3,3,0,0,0,
  196.             0,0,3,3,0,0,0,0, 0,0,3,3,0,0,0,0},
  197.     {'8',8, 0,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 0,3,6,3,3,3,0,0,
  198.             3,3,0,0,0,3,3,0, 0,3,6,3,3,3,0,0},
  199.     {'9',8, 0,3,6,3,3,3,0,0, 3,3,0,0,0,3,3,0, 0,3,6,3,3,3,3,0,
  200.             0,0,0,0,0,3,3,0, 0,3,6,3,3,3,3,0},
  201.     {'_',7, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  202.             0,0,0,0,0,0,0,0, 3,6,3,3,3,3,0,0},
  203.     {'*',8, 0,3,0,6,0,3,0,0, 0,0,3,6,3,0,0,0, 3,3,3,0,3,3,3,0,
  204.             0,0,3,6,3,0,0,0, 0,3,0,6,0,3,0,0},
  205.     {'-',5, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 3,6,3,3,0,0,0,0,
  206.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  207.     {'|',3, 3,6,0,0,0,0,0,0, 3,6,0,0,0,0,0,0, 3,6,0,0,0,0,0,0,
  208.             3,6,0,0,0,0,0,0, 3,6,0,0,0,0,0,0},
  209.     {'.',3, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  210.             0,0,0,0,0,0,0,0, 3,6,0,0,0,0,0,0},
  211.     {'(',5, 0,0,6,3,0,0,0,0, 0,3,6,0,0,0,0,0, 3,3,0,0,0,0,0,0,
  212.             0,3,6,0,0,0,0,0, 0,0,6,3,0,0,0,0},
  213.     {')',5, 3,5,0,0,0,0,0,0, 0,5,3,0,0,0,0,0, 0,0,3,3,0,0,0,0,
  214.             0,5,3,0,0,0,0,0, 3,5,0,0,0,0,0,0},
  215.     {'[',4, 3,6,3,0,0,0,0,0, 3,6,0,0,0,0,0,0, 3,6,0,0,0,0,0,0,
  216.             3,6,0,0,0,0,0,0, 3,6,3,0,0,0,0,0},
  217.     {']',4, 3,5,3,0,0,0,0,0, 0,5,3,0,0,0,0,0, 0,5,3,0,0,0,0,0,
  218.             0,5,3,0,0,0,0,0, 3,5,3,0,0,0,0,0},
  219.     {'/',7, 0,0,0,0,3,3,0,0, 0,0,0,3,3,0,0,0, 0,0,6,3,0,0,0,0,
  220.             0,3,6,0,0,0,0,0, 3,3,0,0,0,0,0,0},
  221.    {'\\',7, 3,3,0,0,0,0,0,0, 0,3,6,0,0,0,0,0, 0,0,6,3,0,0,0,0,
  222.             0,0,0,3,3,0,0,0, 0,0,0,0,3,3,0,0},
  223.     {'`',4, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  224.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  225.     {'~',8, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  226.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  227.     {' ',6, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  228.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  229.      };
  230.  
  231.   static struct _b8x5 f3[] = {          /* 7x4 robo-computer font        */
  232.     {'A',8, 0,3,2,2,2,3,0,0, 1,3,1,1,1,3,1,0, 3,3,0,0,0,0,3,0,
  233.             3,3,0,0,0,0,3,0, 0,0,0,0,0,0,0,0},
  234.     {'B',8, 3,2,2,2,2,3,0,0, 3,1,1,1,1,1,3,0, 3,3,0,0,0,0,3,0,
  235.             3,3,1,1,1,1,3,0, 0,0,0,0,0,0,0,0},
  236.     {'C',8, 3,2,2,2,2,2,3,0, 3,1,0,0,0,0,0,0, 3,3,0,0,0,0,0,0,
  237.             3,3,1,1,1,1,3,0, 0,0,0,0,0,0,0,0},
  238.     {'D',8, 3,2,2,2,2,2,3,0, 3,1,0,0,0,0,3,0, 3,3,0,0,0,0,3,0,
  239.             3,3,1,1,1,1,3,0, 0,0,0,0,0,0,0,0},
  240.     {'E',8, 3,2,2,2,2,2,2,0, 3,1,1,1,1,1,1,0, 3,3,0,0,0,0,0,0,
  241.             3,3,1,1,1,1,1,0, 0,0,0,0,0,0,0,0},
  242.     {'F',8, 3,2,2,2,2,2,2,0, 3,1,1,1,1,1,1,0, 3,3,0,0,0,0,0,0,
  243.             3,3,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  244.     {'G',8, 3,2,2,2,2,2,3,0, 3,1,0,0,1,1,1,0, 3,3,0,0,0,0,3,0,
  245.             3,3,1,1,1,1,3,0, 0,0,0,0,0,0,0,0},
  246.     {'H',8, 3,0,0,0,0,0,3,0, 3,1,1,1,1,1,3,0, 3,3,0,0,0,0,3,0,
  247.             3,3,0,0,0,0,3,0, 0,0,0,0,0,0,0,0},
  248.     {'I',5, 0,3,0,0,0,0,0,0, 0,3,1,0,0,0,0,0, 0,3,3,0,0,0,0,0,
  249.             0,3,3,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  250.     {'J',8, 0,0,0,0,0,3,0,0, 0,0,0,0,0,3,1,0, 0,0,0,0,0,3,3,0,
  251.             3,1,1,1,1,3,3,0, 0,0,0,0,0,0,0,0},
  252.     {'K',8, 3,0,0,0,3,0,0,0, 3,1,1,3,1,1,1,0, 3,3,0,0,0,0,3,0,
  253.             3,3,0,0,0,0,3,0, 0,0,0,0,0,0,0,0},
  254.     {'L',8, 3,0,0,0,0,0,0,0, 3,1,0,0,0,0,0,0, 3,3,0,0,0,0,0,0,
  255.             3,3,1,1,1,1,1,0, 0,0,0,0,0,0,0,0},
  256.     {'M',8, 3,2,2,3,2,2,3,0, 3,1,0,3,0,0,3,0, 3,3,0,3,0,0,3,0,
  257.             3,3,0,3,0,0,3,0, 0,0,0,0,0,0,0,0},
  258.     {'N',8, 3,2,2,2,2,2,3,0, 3,1,0,0,0,0,3,0, 3,3,0,0,0,0,3,0,
  259.             3,3,0,0,0,0,3,0, 0,0,0,0,0,0,0,0},
  260.     {'O',8, 3,2,2,2,3,3,3,0, 3,0,0,0,0,2,3,0, 3,0,0,0,0,0,3,0,
  261.             3,1,1,1,1,1,3,0, 0,0,0,0,0,0,0,0},
  262.     {'P',8, 3,2,2,2,2,2,3,0, 3,1,1,1,1,1,3,0, 3,3,0,0,0,0,0,0,
  263.             3,3,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  264.     {'Q',8, 3,2,2,2,2,2,3,0, 3,0,0,0,0,0,3,0, 3,0,0,0,0,0,3,0,
  265.             3,1,1,3,3,3,3,0, 0,0,0,0,0,0,0,0},
  266.     {'R',8, 3,2,2,2,2,3,0,0, 3,1,1,1,1,3,1,0, 3,3,0,0,0,0,3,0,
  267.             3,3,0,0,0,0,3,0, 0,0,0,0,0,0,0,0},
  268.     {'S',8, 3,2,2,2,2,2,3,0, 3,1,1,1,1,1,1,0, 0,0,0,0,0,3,3,0,
  269.             3,1,1,1,1,3,3,0, 0,0,0,0,0,0,0,0},
  270.     {'T',8, 2,2,2,3,2,2,2,0, 0,0,0,3,1,0,0,0, 0,0,0,3,3,0,0,0,
  271.             0,0,0,3,3,0,0,0, 0,0,0,0,0,0,0,0},
  272.     {'U',8, 3,0,0,0,0,0,3,0, 3,1,0,0,0,0,3,0, 3,3,0,0,0,0,3,0,
  273.             3,3,1,1,1,1,3,0, 0,0,0,0,0,0,0,0},
  274.     {'V',8, 3,3,0,0,0,0,3,0, 3,3,0,0,0,1,3,0, 0,3,0,0,0,3,0,0,
  275.             0,3,1,1,1,3,0,0, 0,0,0,0,0,0,0,0},
  276.     {'W',8, 3,0,0,3,0,0,3,0, 3,1,0,3,0,0,3,0, 3,3,0,3,0,0,3,0,
  277.             3,3,1,3,1,1,3,0, 0,0,0,0,0,0,0,0},
  278.     {'X',8, 3,0,0,0,0,0,3,0, 2,1,1,1,1,1,2,0, 3,3,0,0,0,0,3,0,
  279.             3,3,0,0,0,0,3,0, 0,0,0,0,0,0,0,0},
  280.     {'Y',8, 3,0,0,0,0,0,3,0, 3,1,1,1,1,1,3,0, 0,0,0,3,3,0,0,0,
  281.             0,0,0,3,3,0,0,0, 0,0,0,0,0,0,0,0},
  282.     {'Z',8, 2,2,2,2,2,2,3,0, 1,1,1,1,1,1,3,0, 3,3,0,0,0,0,0,0,
  283.             3,3,1,1,1,1,1,0, 0,0,0,0,0,0,0,0},
  284.     {'0',8, 3,2,2,2,2,2,3,0, 3,0,0,0,0,1,3,0, 3,0,0,0,0,3,3,0,
  285.             3,1,1,1,1,3,3,0, 0,0,0,0,0,0,0,0},
  286.     {'1',5, 0,0,3,0,0,0,0,0, 0,1,3,0,0,0,0,0, 0,3,3,0,0,0,0,0,
  287.             0,3,3,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  288.     {'2',8, 3,2,2,2,2,2,3,0, 0,0,0,0,0,0,3,0, 3,3,2,2,2,2,2,0,
  289.             3,3,1,1,1,1,3,0, 0,0,0,0,0,0,0,0},
  290.     {'3',8, 3,2,2,2,2,3,0,0, 0,1,1,1,1,3,1,0, 0,0,0,0,0,3,3,0,
  291.             3,1,1,1,1,3,3,0, 0,0,0,0,0,0,0,0},
  292.     {'4',8, 3,0,0,0,0,3,0,0, 3,0,0,0,0,3,0,0, 3,1,1,1,1,3,1,0,
  293.             0,0,0,0,3,3,0,0, 0,0,0,0,0,0,0,0},
  294.     {'5',8, 3,2,2,2,2,2,2,0, 3,1,1,1,1,1,1,0, 0,0,0,0,0,3,3,0,
  295.             3,1,1,1,1,3,3,0, 0,0,0,0,0,0,0,0},
  296.     {'6',8, 3,2,2,2,2,2,3,0, 3,1,1,1,1,1,1,0, 3,0,0,0,0,3,3,0,
  297.             3,1,1,1,1,3,3,0, 0,0,0,0,0,0,0,0},
  298.     {'7',8, 2,2,2,2,2,2,3,0, 0,0,0,0,0,1,3,0, 0,0,0,0,0,3,3,0,
  299.             0,0,0,0,0,3,3,0, 0,0,0,0,0,0,0,0},
  300.     {'8',8, 0,3,2,2,2,3,0,0, 1,3,1,1,1,3,1,0, 3,0,0,0,0,3,3,0,
  301.             3,1,1,1,1,3,3,0, 0,0,0,0,0,0,0,0},
  302.     {'9',8, 3,2,2,2,2,2,3,0, 3,0,0,0,0,0,3,0, 2,2,2,2,2,3,3,0,
  303.             0,0,0,0,0,3,3,0, 0,0,0,0,0,0,0,0},
  304.     {'_',8, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  305.             1,1,1,1,1,1,1,0, 0,0,0,0,0,0,0,0},
  306.     {'*',8, 2,1,0,3,0,1,2,0, 1,1,3,2,3,1,1,0, 0,1,2,3,2,1,0,0,
  307.             2,0,0,2,0,0,2,0, 0,0,0,0,0,0,0,0},
  308.     {'-',5, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 3,3,3,3,0,0,0,0,
  309.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  310.     {'|',2, 3,0,0,0,0,0,0,0, 3,0,0,0,0,0,0,0, 3,0,0,0,0,0,0,0,
  311.             3,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  312.     {'.',3, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  313.             3,3,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  314.     {'(',4, 0,1,2,0,0,0,0,0, 3,0,0,0,0,0,0,0, 3,0,0,0,0,0,0,0,
  315.             0,2,1,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  316.     {')',4, 2,1,0,0,0,0,0,0, 0,0,3,0,0,0,0,0, 0,0,3,0,0,0,0,0,
  317.             1,2,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  318.     {'[',4, 3,2,2,0,0,0,0,0, 3,0,0,0,0,0,0,0, 3,0,0,0,0,0,0,0,
  319.             3,1,1,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  320.     {']',4, 2,2,3,0,0,0,0,0, 0,0,3,0,0,0,0,0, 0,0,3,0,0,0,0,0,
  321.             1,1,3,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  322.     {'/',5, 0,0,0,3,0,0,0,0, 0,0,3,0,0,0,0,0, 0,3,0,0,0,0,0,0,
  323.             3,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  324.    {'\\',5, 3,0,0,0,0,0,0,0, 0,3,0,0,0,0,0,0, 0,0,3,0,0,0,0,0,
  325.             0,0,0,3,0,0,0,0, 0,0,0,0,0,0,0,0},
  326.     {'`',4, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  327.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  328.     {'~',8, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  329.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  330.     {' ',6, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,
  331.             0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0},
  332.       };
  333.  
  334.   static struct _b8x5 f4[] = {          /* 7x4 reversed video FONT3      */
  335.     {'A',8, 3,2,2,2,2,2,3,3, 3,0,3,3,3,0,3,3, 0,0,1,1,1,1,0,3,
  336.             0,0,3,3,3,3,0,3, 1,1,3,3,3,3,1,3},
  337.     {'B',8, 2,2,2,2,2,2,3,3, 0,3,3,3,3,1,2,3, 0,0,1,1,1,1,0,3,
  338.             0,0,3,3,3,3,0,3, 1,1,1,1,1,1,1,3},
  339.     {'C',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,1,3, 0,0,3,3,3,3,3,3,
  340.             0,0,3,3,3,3,2,3, 1,1,1,1,1,1,1,3},
  341.     {'D',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,0,3, 0,0,3,3,3,3,0,3,
  342.             0,0,3,3,3,3,0,3, 1,1,1,1,1,1,1,3},
  343.     {'E',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,3,3, 0,0,1,1,1,1,1,3,
  344.             0,0,3,3,3,3,3,3, 1,1,1,1,1,1,1,3},
  345.     {'F',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,3,3, 0,0,1,1,1,1,1,3,
  346.             0,0,3,3,3,3,3,3, 1,1,3,3,3,3,3,3},
  347.     {'G',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,1,3, 0,0,3,3,1,1,0,3,
  348.             0,0,3,3,3,3,0,3, 1,1,1,1,1,1,1,3},
  349.     {'H',8, 2,3,3,3,3,3,2,3, 0,3,3,3,3,3,0,3, 0,0,1,1,1,1,0,3,
  350.             0,0,3,3,3,3,0,3, 1,1,3,3,3,3,1,3},
  351.     {'I',5, 3,2,3,3,3,3,3,3, 3,0,3,3,3,3,3,3, 3,0,0,3,3,3,3,3,
  352.             3,0,0,3,3,3,3,3, 3,1,1,3,3,3,3,3},
  353.     {'J',8, 3,3,3,3,3,2,3,3, 3,3,3,3,3,0,3,3, 3,3,3,3,3,0,0,3,
  354.             2,3,3,3,3,0,0,3, 1,1,1,1,1,1,1,3},
  355.     {'K',8, 2,3,3,3,2,3,3,3, 0,3,3,2,1,3,3,3, 0,0,1,1,1,1,0,3,
  356.             0,0,3,3,3,3,0,3, 1,1,3,3,3,3,1,3},
  357.     {'L',8, 2,3,3,3,3,3,3,3, 0,3,3,3,3,3,3,3, 0,0,3,3,3,3,3,3,
  358.             0,0,3,3,3,3,3,3, 1,1,1,1,1,1,1,3},
  359.     {'M',8, 2,2,2,2,2,2,2,3, 0,3,3,0,3,3,0,3, 0,0,3,0,3,3,0,3,
  360.             0,0,3,0,3,3,0,3, 1,1,3,1,3,3,1,3},
  361.     {'N',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,0,3, 0,0,3,3,3,3,0,3,
  362.             0,0,3,3,3,3,0,3, 1,1,3,3,3,3,1,3},
  363.     {'O',8, 2,2,2,2,2,2,2,3, 0,3,3,3,1,0,0,3, 0,3,3,3,3,3,0,3,
  364.             0,3,3,3,3,3,0,3, 1,1,1,1,1,1,1,3},
  365.     {'P',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,0,3, 0,0,1,1,1,1,1,3,
  366.             0,0,3,3,3,3,3,3, 1,1,3,3,3,3,3,3},
  367.     {'Q',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,0,3, 0,3,3,3,3,3,0,3,
  368.             0,3,3,3,2,2,0,3, 1,1,1,1,1,1,1,3},
  369.     {'R',8, 2,2,2,2,2,2,3,3, 0,3,3,3,3,0,3,3, 0,0,1,1,1,1,0,3,
  370.             0,0,3,3,3,3,0,3, 1,1,3,3,3,3,1,3},
  371.     {'S',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,1,3, 1,1,1,1,1,0,0,3,
  372.             2,3,3,3,3,0,0,3, 1,1,1,1,1,1,1,3},
  373.     {'T',8, 2,2,2,2,2,2,2,3, 3,3,3,0,3,3,3,3, 3,3,3,0,0,3,3,3,
  374.             3,3,3,0,0,3,3,3, 3,3,3,1,1,3,3,3},
  375.     {'U',8, 2,3,3,3,3,3,2,3, 0,3,3,3,3,3,0,3, 0,0,3,3,3,3,0,3,
  376.             0,0,3,3,3,3,0,3, 1,1,1,1,1,1,1,3},
  377.     {'V',8, 2,2,3,3,3,3,2,3, 0,0,3,3,3,3,0,3, 1,0,3,3,3,0,1,3,
  378.             3,0,3,3,3,0,3,3, 3,1,1,1,1,1,3,3},
  379.     {'W',8, 2,3,3,2,3,3,2,3, 0,3,3,0,3,3,0,3, 0,0,3,0,3,3,0,3,
  380.             0,0,3,0,3,3,0,3, 1,1,1,1,1,1,1,3},
  381.     {'X',8, 2,3,3,3,3,3,2,3, 0,3,3,3,3,3,0,3, 2,0,1,1,1,1,2,3,
  382.             0,0,3,3,3,3,0,3, 1,1,3,3,3,3,1,3},
  383.     {'Y',8, 2,3,3,3,3,3,2,3, 0,3,3,3,3,3,0,3, 1,1,1,0,0,1,1,3,
  384.             3,3,3,0,0,3,3,3, 3,3,3,1,1,3,3,3},
  385.     {'Z',8, 2,2,2,2,2,2,2,3, 3,3,3,3,3,3,0,3, 0,0,1,1,1,1,1,3,
  386.             0,0,3,3,3,3,3,3, 1,1,1,1,1,1,1,3},
  387.     {'0',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,0,3, 0,3,3,3,3,0,0,3,
  388.             0,3,3,3,3,0,0,3, 1,1,1,1,1,1,1,3},
  389.     {'1',5, 3,3,2,3,3,3,3,3, 3,3,0,3,3,3,3,3, 3,0,0,3,3,3,3,3,
  390.             3,0,0,3,3,3,3,3, 3,1,1,3,3,3,3,3},
  391.     {'2',8, 2,2,2,2,2,2,2,3, 1,3,3,3,3,3,0,3, 2,2,2,2,2,2,0,3,
  392.             0,0,3,3,3,3,2,3, 1,1,1,1,1,1,1,3},
  393.     {'3',8, 2,2,2,2,2,2,3,3, 1,3,3,3,3,0,3,3, 3,1,1,1,1,0,0,3,
  394.             2,3,3,3,3,0,0,3, 1,1,1,1,1,1,1,3},
  395.     {'4',8, 2,3,3,3,3,2,3,3, 0,3,3,3,3,0,3,3, 0,3,3,3,3,0,3,3,
  396.             1,1,1,1,0,0,1,3, 3,3,3,3,1,1,3,3},
  397.     {'5',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,3,3, 1,1,1,1,1,0,0,3,
  398.             2,3,3,3,3,0,0,3, 1,1,1,1,1,1,1,3},
  399.     {'6',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,1,3, 0,1,1,1,1,0,0,3,
  400.             0,3,3,3,3,0,0,3, 1,1,1,1,1,1,1,3},
  401.     {'7',8, 2,2,2,2,2,2,2,3, 3,3,3,3,3,3,0,3, 3,3,3,3,3,0,0,3,
  402.             3,3,3,3,3,0,0,3, 3,3,3,3,3,1,1,3},
  403.     {'8',8, 3,2,2,2,2,2,3,3, 3,0,3,3,3,0,3,3, 0,1,1,1,1,0,0,3,
  404.             0,3,3,3,3,0,0,3, 1,1,1,1,1,1,1,3},
  405.     {'9',8, 2,2,2,2,2,2,2,3, 0,3,3,3,3,3,0,3, 0,2,2,2,2,2,0,3,
  406.             3,3,3,3,3,0,0,3, 3,3,3,3,3,1,1,3},
  407.     {'_',8, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,
  408.             3,3,3,3,3,3,3,3, 1,1,1,1,1,1,1,3},
  409.     {'*',8, 2,3,3,2,3,3,2,3, 3,1,2,0,2,1,3,3, 1,1,0,2,0,1,1,3,
  410.             2,1,3,0,3,1,2,3, 3,3,3,3,3,3,3,3},
  411.     {'-',5, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, 0,0,0,0,3,3,3,3,
  412.             3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3},
  413.     {'|',2, 2,3,3,3,3,3,3,3, 0,3,3,3,3,3,3,3, 0,3,3,3,3,3,3,3,
  414.             0,3,3,3,3,3,3,3, 1,3,3,3,3,3,3,3},
  415.     {'.',3, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,
  416.             2,2,3,3,3,3,3,3, 1,1,3,3,3,3,3,3},
  417.     {'(',4, 3,3,2,3,3,3,3,3, 2,1,3,3,3,3,3,3, 0,3,3,3,3,3,3,3,
  418.             1,2,3,3,3,3,3,3, 3,3,1,3,3,3,3,3},
  419.     {')',4, 2,3,3,3,3,3,3,3, 3,1,2,3,3,3,3,3, 3,3,0,3,3,3,3,3,
  420.             3,2,1,3,3,3,3,3, 1,3,3,3,3,3,3,3},
  421.     {'[',4, 2,2,2,3,3,3,3,3, 0,3,3,3,3,3,3,3, 0,3,3,3,3,3,3,3,
  422.             0,3,3,3,3,3,3,3, 1,1,1,3,3,3,3,3},
  423.     {']',4, 2,2,2,3,3,3,3,3, 3,3,0,3,3,3,3,3, 3,3,0,3,3,3,3,3,
  424.             3,3,0,3,3,3,3,3, 1,1,1,3,3,3,3,3},
  425.     {'/',5, 3,3,3,2,3,3,3,3, 3,3,2,1,3,3,3,3, 3,2,1,3,3,3,3,3,
  426.             2,1,3,3,3,3,3,3, 1,3,3,3,3,3,3,3},
  427.    {'\\',5, 2,3,3,3,3,3,3,3, 1,2,3,3,3,3,3,3, 3,1,2,3,3,3,3,3,
  428.             3,3,1,2,3,3,3,3, 3,3,3,1,3,3,3,3},
  429.     {'`',4, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,
  430.             3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3},
  431.     {'~',8, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,
  432.             3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3},
  433.     {' ',6, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,
  434.             3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3},
  435.       };
  436.  
  437.  
  438.   /* NOTE: the font-table automatically adjusts to the variable number   */
  439.   /*       of elements in the font definition array's!                   */
  440.  
  441. static struct _font_tab {               /* font table structure          */
  442.        short int  k;                    /* (max) number of columns       */
  443.        short int  r;                    /* number of rows (lines)        */
  444.        short int  n;                    /* number of pattern entries     */
  445.        struct _b8x5 *d;                 /* pointer to font definition    */
  446.            } ft[] = {                   /* FONT table                    */
  447.          {0, 0, 0, NULL},               /* FONT0 dummy: suppress title   */
  448.          {6, 3, sizeof(f1)/sizeof(struct _b8x5), f1}, /* FONT1 */
  449.          {8, 5, sizeof(f2)/sizeof(struct _b8x5), f2}, /* FONT2 */
  450.          {8, 4, sizeof(f3)/sizeof(struct _b8x5), f3}, /* FONT3 */
  451.          {8, 5, sizeof(f4)/sizeof(struct _b8x5), f4}, /* FONT4 */
  452.            };
  453.  
  454. /* ===================================================== */
  455. /* Generate string of block-characters (1 part per call) */
  456. /* ===================================================== */
  457. char *strnblk(char  *b,
  458.               short int n,
  459.               short int f,
  460.               short int k)
  461. {
  462.   int  i, j, x ,w;                      /* counters                      */
  463.   static char a[80];                    /* returned line buffer          */
  464.   static char b_array[]  = " ▄▀█░▌▐▒▓"; /* block character elements      */
  465.                                         /* codepage 437, 860, 863, 865   */
  466.   static char pg_multi[] = " ▄▀█░║║▒▓"; /* Code Page 850: Multilingual   */
  467.  
  468.   if (c_info.codepage==850)             /* codepage 850                  */
  469.     strcpy(b_array,pg_multi);           /* suitable blockchars           */
  470.  
  471.   if (f<FONT1 || f>FONT4)               /* check range of selected font  */
  472.     f = FONT2;                          /* reset to default if out of rng*/
  473.  
  474.   if (k<LINE1 || k>ft[f].k-1)           /* check range of LINE           */
  475.     k = LINE1;                          /* prevent addressing violations */
  476.  
  477.   i = 0;                                /* zero count                    */
  478.   w = 1;                                /* width 1: leading char         */
  479.   while (i<n && b[i]!='\0' && w<=sizeof(a)) {   /* limit width of output */
  480.     for (j=0; j<ft[f].n &&
  481.               ft[f].d[j].c!=(char)toupper(b[i]); j++);   /* search char  */
  482.     if (j < ft[f].n) {                  /* found                         */
  483.       if (w + ft[f].d[j].k < sizeof(a)) {    /* would it fit?            */
  484.         w += ft[f].d[j].k;              /* add active columns + 1 blank  */
  485.         ++i;                            /* accept character              */
  486.         }                               /* endif                         */
  487.       else
  488.         n = i;                          /* indicate 'full'               */
  489.       }                                 /* endif                         */
  490.     else {                              /* not found                     */
  491.       if (w + ft[f].k < sizeof(a)) {    /* would dummy fit?              */
  492.         w += ft[f].k;                   /* add max columns + 1 blank     */
  493.         ++i;                            /* accept character              */
  494.         }                               /* endif                         */
  495.       else
  496.         n = i;                          /* indicate 'full'               */
  497.       }                                 /* endif                         */
  498.     }                                   /* endif                         */
  499.   n = i;                                /* maximum # title characters    */
  500.  
  501.   a[0] = b_array[(f==FONT4) ? 3 : 0];   /* leading character             */
  502.   for (i=0,w=1; i<n; ++i) {             /* process string up till n      */
  503.     for (j=0; j<ft[f].n &&
  504.               ft[f].d[j].c!=(char)toupper(b[i]); j++);  /* search        */
  505.     if (j < ft[f].n) {                  /* char found                    */
  506.       a[w++] = b_array[ft[f].d[j].p[k].c0];
  507.       if (ft[f].d[j].k > 1)
  508.         a[w++] = b_array[ft[f].d[j].p[k].c1];
  509.       if (ft[f].d[j].k > 2)
  510.         a[w++] = b_array[ft[f].d[j].p[k].c2];
  511.       if (ft[f].d[j].k > 3)
  512.         a[w++] = b_array[ft[f].d[j].p[k].c3];
  513.       if (ft[f].d[j].k > 4)
  514.         a[w++] = b_array[ft[f].d[j].p[k].c4];
  515.       if (ft[f].d[j].k > 5)
  516.         a[w++] = b_array[ft[f].d[j].p[k].c5];
  517.       if (ft[f].d[j].k > 6)
  518.         a[w++] = b_array[ft[f].d[j].p[k].c6];
  519.       if (ft[f].d[j].k > 7)
  520.         a[w++] = b_array[ft[f].d[j].p[k].c7];
  521.       }
  522.     else {                              /* char not found                */
  523.       --j;                              /* take last character in table  */
  524.       for (x=0; x<ft[f].k; x++)         /* max columns                   */
  525.         a[w++] = b_array[ft[f].d[j].p[0].c0];    /* filler block         */
  526.       }                                 /* endfor                        */
  527.     }                                   /* endfor                        */
  528.   a[(f==FONT4) ? w : w-1] = '\0';       /* end of string                 */
  529.   return(a);                            /* return ptr to outputstring    */
  530.   }
  531.  
  532.  
  533. /* ======================================== */
  534. /* function to insert BLOCK title in report */
  535. /* ======================================== */
  536. void block_title(FILE *pf,              /* output FILE pointer */
  537.                short int n,             /* max length of title string */
  538.                char *prefx,             /* title prefix */
  539.                char *title,             /* title string */
  540.                LISTPARM *ls)            /* pointer to list specs */
  541. {
  542.   unsigned short int i;
  543.  
  544.   for (i=0; i<ft[ls->tfont].r; ++i)     /* all rows */
  545.     fprintf(pf, "%s%s\n", prefx, strnblk(title, n, ls->tfont, i));
  546.   }
  547.  
  548.