about summary refs log tree commit diff
path: root/converter/pbm/pbmtoppa/ppapbm.h
blob: 1ffc093b468bbe90ddfeef9307a67ce503a4e653 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* pbm.h
 * Copyright (c) 1998 Tim Norman.  See LICENSE for details
 * 2-25-98
 *
 * Mar 18, 1998  Jim Peterson  <jspeter@birch.ee.vt.edu>
 *
 *     Restructured to encapsulate more of the PBM handling.
 */
#ifndef _PBM_H
#define _PBM_H

#include <stdio.h>

typedef struct
{
  FILE* fptr;
  enum { none, P1, P4 } version;
  int width, height;
  int current_line;
  void *revdata;
  int unread;
} pbm_stat;

int make_pbm_stat(pbm_stat*,FILE*);
int pbm_readline(pbm_stat*,unsigned char*); 
  /* reads a single line into char* */
void pbm_unreadline(pbm_stat*,void*); /* pushes a single line back */

#endif