#if __STDC__ || defined(__cplusplus) #define __P_(s) s #else #define __P_(s) () #endif /* pnmscan.c */ int main __P_((int argc, char **argv)); static void print_settings __P_((struct scanmode *m)); int checkrange __P_((struct scanmode *m)); static parse_options __P_((int argc, char **argv)); static void usage __P_((char *name)); static void errexit __P_((char *format, ...)); static int gettmpfd __P_((void)); static void buildgamma __P_((unsigned char table[], double gamma)); void scan __P_((int fd, struct scanmode *m)); int initscan __P_((int fd, struct scanmode *m)); void readpage __P_((int fd, int outfd, int rowbytes, int scanlines, int invert)); void inquiry __P_((int fd)); void test_unit_ready __P_((int fd)); static int waitready __P_((int fd, int maxsec)); int setareas __P_((int fd, int halftone, u_short *coor, int patterntype)); int setvalues __P_((int fd, int paperlen, int dpi, int brightness, int contrast, int grain, int speed)); int uselut __P_((int fd, u_int nr)); int loadlut __P_((int fd, u_char *red, u_char *green, u_char *blue)); int setbacktrack __P_((int fd, int on)); int stopscan __P_((int fd)); int startscan __P_((int fd, u_int filter, u_int multibit, u_int dpi)); struct image_status *getistatus __P_((int fd)); int readlines __P_((int fd, u_char *buffer, int len, int lines)); int getdata __P_((int fd, u_char *buffer, int len, u_char *cdb)); int putdata __P_((int fd, u_char *buffer, int len, u_char *cdb)); #undef __P_