home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c185 / 2.ddi / OWLSRC.EXE / CSCAPE / SOURCE / PCXDECL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  1.8 KB  |  56 lines

  1. /*
  2.     pcxdecl.h
  3.  
  4.     % declarations for PCX image i/o.
  5.  
  6.     5/02/89  by Ted.
  7.  
  8.     OWL 1.1
  9.     Copyright (c) 1989 by Oakland Group, Inc.
  10.     ALL RIGHTS RESERVED.
  11.  
  12.     Revision History:
  13.     -----------------
  14. */
  15. #define PCX_FILLER    56
  16.  
  17. typedef struct {
  18.     byte mfgr;
  19.     byte version;
  20.     byte encoding;
  21.     byte pixbits;
  22.     unsigned short xmin;
  23.     unsigned short ymin;
  24.     unsigned short xmax;
  25.     unsigned short ymax;
  26.  
  27.     unsigned short hres;
  28.     unsigned short vres;
  29.  
  30.     byte rgb[16][3];
  31.     byte reserved;
  32.     byte nplanes;
  33.     unsigned short linebytes;
  34.     unsigned short paltype;        /* 1 := color/bw, 2:= greyscale */
  35.     unsigned short ylines;
  36.     byte filler[PCX_FILLER];
  37. } pcxhdr_struct;
  38.  
  39. #define pcxunpack_func(fname)        boolean DIGPRIV fname(_arg3(struct frw_struct *frw, pcxhdr_struct *pcxhdr, pmap_type pmap))
  40. typedef                 boolean (DIGPRIV *pcxunpack_fptr)(_arg3(struct frw_struct *frw, pcxhdr_struct *pcxhdr, pmap_type pmap));
  41.  
  42. #define pcxpack_func(fname)            boolean DIGPRIV fname(_arg2(struct frw_struct *frw, pmap_type pmap))
  43. typedef                   boolean (DIGPRIV *pcxpack_fptr)(_arg2(struct frw_struct *frw, pmap_type pmap));
  44. /* -------------------------------------------------------------------------- */
  45.  
  46. /* pcxload.c */
  47. extern void DIGPRIV dig_loadpcx(_arg4(frw_type frw, pmap_type *pmapp, ocolmap_type *cmapp, pcxunpack_fptr unpackpcx));
  48. extern boolean DIGPRIV pcx_readline(_arg4(frw_type frw, byte *obuf, unsigned linebytes, unsigned *ocountp));
  49. extern void DIGPRIV pcx_hdrflip(_arg1(pcxhdr_struct *pcxhdr));
  50.  
  51. /* pcxsave.c */
  52. extern boolean DIGPRIV dig_savepcx(_arg4(frw_type frw, pmap_type pmap, ocolmap_type cmap, pcxpack_fptr packpcx));
  53. extern boolean DIGPRIV pcx_writeline(_arg3(frw_type frw, byte *obuf, unsigned linebytes));
  54. /* -------------------------------------------------------------------------- */
  55.  
  56.