home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / printer / dvi2pcl.lha / storefont.c < prev    next >
C/C++ Source or Header  |  1992-11-25  |  2KB  |  56 lines

  1. /* $Log:    storefont.c,v $
  2.  * Revision 0.8  92/11/23  19:47:01  19:47:01  bt (Bo Thide')
  3.  * Fixed resolution bug. Portable downloading. Added/changed options. PJXL color support
  4.  * 
  5.  * Revision 0.7  92/11/13  02:41:44  02:41:44  bt (Bo Thide')
  6.  * More bug fixes and improvements. Support for PaintJet XL
  7.  * 
  8.  * Revision 0.6  92/11/10  21:48:42  21:48:42  bt (Bo Thide')
  9.  * Bug fixes. Added -R option. Better font handling.
  10.  * 
  11.  * Revision 0.5  92/11/09  16:25:48  16:25:48  bt (Bo Thide')
  12.  * Rewrite of dospecial.c. Extended \special support
  13.  * 
  14.  * Revision 0.4  92/11/08  02:46:05  02:46:05  bt (Bo Thide')
  15.  * Changed to portable bit manipulations. Replaced strrstr for non-POSIX compliant C. Fixed numerous bugs. Added support for more \special's.
  16.  * 
  17.  * Revision 0.3  92/08/24  12:43:22  12:43:22  bt (Bo Thide')
  18.  * Fixed 8 bit (dc font) support.
  19.  * 
  20.  * Revision 0.2  92/08/23  17:29:01  17:29:01  bt (Bo Thide')
  21.  * Source cleaned up.  Changed certain function calls.  Removed globals.
  22.  * 
  23.  * Revision 0.1  92/08/22  23:58:48  23:58:48  bt (Bo Thide')
  24.  * First Release.
  25.  *  */
  26.  
  27. #include <stdio.h>
  28. #include <stdlib.h>
  29. #include "globals.h"
  30.  
  31. static char rcsid[] = "$Header: storefont.c,v 0.8 92/11/23 19:47:01 bt Exp $";
  32.  
  33. /*
  34.  * Allocate memory for gfont structure and store font in memory
  35.  */
  36. storefont(bitfile, f)
  37. FILE    *bitfile;
  38. int    f;
  39. {
  40.     int    i;
  41.     charfmt    *u;
  42.  
  43.     if(verbose)
  44.         fprintf(stderr,"Font %d will be stored in memory\n", f);
  45.     gfont = (gfontfmt)malloc(sizeof(*gfont));
  46.     gfontptr[f] = gfont;
  47.     for(i = font->bc ; i <= font->ec ; i++) { 
  48.         u = cbase + i;
  49.         if(u->use_count) { 
  50.             if(u->use_count > 0)
  51.                 u->use_count = -u->use_count;
  52.             storechar(i);
  53.         }
  54.     }
  55. }
  56.