home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume24 / gnuplot3 / part03 < prev    next >
Text File  |  1991-10-26  |  49KB  |  863 lines

  1. Newsgroups: comp.sources.misc
  2. From: gershon%gr@cs.utah.edu (Elber Gershon)
  3. Subject:  v24i025:  gnuplot3 - interactive function plotting utility, Part03/26
  4. Message-ID: <1991Oct26.222142.6215@sparky.imd.sterling.com>
  5. X-Md4-Signature: 99337f1dc56139f15d136209caa162e8
  6. Date: Sat, 26 Oct 1991 22:21:42 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: gershon%gr@cs.utah.edu (Elber Gershon)
  10. Posting-number: Volume 24, Issue 25
  11. Archive-name: gnuplot3/part03
  12. Environment: UNIX, MS-DOS, VMS
  13. Supersedes: gnuplot2: Volume 11, Issue 65-79
  14.  
  15. #!/bin/sh
  16. # this is Part.03 (part 3 of a multipart archive)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file gnuplot/help.c continued
  19. #
  20. if test ! -r _shar_seq_.tmp; then
  21.     echo 'Please unpack part 1 first!'
  22.     exit 1
  23. fi
  24. (read Scheck
  25.  if test "$Scheck" != 3; then
  26.     echo Please unpack part "$Scheck" next!
  27.     exit 1
  28.  else
  29.     exit 0
  30.  fi
  31. ) < _shar_seq_.tmp || exit 1
  32. if test ! -f _shar_wnt_.tmp; then
  33.     echo 'x - still skipping gnuplot/help.c'
  34. else
  35. echo 'x - continuing file gnuplot/help.c'
  36. sed 's/^X//' << 'SHAR_EOF' >> 'gnuplot/help.c' &&
  37. X    /* leave room for prompt line */
  38. X    if (pagelines >= SCREENSIZE - 2) {
  39. X       printf("Press return for more: ");
  40. X       do 
  41. X        c = getchar();
  42. X       while (c != EOF && c != '\n');
  43. X       pagelines = 0;
  44. X    }
  45. X    fputs(line, stderr);
  46. X    pagelines++;
  47. }
  48. X
  49. static void
  50. EndOutput()
  51. {
  52. #ifdef unix
  53. X    extern int pclose();
  54. X
  55. X    if (outfile != stderr)
  56. X     (void) pclose(outfile);
  57. #endif
  58. }
  59. X
  60. SHAR_EOF
  61. echo 'File gnuplot/help.c is complete' &&
  62. chmod 0644 gnuplot/help.c ||
  63. echo 'restore of gnuplot/help.c failed'
  64. Wc_c="`wc -c < 'gnuplot/help.c'`"
  65. test 17904 -eq "$Wc_c" ||
  66.     echo 'gnuplot/help.c: original size 17904, current size' "$Wc_c"
  67. rm -f _shar_wnt_.tmp
  68. fi
  69. # ============= gnuplot/bitmap.c ==============
  70. if test -f 'gnuplot/bitmap.c' -a X"$1" != X"-c"; then
  71.     echo 'x - skipping gnuplot/bitmap.c (File already exists)'
  72.     rm -f _shar_wnt_.tmp
  73. else
  74. > _shar_wnt_.tmp
  75. echo 'x - extracting gnuplot/bitmap.c (Text)'
  76. sed 's/^X//' << 'SHAR_EOF' > 'gnuplot/bitmap.c' &&
  77. /* GNUPLOT - bitmap.c */
  78. /*
  79. X * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  80. X *
  81. X * Permission to use, copy, and distribute this software and its
  82. X * documentation for any purpose with or without fee is hereby granted, 
  83. X * provided that the above copyright notice appear in all copies and 
  84. X * that both that copyright notice and this permission notice appear 
  85. X * in supporting documentation.
  86. X *
  87. X * Permission to modify the software is granted, but not the right to
  88. X * distribute the modified code.  Modifications are to be distributed 
  89. X * as patches to released version.
  90. X *  
  91. X * This software is provided "as is" without express or implied warranty.
  92. X * 
  93. X *
  94. X * AUTHORS
  95. X * 
  96. X *   Original Software:
  97. X *     Jyrki Yli-Nokari <jty@intrin.UUCP>
  98. X *     Ronald J. Hartranft <rjh2@ns.cc.lehigh.edu>
  99. X *     Russell Lang <rjl@monu1.cc.monash.edu.au>
  100. X * 
  101. X * Send your comments or suggestions to 
  102. X *  pixar!info-gnuplot@sun.com.
  103. X * This is a mailing list; to join it send a note to 
  104. X *  pixar!info-gnuplot-request@sun.com.  
  105. X * Send bug reports to
  106. X *  pixar!bug-gnuplot@sun.com.
  107. X */
  108. X
  109. /*
  110. ** General raster plotting routines.
  111. ** Raster routines written and copyrighted 1987 by
  112. ** Jyrki Yli-Nokari (jty@intrin.UUCP)
  113. ** Intrinsic, Ltd.
  114. **
  115. ** You may use this code for anything you like as long as
  116. ** you are not selling it and the credit is given and
  117. ** this message retained.
  118. **
  119. */
  120. X
  121. /* Bitmap plotting routines derived from above raster plotting routines
  122. X * Russell Lang, 1990
  123. X */
  124. X
  125. #include <stdio.h>
  126. #include "plot.h"
  127. #include "bitmap.h"
  128. X
  129. bitmap *b_p = (bitmap *)NULL;    /* global pointer to bitmap */
  130. unsigned int b_currx, b_curry;    /* the current coordinates */
  131. unsigned int b_xsize, b_ysize;    /* the size of the bitmap */
  132. unsigned int b_planes;            /* number of color planes */
  133. unsigned int b_psize;            /* size of each plane */
  134. unsigned int b_rastermode;        /* raster mode rotates -90deg */
  135. unsigned int b_linemask = 0xffff;    /* 16 bit mask for dotted lines */
  136. unsigned int b_value = 1;        /* colour of lines */
  137. unsigned int b_hchar;            /* width of characters */
  138. unsigned int b_hbits;            /* actual bits in char horizontally */
  139. unsigned int b_vchar;            /* height of characters */
  140. unsigned int b_vbits;            /* actual bits in char vertically */
  141. unsigned int b_angle;            /* rotation of text */
  142. char_box b_font[FNT_CHARS];        /* the current font */
  143. unsigned int b_pattern[] = {0xffff, 0x1111,
  144. X    0xffff, 0x5555, 0x3333, 0x7777, 0x3f3f, 0x0f0f, 0x5f5f};
  145. int b_maskcount = 0;
  146. unsigned int b_lastx, b_lasty;    /* last pixel set - used by b_line */
  147. X
  148. #define IN(i,size)  ((unsigned)i < (unsigned)size)
  149. X
  150. /* 5x9 font, bottom row first, left pixel in lsb */
  151. char_row fnt5x9[FNT_CHARS][FNT5X9_VBITS] = {
  152. X  /* */  {000000,000000,000000,000000,000000,000000,000000,000000,000000},
  153. X  /*!*/  {000000,000000,0x0004,000000,0x0004,0x0004,0x0004,0x0004,0x0004},
  154. X  /*"*/  {000000,000000,000000,000000,000000,000000,0x000a,0x000a,0x000a},
  155. X  /*#*/  {000000,000000,0x000a,0x000a,0x001f,0x000a,0x001f,0x000a,0x000a},
  156. X  /*$*/  {000000,000000,0x0004,0x000f,0x0014,0x000e,0x0005,0x001e,0x0004},
  157. X  /*%*/  {000000,000000,0x0018,0x0019,0x0002,0x0004,0x0008,0x0013,0x0003},
  158. X  /*&*/  {000000,000000,0x0016,0x0009,0x0015,0x0002,0x0005,0x0005,0x0002},
  159. X  /*'*/  {000000,000000,000000,000000,000000,0x0002,0x0004,0x0006,0x0006},
  160. X  /*(*/  {000000,000000,0x0008,0x0004,0x0002,0x0002,0x0002,0x0004,0x0008},
  161. X  /*)*/  {000000,000000,0x0002,0x0004,0x0008,0x0008,0x0008,0x0004,0x0002},
  162. X  /***/  {000000,000000,0x0004,0x0015,0x000e,0x001f,0x000e,0x0015,0x0004},
  163. X  /*+*/  {000000,000000,000000,0x0004,0x0004,0x001f,0x0004,0x0004,000000},
  164. X  /*,*/  {000000,0x0002,0x0004,0x0006,0x0006,000000,000000,000000,000000},
  165. X  /*-*/  {000000,000000,000000,000000,000000,0x001f,000000,000000,000000},
  166. X  /*.*/  {000000,000000,0x0006,0x0006,000000,000000,000000,000000,000000},
  167. X  /*-/-*/{000000,000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,000000},
  168. X  /*0*/  {000000,000000,0x000e,0x0011,0x0013,0x0015,0x0019,0x0011,0x000e},
  169. X  /*1*/  {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0006,0x0004},
  170. X  /*2*/  {000000,000000,0x001f,0x0001,0x0001,0x000e,0x0010,0x0011,0x000e},
  171. X  /*3*/  {000000,000000,0x000e,0x0011,0x0010,0x000c,0x0010,0x0011,0x000e},
  172. X  /*4*/  {000000,000000,0x0008,0x0008,0x001f,0x0009,0x000a,0x000c,0x0008},
  173. X  /*5*/  {000000,000000,0x000e,0x0011,0x0010,0x0010,0x000f,0x0001,0x001f},
  174. X  /*6*/  {000000,000000,0x000e,0x0011,0x0011,0x000f,0x0001,0x0002,0x000c},
  175. X  /*7*/  {000000,000000,0x0001,0x0001,0x0002,0x0004,0x0008,0x0010,0x001f},
  176. X  /*8*/  {000000,000000,0x000e,0x0011,0x0011,0x000e,0x0011,0x0011,0x000e},
  177. X  /*9*/  {000000,000000,0x0006,0x0008,0x0010,0x001e,0x0011,0x0011,0x000e},
  178. X  /*:*/  {000000,000000,000000,0x0006,0x0006,000000,0x0006,0x0006,000000},
  179. X  /*;*/  {000000,0x0001,0x0002,0x0006,0x0006,000000,0x0006,0x0006,000000},
  180. X  /*<*/  {000000,000000,0x0008,0x0004,0x0002,0x0001,0x0002,0x0004,0x0008},
  181. X  /*=*/  {000000,000000,000000,000000,0x001f,000000,0x001f,000000,000000},
  182. X  /*>*/  {000000,000000,0x0002,0x0004,0x0008,0x0010,0x0008,0x0004,0x0002},
  183. X  /*?*/  {000000,000000,0x0004,000000,0x0004,0x0008,0x0010,0x0011,0x000e},
  184. X  /*@*/  {000000,000000,0x000e,0x0015,0x0015,0x0016,0x0010,0x0011,0x000e},
  185. X  /*A*/  {000000,000000,0x0011,0x0011,0x001f,0x0011,0x0011,0x000a,0x0004},
  186. X  /*B*/  {000000,000000,0x000f,0x0012,0x0012,0x000e,0x0012,0x0012,0x000f},
  187. X  /*C*/  {000000,000000,0x000e,0x0011,0x0001,0x0001,0x0001,0x0011,0x000e},
  188. X  /*D*/  {000000,000000,0x000f,0x0012,0x0012,0x0012,0x0012,0x0012,0x000f},
  189. X  /*E*/  {000000,000000,0x001f,0x0001,0x0001,0x0007,0x0001,0x0001,0x001f},
  190. X  /*F*/  {000000,000000,0x0001,0x0001,0x0001,0x0007,0x0001,0x0001,0x001f},
  191. X  /*G*/  {000000,000000,0x001e,0x0011,0x0011,0x0019,0x0001,0x0001,0x001e},
  192. X  /*H*/  {000000,000000,0x0011,0x0011,0x0011,0x001f,0x0011,0x0011,0x0011},
  193. X  /*I*/  {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0004,0x000e},
  194. X  /*J*/  {000000,000000,0x000e,0x0011,0x0010,0x0010,0x0010,0x0010,0x0010},
  195. X  /*K*/  {000000,000000,0x0011,0x0009,0x0005,0x0003,0x0005,0x0009,0x0011},
  196. X  /*L*/  {000000,000000,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001},
  197. X  /*M*/  {000000,000000,0x0011,0x0011,0x0011,0x0015,0x0015,0x001b,0x0011},
  198. X  /*N*/  {000000,000000,0x0011,0x0011,0x0011,0x0019,0x0015,0x0013,0x0011},
  199. X  /*O*/  {000000,000000,0x000e,0x0011,0x0011,0x0011,0x0011,0x0011,0x000e},
  200. X  /*P*/  {000000,000000,0x0001,0x0001,0x0001,0x000f,0x0011,0x0011,0x000f},
  201. X  /*Q*/  {000000,0x0018,0x000e,0x0015,0x0011,0x0011,0x0011,0x0011,0x000e},
  202. X  /*R*/  {000000,000000,0x0011,0x0009,0x0005,0x000f,0x0011,0x0011,0x000f},
  203. X  /*S*/  {000000,000000,0x000e,0x0011,0x0010,0x000e,0x0001,0x0011,0x000e},
  204. X  /*T*/  {000000,000000,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x001f},
  205. X  /*U*/  {000000,000000,0x000e,0x0011,0x0011,0x0011,0x0011,0x0011,0x0011},
  206. X  /*V*/  {000000,000000,0x0004,0x0004,0x000a,0x000a,0x0011,0x0011,0x0011},
  207. X  /*W*/  {000000,000000,0x0011,0x001b,0x0015,0x0011,0x0011,0x0011,0x0011},
  208. X  /*X*/  {000000,000000,0x0011,0x0011,0x000a,0x0004,0x000a,0x0011,0x0011},
  209. X  /*Y*/  {000000,000000,0x0004,0x0004,0x0004,0x0004,0x000a,0x0011,0x0011},
  210. X  /*Z*/  {000000,000000,0x001f,0x0001,0x0002,0x0004,0x0008,0x0010,0x001f},
  211. X  /*[*/  {000000,000000,0x000e,0x0002,0x0002,0x0002,0x0002,0x0002,0x000e},
  212. X  /*\*/  {000000,000000,000000,0x0010,0x0008,0x0004,0x0002,0x0001,000000},
  213. X  /*]*/  {000000,000000,0x000e,0x0008,0x0008,0x0008,0x0008,0x0008,0x000e},
  214. X  /*^*/  {000000,000000,000000,000000,000000,000000,0x0011,0x000a,0x0004},
  215. X  /*_*/  {000000,000000,0x001f,000000,000000,000000,000000,000000,000000},
  216. X  /*`*/  {000000,000000,000000,000000,000000,0x0008,0x0004,0x000c,0x000c},
  217. X  /*a*/  {000000,000000,0x001e,0x0011,0x001e,0x0010,0x000e,000000,000000},
  218. X  /*b*/  {000000,000000,0x000d,0x0013,0x0011,0x0013,0x000d,0x0001,0x0001},
  219. X  /*c*/  {000000,000000,0x000e,0x0011,0x0001,0x0011,0x000e,000000,000000},
  220. X  /*d*/  {000000,000000,0x0016,0x0019,0x0011,0x0019,0x0016,0x0010,0x0010},
  221. X  /*e*/  {000000,000000,0x000e,0x0001,0x001f,0x0011,0x000e,000000,000000},
  222. X  /*f*/  {000000,000000,0x0004,0x0004,0x0004,0x000e,0x0004,0x0014,0x0008},
  223. X  /*g*/  {0x000e,0x0011,0x0016,0x0019,0x0011,0x0019,0x0016,000000,000000},
  224. X  /*h*/  {000000,000000,0x0011,0x0011,0x0011,0x0013,0x000d,0x0001,0x0001},
  225. X  /*i*/  {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0006,000000,0x0004},
  226. X  /*j*/  {0x0006,0x0009,0x0008,0x0008,0x0008,0x0008,0x000c,000000,0x0008},
  227. X  /*k*/  {000000,000000,0x0009,0x0005,0x0003,0x0005,0x0009,0x0001,0x0001},
  228. X  /*l*/  {000000,000000,0x000e,0x0004,0x0004,0x0004,0x0004,0x0004,0x0006},
  229. X  /*m*/  {000000,000000,0x0015,0x0015,0x0015,0x0015,0x000b,000000,000000},
  230. X  /*n*/  {000000,000000,0x0011,0x0011,0x0011,0x0013,0x000d,000000,000000},
  231. X  /*o*/  {000000,000000,0x000e,0x0011,0x0011,0x0011,0x000e,000000,000000},
  232. X  /*p*/  {0x0001,0x0001,0x000d,0x0013,0x0011,0x0013,0x000d,000000,000000},
  233. X  /*q*/  {0x0010,0x0010,0x0016,0x0019,0x0011,0x0019,0x0016,000000,000000},
  234. X  /*r*/  {000000,000000,0x0001,0x0001,0x0001,0x0013,0x000d,000000,000000},
  235. X  /*s*/  {000000,000000,0x000f,0x0010,0x000e,0x0001,0x001e,000000,000000},
  236. X  /*t*/  {000000,000000,0x0008,0x0014,0x0004,0x0004,0x001f,0x0004,0x0004},
  237. X  /*u*/  {000000,000000,0x0016,0x0019,0x0011,0x0011,0x0011,000000,000000},
  238. X  /*v*/  {000000,000000,0x0004,0x000a,0x0011,0x0011,0x0011,000000,000000},
  239. X  /*w*/  {000000,000000,0x000a,0x0015,0x0015,0x0011,0x0011,000000,000000},
  240. X  /*x*/  {000000,000000,0x0011,0x000a,0x0004,0x000a,0x0011,000000,000000},
  241. X  /*y*/  {0x000e,0x0010,0x001e,0x0011,0x0011,0x0011,0x0011,000000,000000},
  242. X  /*z*/  {000000,000000,0x001f,0x0002,0x0004,0x0008,0x001f,000000,000000},
  243. X  /*{*/  {000000,000000,0x0008,0x0004,0x0004,0x0002,0x0004,0x0004,0x0008},
  244. X  /*|*/  {000000,000000,0x0004,0x0004,0x0004,000000,0x0004,0x0004,0x0004},
  245. X  /*}*/  {000000,000000,0x0002,0x0004,0x0004,0x0008,0x0004,0x0004,0x0002},
  246. X  /*~*/  {000000,000000,000000,000000,000000,000000,0x0008,0x0015,0x0002},
  247. X  /*DEL*/{000000,000000,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f},
  248. };
  249. X
  250. /* 9x17 font, bottom row first, left pixel in lsb */
  251. char_row fnt9x17[FNT_CHARS][FNT9X17_VBITS] = {
  252. X  /* */  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  253. X          000000,000000,000000,000000,000000,000000,000000,000000},
  254. X  /*!*/  {000000,000000,000000,000000,0x0010,000000,000000,000000,0x0010,
  255. X          0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010},
  256. X  /*"*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  257. X          000000,000000,000000,0x0044,0x0044,0x0044,0x0044,0x0044},
  258. X  /*#*/  {000000,000000,000000,000000,0x0044,0x0044,0x0044,0x0044,0x01ff,
  259. X          0x0044,0x0044,0x0044,0x01ff,0x0044,0x0044,0x0044,0x0044},
  260. X  /*$*/  {000000,000000,000000,000000,0x0010,0x0010,0x007e,0x0091,0x0110,
  261. X          0x0090,0x007c,0x0012,0x0011,0x0112,0x00fc,0x0010,0x0010},
  262. X  /*%*/  {000000,000000,000000,000000,0x0080,0x0141,0x0081,0x0002,0x0004,
  263. X          0x0008,0x0010,0x0020,0x0040,0x0080,0x0102,0x0105,0x0002},
  264. X  /*&*/  {000000,000000,000000,000000,0x011c,0x00a2,0x0041,0x00c1,0x0141,
  265. X          0x0022,0x001c,0x0014,0x0022,0x0022,0x001c,000000,000000},
  266. X  /*'*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  267. X          000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010},
  268. X  /*(*/  {000000,000000,000000,000000,0x0040,0x0020,0x0010,0x0008,0x0008,
  269. X          0x0004,0x0004,0x0004,0x0008,0x0008,0x0010,0x0020,0x0040},
  270. X  /*)*/  {000000,000000,000000,000000,0x0004,0x0008,0x0010,0x0020,0x0020,
  271. X          0x0040,0x0040,0x0040,0x0020,0x0020,0x0010,0x0008,0x0004},
  272. X  /***/  {000000,000000,000000,000000,0x0010,0x0010,0x0111,0x0092,0x0054,
  273. X          0x0038,0x01ff,0x0038,0x0054,0x0092,0x0111,0x0010,0x0010},
  274. X  /*+*/  {000000,000000,000000,000000,000000,000000,0x0010,0x0010,0x0010,
  275. X          0x0010,0x01ff,0x0010,0x0010,0x0010,0x0010,000000,000000},
  276. X  /*,*/  {000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010,000000,
  277. X          000000,000000,000000,000000,000000,000000,000000,000000},
  278. X  /*-*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  279. X          000000,0x01ff,000000,000000,000000,000000,000000,000000},
  280. X  /*.*/  {000000,000000,000000,000000,0x0010,0x0038,0x0010,000000,000000,
  281. X          000000,000000,000000,000000,000000,000000,000000,000000},
  282. X  /*-/-*/{000000,000000,000000,000000,000000,000000,0x0001,0x0002,0x0004,
  283. X          0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,000000,000000},
  284. X  /*0*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0103,0x0105,
  285. X          0x0109,0x0111,0x0121,0x0141,0x0181,0x0101,0x0082,0x007c},
  286. X  /*1*/  {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010,
  287. X          0x0010,0x0010,0x0010,0x0010,0x0010,0x001c,0x0018,0x0010},
  288. X  /*2*/  {000000,000000,000000,000000,0x01ff,0x0001,0x0001,0x0001,0x0001,
  289. X          0x0002,0x007c,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c},
  290. X  /*3*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100,
  291. X          0x0080,0x0078,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c},
  292. X  /*4*/  {000000,000000,000000,000000,0x0040,0x0040,0x0040,0x0040,0x0040,
  293. X          0x01ff,0x0041,0x0042,0x0044,0x0048,0x0050,0x0060,0x0040},
  294. X  /*5*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100,
  295. X          0x0100,0x0080,0x007f,0x0001,0x0001,0x0001,0x0001,0x01ff},
  296. X  /*6*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101,
  297. X          0x0081,0x007f,0x0001,0x0001,0x0001,0x0002,0x0084,0x0078},
  298. X  /*7*/  {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0002,0x0004,
  299. X          0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0100,0x01ff},
  300. X  /*8*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101,
  301. X          0x0082,0x007c,0x0082,0x0101,0x0101,0x0101,0x0082,0x007c},
  302. X  /*9*/  {000000,000000,000000,000000,0x001c,0x0022,0x0040,0x0080,0x0100,
  303. X          0x0100,0x01fc,0x0102,0x0101,0x0101,0x0101,0x0082,0x007c},
  304. X  /*:*/  {000000,000000,000000,000000,000000,000000,0x0010,0x0038,0x0010,
  305. X          000000,000000,000000,0x0010,0x0038,0x0010,000000,000000},
  306. X  /*;*/  {000000,000000,000000,0x0004,0x0008,0x0010,0x0030,0x0038,0x0010,
  307. X          000000,000000,000000,0x0010,0x0038,0x0010,000000,000000},
  308. X  /*<*/  {000000,000000,000000,000000,0x0040,0x0020,0x0010,0x0008,0x0004,
  309. X          0x0002,0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040},
  310. X  /*=*/  {000000,000000,000000,000000,000000,000000,000000,000000,0x01ff,
  311. X          000000,000000,000000,0x01ff,000000,000000,000000,000000},
  312. X  /*>*/  {000000,000000,000000,000000,0x0004,0x0008,0x0010,0x0020,0x0040,
  313. X          0x0080,0x0100,0x0080,0x0040,0x0020,0x0010,0x0008,0x0004},
  314. X  /*?*/  {000000,000000,000000,0x0010,0x0038,0x0010,000000,0x0010,0x0010,
  315. X          0x0020,0x0040,0x0080,0x0100,0x0100,0x0101,0x0082,0x007c},
  316. X  /*@*/  {000000,000000,000000,000000,0x007c,0x0002,0x0001,0x01f9,0x0145,
  317. X          0x0145,0x0145,0x0179,0x0101,0x0101,0x0101,0x0082,0x007c},
  318. X  /*A*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x01ff,
  319. X          0x0101,0x0082,0x0082,0x0044,0x0044,0x0028,0x0028,0x0010},
  320. X  /*B*/  {000000,000000,000000,000000,0x007f,0x0084,0x0104,0x0104,0x0104,
  321. X          0x0084,0x007c,0x0084,0x0104,0x0104,0x0104,0x0084,0x007f},
  322. X  /*C*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0001,0x0001,
  323. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0101,0x0082,0x007c},
  324. X  /*D*/  {000000,000000,000000,000000,0x007f,0x0084,0x0104,0x0104,0x0104,
  325. X          0x0104,0x0104,0x0104,0x0104,0x0104,0x0104,0x0084,0x007f},
  326. X  /*E*/  {000000,000000,000000,000000,0x01ff,0x0001,0x0001,0x0001,0x0001,
  327. X          0x0001,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x01ff},
  328. X  /*F*/  {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001,
  329. X          0x0001,0x001f,0x0001,0x0001,0x0001,0x0001,0x0001,0x01ff},
  330. X  /*G*/  {000000,000000,000000,000000,0x00fc,0x0102,0x0101,0x0101,0x0101,
  331. X          0x0101,0x01c1,0x0001,0x0001,0x0001,0x0001,0x0102,0x00fc},
  332. X  /*H*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101,
  333. X          0x0101,0x01ff,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101},
  334. X  /*I*/  {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010,
  335. X          0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x007c},
  336. X  /*J*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100,
  337. X          0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0100,0x0180},
  338. X  /*K*/  {000000,000000,000000,000000,0x0101,0x0081,0x0041,0x0021,0x0011,
  339. X          0x0009,0x0005,0x000b,0x0011,0x0021,0x0041,0x0081,0x0101},
  340. X  /*L*/  {000000,000000,000000,000000,0x01ff,0x0101,0x0001,0x0001,0x0001,
  341. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001},
  342. X  /*M*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101,
  343. X          0x0101,0x0111,0x0111,0x0129,0x0145,0x0145,0x0183,0x0101},
  344. X  /*N*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0181,0x0141,
  345. X          0x0141,0x0121,0x0111,0x0109,0x0105,0x0105,0x0103,0x0101},
  346. X  /*O*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101,
  347. X          0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0082,0x007c},
  348. X  /*P*/  {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001,
  349. X          0x0001,0x007f,0x0081,0x0101,0x0101,0x0101,0x0081,0x007f},
  350. X  /*Q*/  {000000,000000,0x0180,0x0040,0x007c,0x0092,0x0101,0x0101,0x0101,
  351. X          0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0082,0x007c},
  352. X  /*R*/  {000000,000000,000000,000000,0x0101,0x0081,0x0041,0x0021,0x0011,
  353. X          0x0009,0x007f,0x0081,0x0101,0x0101,0x0101,0x0081,0x007f},
  354. X  /*S*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0100,0x0100,
  355. X          0x0080,0x007c,0x0002,0x0001,0x0001,0x0101,0x0082,0x007c},
  356. X  /*T*/  {000000,000000,000000,000000,0x0038,0x0010,0x0010,0x0010,0x0010,
  357. X          0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0111,0x01ff},
  358. X  /*U*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101,
  359. X          0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101},
  360. X  /*V*/  {000000,000000,000000,000000,0x0010,0x0010,0x0028,0x0028,0x0044,
  361. X          0x0044,0x0082,0x0082,0x0101,0x0101,0x0101,0x0101,0x0101},
  362. X  /*W*/  {000000,000000,000000,000000,0x0101,0x0183,0x0145,0x0145,0x0129,
  363. X          0x0111,0x0111,0x0101,0x0101,0x0101,0x0101,0x0101,0x0101},
  364. X  /*X*/  {000000,000000,000000,000000,0x0101,0x0101,0x0082,0x0082,0x0044,
  365. X          0x0028,0x0010,0x0028,0x0044,0x0082,0x0082,0x0101,0x0101},
  366. X  /*Y*/  {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010,
  367. X          0x0010,0x0010,0x0028,0x0044,0x0082,0x0082,0x0101,0x0101},
  368. X  /*Z*/  {000000,000000,000000,000000,0x01ff,0x0001,0x0002,0x0002,0x0004,
  369. X          0x0008,0x0010,0x0020,0x0040,0x0080,0x0080,0x0100,0x01ff},
  370. X  /*[*/  {000000,000000,000000,000000,0x007c,0x0004,0x0004,0x0004,0x0004,
  371. X          0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004,0x007c},
  372. X  /*\*/  {000000,000000,000000,000000,000000,000000,0x0100,0x0080,0x0040,
  373. X          0x0020,0x0010,0x0008,0x0004,0x0002,0x0001,000000,000000},
  374. X  /*]*/  {000000,000000,000000,000000,0x007c,0x0040,0x0040,0x0040,0x0040,
  375. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x007c},
  376. X  /*^*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  377. X          000000,000000,000000,0x0101,0x0082,0x0044,0x0028,0x0010},
  378. X  /*_*/  {000000,000000,000000,000000,0x01ff,000000,000000,000000,000000,
  379. X          000000,000000,000000,000000,000000,000000,000000,000000},
  380. X  /*`*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  381. X          000000,000000,0x0020,0x0010,0x0008,0x000c,0x001c,0x0008},
  382. X  /*a*/  {000000,000000,000000,000000,0x03fc,0x0102,0x0101,0x0102,0x01fc,
  383. X          0x0100,0x0100,0x0080,0x007c,000000,000000,000000,000000},
  384. X  /*b*/  {000000,000000,000000,000000,0x007d,0x0083,0x0101,0x0101,0x0101,
  385. X          0x0101,0x0101,0x0083,0x007d,0x0001,0x0001,0x0001,0x0001},
  386. X  /*c*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0001,0x0001,
  387. X          0x0001,0x0101,0x0082,0x007c,000000,000000,000000,000000},
  388. X  /*d*/  {000000,000000,000000,000000,0x017c,0x0182,0x0101,0x0101,0x0101,
  389. X          0x0101,0x0101,0x0182,0x017c,0x0100,0x0100,0x0100,0x0100},
  390. X  /*e*/  {000000,000000,000000,000000,0x007c,0x0002,0x0001,0x0001,0x01ff,
  391. X          0x0101,0x0101,0x0082,0x007c,000000,000000,000000,000000},
  392. X  /*f*/  {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010,
  393. X          0x0010,0x007c,0x0010,0x0010,0x0010,0x0110,0x00a0,0x0040},
  394. X  /*g*/  {0x007c,0x0082,0x0101,0x0100,0x017c,0x0182,0x0101,0x0101,0x0101,
  395. X          0x0101,0x0101,0x0182,0x017c,000000,000000,000000,000000},
  396. X  /*h*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101,
  397. X          0x0103,0x0103,0x0085,0x0079,0x0001,0x0001,0x0001,0x0001},
  398. X  /*i*/  {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010,
  399. X          0x0010,0x0010,0x0018,000000,000000,0x0018,0x0018,000000},
  400. X  /*j*/  {0x003c,0x0042,0x0081,0x0080,0x0080,0x0080,0x0080,0x0080,0x0080,
  401. X          0x0080,0x0080,0x00c0,000000,000000,0x00c0,0x00c0,000000},
  402. X  /*k*/  {000000,000000,000000,000000,0x0082,0x0042,0x0022,0x0012,0x000a,
  403. X          0x0016,0x0022,0x0042,0x0002,0x0002,0x0002,0x0002,0x0002},
  404. X  /*l*/  {000000,000000,000000,000000,0x007c,0x0010,0x0010,0x0010,0x0010,
  405. X          0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x0010,0x001c},
  406. X  /*m*/  {000000,000000,000000,000000,0x0111,0x0111,0x0111,0x0111,0x0111,
  407. X          0x0111,0x0111,0x00ab,0x0045,000000,000000,000000,000000},
  408. X  /*n*/  {000000,000000,000000,000000,0x0101,0x0101,0x0101,0x0101,0x0101,
  409. X          0x0101,0x0101,0x0083,0x007d,000000,000000,000000,000000},
  410. X  /*o*/  {000000,000000,000000,000000,0x007c,0x0082,0x0101,0x0101,0x0101,
  411. X          0x0101,0x0101,0x0082,0x007c,000000,000000,000000,000000},
  412. X  /*p*/  {0x0001,0x0001,0x0001,0x0001,0x007d,0x0003,0x0081,0x0101,0x0101,
  413. X          0x0101,0x0101,0x0083,0x007d,000000,000000,000000,000000},
  414. X  /*q*/  {0x0100,0x0100,0x0100,0x0100,0x017c,0x0182,0x0101,0x0101,0x0101,
  415. X          0x0101,0x0101,0x0182,0x017c,000000,000000,000000,000000},
  416. X  /*r*/  {000000,000000,000000,000000,0x0001,0x0001,0x0001,0x0001,0x0001,
  417. X          0x0001,0x0103,0x0085,0x0079,000000,000000,000000,000000},
  418. X  /*s*/  {000000,000000,000000,000000,0x007e,0x0081,0x0100,0x0080,0x007c,
  419. X          0x0002,0x0001,0x0102,0x00fc,000000,000000,000000,000000},
  420. X  /*t*/  {000000,000000,000000,000000,0x0040,0x00a0,0x0110,0x0010,0x0010,
  421. X          0x0010,0x0010,0x0010,0x00fe,0x0010,0x0010,0x0010,0x0010},
  422. X  /*u*/  {000000,000000,000000,000000,0x013c,0x0142,0x0181,0x0101,0x0101,
  423. X          0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000},
  424. X  /*v*/  {000000,000000,000000,000000,0x0010,0x0028,0x0044,0x0082,0x0101,
  425. X          0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000},
  426. X  /*w*/  {000000,000000,000000,000000,0x0044,0x00aa,0x0111,0x0111,0x0101,
  427. X          0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000},
  428. X  /*x*/  {000000,000000,000000,000000,0x0101,0x0082,0x0044,0x0028,0x0010,
  429. X          0x0028,0x0044,0x0082,0x0101,000000,000000,000000,000000},
  430. X  /*y*/  {0x007c,0x0082,0x0101,0x0100,0x0100,0x01fc,0x0102,0x0101,0x0101,
  431. X          0x0101,0x0101,0x0101,0x0101,000000,000000,000000,000000},
  432. X  /*z*/  {000000,000000,000000,000000,0x01ff,0x0002,0x0004,0x0008,0x0010,
  433. X          0x0020,0x0040,0x0080,0x01ff,000000,000000,000000,000000},
  434. X  /*{*/  {000000,000000,000000,000000,0x00c0,0x0020,0x0010,0x0010,0x0010,
  435. X          0x0008,0x0004,0x0008,0x0010,0x0010,0x0010,0x0020,0x00c0},
  436. X  /*|*/  {000000,000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010,
  437. X          000000,000000,000000,0x0010,0x0010,0x0010,0x0010,0x0010},
  438. X  /*}*/  {000000,000000,000000,000000,0x0006,0x0008,0x0010,0x0010,0x0010,
  439. X          0x0020,0x0040,0x0020,0x0010,0x0010,0x0010,0x0008,0x0006},
  440. X  /*~*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  441. X          000000,000000,000000,0x0040,0x00a0,0x0111,0x000a,0x0004},
  442. X  /*DEL*/{000000,000000,000000,000000,0x0155,000000,0x0155,000000,0x0155,
  443. X          000000,0x0155,000000,0x0155,000000,0x0155,000000,0x0155},
  444. };
  445. X
  446. /* 13x25 font, bottom row first, left pixel in lsb */
  447. char_row fnt13x25[FNT_CHARS][FNT13X25_VBITS] = {
  448. X  /* */  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  449. X          000000,000000,000000,000000,000000,000000,000000,000000,000000,
  450. X          000000,000000,000000,000000,000000,000000,000000},
  451. X  /*!*/  {000000,000000,000000,000000,000000,0x00e0,0x00e0,0x00e0,000000,
  452. X          000000,000000,0x0040,0x0040,0x0040,0x0040,0x0040,0x00e0,0x00e0,
  453. X          0x00e0,0x00e0,0x00e0,0x00e0,0x00e0,0x00e0,0x0040},
  454. X  /*"*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  455. X          000000,000000,000000,000000,000000,000000,000000,000000,000000,
  456. X          0x0208,0x0208,0x0208,0x0208,0x0208,0x0208,0x0208},
  457. X  /*#*/  {000000,000000,000000,000000,000000,000000,0x0208,0x0208,0x0208,
  458. X          0x0208,0x0208,0x0208,0x1fff,0x0208,0x0208,0x0208,0x0208,0x0208,
  459. X          0x1fff,0x0208,0x0208,0x0208,0x0208,0x0208,0x0208},
  460. X  /*$*/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040,
  461. X          0x03f8,0x0444,0x0842,0x0840,0x0840,0x0440,0x03f8,0x0044,0x0042,
  462. X          0x0042,0x0842,0x0444,0x03f8,0x0040,0x0040,0x0040},
  463. X  /*%*/  {000000,000000,000000,000000,000000,000000,0x0c00,0x1200,0x1201,
  464. X          0x0c01,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,
  465. X          0x0200,0x0400,0x0800,0x1006,0x1009,0x0009,0x0006},
  466. X  /*&*/  {000000,000000,000000,000000,000000,000000,0x1078,0x1084,0x0902,
  467. X          0x0601,0x0601,0x0901,0x1081,0x0042,0x0024,0x0018,0x0018,0x0024,
  468. X          0x0042,0x0042,0x0042,0x0042,0x0024,0x0018,000000},
  469. X  /*'*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  470. X          000000,000000,000000,000000,000000,0x0001,0x0002,0x0004,0x0008,
  471. X          0x0010,0x0030,0x0078,0x0078,0x0078,0x0030,000000},
  472. X  /*(*/  {000000,000000,000000,000000,000000,000000,0x0080,0x0040,0x0020,
  473. X          0x0020,0x0010,0x0008,0x0008,0x0004,0x0004,0x0004,0x0004,0x0004,
  474. X          0x0008,0x0008,0x0010,0x0020,0x0020,0x0040,0x0080},
  475. X  /*)*/  {000000,000000,000000,000000,000000,000000,0x0020,0x0040,0x0080,
  476. X          0x0080,0x0100,0x0200,0x0200,0x0400,0x0400,0x0400,0x0400,0x0400,
  477. X          0x0200,0x0200,0x0100,0x0080,0x0080,0x0040,0x0020},
  478. X  /***/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040,
  479. X          0x1041,0x0842,0x0444,0x0248,0x0150,0x00e0,0x1fff,0x00e0,0x0150,
  480. X          0x0248,0x0444,0x0842,0x1041,0x0040,0x0040,0x0040},
  481. X  /*+*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  482. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x1fff,0x0040,0x0040,
  483. X          0x0040,0x0040,0x0040,0x0040,000000,000000,000000},
  484. X  /*,*/  {000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0030,0x0078,
  485. X          0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000,
  486. X          000000,000000,000000,000000,000000,000000,000000},
  487. X  /*-*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  488. X          000000,000000,000000,000000,000000,000000,0x1fff,000000,000000,
  489. X          000000,000000,000000,000000,000000,000000,000000},
  490. X  /*.*/  {000000,000000,000000,000000,000000,000000,000000,0x0038,0x007c,
  491. X          0x007c,0x007c,0x0038,000000,000000,000000,000000,000000,000000,
  492. X          000000,000000,000000,000000,000000,000000,000000},
  493. X  /*-/-*/{000000,000000,000000,000000,000000,000000,000000,000000,0x0001,
  494. X          0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,
  495. X          0x0200,0x0400,0x0800,0x1000,0x1000,000000,000000},
  496. X  /*0*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  497. X          0x1001,0x1003,0x1005,0x1009,0x1011,0x1021,0x1041,0x1081,0x1101,
  498. X          0x1201,0x1401,0x1801,0x1001,0x0802,0x0404,0x03f8},
  499. X  /*1*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040,
  500. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,
  501. X          0x0040,0x0040,0x0040,0x0048,0x0070,0x0060,0x0040},
  502. X  /*2*/  {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001,
  503. X          0x0001,0x0001,0x0001,0x0001,0x0002,0x03fc,0x0400,0x0800,0x1000,
  504. X          0x1000,0x1000,0x1000,0x1001,0x0802,0x0404,0x03f8},
  505. X  /*3*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  506. X          0x1001,0x1000,0x1000,0x1000,0x0800,0x0400,0x03e0,0x0400,0x0800,
  507. X          0x1000,0x1000,0x1000,0x1001,0x0802,0x0404,0x03f8},
  508. X  /*4*/  {000000,000000,000000,000000,000000,000000,0x0200,0x0200,0x0200,
  509. X          0x0200,0x0200,0x0200,0x0200,0x1fff,0x0201,0x0201,0x0202,0x0204,
  510. X          0x0208,0x0210,0x0220,0x0240,0x0280,0x0300,0x0200},
  511. X  /*5*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  512. X          0x1001,0x1000,0x1000,0x1000,0x1000,0x1000,0x0800,0x0400,0x03ff,
  513. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff},
  514. X  /*6*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  515. X          0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff,0x0001,0x0001,
  516. X          0x0001,0x0001,0x0002,0x0004,0x0808,0x0410,0x03e0},
  517. X  /*7*/  {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001,
  518. X          0x0002,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,
  519. X          0x0200,0x0400,0x0800,0x0800,0x1000,0x1000,0x1fff},
  520. X  /*8*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  521. X          0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8,0x0404,0x0802,
  522. X          0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8},
  523. X  /*9*/  {000000,000000,000000,000000,000000,000000,0x00f8,0x0104,0x0202,
  524. X          0x0400,0x0800,0x1000,0x1000,0x1000,0x1000,0x1ff8,0x1004,0x1002,
  525. X          0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8},
  526. X  /*:*/  {000000,000000,000000,000000,000000,000000,000000,000000,0x0030,
  527. X          0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000,
  528. X          0x0030,0x0078,0x0078,0x0030,000000,000000,000000},
  529. X  /*;*/  {000000,000000,0x0001,0x0002,0x0004,0x0008,0x0010,0x0030,0x0078,
  530. X          0x0078,0x0078,0x0030,000000,000000,000000,000000,000000,000000,
  531. X          0x0030,0x0078,0x0078,0x0030,000000,000000,000000},
  532. X  /*<*/  {000000,000000,000000,000000,000000,000000,0x0200,0x0100,0x0080,
  533. X          0x0040,0x0020,0x0010,0x0008,0x0004,0x0002,0x0001,0x0002,0x0004,
  534. X          0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0200},
  535. X  /*=*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  536. X          000000,000000,000000,0x1fff,000000,000000,000000,000000,000000,
  537. X          0x1fff,000000,000000,000000,000000,000000,000000},
  538. X  /*>*/  {000000,000000,000000,000000,000000,000000,0x0008,0x0010,0x0020,
  539. X          0x0040,0x0080,0x0100,0x0200,0x0400,0x0800,0x1000,0x0800,0x0400,
  540. X          0x0200,0x0100,0x0080,0x0040,0x0020,0x0010,0x0008},
  541. X  /*?*/  {000000,000000,000000,000000,000000,0x0040,0x00e0,0x0040,000000,
  542. X          000000,000000,0x0040,0x0040,0x0080,0x0100,0x0200,0x0400,0x0800,
  543. X          0x1000,0x1000,0x1001,0x1001,0x0802,0x0404,0x03f8},
  544. X  /*@*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0002,
  545. X          0x0001,0x0001,0x0ee1,0x1111,0x1111,0x1111,0x1111,0x1111,0x12e1,
  546. X          0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8},
  547. X  /*A*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  548. X          0x1001,0x1001,0x1001,0x1fff,0x1001,0x1001,0x1001,0x1001,0x0802,
  549. X          0x0802,0x0404,0x0208,0x0110,0x00a0,0x00a0,0x0040},
  550. X  /*B*/  {000000,000000,000000,000000,000000,000000,0x03ff,0x0408,0x0808,
  551. X          0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03f8,0x0408,0x0808,
  552. X          0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03ff},
  553. X  /*C*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  554. X          0x1001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,
  555. X          0x0001,0x0001,0x0001,0x1001,0x0802,0x0404,0x03f8},
  556. X  /*D*/  {000000,000000,000000,000000,000000,000000,0x03ff,0x0408,0x0808,
  557. X          0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,0x1008,
  558. X          0x1008,0x1008,0x1008,0x1008,0x0808,0x0408,0x03ff},
  559. X  /*E*/  {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001,
  560. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x007f,0x0001,0x0001,
  561. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff},
  562. X  /*F*/  {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001,
  563. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x007f,0x0001,0x0001,
  564. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1fff},
  565. X  /*G*/  {000000,000000,000000,000000,000000,000000,0x0ff8,0x1004,0x1002,
  566. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1f01,0x0001,0x0001,
  567. X          0x0001,0x0001,0x0001,0x0001,0x0002,0x1004,0x0ff8},
  568. X  /*H*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  569. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1fff,0x1001,0x1001,
  570. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001},
  571. X  /*I*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040,
  572. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,
  573. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x03f8},
  574. X  /*J*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  575. X          0x1001,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,
  576. X          0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x1e00},
  577. X  /*K*/  {000000,000000,000000,000000,000000,000000,0x1001,0x0801,0x0401,
  578. X          0x0201,0x0101,0x0081,0x0041,0x0021,0x0011,0x000f,0x0009,0x0011,
  579. X          0x0021,0x0041,0x0081,0x0101,0x0201,0x0401,0x0801},
  580. X  /*L*/  {000000,000000,000000,000000,000000,000000,0x1fff,0x1001,0x1001,
  581. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,
  582. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001},
  583. X  /*M*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  584. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1041,0x1041,0x10a1,
  585. X          0x10a1,0x1111,0x1209,0x1209,0x1405,0x1803,0x1001},
  586. X  /*N*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  587. X          0x1001,0x1801,0x1401,0x1201,0x1201,0x1101,0x1081,0x1041,0x1041,
  588. X          0x1021,0x1011,0x1009,0x1009,0x1005,0x1003,0x1001},
  589. X  /*O*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  590. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  591. X          0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8},
  592. X  /*P*/  {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001,
  593. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x03ff,0x0401,0x0801,
  594. X          0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff},
  595. X  /*Q*/  {000000,000000,000000,000000,0x0c00,0x0200,0x03f8,0x0494,0x0862,
  596. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  597. X          0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,0x03f8},
  598. X  /*R*/  {000000,000000,000000,000000,000000,000000,0x1001,0x0801,0x0401,
  599. X          0x0201,0x0101,0x0081,0x0041,0x0021,0x0011,0x03ff,0x0401,0x0801,
  600. X          0x1001,0x1001,0x1001,0x1001,0x0801,0x0401,0x03ff},
  601. X  /*S*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  602. X          0x1001,0x1000,0x1000,0x1000,0x0800,0x0400,0x03f8,0x0004,0x0002,
  603. X          0x0001,0x0001,0x0001,0x1001,0x0802,0x0404,0x03f8},
  604. X  /*T*/  {000000,000000,000000,000000,000000,000000,0x00e0,0x0040,0x0040,
  605. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,
  606. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x1041,0x1fff},
  607. X  /*U*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  608. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  609. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001},
  610. X  /*V*/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x00a0,
  611. X          0x00a0,0x0110,0x0110,0x0208,0x0208,0x0404,0x0404,0x0802,0x0802,
  612. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001},
  613. X  /*W*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1803,
  614. X          0x1405,0x1405,0x1209,0x1209,0x1111,0x1111,0x10a1,0x1041,0x1001,
  615. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001},
  616. X  /*X*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  617. X          0x0802,0x0802,0x0404,0x0208,0x0110,0x00a0,0x0040,0x00a0,0x0110,
  618. X          0x0208,0x0404,0x0802,0x0802,0x1001,0x1001,0x1001},
  619. X  /*Y*/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040,
  620. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x00a0,0x0110,0x0208,
  621. X          0x0404,0x0802,0x0802,0x1001,0x1001,0x1001,0x1001},
  622. X  /*Z*/  {000000,000000,000000,000000,000000,000000,0x1fff,0x0001,0x0001,
  623. X          0x0002,0x0004,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,
  624. X          0x0200,0x0400,0x0400,0x0800,0x1000,0x1000,0x1fff},
  625. X  /*[*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0008,0x0008,
  626. X          0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,
  627. X          0x0008,0x0008,0x0008,0x0008,0x0008,0x0008,0x03f8},
  628. X  /*\*/  {000000,000000,000000,000000,000000,000000,000000,000000,0x1000,
  629. X          0x1000,0x0800,0x0400,0x0200,0x0100,0x0080,0x0040,0x0020,0x0010,
  630. X          0x0008,0x0004,0x0002,0x0001,0x0001,000000,000000},
  631. X  /*]*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0200,0x0200,
  632. X          0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,
  633. X          0x0200,0x0200,0x0200,0x0200,0x0200,0x0200,0x03f8},
  634. X  /*^*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  635. X          000000,000000,000000,000000,000000,000000,000000,000000,000000,
  636. X          0x1001,0x0802,0x0404,0x0208,0x0110,0x00a0,0x0040},
  637. X  /*_*/  {000000,000000,000000,000000,000000,000000,0x1fff,000000,000000,
  638. X          000000,000000,000000,000000,000000,000000,000000,000000,000000,
  639. X          000000,000000,000000,000000,000000,000000,000000},
  640. X  /*`*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  641. X          000000,000000,000000,000000,000000,0x0400,0x0200,0x0100,0x0080,
  642. X          0x0040,0x0060,0x00f0,0x00f0,0x00f0,0x0060,000000},
  643. X  /*a*/  {000000,000000,000000,000000,000000,000000,0x17f8,0x0804,0x0802,
  644. X          0x0802,0x0802,0x0804,0x0ff8,0x0800,0x0800,0x0800,0x0800,0x0404,
  645. X          0x03f8,000000,000000,000000,000000,000000,000000},
  646. X  /*b*/  {000000,000000,000000,000000,000000,000000,0x03f9,0x0405,0x0803,
  647. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405,
  648. X          0x03f9,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001},
  649. X  /*c*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  650. X          0x1001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1001,0x0802,0x0404,
  651. X          0x03f8,000000,000000,000000,000000,000000,000000},
  652. X  /*d*/  {000000,000000,000000,000000,000000,000000,0x13f8,0x1404,0x1802,
  653. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404,
  654. X          0x13f8,0x1000,0x1000,0x1000,0x1000,0x1000,0x1000},
  655. X  /*e*/  {000000,000000,000000,000000,000000,000000,0x0ff8,0x0004,0x0002,
  656. X          0x0001,0x0001,0x0001,0x1fff,0x1001,0x1001,0x1001,0x0802,0x0404,
  657. X          0x03f8,000000,000000,000000,000000,000000,000000},
  658. X  /*f*/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040,
  659. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x03f8,0x0040,0x0040,
  660. X          0x0040,0x0040,0x0040,0x1040,0x0880,0x0500,0x0200},
  661. X  /*g*/  {0x03f8,0x0404,0x0802,0x1001,0x1000,0x1000,0x13f8,0x1404,0x1802,
  662. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404,
  663. X          0x13f8,000000,000000,000000,000000,000000,000000},
  664. X  /*h*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  665. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405,
  666. X          0x03f9,0x0001,0x0001,0x0001,0x0001,0x0001,0x0001},
  667. X  /*i*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040,
  668. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0070,
  669. X          000000,000000,000000,0x00e0,0x00e0,0x00e0,000000},
  670. X  /*j*/  {0x00f0,0x0108,0x0204,0x0402,0x0400,0x0400,0x0400,0x0400,0x0400,
  671. X          0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0400,0x0700,
  672. X          000000,000000,000000,0x0700,0x0700,0x0700,000000},
  673. X  /*k*/  {000000,000000,000000,000000,000000,000000,0x0804,0x0404,0x0204,
  674. X          0x0104,0x0084,0x0044,0x0024,0x0014,0x002c,0x0044,0x0084,0x0104,
  675. X          0x0204,0x0004,0x0004,0x0004,0x0004,0x0004,0x0004},
  676. X  /*l*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0040,0x0040,
  677. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,
  678. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0070},
  679. X  /*m*/  {000000,000000,000000,000000,000000,000000,0x1041,0x1041,0x1041,
  680. X          0x1041,0x1041,0x1041,0x1041,0x1041,0x1041,0x1041,0x08a3,0x0515,
  681. X          0x0209,000000,000000,000000,000000,000000,000000},
  682. X  /*n*/  {000000,000000,000000,000000,000000,000000,0x1001,0x1001,0x1001,
  683. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405,
  684. X          0x03f9,000000,000000,000000,000000,000000,000000},
  685. X  /*o*/  {000000,000000,000000,000000,000000,000000,0x03f8,0x0404,0x0802,
  686. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0802,0x0404,
  687. X          0x03f8,000000,000000,000000,000000,000000,000000},
  688. X  /*p*/  {0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x03f9,0x0405,0x0803,
  689. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x0803,0x0405,
  690. X          0x03f9,000000,000000,000000,000000,000000,000000},
  691. X  /*q*/  {0x1000,0x1000,0x1000,0x1000,0x1000,0x1000,0x13f8,0x1404,0x1802,
  692. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1802,0x1404,
  693. X          0x13f8,000000,000000,000000,000000,000000,000000},
  694. X  /*r*/  {000000,000000,000000,000000,000000,000000,0x0001,0x0001,0x0001,
  695. X          0x0001,0x0001,0x0001,0x0001,0x0001,0x0001,0x1001,0x0803,0x0405,
  696. X          0x03f9,000000,000000,000000,000000,000000,000000},
  697. X  /*s*/  {000000,000000,000000,000000,000000,000000,0x03fc,0x0402,0x0800,
  698. X          0x0800,0x0800,0x0400,0x03f8,0x0004,0x0002,0x0002,0x0002,0x0804,
  699. X          0x07f8,000000,000000,000000,000000,000000,000000},
  700. X  /*t*/  {000000,000000,000000,000000,000000,000000,0x0200,0x0500,0x0880,
  701. X          0x1040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,
  702. X          0x07fc,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040},
  703. X  /*u*/  {000000,000000,000000,000000,000000,000000,0x13f8,0x1404,0x1802,
  704. X          0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  705. X          0x1001,000000,000000,000000,000000,000000,000000},
  706. X  /*v*/  {000000,000000,000000,000000,000000,000000,0x0040,0x00a0,0x0110,
  707. X          0x0208,0x0404,0x0802,0x0802,0x1001,0x1001,0x1001,0x1001,0x1001,
  708. X          0x1001,000000,000000,000000,000000,000000,000000},
  709. X  /*w*/  {000000,000000,000000,000000,000000,000000,0x0208,0x0514,0x08a2,
  710. X          0x08a2,0x1041,0x1041,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  711. X          0x1001,000000,000000,000000,000000,000000,000000},
  712. X  /*x*/  {000000,000000,000000,000000,000000,000000,0x1001,0x0802,0x0404,
  713. X          0x0208,0x0110,0x00a0,0x0040,0x00a0,0x0110,0x0208,0x0404,0x0802,
  714. X          0x1001,000000,000000,000000,000000,000000,000000},
  715. X  /*y*/  {0x03f8,0x0404,0x0802,0x1001,0x1000,0x1000,0x1000,0x1000,0x1ff8,
  716. X          0x1004,0x1002,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,0x1001,
  717. X          0x1001,000000,000000,000000,000000,000000,000000},
  718. X  /*z*/  {000000,000000,000000,000000,000000,000000,0x1fff,0x0002,0x0004,
  719. X          0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0200,0x0400,0x0800,
  720. X          0x1fff,000000,000000,000000,000000,000000,000000},
  721. X  /*{*/  {000000,000000,000000,000000,000000,000000,0x0600,0x0100,0x0080,
  722. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0020,0x0010,0x0020,0x0040,
  723. X          0x0040,0x0040,0x0040,0x0040,0x0080,0x0100,0x0600},
  724. X  /*|*/  {000000,000000,000000,000000,000000,000000,0x0040,0x0040,0x0040,
  725. X          0x0040,0x0040,0x0040,0x0040,000000,000000,000000,000000,000000,
  726. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0040,0x0040},
  727. X  /*}*/  {000000,000000,000000,000000,000000,000000,0x000c,0x0010,0x0020,
  728. X          0x0040,0x0040,0x0040,0x0040,0x0040,0x0080,0x0100,0x0080,0x0040,
  729. X          0x0040,0x0040,0x0040,0x0040,0x0020,0x0010,0x000c},
  730. X  /*~*/  {000000,000000,000000,000000,000000,000000,000000,000000,000000,
  731. X          000000,000000,000000,000000,000000,000000,000000,000000,000000,
  732. X          0x0600,0x0900,0x1080,0x1041,0x0021,0x0012,0x000c},
  733. X  /*DEL*/{000000,000000,000000,000000,000000,000000,0x1249,000000,000000,
  734. X          0x1249,000000,000000,0x1249,000000,000000,0x1249,000000,000000,
  735. X          0x1249,000000,000000,0x1249,000000,000000,0x1249},
  736. };
  737. X
  738. /*
  739. ** The plotting area is defined as a huge bitmap.
  740. ** The bitmap is stored in a dynamically allocated pixel array b_p
  741. **
  742. ** The bitmap is allocated (and initialized to zero) with
  743. ** b_makebitmap(xsize, ysize, planes)
  744. ** and freed with b_freebitmap()
  745. ** xsize and ysize will be rounded up to a multiple of 8.
  746. **
  747. ** Valid (int) coordinates range from zero to (xsize-1,ysize-1)
  748. **
  749. ** Plotting is done via b_move(x, y) and b_vector(x, y) functions,
  750. ** where the point (x,y) is the target to go from the current point
  751. ** To set the color use b_setvalue(value) where value is the value 
  752. ** (0 or 1 or a color number) to be stored in every pixel.
  753. ** To get dotted line styles, use b_setlinetype(linetype).
  754. **
  755. ** Internally all plotting goes through b_setpixel(x, y, value).
  756. */
  757. X
  758. X
  759. /*
  760. ** set pixel (x, y, value) to value value (this can be 1/0 or a color number).
  761. */
  762. void
  763. b_setpixel(x, y, value)
  764. unsigned int x, y, value;
  765. {
  766. X  register unsigned int row;
  767. X  register unsigned char mask;
  768. X  int i;
  769. X  if (b_rastermode) {
  770. X    /* interchange so that new (x,y) is old (y,b_ysize-1-x) */
  771. X    row = x;  /* temp storage */
  772. X    x = y;
  773. X    y = b_ysize-1-row;
  774. X  }
  775. X  if (IN(x, b_xsize) && IN(y, b_ysize))
  776. X  {
  777. X    row = y/8;
  778. X    mask = 1<<(y%8);
  779. X
  780. X    for (i=0; i<b_planes; i++) {
  781. X        if (value&1)
  782. X            *((*b_p)[row]+x) |= mask;
  783. X        else
  784. X            *((*b_p)[row]+x) &= ~mask;
  785. X        row += b_psize;
  786. X        value >>= 1;
  787. X    }
  788. X  }
  789. #ifdef BITMAPDEBUG
  790. X  else
  791. X  {
  792. X    if (b_rastermode)
  793. X      fprintf(stderr, "Warning: setpixel(%d, %d, %d) out of bounds\n", 
  794. X        b_ysize-1-y, x, value);
  795. X    else
  796. X      fprintf(stderr, "Warning: setpixel(%d, %d, %d) out of bounds\n",
  797. X        x, y, value);
  798. X  }
  799. #endif
  800. }
  801. X
  802. /*
  803. ** get pixel (x,y) value----unused
  804. */
  805. /****************************
  806. unsigned int
  807. b_getpixel(x, y)
  808. unsigned int x, y;
  809. {
  810. X  register unsigned int row;
  811. X  register unsigned char mask;
  812. X  register unsigned char value;
  813. X  int i;
  814. X
  815. X  if (b_rastermode) {
  816. X    row = x;
  817. X    x = y;
  818. X    y = b_ysize-1-row;
  819. X  }
  820. X  if (IN(x, b_xsize) && IN(y, b_ysize))
  821. X  {
  822. X    row = y/8 + (b_planes-1)*b_psize;
  823. X    mask = 1<<(y%8);
  824. X
  825. X    for (i=0; i<b_planes; i++) {
  826. X        if ( *((*b_p)[row]+x) & mask )
  827. X            value |= 1;
  828. X        row -= b_psize;
  829. X        value <<= 1;
  830. X    }
  831. X    return(value);
  832. X  }
  833. X  else
  834. X  {
  835. #ifdef BITMAPDEBUG
  836. X    if (b_rastermode)
  837. X      fprintf(stderr, "Warning: getpixel(%d,%d) out of bounds\n",
  838. X        b_ysize-1-y, x);
  839. X    else
  840. X      fprintf(stderr, "Warning: getpixel(%d,%d) out of bounds\n", x, y);
  841. #endif
  842. X    return(0);
  843. X  }
  844. }
  845. ********************************/
  846. X
  847. /*
  848. ** allocate the bitmap
  849. SHAR_EOF
  850. true || echo 'restore of gnuplot/bitmap.c failed'
  851. fi
  852. echo 'End of  part 3'
  853. echo 'File gnuplot/bitmap.c is continued in part 4'
  854. echo 4 > _shar_seq_.tmp
  855. exit 0
  856.  
  857. exit 0 # Just in case...
  858. -- 
  859. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  860. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  861. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  862. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  863.