diff options
Diffstat (limited to 'lib/pm.h')
-rw-r--r-- | lib/pm.h | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/lib/pm.h b/lib/pm.h index 3fc92fb4..62ad5355 100644 --- a/lib/pm.h +++ b/lib/pm.h @@ -111,13 +111,16 @@ extern int pm_plain_output; extern const char * pm_progname; void -pm_init(const char * const progname, unsigned int const flags); +pm_init(const char * const progname, + unsigned int const flags); void -pm_proginit(int * const argcP, const char * argv[]); +pm_proginit(int * const argcP, + const char ** const argv); void -pm_setMessage(int const newState, int * const oldStateP); +pm_setMessage(int const newState, + int * const oldStateP); int pm_getMessage(void); @@ -137,19 +140,23 @@ pm_make_tmpfile_fd(int * const fdP, const char ** const filenameP); void -pm_nextimage(FILE * const file, int * const eofP); +pm_nextimage(FILE * const file, + int * const eofP); /* Variable-sized arrays definitions. */ char** -pm_allocarray (int const cols, int const rows, int const size ); +pm_allocarray (int const cols, + int const rows, + int const size ); void * pm_allocrow(unsigned int const cols, unsigned int const size); void -pm_freearray (char** const its, int const rows); +pm_freearray (char ** const its, + int const rows); void pm_freerow(void * const row); @@ -380,12 +387,25 @@ pm_getline(FILE * const ifP, int * const eofP, size_t * const lineLenP); +void +pm_readfile(FILE * const fileP, + const unsigned char ** const bytesP, + size_t * const szP); + +void +pm_writefile(FILE * const fileP, + const unsigned char * const bytes, + size_t const sz); + short pm_bs_short(short const s); long pm_bs_long(long const l); +int +pm_is_seekable(FILE * const fileP); + unsigned int pm_tell(FILE * const fileP); @@ -400,7 +420,8 @@ pm_seek2(FILE * const fileP, unsigned int const fileposSize); void -pm_seek(FILE * const fileP, unsigned long filepos); +pm_seek(FILE * const fileP, + unsigned long const filepos); enum pm_check_code { PM_CHECK_OK, @@ -437,6 +458,9 @@ pm_parse_width(const char * const arg); unsigned int pm_parse_height(const char * const arg); +unsigned int +pm_parse_maxval(const char * const arg); + #ifdef __cplusplus } #endif |