From b31e75a79a6f096f3462292fd48494035f0be0fe Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 1 Oct 2006 17:12:42 +0000 Subject: Fix prototypes that don't literally match definitions, for Irix compiler git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@77 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- Makefile.version | 2 +- converter/other/pamtosvg/curve.h | 2 +- converter/other/pamtosvg/fit.c | 4 ++-- converter/other/pnmtojpeg.c | 2 +- converter/ppm/ppmtompeg/headers/frame.h | 18 +++++++++--------- converter/ppm/ppmtompeg/headers/frames.h | 2 +- converter/ppm/ppmtompeg/headers/mpeg.h | 2 +- converter/ppm/ppmtompeg/headers/parallel.h | 2 +- converter/ppm/ppmtompeg/headers/prototypes.h | 6 +++--- converter/ppm/ppmtompeg/iframe.c | 6 +++--- converter/ppm/ppmtompeg/mheaders.c | 2 +- converter/ppm/sldtoppm.c | 2 +- doc/HISTORY | 5 +++++ lib/pm.h | 2 +- lib/ppmdraw.h | 4 ++-- 15 files changed, 33 insertions(+), 28 deletions(-) diff --git a/Makefile.version b/Makefile.version index 757a049b..3058b964 100644 --- a/Makefile.version +++ b/Makefile.version @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 35 -NETPBM_POINT_RELEASE = 06 +NETPBM_POINT_RELEASE = 07 diff --git a/converter/other/pamtosvg/curve.h b/converter/other/pamtosvg/curve.h index db3cc682..ee046620 100644 --- a/converter/other/pamtosvg/curve.h +++ b/converter/other/pamtosvg/curve.h @@ -83,7 +83,7 @@ append_pixel(curve_type const c, pm_pixelcoord const p); /* Like `append_pixel', for a point in real coordinates. */ -extern void append_point (curve_type c, float_coord p); +extern void append_point (curve_type const c, float_coord const p); /* Write some or all, respectively, of the curve C in human-readable form to the log file, if logging is enabled. */ diff --git a/converter/other/pamtosvg/fit.c b/converter/other/pamtosvg/fit.c index bcda033f..08db41db 100644 --- a/converter/other/pamtosvg/fit.c +++ b/converter/other/pamtosvg/fit.c @@ -61,12 +61,12 @@ static void remove_adjacent_corners (index_list_type *, unsigned, bool, at_exception_type * exception); static void filter (curve_type, fitting_opts_type *); static void find_vectors - (unsigned, pixel_outline_type, vector_type *, vector_type *, unsigned); + (unsigned const, pixel_outline_type const, vector_type * const, vector_type * const, unsigned const); static float find_error (curve_type, spline_type, unsigned *, at_exception_type * exception); static vector_type find_half_tangent (curve_type, bool start, unsigned *, unsigned); static void find_tangent (curve_type, bool, bool, unsigned); -static void remove_knee_points (curve_type, bool); +static void remove_knee_points (curve_type const, bool const); static void set_initial_parameter_values (curve_type); static float distance (float_coord, float_coord); diff --git a/converter/other/pnmtojpeg.c b/converter/other/pnmtojpeg.c index a0262331..9a247633 100644 --- a/converter/other/pnmtojpeg.c +++ b/converter/other/pnmtojpeg.c @@ -334,7 +334,7 @@ static void compute_rescaling_array(JSAMPLE ** const rescale_p, const pixval maxval, const struct jpeg_compress_struct cinfo); static void -convert_scanlines(struct jpeg_compress_struct *cinfo_p, FILE *input_file, +convert_scanlines(struct jpeg_compress_struct * const cinfo_p, FILE * const input_file, const pixval maxval, const int input_fmt, JSAMPLE xlate_table[]); diff --git a/converter/ppm/ppmtompeg/headers/frame.h b/converter/ppm/ppmtompeg/headers/frame.h index 1003ee15..6df3d19f 100644 --- a/converter/ppm/ppmtompeg/headers/frame.h +++ b/converter/ppm/ppmtompeg/headers/frame.h @@ -131,17 +131,17 @@ Frame_Resize(MpegFrame * const omf, int const outsize_y); -extern void Frame_Free _ANSI_ARGS_((MpegFrame *frame)); +extern void Frame_Free _ANSI_ARGS_((MpegFrame * const frame)); extern void Frame_Exit _ANSI_ARGS_((void)); extern void Frame_AllocPPM _ANSI_ARGS_((MpegFrame * frame)); -extern void Frame_AllocYCC _ANSI_ARGS_((MpegFrame * mf)); -extern void Frame_AllocDecoded _ANSI_ARGS_((MpegFrame *frame, - boolean makeReference)); -extern void Frame_AllocHalf _ANSI_ARGS_((MpegFrame *frame)); -extern void Frame_AllocBlocks _ANSI_ARGS_((MpegFrame *mf)); -extern void Frame_Resize _ANSI_ARGS_((MpegFrame *omf, MpegFrame *mf, - int insize_x, int insize_y, - int outsize_x, int outsize_y)); +extern void Frame_AllocYCC _ANSI_ARGS_((MpegFrame * const mf)); +extern void Frame_AllocDecoded _ANSI_ARGS_((MpegFrame * const frame, + boolean const makeReference)); +extern void Frame_AllocHalf _ANSI_ARGS_((MpegFrame * const frame)); +extern void Frame_AllocBlocks _ANSI_ARGS_((MpegFrame * const mf)); +extern void Frame_Resize _ANSI_ARGS_((MpegFrame * const omf, MpegFrame * const mf, + int const insize_x, int const insize_y, + int const outsize_x, int const outsize_y)); #endif /* FRAME_INCLUDED */ diff --git a/converter/ppm/ppmtompeg/headers/frames.h b/converter/ppm/ppmtompeg/headers/frames.h index 3fefaea7..558ebf81 100644 --- a/converter/ppm/ppmtompeg/headers/frames.h +++ b/converter/ppm/ppmtompeg/headers/frames.h @@ -85,7 +85,7 @@ typedef struct dct_data_tye_struct { int fmotionX, fmotionY, bmotionX, bmotionY; } dct_data_type; -void EncodeYDC _ANSI_ARGS_((int32 dc_term, int32 *pred_term, BitBucket *bb)); +void EncodeYDC _ANSI_ARGS_((int32 const dc_term, int32 * const pred_term, BitBucket * const bb)); void EncodeCDC(int32 const dc_term, int32 * const pred_term, diff --git a/converter/ppm/ppmtompeg/headers/mpeg.h b/converter/ppm/ppmtompeg/headers/mpeg.h index d739dede..23875c2c 100644 --- a/converter/ppm/ppmtompeg/headers/mpeg.h +++ b/converter/ppm/ppmtompeg/headers/mpeg.h @@ -90,7 +90,7 @@ void ReadDecodedRefFrame(MpegFrame * const frameP, unsigned int const frameNumber); -extern void WriteDecodedFrame _ANSI_ARGS_((MpegFrame *frame)); +extern void WriteDecodedFrame _ANSI_ARGS_((MpegFrame * const frame)); extern void SetBitRateFileName _ANSI_ARGS_((char *fileName)); extern void SetFrameRate _ANSI_ARGS_((void)); diff --git a/converter/ppm/ppmtompeg/headers/parallel.h b/converter/ppm/ppmtompeg/headers/parallel.h index e18d3f46..90edd874 100644 --- a/converter/ppm/ppmtompeg/headers/parallel.h +++ b/converter/ppm/ppmtompeg/headers/parallel.h @@ -87,7 +87,7 @@ void NoteFrameDone(int frameStart, int frameEnd); void -SetIOConvert(boolean separate); +SetIOConvert(boolean const separate); void SetRemoteShell(const char * const shell); diff --git a/converter/ppm/ppmtompeg/headers/prototypes.h b/converter/ppm/ppmtompeg/headers/prototypes.h index d729aafa..a284888f 100644 --- a/converter/ppm/ppmtompeg/headers/prototypes.h +++ b/converter/ppm/ppmtompeg/headers/prototypes.h @@ -47,7 +47,7 @@ void SetSearchRange (int const pixelsP, void ResetIFrameStats _ANSI_ARGS_((void)); void SetPixelSearch(const char * const searchType); -void SetIQScale _ANSI_ARGS_((int qI)); +void SetIQScale _ANSI_ARGS_((int const qI)); void SetPQScale _ANSI_ARGS_((int qP)); void SetBQScale _ANSI_ARGS_((int qB)); float EstimateSecondsPerIFrame _ANSI_ARGS_((void)); @@ -56,7 +56,7 @@ float EstimateSecondsPerBFrame _ANSI_ARGS_((void)); void SetGOPSize _ANSI_ARGS_((int size)); void SetStatFileName(const char * const fileName); -void SetSlicesPerFrame _ANSI_ARGS_((int number)); +void SetSlicesPerFrame _ANSI_ARGS_((int const number)); void SetBlocksPerSlice _ANSI_ARGS_((void)); @@ -64,7 +64,7 @@ void DCTFrame _ANSI_ARGS_((MpegFrame * mf)); void PPMtoYCC _ANSI_ARGS_((MpegFrame * mf)); -void MotionSearchPreComputation _ANSI_ARGS_((MpegFrame *frame)); +void MotionSearchPreComputation _ANSI_ARGS_((MpegFrame * const frame)); void ComputeHalfPixelData _ANSI_ARGS_((MpegFrame *frame)); void mp_validate_size _ANSI_ARGS_((int *x, int *y)); diff --git a/converter/ppm/ppmtompeg/iframe.c b/converter/ppm/ppmtompeg/iframe.c index cb6d4683..f4d7665a 100644 --- a/converter/ppm/ppmtompeg/iframe.c +++ b/converter/ppm/ppmtompeg/iframe.c @@ -136,14 +136,14 @@ int TIME_RATE; /*=====================* * EXPORTED PROCEDURES * *=====================*/ -extern void PrintItoIBitRate _ANSI_ARGS_((int numBits, int frameNum)); +extern void PrintItoIBitRate _ANSI_ARGS_((int const numBits, int const frameNum)); /*===============================* * INTERNAL PROCEDURE prototypes * *===============================*/ void AllocDctBlocks(void ); -int SetFCodeHelper (int sr); -void CalcDistortion (MpegFrame *current, int y, int x); +int SetFCodeHelper (int const sr); +void CalcDistortion (MpegFrame * const current, int const y, int const x); int SetFCodeHelper(int const SR) { diff --git a/converter/ppm/ppmtompeg/mheaders.c b/converter/ppm/ppmtompeg/mheaders.c index 2a5f2c63..8a51c089 100644 --- a/converter/ppm/ppmtompeg/mheaders.c +++ b/converter/ppm/ppmtompeg/mheaders.c @@ -293,7 +293,7 @@ static void GenPictHead _ANSI_ARGS_((BitBucket *bb, uint32 temp_ref, static void GenMBType _ANSI_ARGS_((BitBucket *bb, uint32 pict_code_type, uint32 mb_quant, uint32 motion_forw, uint32 motion_back, uint32 mb_pattern, uint32 mb_intra)); -static void GenMotionCode _ANSI_ARGS_((BitBucket *bb, int32 vector)); +static void GenMotionCode _ANSI_ARGS_((BitBucket * const bb, int32 const vector)); static void GenBlockPattern _ANSI_ARGS_((BitBucket *bb, uint32 mb_pattern)); diff --git a/converter/ppm/sldtoppm.c b/converter/ppm/sldtoppm.c index 7da6d592..6b51f291 100644 --- a/converter/ppm/sldtoppm.c +++ b/converter/ppm/sldtoppm.c @@ -74,7 +74,7 @@ static void slider ARGS((void (*slvec) ARGS((struct svector *vec, int color)), void (*slflood) ARGS((struct spolygon *poly, int color)) )); static void slidefind ARGS((char *sname, int dironly, int ucasen)); static void draw ARGS((struct svector *vec, int color)); -static void flood ARGS((struct spolygon *poly, int color)); +static void flood ARGS((struct spolygon *const poly, int const color)); static int ixdots, iydots; /* Screen size in dots */ static FILE *slfile; /* Slide file descriptor */ diff --git a/doc/HISTORY b/doc/HISTORY index 43c53e98..40c81079 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,11 @@ Netpbm. CHANGE HISTORY -------------- +06.10.01 BJH Release 10.35.07 + + Fix some prototypes that don't literally match definitions + so that Irix compiler will accept them. + 06.09.29 BJH Release 10.35.06 Build: fix build with separate build directory. diff --git a/lib/pm.h b/lib/pm.h index 040a6a4b..9c3c087e 100644 --- a/lib/pm.h +++ b/lib/pm.h @@ -65,7 +65,7 @@ extern "C" { #ifdef __GNUC__ #define PM_GNU_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b))) #else -#define PM_GNU_PRINTF_ATTR +#define PM_GNU_PRINTF_ATTR(a,b) #endif diff --git a/lib/ppmdraw.h b/lib/ppmdraw.h index 9efe51b9..6a379573 100644 --- a/lib/ppmdraw.h +++ b/lib/ppmdraw.h @@ -59,7 +59,7 @@ typedef struct { -typedef void ppmd_drawproc(pixel **, int, int, pixval, int, int, const void *); +typedef void ppmd_drawproc(pixel ** const, int const, int const, pixval const, int const, int const, const void *const); ppmd_drawproc ppmd_point_drawproc; @@ -274,7 +274,7 @@ ppmd_text(pixel** const pixels, int const height, int const angle, const char * const sArg, - void (*drawprocP)(pixel**, int, int, pixval, int, int, const void*), + ppmd_drawproc, const void* const clientdata); /* Draws the null-terminated string 's' left justified at the point ('x', 'y'). The text will be 'height' pixels high and will be aligned on a -- cgit 1.4.1