home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 2
/
goldfish_vol2_cd1.bin
/
files
/
comm
/
misc
/
elcheapofax
/
rcs
/
faxfile.h,v
< prev
next >
Wrap
Text File
|
1993-12-21
|
3KB
|
150 lines
head 1.3;
access;
symbols
OCT93:1.3;
locks;
comment @ * @;
1.3
date 93.08.20.02.48.24; author Rhialto; state Exp;
branches;
next 1.2;
1.2
date 93.06.11.16.33.37; author Rhialto; state Exp;
branches;
next 1.1;
1.1
date 93.06.11.14.53.53; author Rhialto; state Exp;
branches;
next ;
desc
@Stuff for g3 file conversion
@
1.3
log
@Add hack for auto-detecting fax bit order.
@
text
@/* Derived from gdevdfax.c */
/* $Id: faxfile.h,v 1.2 1993/06/11 16:33:37 Rhialto Exp $
* $Log: faxfile.h,v $
* Revision 1.2 1993/06/11 16:33:37 Rhialto
* First real RCS checkin
*
*/
/*************************************************************************
* Format of page header in PC Research "group_3" FAX file
*
* Note that all "shorts" are stored LSB in lowest byte address
*************************************************************************/
typedef struct
{
char magic[24];
} FAXBREAK;
#define FAXMAGIC "\000PC Research, Inc\000\000\000\000\000\000"
typedef struct
{
/*24*/ short pages; /* Number of pages in file */
/*26*/ short pagenum;
/*28*/ char msbfirst; /* Coding used in file for codewords */
/* MUST be set to 1, meaning the codewords */
/* are filled starting with the most */
/* significant bit */
/*29*/ char hires; /* Set to 1 for Hi resolution, else 0 */
/*30*/ char dirty; /* File may contain T.4 errors if 1, else 0 */
/* e.g. it was received by FAX, not created */
/* by a program */
/*31*/ char reservedc;
/*32*/ short reserved[12];
} FAXINFO;
#define OFFSET_PAGES 24
typedef struct
{
char jt0;
char jthires; /* Set to 0x40 for Hi resolution, else 0 */
char jt2;
char jt3;
char jt4;
char jt5;
char jt6;
char jt7;
} JTINFO;
/*
* This appears before each page in a FAX file
*/
typedef struct
{
FAXBREAK id;
FAXINFO info;
JTINFO jtinfo;
} FAXHDR;
/*
* Some FAX-related data
*/
/* The device descriptor */
#define X_DPI 204
#define Y_DPI 196 /* hires; non-hires is half this resolution */
#define LINE_SIZE ((X_DPI * 85 / 10 + 7) / 8) /* bytes per line */
#define LINE_BITS_0 1728
#define LINE_BITS_1 2048
#define LINE_BITS_2 2432
#define LINE_BITS LINE_BITS_0 /* only one supported now */
/*
* Prototypes
*/
/* tofax.c */
long faxin_open_fp(FILE *file, int dostretch, int doreverse);
int faxin_begin_page(FILE *file);
int fromfax(FILE *inf, unsigned char *bitrow);
/* tofax.c */
struct faxout;
struct faxout *faxout_open (char *, int);
struct faxout *faxout_open_fp (FILE *, int);
int faxout_begin_page (struct faxout *, int);
int faxout_end_page (struct faxout *);
int faxout_close (struct faxout *);
void tofax(struct faxout *faxp, unsigned char *p, int linebits);
@
1.2
log
@First real RCS checkin
@
text
@d2 5
a6 2
/* $Id$
* $Log$
d79 1
a79 1
long faxin_open_fp(FILE *file, int dostretch);
@
1.1
log
@Initial revision
@
text
@d2 3
@