|
|
1.1 ! root 1: /* photo.h - */ ! 2: ! 3: /* ! 4: * $Header: /f/osi/h/quipu/RCS/photo.h,v 7.0 89/11/23 21:56:42 mrose Rel $ ! 5: * ! 6: * ! 7: * $Log: photo.h,v $ ! 8: * Revision 7.0 89/11/23 21:56:42 mrose ! 9: * Release 6.0 ! 10: * ! 11: */ ! 12: ! 13: /* ! 14: * NOTICE ! 15: * ! 16: * Acquisition, use, and distribution of this module and related ! 17: * materials are subject to the restrictions of a license agreement. ! 18: * Consult the Preface in the User's Manual for the full terms of ! 19: * this agreement. ! 20: * ! 21: */ ! 22: ! 23: ! 24: typedef struct { ! 25: char length; /* number of bits in the pattern */ ! 26: short pattern; /* the bit pattern ! 27: (starting at bit 13) */ ! 28: } code_word; ! 29: ! 30: typedef struct { ! 31: code_word make, /* make up code */ ! 32: /* if make.length = 0 then there ! 33: is no make up code */ ! 34: term; /* terminal code */ ! 35: } full_code; ! 36: ! 37: typedef struct { ! 38: unsigned char pos; /* pointer into the string */ ! 39: int * run_top; /* run length pointer */ ! 40: int * run_pos; /* pointer to above */ ! 41: unsigned char mask; /* mask to get at one bit of the string */ ! 42: char * dbuf_top; ! 43: char * dbuf; ! 44: } bit_string; ! 45: ! 46: typedef struct { ! 47: char r_type; /* descibes type of run */ ! 48: int run_length; /* a run_length */ ! 49: } run_type; ! 50: ! 51: ! 52: typedef struct nd { ! 53: char n_type; /* describe the type of node */ ! 54: struct nd * one; /* one branch */ ! 55: struct nd * zero; /* zero branch */ ! 56: int value; /* value arrived at */ ! 57: } node ; ! 58: ! 59: ! 60: /* now some constant definitions */ ! 61: #define MSB_MASK 010000 /* octal. Mask to get at first bit ! 62: of code_word pattern */ ! 63: #define BIT_MASK 0x80 /* i.e. set bit 8 of a char */ ! 64: ! 65: #define WHITE 0 ! 66: #define WT_TERM 0 ! 67: #define BLACK 1 ! 68: #define BL_TERM 1 ! 69: #define MAKE 2 ! 70: #define EOLN 127 ! 71: #define INTERNAL 7 ! 72: ! 73: #define P 1 ! 74: #define H 2 ! 75: #define V0 6 ! 76: #define VR1 7 ! 77: #define VR2 8 ! 78: #define VR3 9 ! 79: #define VL1 5 ! 80: #define VL2 4 ! 81: #define VL3 3 ! 82: ! 83: #define BUFLEN 75000 ! 84: #define LINEBUF 4096 ! 85: ! 86: #define FIXED_OFFSET 6 ! 87: ! 88: full_code get_code(); ! 89: char get_bit(); ! 90: node * get_node (); ! 91: run_type next_run ();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.