diff options
| -rw-r--r-- | libspectre/ps.c | 58 |
1 files changed, 15 insertions, 43 deletions
diff --git a/libspectre/ps.c b/libspectre/ps.c index 03d462a..ef61bfd 100644 --- a/libspectre/ps.c +++ b/libspectre/ps.c @@ -1312,8 +1312,7 @@ psdocreference (struct document *doc) /*----------------------------------------------------------*/ static char * -gettextline(line) - char *line; +gettextline(char *line) { char *cp; @@ -1341,9 +1340,7 @@ gettextline(line) /*----------------------------------------------------------*/ static char * -ps_gettext(line, next_char) - char *line; - char **next_char; +ps_gettext(char *line, char **next_char) { char text[PSLINELENGTH]; /* Temporary storage for text */ char *cp; @@ -1457,8 +1454,7 @@ ps_gettext(line, next_char) #define MAX_PS_IO_FGETCHARS_BUF_SIZE 57344 #define BREAK_PS_IO_FGETCHARS_BUF_SIZE 49152 -static FileData ps_io_init(file) - FILE *file; +static FileData ps_io_init(FILE *file) { FileData fd; size_t size = sizeof(FileDataStruct); @@ -1485,8 +1481,7 @@ static FileData ps_io_init(file) /*----------------------------------------------------------*/ static void -ps_io_rewind(fd) - FileData fd; +ps_io_rewind(FileData fd) { rewind(FD_FILE); FD_FILEPOS = ftell(FD_FILE); @@ -1505,8 +1500,7 @@ ps_io_rewind(fd) /*----------------------------------------------------------*/ static void -ps_io_exit(fd) - FileData fd; +ps_io_exit(FileData fd) { BEGINMESSAGE(ps_io_exit) PS_XtFree(FD_BUF); @@ -1519,9 +1513,7 @@ ps_io_exit(fd) /*----------------------------------------------------------*/ static int -ps_io_fseek(fd,offset) - FileData fd; - int offset; +ps_io_fseek(FileData fd,int offset) { int status; BEGINMESSAGE(ps_io_fseek) @@ -1538,8 +1530,7 @@ ps_io_fseek(fd,offset) /*----------------------------------------------------------*/ static int -ps_io_ftell(fd) - FileData fd; +ps_io_ftell(FileData fd) { BEGINMESSAGE(ps_io_ftell) IMESSAGE(FD_FILEPOS) @@ -1564,9 +1555,7 @@ static void ps_memmove (d, s, l) # define ps_memmove memmove #endif -static char * ps_io_fgetchars(fd,num) - FileData fd; - int num; +static char * ps_io_fgetchars(FileData fd,int num) { char *eol=NULL,*tmp; size_t size_of_char = sizeof(char); @@ -1711,12 +1700,7 @@ static char * ps_io_fgetchars(fd,num) */ /*----------------------------------------------------------*/ -static char * readline (fd, enddoseps, lineP, positionP, line_lenP) - FileData fd; - long enddoseps; - char **lineP; - long *positionP; - unsigned int *line_lenP; +static char * readline (FileData fd, long enddoseps, char **lineP, long *positionP, unsigned int *line_lenP) { unsigned int nbytes=0; int skipped=0; @@ -1904,12 +1888,8 @@ static char * readlineuntil (FileData fd, long enddoseps, char **lineP, long *po /*###########################################################*/ char * -pscopyuntil(fd, to, begin, end, comment) - FileData fd; - FILE *to; - long begin; /* set negative to avoid initial seek */ - long end; - char *comment; +pscopyuntil(FileData fd, FILE *to, long begin, long end, char *comment) + /* set long to negative to avoid initial seek */ { char *line; int comment_length; @@ -1987,8 +1967,7 @@ pscopyuntil(fd, to, begin, end, comment) /* Check whether the line contains nothing but white space. */ /*----------------------------------------------------------*/ -static int blank(line) - char *line; +static int blank(char *line) { char *cp = line; @@ -2094,11 +2073,7 @@ pscopytrailer (FILE *from, FILE *to, Document d, unsigned int n_pages) /*##########################################################*/ void -pscopydoc(dest_file,src_filename,d,pagelist) - FILE *dest_file; - char *src_filename; - Document d; - char *pagelist; +pscopydoc(FILE *dest_file,char *src_filename,Document d,char *pagelist) { FILE *src_file; char text[PSLINELENGTH]; @@ -2193,8 +2168,7 @@ static unsigned long dsc_arch = 0x00000001; /* change byte order if architecture is big-endian */ static PS_DWORD -reorder_dword(val) - PS_DWORD val; +reorder_dword(PS_DWORD val) { if (*((char *)(&dsc_arch))) return val; /* little endian machine */ @@ -2237,9 +2211,7 @@ ps_read_doseps_word(FileData fd, PS_WORD *word) /* DOS EPS header reading */ static unsigned long -ps_read_doseps(fd,doseps) - FileData fd; - DOSEPS *doseps; +ps_read_doseps(FileData fd,DOSEPS *doseps) { const size_t read = fread(doseps->id, 1, 4, FD_FILE); if (! ((read == 4) && (doseps->id[0]==0xc5) && (doseps->id[1]==0xd0) |
