From 7e0a9517e34b0e180f8af45964b5f48ff76fb44c Mon Sep 17 00:00:00 2001 From: Pascal Stumpf Date: Mon, 22 Jul 2013 18:44:04 +0200 Subject: [PATCH] Silence lots of warnings in lib/DtHelp. * 64bit warnings * Missing prototypes * explicit parentheses / brackets There's still some work to be done, but, as always, it's a start ... --- cde/include/Xm/XmPrivate.h | 18 +++++++++++ cde/include/Xm/extractprototype.awk | 2 ++ cde/lib/DtHelp/Actions.c | 1 + cde/lib/DtHelp/CCDFUtil.c | 2 ++ cde/lib/DtHelp/Callbacks.c | 2 ++ cde/lib/DtHelp/Canvas.c | 3 +- cde/lib/DtHelp/CanvasI.h | 2 +- cde/lib/DtHelp/CanvasOs.c | 2 ++ cde/lib/DtHelp/CleanUp.c | 2 ++ cde/lib/DtHelp/Destroy.c | 2 +- cde/lib/DtHelp/DisplayAreaP.h | 2 +- cde/lib/DtHelp/Environ_c.c | 1 + cde/lib/DtHelp/Font.c | 38 +++++++++++------------ cde/lib/DtHelp/FontI.h | 16 +++++----- cde/lib/DtHelp/Format.c | 24 ++++++++------- cde/lib/DtHelp/FormatCCDF.c | 2 +- cde/lib/DtHelp/FormatI.h | 4 +++ cde/lib/DtHelp/FormatMan.c | 2 +- cde/lib/DtHelp/FormatSDL.c | 6 ++-- cde/lib/DtHelp/FormatTerm.c | 4 +-- cde/lib/DtHelp/FormatUtil.c | 1 + cde/lib/DtHelp/GenUtils.c | 1 + cde/lib/DtHelp/GifUtils.c | 1 + cde/lib/DtHelp/GlobSearch.c | 7 +++-- cde/lib/DtHelp/Graphics.c | 7 ++++- cde/lib/DtHelp/HelpDialog.c | 2 ++ cde/lib/DtHelp/HelpQuickD.c | 2 ++ cde/lib/DtHelp/HelpUtil.c | 3 ++ cde/lib/DtHelp/HelpUtilI.h | 2 +- cde/lib/DtHelp/Layout.c | 4 +-- cde/lib/DtHelp/LayoutUtil.c | 6 ++-- cde/lib/DtHelp/LayoutUtilI.h | 3 ++ cde/lib/DtHelp/Obsolete.c | 2 ++ cde/lib/DtHelp/PathArea.c | 2 ++ cde/lib/DtHelp/Print.c | 5 +++ cde/lib/DtHelp/PrintI.h | 7 +++++ cde/lib/DtHelp/Resize.c | 1 + cde/lib/DtHelp/Selection.c | 3 +- cde/lib/DtHelp/SetList.c | 1 + cde/lib/DtHelp/SetListI.h | 4 +++ cde/lib/DtHelp/StringFuncs.c | 4 +-- cde/lib/DtHelp/XInterface.c | 32 +++++++++---------- cde/lib/DtHelp/XInterfaceI.h | 3 ++ cde/lib/DtHelp/XUICreate.c | 2 ++ cde/lib/DtHelp/XbmUtils.c | 3 +- cde/lib/DtHelp/bufio.c | 2 +- cde/lib/DtHelp/decompress.c | 1 + cde/lib/DtHelp/il/ilX.c | 4 ++- cde/lib/DtHelp/il/ilconvert.c | 1 + cde/lib/DtHelp/il/ildata.c | 48 ++++++++++++++--------------- cde/lib/DtHelp/il/ildecomp.h | 6 ++++ cde/lib/DtHelp/il/ildecompg3.c | 6 ++-- cde/lib/DtHelp/il/ildecompg4.c | 2 +- cde/lib/DtHelp/il/ildecompg4.h | 5 +++ cde/lib/DtHelp/il/ildecompjpeg.c | 14 ++++----- cde/lib/DtHelp/il/ildither.c | 2 +- cde/lib/DtHelp/il/ilimage.c | 15 ++++----- cde/lib/DtHelp/il/iljpgdecode.c | 8 ++--- cde/lib/DtHelp/il/iljpgdecodejif.c | 22 ++++++------- cde/lib/DtHelp/il/iljpgdedct.c | 2 +- cde/lib/DtHelp/il/iljpgdehuff.c | 12 ++++---- cde/lib/DtHelp/il/ilpipe.c | 3 +- cde/lib/DtHelp/il/ilscale.c | 1 + cde/lib/DtHelp/il/iltiff.c | 8 ++--- cde/lib/DtHelp/il/iltiffread.c | 6 ++-- 65 files changed, 259 insertions(+), 152 deletions(-) diff --git a/cde/include/Xm/XmPrivate.h b/cde/include/Xm/XmPrivate.h index 46eb94d6..aaa8b2c7 100644 --- a/cde/include/Xm/XmPrivate.h +++ b/cde/include/Xm/XmPrivate.h @@ -39,8 +39,26 @@ extern void _XmBulletinBoardSizeUpdate( extern void _XmBulletinBoardSetDynDefaultButton( Widget wid, Widget newDefaultButton) ; +/* Extracted from GeoUtilsI.h */ +extern Boolean _XmGeoSetupKid( + XmKidGeometry geo, + Widget kidWid) ; /* Extracted from IconFileP.h */ extern void XmeFlushIconFileCache(String path); +/* Extracted from ImageCachI.h */ +extern void _XmPutScaledImage ( + Display* display , + Drawable d , + GC gc , + XImage* src_image , + int src_x , + int src_y , + int dest_x , + int dest_y , + unsigned int src_width , + unsigned int src_height, + unsigned int dest_width , + unsigned int dest_height); /* Extracted from ManagerI.h */ extern void _XmManagerHelp( Widget wid, diff --git a/cde/include/Xm/extractprototype.awk b/cde/include/Xm/extractprototype.awk index d6c46edb..7340545e 100644 --- a/cde/include/Xm/extractprototype.awk +++ b/cde/include/Xm/extractprototype.awk @@ -69,4 +69,6 @@ function proto() { /_XmBulletinBoardSetDynDefaultButton/ { proto(); } /_XmBulletinBoardSizeUpdate/ { proto(); } /_XmManagerHelp/ { proto(); } +/_XmPutScaledImage/ { proto(); } +/_XmGeoSetupKid/ { proto(); } /XmeFlushIconFileCache/ { proto(); } diff --git a/cde/lib/DtHelp/Actions.c b/cde/lib/DtHelp/Actions.c index 1d4a0aeb..cbefdc60 100644 --- a/cde/lib/DtHelp/Actions.c +++ b/cde/lib/DtHelp/Actions.c @@ -45,6 +45,7 @@ /* * system includes */ +#include #include /* diff --git a/cde/lib/DtHelp/CCDFUtil.c b/cde/lib/DtHelp/CCDFUtil.c index f4a8370b..78a9eb71 100644 --- a/cde/lib/DtHelp/CCDFUtil.c +++ b/cde/lib/DtHelp/CCDFUtil.c @@ -72,6 +72,8 @@ extern int errno; #include "CCDFUtilI.h" #include "FontAttrI.h" #include "CvStringI.h" +#include "FormatUtilI.h" +#include "StringFuncsI.h" #ifdef NLS16 #endif diff --git a/cde/lib/DtHelp/Callbacks.c b/cde/lib/DtHelp/Callbacks.c index 10b92783..e83e0dbd 100644 --- a/cde/lib/DtHelp/Callbacks.c +++ b/cde/lib/DtHelp/Callbacks.c @@ -57,6 +57,7 @@ #include #include #include +#include /* @@ -67,6 +68,7 @@ /* * private includes */ +#include "Access.h" #include "DisplayAreaP.h" #include "CallbacksI.h" #include "FontI.h" diff --git a/cde/lib/DtHelp/Canvas.c b/cde/lib/DtHelp/Canvas.c index fed159bd..141a552a 100644 --- a/cde/lib/DtHelp/Canvas.c +++ b/cde/lib/DtHelp/Canvas.c @@ -61,6 +61,7 @@ #include "CvStringI.h" #include "LinkMgrI.h" #include "LayoutUtilI.h" +#include "SelectionI.h" #include "VirtFuncsI.h" #ifdef NLS16 @@ -144,7 +145,7 @@ static _DtCanvasStruct DefaultCanvas = NULL, /* _DtCvMarkData *marks; */ NULL, /* searchs */ NULL, /* pg_breaks */ - NULL, /* _DtCvVirtualInfo virt_functions; */ + { NULL }, /* _DtCvVirtualInfo virt_functions; */ }; /***************************************************************************** diff --git a/cde/lib/DtHelp/CanvasI.h b/cde/lib/DtHelp/CanvasI.h index 1af7c981..85ed3f57 100644 --- a/cde/lib/DtHelp/CanvasI.h +++ b/cde/lib/DtHelp/CanvasI.h @@ -130,7 +130,7 @@ typedef struct _dtCvSearchData { typedef struct _dtCanvasStruct { int error; - int txt_cnt; /* maximum used in txt_list */ + long txt_cnt; /* maximum used in txt_list */ int txt_max; /* maximum in txt_list */ int line_cnt; /* maximum used in line_lst */ diff --git a/cde/lib/DtHelp/CanvasOs.c b/cde/lib/DtHelp/CanvasOs.c index 56e510d7..cccb8cb3 100644 --- a/cde/lib/DtHelp/CanvasOs.c +++ b/cde/lib/DtHelp/CanvasOs.c @@ -43,6 +43,7 @@ /* * system includes */ +#include #include #include #include @@ -59,6 +60,7 @@ */ #include "bufioI.h" #include "CanvasOsI.h" +#include "FormatUtilI.h" #ifdef NLS16 #endif diff --git a/cde/lib/DtHelp/CleanUp.c b/cde/lib/DtHelp/CleanUp.c index ab917bd9..c9d984b6 100644 --- a/cde/lib/DtHelp/CleanUp.c +++ b/cde/lib/DtHelp/CleanUp.c @@ -45,6 +45,7 @@ * system includes */ #include +#include /* * Canvas Engine includes @@ -61,6 +62,7 @@ #include "FontAttrI.h" #include "FormatUtilI.h" #include "RegionI.h" +#include "StringFuncsI.h" #include "XInterfaceI.h" #ifdef NLS16 diff --git a/cde/lib/DtHelp/Destroy.c b/cde/lib/DtHelp/Destroy.c index ac92912c..e3061be6 100644 --- a/cde/lib/DtHelp/Destroy.c +++ b/cde/lib/DtHelp/Destroy.c @@ -140,7 +140,7 @@ _DtHelpDisplayAreaDestroyCB ( XtPointer call_data) { int i; - int strIdx; + long strIdx; XrmName xrmList[_DtHelpFontQuarkNumber]; Display *dpy; DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data; diff --git a/cde/lib/DtHelp/DisplayAreaP.h b/cde/lib/DtHelp/DisplayAreaP.h index 7719e573..95c8bb1f 100644 --- a/cde/lib/DtHelp/DisplayAreaP.h +++ b/cde/lib/DtHelp/DisplayAreaP.h @@ -120,7 +120,7 @@ typedef struct _DtHelpDAfontInfo { int max_sets; /* The max number of font_sets */ int struct_cnt; /* the cur number of font_structs */ int set_cnt; /* The cur number of font_sets */ - int def_idx; /* The default index */ + long def_idx; /* The default index */ } DtHelpDAFontInfo; /* diff --git a/cde/lib/DtHelp/Environ_c.c b/cde/lib/DtHelp/Environ_c.c index 9cffa956..4ffb05f6 100644 --- a/cde/lib/DtHelp/Environ_c.c +++ b/cde/lib/DtHelp/Environ_c.c @@ -40,6 +40,7 @@ ** ******************************************************************** ****************************<+>*************************************/ +#include #include #include #include diff --git a/cde/lib/DtHelp/Font.c b/cde/lib/DtHelp/Font.c index d34d96c2..34f61f4e 100644 --- a/cde/lib/DtHelp/Font.c +++ b/cde/lib/DtHelp/Font.c @@ -270,7 +270,7 @@ static XrmBinding FontBindings[_DtHelpFontQuarkNumber] = { XrmBindLoosely, XrmBindLoosely, XrmBindLoosely, XrmBindLoosely, XrmBindLoosely, XrmBindLoosely, XrmBindLoosely }; -static DtHelpDAFSMetrics DefaultMetrics = { FALSE, 0, 0 }; +static DtHelpDAFSMetrics DefaultMetrics = { FALSE, { 0, 0 } }; static DtHelpDAFontInfo DefFontInfo = { NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, 0, 0, 0, 0}; @@ -366,7 +366,7 @@ LoadFont ( Display *dpy, DtHelpDAFontInfo *font_info, char *font_string, - int *ret_index) + long *ret_index) { short found = False; short colon = False; @@ -479,10 +479,10 @@ int __DtHelpFontIndexGet ( DtHelpDispAreaStruct *pDAS, XrmQuarkList xrm_list, - int *ret_idx) + long *ret_idx) { int result = -1; - int fontIndex = pDAS->font_info.def_idx; + long fontIndex = pDAS->font_info.def_idx; XrmRepresentation retType; XrmValue retValue; char buffer[10]; @@ -541,7 +541,7 @@ __DtHelpFontIndexGet ( /* * remember the character set for this font. */ - sprintf (buffer, "%d", fontIndex); + sprintf (buffer, "%ld", fontIndex); retValue.size = sizeof (XrmQuark); retValue.addr = (XtPointer) &xrm_list[_DT_HELP_FONT_CHAR_SET]; xrmList[0] = XrmStringToQuark (buffer); @@ -581,7 +581,7 @@ __DtHelpFontIndexGet ( int __DtHelpFontCharSetQuarkGet ( DtHelpDispAreaStruct *pDAS, - int font_index, + long font_index, XrmQuark *ret_quark ) { XrmRepresentation retType; @@ -593,7 +593,7 @@ __DtHelpFontCharSetQuarkGet ( /* * quarkize the font index */ - sprintf (buffer, "%d", font_index); + sprintf (buffer, "%ld", font_index); xrmList[0] = XrmStringToQuark (buffer); xrmList[1] = XrmStringToQuark ("code_set"); xrmList[2] = 0; @@ -625,7 +625,7 @@ __DtHelpFontCharSetQuarkGet ( int __DtHelpFontLangQuarkGet ( DtHelpDispAreaStruct *pDAS, - int font_index, + long font_index, XrmQuark *ret_quark ) { XrmRepresentation retType; @@ -637,7 +637,7 @@ __DtHelpFontLangQuarkGet ( /* * quarkize the font index */ - sprintf (buffer, "%d", font_index); + sprintf (buffer, "%ld", font_index); xrmList[0] = XrmStringToQuark (buffer); xrmList[1] = XrmStringToQuark ("language"); xrmList[2] = 0; @@ -814,7 +814,7 @@ __DtHelpFontDatabaseInit ( } /****************************************************************************** - * Function: XFontStruct *__DtHelpFontStructGet (int font_index ); + * Function: XFontStruct *__DtHelpFontStructGet (long font_index ); * * Parameters: font_index Specifies an index into the Font Structure * List. @@ -827,7 +827,7 @@ __DtHelpFontDatabaseInit ( XFontStruct * __DtHelpFontStructGet ( DtHelpDAFontInfo font_info, - int font_index) + long font_index) { if (font_index > -1 && font_index < font_info.struct_cnt) @@ -837,7 +837,7 @@ __DtHelpFontStructGet ( } /****************************************************************************** - * Function: XFontSet __DtHelpFontSetGet (int font_index); + * Function: XFontSet __DtHelpFontSetGet (long font_index); * * Parameters: font_index Specifies an index into the Font Set List. * @@ -849,7 +849,7 @@ __DtHelpFontStructGet ( XFontSet __DtHelpFontSetGet ( DtHelpDAFontInfo font_info, - int font_index) + long font_index) { if (font_index < 0) @@ -864,7 +864,7 @@ __DtHelpFontSetGet ( } /****************************************************************************** - * Function: int __DtHelpDefaultFontIndexGet (); + * Function: long __DtHelpDefaultFontIndexGet (); * * Parameters: * @@ -873,7 +873,7 @@ __DtHelpFontSetGet ( * Purpose: * *****************************************************************************/ -int +long __DtHelpDefaultFontIndexGet ( DtHelpDispAreaStruct *pDAS) { @@ -894,7 +894,7 @@ __DtHelpDefaultFontIndexGet ( void __DtHelpFontMetrics ( DtHelpDAFontInfo font_info, - int font_index, + long font_index, _DtCvUnit *ret_ascent, _DtCvUnit *ret_descent, _DtCvUnit *ret_char_width, @@ -983,11 +983,11 @@ _DtHelpGetExactFontIndex ( const char *lang, const char *char_set, char *xlfd_spec, - int *ret_idx) + long *ret_idx) { int i = 0; int result = -1; - int fontIndex = pDAS->font_info.def_idx; + long fontIndex = pDAS->font_info.def_idx; char **nameList; DtHelpDAFontInfo *fontInfo = &(pDAS->font_info); Display *dpy = XtDisplay(pDAS->dispWid); @@ -1048,7 +1048,7 @@ _DtHelpGetExactFontIndex ( * remember the character set for this font. */ myQuark = XrmStringToQuark(char_set); - sprintf (buffer, "%d", fontIndex); + sprintf (buffer, "%ld", fontIndex); retValue.size = sizeof (XrmQuark); retValue.addr = (XtPointer) &myQuark; xrmList[0] = XrmStringToQuark (buffer); diff --git a/cde/lib/DtHelp/FontI.h b/cde/lib/DtHelp/FontI.h index 413d0d7b..f88288a5 100644 --- a/cde/lib/DtHelp/FontI.h +++ b/cde/lib/DtHelp/FontI.h @@ -78,12 +78,12 @@ extern "C" { * Semi Public Routines ****************************************************************************/ extern void _DtHelpCopyDefaultList(XrmName *xrm_list); -extern int __DtHelpDefaultFontIndexGet ( +extern long __DtHelpDefaultFontIndexGet ( DtHelpDispAreaStruct *pDAS); extern void _DtHelpGetStringQuarks(XrmName *xrm_list); extern int __DtHelpFontCharSetQuarkGet( DtHelpDispAreaStruct *pDAS, - int font_index, + long font_index, XrmQuark *ret_quark); extern void __DtHelpFontDatabaseInit ( DtHelpDispAreaStruct *pDAS, @@ -93,14 +93,14 @@ extern void __DtHelpFontDatabaseInit ( extern int __DtHelpFontIndexGet ( DtHelpDispAreaStruct *pDAS, XrmQuarkList xrm_list, - int *ret_idx); + long *ret_idx); extern int __DtHelpFontLangQuarkGet( DtHelpDispAreaStruct *pDAS, - int font_index, + long font_index, XrmQuark *ret_quark); extern void __DtHelpFontMetrics ( DtHelpDAFontInfo font_info, - int font_index, + long font_index, _DtCvUnit *ret_ascent, _DtCvUnit *ret_descent, _DtCvUnit *ret_char_width, @@ -108,16 +108,16 @@ extern void __DtHelpFontMetrics ( _DtCvUnit *ret_sub); extern XFontSet __DtHelpFontSetGet ( DtHelpDAFontInfo font_info, - int font_index ); + long font_index ); extern XFontStruct *__DtHelpFontStructGet ( DtHelpDAFontInfo font_info, - int font_index); + long font_index); extern int _DtHelpGetExactFontIndex( DtHelpDispAreaStruct *pDAS, const char *lang, const char *char_set, char *xlfd_spec, - int *ret_idx); + long *ret_idx); #ifdef __cplusplus } diff --git a/cde/lib/DtHelp/Format.c b/cde/lib/DtHelp/Format.c index 8a923096..db913eca 100644 --- a/cde/lib/DtHelp/Format.c +++ b/cde/lib/DtHelp/Format.c @@ -83,10 +83,12 @@ extern int errno; #include "Access.h" #include "AccessP.h" #include "AccessI.h" +#include "AccessCCDFI.h" #include "SDLI.h" #include "FormatUtilI.h" #include "FormatCCDFI.h" #include "FormatSDLI.h" +#include "StringFuncsI.h" #ifdef NLS16 @@ -135,10 +137,10 @@ FormatChunksToXmString( { int result = 0; int i; - int j; + long j; int quarkCount; - int chunkType; - int myIdx; + long chunkType; + long myIdx; _DtCvPointer fontPtr; char *charSet; const char *strChunk; @@ -219,7 +221,7 @@ FormatChunksToXmString( /* * create a string for the char set and a quark for it. */ - chunkType = (int) title_chunks[i++]; + chunkType = (long) title_chunks[i++]; /* * i now points to the first value after the type @@ -247,7 +249,7 @@ FormatChunksToXmString( * resolve/load the font for the default fonts */ _DtHelpDAResolveFont(pDAS, lang, charSet, fontSpecs, &fontPtr); - myIdx = (int) fontPtr; + myIdx = (long) fontPtr; if (lang != NULL) { charSet--; @@ -267,9 +269,9 @@ FormatChunksToXmString( /* * get the default font for the language and code set. */ - (void) __DtHelpFontCharSetQuarkGet(pDAS, (int)title_chunks[i], + (void) __DtHelpFontCharSetQuarkGet(pDAS, (long)title_chunks[i], &xrmName[_DT_HELP_FONT_CHAR_SET]); - (void) __DtHelpFontLangQuarkGet(pDAS, (int)title_chunks[i], + (void) __DtHelpFontLangQuarkGet(pDAS, (long)title_chunks[i], &xrmName[_DT_HELP_FONT_LANG_TER]); (void) __DtHelpFontIndexGet(pDAS, xrmName, &myIdx); @@ -284,23 +286,23 @@ FormatChunksToXmString( */ if (chunkType & DT_HELP_CE_SPC) { - j = (int) title_chunks[i]; + j = (long) title_chunks[i]; strChunk = _DtHelpDAGetSpcString(pDAS->spc_chars[j].spc_idx); fontPtr = pDAS->spc_chars[j].font_ptr; /* * get the default font for the language and code set. */ - (void) __DtHelpFontCharSetQuarkGet(pDAS, (int)fontPtr, + (void) __DtHelpFontCharSetQuarkGet(pDAS, (long)fontPtr, &xrmName[_DT_HELP_FONT_CHAR_SET]); - (void) __DtHelpFontLangQuarkGet(pDAS, (int)fontPtr, + (void) __DtHelpFontLangQuarkGet(pDAS, (long)fontPtr, &xrmName[_DT_HELP_FONT_LANG_TER]); (void) __DtHelpFontIndexGet(pDAS, xrmName, &myIdx); } else /* if (chunkType & _DT_HELP_CE_STRING) */ strChunk = (char *) title_chunks[i]; - sprintf(buffer, "%d", myIdx); + sprintf(buffer, "%ld", myIdx); charSetQuark = XrmStringToQuark(buffer); j = 0; diff --git a/cde/lib/DtHelp/FormatCCDF.c b/cde/lib/DtHelp/FormatCCDF.c index 66bf31c3..56c5eebe 100644 --- a/cde/lib/DtHelp/FormatCCDF.c +++ b/cde/lib/DtHelp/FormatCCDF.c @@ -5206,7 +5206,7 @@ _DtHelpCeGetCcdfTitleChunks( _FrmtUiInfo *ui_info, void ***ret_chunks) { - int type = 0; + long type = 0; int result = 0; int offset; char *fileName; diff --git a/cde/lib/DtHelp/FormatI.h b/cde/lib/DtHelp/FormatI.h index a1b13bc7..1369d5a2 100644 --- a/cde/lib/DtHelp/FormatI.h +++ b/cde/lib/DtHelp/FormatI.h @@ -100,5 +100,9 @@ extern int _DtHelpFormatVolumeTitle ( XmString *ret_title, XmFontList *ret_list, Boolean *ret_mod); +extern int _DtHelpGetAsciiVolumeTitle ( + XtPointer client_data, + _DtHelpVolumeHdl volume, + char **ret_title); #endif /* _DtHelpFormatI_h */ diff --git a/cde/lib/DtHelp/FormatMan.c b/cde/lib/DtHelp/FormatMan.c index 3dd27177..cf758626 100644 --- a/cde/lib/DtHelp/FormatMan.c +++ b/cde/lib/DtHelp/FormatMan.c @@ -893,7 +893,7 @@ _DtHelpFormatManPage( /* * did we have any paragraphs to format? */ - if (topic != NULL && NULL == topicStruct->seg_list + if ((topic != NULL && NULL == topicStruct->seg_list) || NULL == _DtCvContainerListOfSeg(topicStruct->seg_list)) { _DtHelpFreeSegments(topicStruct->seg_list, _DtCvFALSE, diff --git a/cde/lib/DtHelp/FormatSDL.c b/cde/lib/DtHelp/FormatSDL.c index 34ea1641..8a32490d 100644 --- a/cde/lib/DtHelp/FormatSDL.c +++ b/cde/lib/DtHelp/FormatSDL.c @@ -600,19 +600,21 @@ static FormatStruct DefFormatStruct = SdlTypeDynamic, /* SdlOption sdl_type */ SdlWindowCurrent, /* SdlOption window; */ SdlInterpKsh, /* SdlOption interp; */ - 0, /* SDLNumber count/offset; */ + { 0 }, /* SDLNumber count/offset; */ NULL, /* SDLCdata language; */ NULL, /* SDLCdata char_set; */ NULL, /* SDLCdata id; */ NULL, /* SDLCdata elstr1; */ NULL, /* SDLCdata elstr2; */ { /* SDLDocInfo doc_info; */ + { NULL, /* SDLCdata language; */ NULL, /* SDLCdata char_set; */ NULL, /* SDLId first_pg; */ NULL, /* SDLCdata doc-id; */ NULL, /* SDLCdata timestamp; */ NULL, /* SDLCdata sdldtd; */ + }, }, { /* SdlMatchData */ SdlClassText, /* SdlOption clan; */ @@ -9355,7 +9357,7 @@ CreateTitleChunks( int *ret_cnt, void ***ret_chunks) { - int type; + long type; int cnt; int result = 0; const char *myLang; diff --git a/cde/lib/DtHelp/FormatTerm.c b/cde/lib/DtHelp/FormatTerm.c index e1174646..c9790fd6 100644 --- a/cde/lib/DtHelp/FormatTerm.c +++ b/cde/lib/DtHelp/FormatTerm.c @@ -317,7 +317,7 @@ TermStrDraw ( pTerm->lines[y] = (wchar_t *) malloc (sizeof(wchar_t) * (length + 1)); if (pTerm->lines[y] != NULL) { - register i; + register int i; wcStr = pTerm->lines[y]; _DtHelpProcessLock(); @@ -340,7 +340,7 @@ TermStrDraw ( (sizeof(wchar_t) * (length + 1))); if (pTerm->lines[y] != NULL) { - register i; + register int i; wcStr = pTerm->lines[y]; _DtHelpProcessLock(); for (i = pTerm->wc_num[y]; i < x; i++) diff --git a/cde/lib/DtHelp/FormatUtil.c b/cde/lib/DtHelp/FormatUtil.c index 327d2759..21543d21 100644 --- a/cde/lib/DtHelp/FormatUtil.c +++ b/cde/lib/DtHelp/FormatUtil.c @@ -47,6 +47,7 @@ /* * system includes */ +#include #include #include #include diff --git a/cde/lib/DtHelp/GenUtils.c b/cde/lib/DtHelp/GenUtils.c index 8c737311..97a145e9 100644 --- a/cde/lib/DtHelp/GenUtils.c +++ b/cde/lib/DtHelp/GenUtils.c @@ -66,6 +66,7 @@ #include "GenUtilsP.h" #include "FontAttrI.h" #include "Access.h" +#include "AccessI.h" #include "AccessP.h" #include "AccessSDLP.h" #include "AccessSDLI.h" diff --git a/cde/lib/DtHelp/GifUtils.c b/cde/lib/DtHelp/GifUtils.c index ef6e2238..ca85d53d 100644 --- a/cde/lib/DtHelp/GifUtils.c +++ b/cde/lib/DtHelp/GifUtils.c @@ -71,6 +71,7 @@ #include #include #include +#include #include "GifUtilsI.h" #ifndef __STDC__ diff --git a/cde/lib/DtHelp/GlobSearch.c b/cde/lib/DtHelp/GlobSearch.c index 5d66b70e..5b60a89a 100644 --- a/cde/lib/DtHelp/GlobSearch.c +++ b/cde/lib/DtHelp/GlobSearch.c @@ -89,7 +89,9 @@ /* * private includes */ +#include "bufioI.h" #include "Access.h" +#include "AccessI.h" #include "StringFuncsI.h" #include "DisplayAreaI.h" #include "HelpDialogP.h" @@ -97,6 +99,7 @@ #include "HelpAccessI.h" #include "HelpUtilI.h" #include "HelposI.h" +#include "HourGlassI.h" #include "GlobSearchI.h" #include "FileListUtilsI.h" #include "FileUtilsI.h" @@ -1070,8 +1073,8 @@ done: else *ret_helpFile = NULL; } /* WARNING: depends on pointers and integers the same size */ -#ifdef __osf__ - return (NULL == ((ulong_t)hit|(ulong_t)posFile|(ulong_t)locationIdList)) ? -1 : 0; +#ifdef __LP64__ + return (NULL == ((int64_t)hit|(int64_t)posFile|(int64_t)locationIdList)) ? -1 : 0; #else return (0 == ((int)hit|(int)posFile|(int)locationIdList)) ? -1 : 0; #endif diff --git a/cde/lib/DtHelp/Graphics.c b/cde/lib/DtHelp/Graphics.c index a5c8b1b4..c3aa329f 100644 --- a/cde/lib/DtHelp/Graphics.c +++ b/cde/lib/DtHelp/Graphics.c @@ -89,6 +89,7 @@ static char rcs_id[]="$XConsortium: Graphics.c /main/23 1996/12/06 11:12:54 cde- #include #include #include +#include #ifndef STUB #include "il.h" #include "ilfile.h" @@ -96,9 +97,13 @@ static char rcs_id[]="$XConsortium: Graphics.c /main/23 1996/12/06 11:12:54 cde- #include "ilerrors.h" #endif #include +#include #include
#include
+#include "bufioI.h" +#include "Access.h" +#include "AccessI.h" #include "GraphicsP.h" #include "GraphicsI.h" #include "StringFuncsI.h" @@ -454,7 +459,7 @@ static int registry_count = XtNumber(registry); /* Registry of converters and destructors for non-default image types */ static _DtGrRegistryRec *new_registry = NULL; -static new_registry_count = 0; +static int new_registry_count = 0; /***************************************************************************** * Private Routines diff --git a/cde/lib/DtHelp/HelpDialog.c b/cde/lib/DtHelp/HelpDialog.c index 408d7773..415425a3 100644 --- a/cde/lib/DtHelp/HelpDialog.c +++ b/cde/lib/DtHelp/HelpDialog.c @@ -65,6 +65,7 @@ #include #include #include +#include /* Copied from Xm/GeoUtilsI.h */ extern XmGeoMatrix _XmGeoMatrixAlloc( @@ -81,6 +82,7 @@ extern XmGeoMatrix _XmGeoMatrixAlloc( #include "AccessI.h" #include "ActionsI.h" #include "DisplayAreaI.h" +#include "DisplayAreaP.h" #include
#include "HelpI.h" diff --git a/cde/lib/DtHelp/HelpQuickD.c b/cde/lib/DtHelp/HelpQuickD.c index 141dd309..aa5eaff4 100644 --- a/cde/lib/DtHelp/HelpQuickD.c +++ b/cde/lib/DtHelp/HelpQuickD.c @@ -62,6 +62,7 @@ #include #include #include +#include /* Copied from Xm/GeoUtilsI.h */ extern XmGeoMatrix _XmGeoMatrixAlloc( @@ -79,6 +80,7 @@ extern XmGeoMatrix _XmGeoMatrixAlloc( #include
#include "HelpP.h" #include "DisplayAreaI.h" +#include "DisplayAreaP.h" #include "StringFuncsI.h" #include "HelpQuickDP.h" #include "HelpQuickDI.h" diff --git a/cde/lib/DtHelp/HelpUtil.c b/cde/lib/DtHelp/HelpUtil.c index 8b816624..1ef61b5a 100644 --- a/cde/lib/DtHelp/HelpUtil.c +++ b/cde/lib/DtHelp/HelpUtil.c @@ -67,6 +67,7 @@ #include "Access.h" #include "bufioI.h" #include "DisplayAreaI.h" +#include "DisplayAreaP.h" #include
#include "HelpI.h" @@ -76,6 +77,8 @@ #include "HelpDialogP.h" #include "HelpUtilI.h" #include "HelposI.h" +#include "HyperTextI.h" +#include "FormatI.h" #include "MessagesP.h" #include "HelpQuickD.h" #include "SetListI.h" diff --git a/cde/lib/DtHelp/HelpUtilI.h b/cde/lib/DtHelp/HelpUtilI.h index e565a183..85c64551 100644 --- a/cde/lib/DtHelp/HelpUtilI.h +++ b/cde/lib/DtHelp/HelpUtilI.h @@ -393,7 +393,7 @@ void _DtHelpDisplayFormatError( * Purpose: This routine inits common help stuff * ****************************************************************************/ -void _DtHelpInitCommonHelpInit( +void _DtHelpCommonHelpInit( _DtHelpCommonHelpStuff * help); /***************************************************************************** diff --git a/cde/lib/DtHelp/Layout.c b/cde/lib/DtHelp/Layout.c index d8bbc807..bb939ed1 100644 --- a/cde/lib/DtHelp/Layout.c +++ b/cde/lib/DtHelp/Layout.c @@ -332,7 +332,7 @@ static const _DtCvSegmentI BlankTableCell = _DtCvCONTAINER, /* type */ -1, /* link_idx */ { /* container info */ - NULL, /* id */ + { NULL }, /* id */ NULL, /* justify_char */ _DtCvDYNAMIC, /* type */ _DtCvBORDER_NONE, /* border */ @@ -348,7 +348,7 @@ static const _DtCvSegmentI BlankTableCell = 0, /* rmargin */ 0, /* tmargin */ 0, /* bmargin */ - _DtCvBORDER_NONE, /* bdr_info */ + _DtCvBORDER_NONE, /* bdr_info */ NULL /* seg_list */ }, NULL, /* next_seg */ diff --git a/cde/lib/DtHelp/LayoutUtil.c b/cde/lib/DtHelp/LayoutUtil.c index 99b79756..489d7b46 100644 --- a/cde/lib/DtHelp/LayoutUtil.c +++ b/cde/lib/DtHelp/LayoutUtil.c @@ -900,7 +900,7 @@ _DtCvSaveInfo ( int len; int start = layout->line_start; int count = layout->line_bytes; - int txtCnt = canvas->txt_cnt; + long txtCnt = canvas->txt_cnt; _DtCvUnit maxAscent = 0; _DtCvUnit maxDescent = 0; _DtCvUnit maxRegion = 0; @@ -1984,7 +1984,7 @@ _DtCvCvtSegsToPts ( int cnt; int start; int length; - int lineIdx; + long lineIdx; int linkIdx = -1; _DtCvValue lastVisLnk = _DtCvFALSE; _DtCvUnit minY = -1; @@ -2020,7 +2020,7 @@ _DtCvCvtSegsToPts ( /* * what line is this segment on? */ - lineIdx = (int) ((*segs)->segment->internal_use); + lineIdx = (long) ((*segs)->segment->internal_use); /* * get some information about the line diff --git a/cde/lib/DtHelp/LayoutUtilI.h b/cde/lib/DtHelp/LayoutUtilI.h index 77869a2b..9120a848 100644 --- a/cde/lib/DtHelp/LayoutUtilI.h +++ b/cde/lib/DtHelp/LayoutUtilI.h @@ -181,6 +181,9 @@ extern int _DtCvSetTravEntryPos ( extern void _DtCvSortTraversalList ( _DtCanvasStruct *canvas, _DtCvValue retain); +extern int _DtCvSetSearchEntryInfo ( + _DtCanvasStruct* canvas, + int line_idx); #ifdef __cplusplus } /* Close scope of 'extern "C"' declaration which encloses file. */ diff --git a/cde/lib/DtHelp/Obsolete.c b/cde/lib/DtHelp/Obsolete.c index 0362e74a..398cd887 100644 --- a/cde/lib/DtHelp/Obsolete.c +++ b/cde/lib/DtHelp/Obsolete.c @@ -58,7 +58,9 @@ * private includes */ #include "ObsoleteP.h" +#include "bufioI.h" #include "Access.h" +#include "AccessI.h" #ifdef NLS16 #endif diff --git a/cde/lib/DtHelp/PathArea.c b/cde/lib/DtHelp/PathArea.c index 12f06378..a3bd1ce9 100644 --- a/cde/lib/DtHelp/PathArea.c +++ b/cde/lib/DtHelp/PathArea.c @@ -64,6 +64,7 @@ * private includes */ #include "DisplayAreaI.h" +#include "DisplayAreaP.h" #include "StringFuncsI.h" #include "HelposI.h" #include "HelpDialogI.h" @@ -71,6 +72,7 @@ #include "HelpUtilI.h" #include "PathAreaI.h" #include "DestroyI.h" +#include "SetListI.h" #include "XUICreateI.h" /* diff --git a/cde/lib/DtHelp/Print.c b/cde/lib/DtHelp/Print.c index d0bd81e3..254b377b 100644 --- a/cde/lib/DtHelp/Print.c +++ b/cde/lib/DtHelp/Print.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include @@ -74,7 +75,11 @@ */ #include "DisplayAreaI.h" +#include "bufioI.h" +#include "Access.h" +#include "AccessI.h" #include "MessagesP.h" +#include "FormatI.h" #include "HelpI.h" #include "HelposI.h" #include "HelpUtilI.h" diff --git a/cde/lib/DtHelp/PrintI.h b/cde/lib/DtHelp/PrintI.h index fb756ed8..dcb12fa7 100644 --- a/cde/lib/DtHelp/PrintI.h +++ b/cde/lib/DtHelp/PrintI.h @@ -130,6 +130,13 @@ void _DtHelpPrintJob( Boolean printToc, char * topicTitle); +extern void _DtHelpInitPrintStuff ( + _DtHelpPrintStuff * print); + +extern void _DtHelpFreePrintStuff ( + _DtHelpPrintStuff * print, + int cleanUpKind); + #endif /* _PrintI_h */ /* Do not add anything after this endif. */ diff --git a/cde/lib/DtHelp/Resize.c b/cde/lib/DtHelp/Resize.c index b69462c0..9d0d4512 100644 --- a/cde/lib/DtHelp/Resize.c +++ b/cde/lib/DtHelp/Resize.c @@ -49,6 +49,7 @@ /* * private includes */ +#include "Access.h" #include "DisplayAreaP.h" #include "CallbacksI.h" #include "ResizeI.h" diff --git a/cde/lib/DtHelp/Selection.c b/cde/lib/DtHelp/Selection.c index 7a6e2b19..d6a4ba14 100644 --- a/cde/lib/DtHelp/Selection.c +++ b/cde/lib/DtHelp/Selection.c @@ -58,6 +58,7 @@ #include "CvStringI.h" #include "LayoutUtilI.h" #include "SelectionI.h" +#include "VirtFuncsI.h" #ifdef NLS16 #endif @@ -1112,7 +1113,7 @@ _DtCvDrawAreaWithFlags ( * I.E. is this line before the start or after the end? */ if (canvas->txt_lst[i].max_x < start.x || - end.y == start.y && end.x <= dstX ) + (end.y == start.y && end.x <= dstX) ) continue; /* diff --git a/cde/lib/DtHelp/SetList.c b/cde/lib/DtHelp/SetList.c index fbd7b3b2..d7727611 100644 --- a/cde/lib/DtHelp/SetList.c +++ b/cde/lib/DtHelp/SetList.c @@ -67,6 +67,7 @@ #include "DisplayAreaP.h" #include "CallbacksI.h" #include "FontAttrI.h" +#include "FormatI.h" #include "SetListI.h" #include "XInterfaceI.h" #include "XUICreateI.h" diff --git a/cde/lib/DtHelp/SetListI.h b/cde/lib/DtHelp/SetListI.h index 4b3f88f9..490734a8 100644 --- a/cde/lib/DtHelp/SetListI.h +++ b/cde/lib/DtHelp/SetListI.h @@ -68,6 +68,10 @@ extern Boolean _DtHelpSetScrollBars ( XtPointer client_data, Dimension new_width, Dimension new_height ); +extern int _DtHelpUpdatePath ( + DtHelpDispAreaStruct *pDAS, + _DtHelpVolumeHdl volume_handle, + char *loc_id); #ifdef __cplusplus } diff --git a/cde/lib/DtHelp/StringFuncs.c b/cde/lib/DtHelp/StringFuncs.c index 0b8f6f96..fba79eec 100644 --- a/cde/lib/DtHelp/StringFuncs.c +++ b/cde/lib/DtHelp/StringFuncs.c @@ -51,7 +51,7 @@ #include #include /* getlocale(), LOCALE_STATUS, LC_xxx */ -#if defined(_AIX) || defined(USL) || defined(__uxp__) +#if defined(_AIX) || defined(USL) || defined(__uxp__) || defined(CSRG_BASED) #include #endif @@ -493,7 +493,7 @@ int _DtHelpCeStrHashToKey( if (!str) return 0; /* RETURN */ - for (tstr = str; c = *tstr++; ) + for (tstr = str; (c = *tstr++); ) key = (key << 1) + c; return key; diff --git a/cde/lib/DtHelp/XInterface.c b/cde/lib/DtHelp/XInterface.c index 2db2e79e..21a75bfa 100644 --- a/cde/lib/DtHelp/XInterface.c +++ b/cde/lib/DtHelp/XInterface.c @@ -731,9 +731,9 @@ MyDrawString ( Display *dpy, Drawable d, GC gc, - int font_index, - int x, - int y, + long font_index, + long x, + long y, const void *string, int length, int wc, @@ -802,7 +802,7 @@ ResolveFont ( char *lang, const char *charset, _DtHelpFontHints font_attr, - int *ret_idx ) + long *ret_idx ) { int result = -1; char *xlfdSpec = font_attr.xlfd; @@ -1246,8 +1246,8 @@ DADrawString ( if (strWidth) { MyDrawString (dpy, win, drawGC, - (int) font_ptr, - (int) x, (int) y, string, byte_len, + (long) font_ptr, + (long) x, (long) y, string, byte_len, wc, False, pDAS->font_info); if (pDAS->dtinfo && NULL != pSCD) { @@ -1365,7 +1365,7 @@ DADrawSpc ( _DtCvFlags new_flags ) { int i; - int spcLstIdx = (int) spc_handle; + long spcLstIdx = (long) spc_handle; _DtCvUnit ascent; _DtCvUnit descent; const char *spcStr; @@ -1693,7 +1693,7 @@ DABuildSelectedSpc ( _DtCvUnit space, _DtCvFlags flags ) { - int spcIdx = (int) spc_handle; + long spcIdx = (long) spc_handle; int i; int totalLen; int spaceNum = 0; @@ -1792,7 +1792,7 @@ _DtHelpDAResolveFont ( * note - if the mod_string comes in with a NULL pointer, * it came from our own call rather than the Core Engine. */ - int idx; + long idx; (void) ResolveFont(client_data, lang, charset, font_attr, &idx); *ret_font = (_DtCvPointer) idx; @@ -1822,8 +1822,8 @@ _DtHelpDAResolveSpc ( { register int i = 0; int result = -1; - int fontIdx; - int spcTbIdx = 0; + long fontIdx; + long spcTbIdx = 0; _DtCvUnit ascent; _DtCvUnit descent; const char *newSet; @@ -1842,7 +1842,7 @@ _DtHelpDAResolveSpc ( if (result == 0) { - int spcLstIdx = 0; + long spcLstIdx = 0; _DtCvUnit maxWidth; _DtHelpDARegion *pReg; @@ -2154,7 +2154,7 @@ _DtHelpDADestroySpc ( _DtCvPointer client_data, _DtCvPointer spc_handle) { - int spc_index = (int) spc_handle; + long spc_index = (long) spc_handle; DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data; if (pDAS->max_spc == 0) @@ -2324,7 +2324,7 @@ _DtHelpDAGetFontMetrics ( { DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data; - __DtHelpFontMetrics (pDAS->font_info, (int) font_ptr, + __DtHelpFontMetrics (pDAS->font_info, (long) font_ptr, ret_ascent, ret_descent, ret_width, ret_super, ret_sub); } @@ -2346,7 +2346,7 @@ _DtHelpDAGetStrWidth ( { DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data; int length; - int font_index; + long font_index; _DtCvStringInfo *strInfo; if (elem_type != _DtCvSTRING_TYPE) @@ -2362,7 +2362,7 @@ _DtHelpDAGetStrWidth ( * was opened for this string. Use the X11R5 I18N routine to figure * out its length. Otherwise use the standard X11 text width call. */ - font_index = (int) strInfo->font_ptr; + font_index = (long) strInfo->font_ptr; if (font_index < 0) { if (0 == strInfo->wc) diff --git a/cde/lib/DtHelp/XInterfaceI.h b/cde/lib/DtHelp/XInterfaceI.h index 89f24354..f5a2a116 100644 --- a/cde/lib/DtHelp/XInterfaceI.h +++ b/cde/lib/DtHelp/XInterfaceI.h @@ -131,6 +131,9 @@ extern void _DtHelpDARenderElem ( _DtCvElemType trav_type, _DtCvPointer trav_data, _DtCvPointer data); +extern void _DtHelpDATocMarker ( + XtPointer client_data, + Boolean draw); #ifdef __cplusplus } /* Close scope of 'extern "C"' declaration which encloses file. */ diff --git a/cde/lib/DtHelp/XUICreate.c b/cde/lib/DtHelp/XUICreate.c index 368b6d51..9a9932e1 100644 --- a/cde/lib/DtHelp/XUICreate.c +++ b/cde/lib/DtHelp/XUICreate.c @@ -55,6 +55,7 @@ #include #include #include +#include /* * Canvas Engine @@ -66,6 +67,7 @@ * private includes */ #include "bufioI.h" +#include "Access.h" #include "DisplayAreaP.h" #include "CallbacksI.h" #include "XUICreateI.h" diff --git a/cde/lib/DtHelp/XbmUtils.c b/cde/lib/DtHelp/XbmUtils.c index a76d111d..b12a4447 100644 --- a/cde/lib/DtHelp/XbmUtils.c +++ b/cde/lib/DtHelp/XbmUtils.c @@ -74,6 +74,7 @@ from the X Consortium. * without the other). */ +#include #include #include #include @@ -123,7 +124,7 @@ static void initHexTable() /* * read next hex value in the input stream, return -1 if EOF */ -static NextInt (fstream) +static int NextInt (fstream) _DtGrStream *fstream; { int ch; diff --git a/cde/lib/DtHelp/bufio.c b/cde/lib/DtHelp/bufio.c index dcccd226..e1b6e639 100644 --- a/cde/lib/DtHelp/bufio.c +++ b/cde/lib/DtHelp/bufio.c @@ -100,7 +100,7 @@ BufFileRawSkip ( return count; } -static +static int BufFileRawFlush ( int c, BufFilePtr f ) diff --git a/cde/lib/DtHelp/decompress.c b/cde/lib/DtHelp/decompress.c index c21d8087..b32a1c20 100644 --- a/cde/lib/DtHelp/decompress.c +++ b/cde/lib/DtHelp/decompress.c @@ -31,6 +31,7 @@ */ /* #include "fontmisc.h" */ +#include #include #include #include diff --git a/cde/lib/DtHelp/il/ilX.c b/cde/lib/DtHelp/il/ilX.c index 79cf4ffd..315cf682 100644 --- a/cde/lib/DtHelp/il/ilX.c +++ b/cde/lib/DtHelp/il/ilX.c @@ -46,6 +46,7 @@ #include "ilpipelem.h" #include "ilerrors.h" +#include #define X_COLOR_MAX 65535 /* max value for X colormap RGB value */ @@ -318,10 +319,11 @@ double spreadFactor; /* Use the grays if the same number, else deallocate them. */ context->error = IL_OK; /* assume no errors */ - if (pXWC->pGrays) + if (pXWC->pGrays) { if (pXWC->nGrays == nGrays) return TRUE; else ilFreeColorData (pXWC, IL_FREE_XGRAYS); + } if (nGrays > 256) return FALSE; /* EXIT */ diff --git a/cde/lib/DtHelp/il/ilconvert.c b/cde/lib/DtHelp/il/ilconvert.c index 1ba03e26..7086c5f3 100644 --- a/cde/lib/DtHelp/il/ilconvert.c +++ b/cde/lib/DtHelp/il/ilconvert.c @@ -38,6 +38,7 @@ ***-------------------------------------------------------------------*/ #include "ilint.h" +#include "ilpipeint.h" #include "ilpipelem.h" #include "ilconvert.h" #include "ilerrors.h" diff --git a/cde/lib/DtHelp/il/ildata.c b/cde/lib/DtHelp/il/ildata.c index 887e206c..7671542d 100644 --- a/cde/lib/DtHelp/il/ildata.c +++ b/cde/lib/DtHelp/il/ildata.c @@ -50,11 +50,11 @@ const ilImageDes ilBitonal0WhiteImageDes = { /* IL_DES_BITONAL */ /* blackIsZero */ FALSE, /* nSamplesPerPixel */ 1, /* noLongerUsed */ 0x10001, - /* compInfo.g3 */ {0}, + /* compInfo.g3 */ { {0} }, /* reserved */ {0, 0, 0, 0}, /* flags */ 0, - /* typeInfo.YCbCr */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - /* nLevelsPerSample */ 2 + /* typeInfo.YCbCr */ { { { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, 0, 0, 0, 0 } }, + /* nLevelsPerSample */ { 2 } }; const ilImageDes ilGray256ImageDes = { /* IL_DES_GRAY */ @@ -63,11 +63,11 @@ const ilImageDes ilGray256ImageDes = { /* IL_DES_GRAY */ /* blackIsZero */ TRUE, /* nSamplesPerPixel */ 1, /* noLongerUsed */ 0x10001, - /* compInfo.g3 */ {0}, + /* compInfo.g3 */ { {0} }, /* reserved */ {0, 0, 0, 0}, /* flags */ 0, - /* typeInfo.YCbCr */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - /* nLevelsPerSample */ 256 + /* typeInfo.YCbCr */ { { { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, 0, 0, 0, 0 } }, + /* nLevelsPerSample */ { 256 } }; const ilImageDes ilRGB256ImageDes = { /* IL_DES_RGB */ @@ -76,11 +76,11 @@ const ilImageDes ilRGB256ImageDes = { /* IL_DES_RGB */ /* blackIsZero */ FALSE, /* nSamplesPerPixel */ 3, /* noLongerUsed */ 0x10001, - /* compInfo.g3 */ {0}, + /* compInfo.g3 */ { {0} }, /* reserved */ {0, 0, 0, 0}, /* flags */ 0, - /* typeInfo.YCbCr */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - /* nLevelsPerSample */ 256, 256, 256 + /* typeInfo.YCbCr */ { { { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, 0, 0, 0, 0 } }, + /* nLevelsPerSample */ { 256, 256, 256 } }; const ilImageDes ilYCbCrImageDes = { /* IL_DES_YCBCR */ @@ -89,12 +89,12 @@ const ilImageDes ilYCbCrImageDes = { /* IL_DES_YCBCR */ /* blackIsZero */ FALSE, /* nSamplesPerPixel */ 3, /* noLongerUsed */ 0x10001, - /* compInfo.g3 */ {0}, + /* compInfo.g3 */ { {0} }, /* reserved */ {0, 0, 0, 0}, /* flags */ 0, - /* typeInfo.YCbCr */ {0, 255, 1, 1, 128, 255, 1, 1, 128, 255, 1, 1, - 2990, 5870, 1140, 0}, - /* nLevelsPerSample */ 256, 256, 256 + /* typeInfo.YCbCr */ { { { { 0, 255, 1, 1 }, { 128, 255, 1, 1 }, { 128, 255, 1, 1 } }, + 2990, 5870, 1140, 0} }, + /* nLevelsPerSample */ { 256, 256, 256 } }; const ilImageDes ilYCbCr2ImageDes = { /* IL_DES_YCBCR_2 */ @@ -103,12 +103,12 @@ const ilImageDes ilYCbCr2ImageDes = { /* IL_DES_YCBCR_2 */ /* blackIsZero */ FALSE, /* nSamplesPerPixel */ 3, /* noLongerUsed */ 0x10001, - /* compInfo.g3 */ {0}, + /* compInfo.g3 */ { {0} }, /* reserved */ {0, 0, 0, 0}, /* flags */ 0, - /* typeInfo.YCbCr */ {0, 255, 1, 1, 128, 255, 2, 2, 128, 255, 2, 2, - 2990, 5870, 1140, 0}, - /* nLevelsPerSample */ 256, 256, 256 + /* typeInfo.YCbCr */ { { { { 0, 255, 1, 1 }, { 128, 255, 2, 2 }, { 128, 255, 2, 2 } }, + 2990, 5870, 1140, 0} }, + /* nLevelsPerSample */ { 256, 256, 256 } }; const ilImageDes ilPaletteImageDes = { /* IL_DES_PALETTE */ @@ -117,11 +117,11 @@ const ilImageDes ilPaletteImageDes = { /* IL_DES_PALETTE */ /* blackIsZero */ FALSE, /* nSamplesPerPixel */ 1, /* noLongerUsed */ 0x10001, - /* compInfo.g3 */ {0}, + /* compInfo.g3 */ { {0} }, /* reserved */ {0, 0, 0, 0}, /* flags */ 0, - /* typeInfo.YCbCr */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, - /* nLevelsPerSample */ 256 + /* typeInfo.YCbCr */ { { { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, 0, 0, 0, 0 } }, + /* nLevelsPerSample */ { 256 } }; @@ -147,16 +147,16 @@ const unsigned char ilBitReverseTable [256] = const ilImageFormat ilBitImageFormat = /* IL_FORMAT_BIT */ - { IL_SAMPLE_PIXELS, IL_MSB_FIRST, 32, 0, 0, 0, 0, 1 }; + { IL_SAMPLE_PIXELS, IL_MSB_FIRST, 32, { 0, 0, 0, 0 }, { 1 } }; const ilImageFormat ilByteImageFormat = /* IL_FORMAT_BYTE */ - { IL_SAMPLE_PIXELS, IL_MSB_FIRST, 8, 0, 0, 0, 0, 8 }; + { IL_SAMPLE_PIXELS, IL_MSB_FIRST, 8, { 0, 0, 0, 0 }, { 8 } }; const ilImageFormat il3BytePixelImageFormat = /* IL_FORMAT_3BYTE_PIXEL */ - { IL_SAMPLE_PIXELS, IL_MSB_FIRST, 8, 0, 0, 0, 0, 8, 8, 8 }; + { IL_SAMPLE_PIXELS, IL_MSB_FIRST, 8, { 0, 0, 0, 0 }, { 8, 8, 8 } }; const ilImageFormat il3BytePlaneImageFormat = /* IL_FORMAT_3BYTE_PLANEL */ - { IL_SAMPLE_PLANES, IL_MSB_FIRST, 8, 0, 0, 0, 0, 8, 8, 8 }; + { IL_SAMPLE_PLANES, IL_MSB_FIRST, 8, { 0, 0, 0, 0 }, { 8, 8, 8 } }; /* Table of shift values, indexed by YCbCr subsample values (1, 2 or 4) */ diff --git a/cde/lib/DtHelp/il/ildecomp.h b/cde/lib/DtHelp/il/ildecomp.h index 17db93a2..9900565b 100644 --- a/cde/lib/DtHelp/il/ildecomp.h +++ b/cde/lib/DtHelp/il/ildecomp.h @@ -75,4 +75,10 @@ IL_EXTERN ilBool _ilDecompPackbits ( ilImageFormat *pimformat ); +IL_EXTERN ilBool _ilDecompJPEG ( + ilPipe pipe, + ilPipeInfo *pInfo, + ilImageDes *pDes + ); + #endif diff --git a/cde/lib/DtHelp/il/ildecompg3.c b/cde/lib/DtHelp/il/ildecompg3.c index 5e08d194..dda06aa1 100644 --- a/cde/lib/DtHelp/il/ildecompg3.c +++ b/cde/lib/DtHelp/il/ildecompg3.c @@ -389,12 +389,12 @@ unsigned long *pNLines if ( tag_bit ) { pPriv->srcpos++; - if (error = _ilDecompG3Line(pPriv,dstImageP) ) + if ((error = _ilDecompG3Line(pPriv,dstImageP)) ) return error; } else { pPriv->srcpos++; - if (error = _ilDecompG4Line(pPriv,pRefLine,dstImageP) ) + if ((error = _ilDecompG4Line(pPriv,pRefLine,dstImageP)) ) return error; } @@ -402,7 +402,7 @@ unsigned long *pNLines if ( ( !Is_EOLs) && ( ( temp = pPriv->srcpos % 8) != 0 ) ) pPriv->srcpos += (8-temp) ; - if (error = _ilDecompG3Line(pPriv,dstImageP) ) + if ((error = _ilDecompG3Line(pPriv,dstImageP)) ) return error; } /* is 2d coding */ diff --git a/cde/lib/DtHelp/il/ildecompg4.c b/cde/lib/DtHelp/il/ildecompg4.c index 747b7770..5532ea1d 100644 --- a/cde/lib/DtHelp/il/ildecompg4.c +++ b/cde/lib/DtHelp/il/ildecompg4.c @@ -564,7 +564,7 @@ unsigned long *pNLines while ( nLines-- > 0 ) { - if (error = _ilDecompG4Line(pPriv,pRefLine,dstImageP) ) + if ((error = _ilDecompG4Line(pPriv,pRefLine,dstImageP)) ) return error; pRefLine = dstImageP; diff --git a/cde/lib/DtHelp/il/ildecompg4.h b/cde/lib/DtHelp/il/ildecompg4.h index f914709f..4494bfad 100644 --- a/cde/lib/DtHelp/il/ildecompg4.h +++ b/cde/lib/DtHelp/il/ildecompg4.h @@ -179,3 +179,8 @@ IL_EXTERN const ilDecompG4HuffTableRec ilArFax1DDecodeBlack[G4K_BlackTableSize]; IL_EXTERN const ilDecompG4HuffTableRec ilArFax2DDecodeTable[G4K_DecodeTableSize]; +IL_EXTERN ilError _ilDecompG4Line( +register ilDecompG3G4PrivPtr pPriv, +ilPtr pRefLine, +ilPtr dstImageP +); diff --git a/cde/lib/DtHelp/il/ildecompjpeg.c b/cde/lib/DtHelp/il/ildecompjpeg.c index 117d31fe..703413e9 100644 --- a/cde/lib/DtHelp/il/ildecompjpeg.c +++ b/cde/lib/DtHelp/il/ildecompjpeg.c @@ -86,7 +86,7 @@ static ilError ilDecompCleanup ( /* Cleanup from JPEG decode, but only if firstStrip setup done */ if (!pPriv->firstStrip) { if (pPriv->pJPEGPriv) - if (error = iljpgDecodeCleanup (pPriv->pJPEGPriv)) + if ((error = iljpgDecodeCleanup (pPriv->pJPEGPriv))) return error; if (pPriv->pJPEGData) return iljpgFreeData (pPriv->pJPEGData); @@ -120,7 +120,7 @@ static ilError ilDecompRawExecute ( /* If first strip, setup iljpg data and call iljpg Init() function */ if (pPriv->firstStrip) { _ilJPEGTablesIn ((ilJPEGData *)pSrcImage->pCompData, &pPriv->jpgData); - if (error = iljpgDecodeInit (&pPriv->jpgData, &pPriv->pJPEGPriv)) + if ((error = iljpgDecodeInit (&pPriv->jpgData, &pPriv->pJPEGPriv))) return error; pPriv->firstStrip = FALSE; } @@ -167,9 +167,9 @@ static ilError ilDecompJIFExecute ( if (firstStrip) { pPriv->streamRec.pData = pData->pSrcImage->plane[0].pPixels; pPriv->streamRec.nBytesLeft = pData->compressed.nBytesToRead; - if (error = iljpgDecodeJIF (&pPriv->streamRec, &pPriv->pJPEGData)) + if ((error = iljpgDecodeJIF (&pPriv->streamRec, &pPriv->pJPEGData))) return error; - if (error = iljpgDecodeInit (pPriv->pJPEGData, &pPriv->pJPEGPriv)) + if ((error = iljpgDecodeInit (pPriv->pJPEGData, &pPriv->pJPEGPriv))) return error; } @@ -184,8 +184,8 @@ static ilError ilDecompJIFExecute ( if ((pPriv->nLinesWritten + pPriv->stripHeight) > pPriv->jpgData.height) *pNLines = pPriv->jpgData.height - pPriv->nLinesWritten; else *pNLines = pPriv->stripHeight; - if (error = iljpgDecodeExecute (pPriv->pJPEGPriv, &pPriv->streamRec, FALSE, *pNLines, - pPixels, nBytesPerRow)) + if ((error = iljpgDecodeExecute (pPriv->pJPEGPriv, &pPriv->streamRec, FALSE, *pNLines, + pPixels, nBytesPerRow))) return error; /* Handle based on whether firstStrip and/or last strip: @@ -212,7 +212,7 @@ static ilError ilDecompJIFExecute ( /* Called by ilDecompress() when pipe image is JPEG compressed. Add a filter to decompress the pipe image. */ -IL_PRIVATE ilBool _ilDecompJPEG ( +ilBool _ilDecompJPEG ( ilPipe pipe, ilPipeInfo *pInfo, ilImageDes *pDes diff --git a/cde/lib/DtHelp/il/ildither.c b/cde/lib/DtHelp/il/ildither.c index 46ba1e73..181da9b4 100644 --- a/cde/lib/DtHelp/il/ildither.c +++ b/cde/lib/DtHelp/il/ildither.c @@ -1027,7 +1027,7 @@ IL_PRIVATE ilBool _ilConvertRGBToPalette ( int i, shifts[3], nColors; const unsigned short *pMulTable[3]; /* dither other than 484 only: pMul? */ static ilConvertToPaletteInfo defaultConvert = - {IL_DIFFUSION, 4, 8, 4, 8, IL_PALETTE, (ilObject)NULL}; + {IL_DIFFUSION, { 4, 8, 4 }, 8, IL_PALETTE, (ilObject)NULL}; /* Init to null those things freed by "cleanup" if error. */ diff --git a/cde/lib/DtHelp/il/ilimage.c b/cde/lib/DtHelp/il/ilimage.c index c74a63ea..357b106c 100644 --- a/cde/lib/DtHelp/il/ilimage.c +++ b/cde/lib/DtHelp/il/ilimage.c @@ -292,10 +292,11 @@ register int rowBitAlign, nBits, nSamplesPerPixel, i; while (nSamplesPerPixel-- > 0) { nBits = *pNBits++; - if (nBits > 8) + if (nBits > 8) { if (nBits <= 16) nBits = 16; else nBits = 32; + } if (pYCbCr) { i = width >> _ilSubsampleShift[pYCbCr->subsampleHoriz]; if (i <= 0) i = 1; @@ -373,9 +374,9 @@ register ilYCbCrSampleInfo *pYCbCr; else { pPixels = (ilPtr)IL_MALLOC (nBytesToAlloc); if (!pPixels) { /* error; free those already created */ - while (plane != 0) { + while ((plane != 0)) { plane--; - if (pPixels = pImage->i.plane[plane].pPixels) + if ((pPixels = pImage->i.plane[plane].pPixels)) IL_FREE (pPixels); } pImage->i.clientPixels = TRUE; /* so IL does not deallocate them */ @@ -500,7 +501,7 @@ ilError error; } /* Validate pDes: don't allow user-defined types. */ - if (context->error = _ilValidateDesFormat (FALSE, pDes, (ilImageFormat *)NULL)) + if ((context->error = _ilValidateDesFormat (FALSE, pDes, (ilImageFormat *)NULL))) return (ilInternalImage)NULL; /* Create the object and add it to context. */ @@ -564,7 +565,7 @@ ilError error; pImage->i.pPalette = (unsigned short *)NULL; pImage->i.clientPalette = TRUE; - if (error = _ilMallocImagePixels (pImage)) { + if ((error = _ilMallocImagePixels (pImage))) { ilDestroyObject ((ilObject)pImage); context->error = error; return (ilInternalImage)NULL; @@ -665,7 +666,7 @@ int plane, nPlanes; } /* Validate pDes and pFormat: do allow user-defined types. */ - if (context->error = _ilValidateDesFormat (TRUE, pInfo->pDes, pInfo->pFormat)) + if ((context->error = _ilValidateDesFormat (TRUE, pInfo->pDes, pInfo->pFormat))) return (ilClientImage)NULL; /* Create the object and add it to context. */ @@ -733,7 +734,7 @@ int plane, nPlanes; pImage->i.plane[plane] = pInfo->plane[plane]; } else { /* no pixels from client; allocate them here if uncompressed image */ - if (error = _ilMallocImagePixels (pImage)) { + if ((error = _ilMallocImagePixels (pImage))) { ilDestroyObject ((ilObject)pImage); context->error = error; return (ilClientImage)NULL; diff --git a/cde/lib/DtHelp/il/iljpgdecode.c b/cde/lib/DtHelp/il/iljpgdecode.c index 4e3ee945..8bae80a0 100644 --- a/cde/lib/DtHelp/il/iljpgdecode.c +++ b/cde/lib/DtHelp/il/iljpgdecode.c @@ -186,7 +186,7 @@ iljpgError iljpgDecodeExecute ( /* Reset Huffman decoding: beginning of a strip/restart interval */ if (doReset) { - if (error = _iljpgDehuffReset (pPriv)) + if ((error = _iljpgDehuffReset (pPriv))) return error; } @@ -201,7 +201,7 @@ iljpgError iljpgDecodeExecute ( If a restart interval and mcu count >, do a reset/restart. */ if (restartInterval && (pPriv->mcuRestartCount >= restartInterval)) { - if (error = _iljpgDehuffReset (pPriv)) + if ((error = _iljpgDehuffReset (pPriv))) return error; pPriv->mcuRestartCount = 0; } @@ -212,8 +212,8 @@ iljpgError iljpgDecodeExecute ( for (v = 0, bY = pComp->y; v < pComp->vertFactor; v++, bY += 8) { for (h = 0, bX = pComp->x; h < pComp->horiFactor; h++, bX += 8) { - if (error = _iljpgDehuffExecute (pPriv, stream, comp, outHuff, - &blockType)) + if ((error = _iljpgDehuffExecute (pPriv, stream, comp, outHuff, + &blockType))) return error; /* Add previous DC to this one, save away for next */ diff --git a/cde/lib/DtHelp/il/iljpgdecodejif.c b/cde/lib/DtHelp/il/iljpgdecodejif.c index 51c796d9..22c6bf5b 100644 --- a/cde/lib/DtHelp/il/iljpgdecodejif.c +++ b/cde/lib/DtHelp/il/iljpgdecodejif.c @@ -172,9 +172,9 @@ iljpgError iljpgDecodeJIF ( /* DRI: get value and save into restartInterval */ case ILJPGM_DRI: - if (error = iljpgGet2Bytes (stream, &value)) /* length */ + if ((error = iljpgGet2Bytes (stream, &value))) /* length */ goto JIFError; - if (error = iljpgGet2Bytes (stream, &value)) /* restart interval */ + if ((error = iljpgGet2Bytes (stream, &value))) /* restart interval */ goto JIFError; pData->restartInterval = value; break; @@ -182,15 +182,15 @@ iljpgError iljpgDecodeJIF ( /* Start Of Frame 0 (SOF0): save Q table indices; note marker seen. */ case ILJPGM_SOF0: SOF0Found = TRUE; - if (error = iljpgGet2Bytes (stream, &value)) /* length */ + if ((error = iljpgGet2Bytes (stream, &value))) /* length */ goto JIFError; if (!ILJPG_DECODE_GET_BYTE (stream, value, error)) goto JIFError; if (value != 8) /* precision != 8; not supported */ goto BadJIFData; - if (error = iljpgGet2Bytes (stream, &pData->height)) + if ((error = iljpgGet2Bytes (stream, &pData->height))) goto JIFError; - if (error = iljpgGet2Bytes (stream, &pData->width)) + if ((error = iljpgGet2Bytes (stream, &pData->width))) goto JIFError; if (!ILJPG_DECODE_GET_BYTE (stream, nFrameComps, error)) goto JIFError; @@ -218,7 +218,7 @@ iljpgError iljpgDecodeJIF ( Multiple tables ("n") can be defined: n = (length-2)/65; */ case ILJPGM_DQT: - if (error = iljpgGet2Bytes (stream, &length)) /* length */ + if ((error = iljpgGet2Bytes (stream, &length))) /* length */ goto JIFError; length -= 2; /* includes itself */ while (length > 0) { @@ -254,7 +254,7 @@ iljpgError iljpgDecodeJIF ( 4 AC or DC tables are allowed,used by "extended" DCT mode. */ case ILJPGM_DHT: - if (error = iljpgGet2Bytes (stream, &length)) + if ((error = iljpgGet2Bytes (stream, &length))) goto JIFError; length -= 2; /* length includes itself */ while (length > 0) { @@ -307,7 +307,7 @@ iljpgError iljpgDecodeJIF ( SOSFound = TRUE; /* terminate while loop */ if (!SOF0Found) /* SOS before SOF0 is an error */ goto BadJIFData; - if (error = iljpgGet2Bytes (stream, &value)) /* length */ + if ((error = iljpgGet2Bytes (stream, &value))) /* length */ goto JIFError; if (!ILJPG_DECODE_GET_BYTE (stream, value, error)) /* Ns (0..3) */ @@ -357,15 +357,15 @@ iljpgError iljpgDecodeJIF ( goto BadJIFData; } /* END each scan header component */ - if (error = iljpgSkipBytes (stream, 3)) /* skip Ss, Se, Ah/Al */ + if ((error = iljpgSkipBytes (stream, 3))) /* skip Ss, Se, Ah/Al */ goto JIFError; break; /* All other markers have lengths: get length and skip length-2 bytes */ default: - if (error = iljpgGet2Bytes (stream, &value)) + if ((error = iljpgGet2Bytes (stream, &value))) goto JIFError; - if (error = iljpgSkipBytes (stream, value - 2)) /* "length" already skipped */ + if ((error = iljpgSkipBytes (stream, value - 2))) /* "length" already skipped */ goto JIFError; break; } /* END switch marker */ diff --git a/cde/lib/DtHelp/il/iljpgdedct.c b/cde/lib/DtHelp/il/iljpgdedct.c index dfa5658d..73efbeb1 100644 --- a/cde/lib/DtHelp/il/iljpgdedct.c +++ b/cde/lib/DtHelp/il/iljpgdedct.c @@ -57,7 +57,7 @@ _gotoLabel: \ /* compute 2-D DCT descaling matrix */ -static _il_fwft_rev_scale ( +static void _il_fwft_rev_scale ( iljpgPtr q, /* pointer to quantization matrix */ float *s /* pointer to pointer to descaling matrix */ ) diff --git a/cde/lib/DtHelp/il/iljpgdehuff.c b/cde/lib/DtHelp/il/iljpgdehuff.c index c126569b..45cc1ee8 100644 --- a/cde/lib/DtHelp/il/iljpgdehuff.c +++ b/cde/lib/DtHelp/il/iljpgdehuff.c @@ -394,14 +394,14 @@ iljpgError _iljpgDehuffInit ( /* Build lookup tables from DC/AC tables from caller (*pPriv->pData) */ for (i = 0; i < 4; i++) { - if (pTable = pData->DCTables[i]) { - if (error = build_huffman_tables (pTable, (pTable+16), LOOKUP_BITS, - &pHuffPriv->table_set_dc[i])) + if ((pTable = pData->DCTables[i])) { + if ((error = build_huffman_tables (pTable, (pTable+16), LOOKUP_BITS, + &pHuffPriv->table_set_dc[i]))) return error; } - if (pTable = pData->ACTables[i]) { - if (error = build_huffman_tables (pTable, (pTable+16), LOOKUP_BITS, - &pHuffPriv->table_set_ac[i])) + if ((pTable = pData->ACTables[i])) { + if ((error = build_huffman_tables (pTable, (pTable+16), LOOKUP_BITS, + &pHuffPriv->table_set_ac[i]))) return error; } } diff --git a/cde/lib/DtHelp/il/ilpipe.c b/cde/lib/DtHelp/il/ilpipe.c index 19a9ab51..944c4769 100644 --- a/cde/lib/DtHelp/il/ilpipe.c +++ b/cde/lib/DtHelp/il/ilpipe.c @@ -44,6 +44,7 @@ #include +#include "ilcodec.h" #include "ilint.h" #include "ilimage.h" #include "ilpipelem.h" @@ -1102,7 +1103,7 @@ ilBool constantStrip, haveConsumerImage, insertCopyFilter; pPipe->image.info.constantStrip = pDstData->constantStrip; pPipe->image.info.stripHeight = pDstData->stripHeight; } - if (pDes = pDstData->pDes) { + if ((pDes = pDstData->pDes)) { if (pDes->type == IL_PALETTE) { if (pDstData->pPalette) pPipe->image.info.pPalette = pDstData->pPalette; diff --git a/cde/lib/DtHelp/il/ilscale.c b/cde/lib/DtHelp/il/ilscale.c index fc21e64d..c07c1fac 100644 --- a/cde/lib/DtHelp/il/ilscale.c +++ b/cde/lib/DtHelp/il/ilscale.c @@ -41,6 +41,7 @@ #include "ilpipelem.h" #include "ilscaleint.h" #include "ilerrors.h" +#include "ilconvert.h" #define LONGSZ 4 #ifdef LSB_BIT_ORDER diff --git a/cde/lib/DtHelp/il/iltiff.c b/cde/lib/DtHelp/il/iltiff.c index 3263fed6..18db350d 100644 --- a/cde/lib/DtHelp/il/iltiff.c +++ b/cde/lib/DtHelp/il/iltiff.c @@ -216,8 +216,8 @@ register ilBool bigEndian; else pFileTag++; } if (tagFound) { - mallocSize += sizeof (ilFileTag) + - (pFileTag->length * _ilTagTypeItemSizes [pFileTag->type] + 3) & ~3; + mallocSize += (sizeof (ilFileTag) + + (pFileTag->length * _ilTagTypeItemSizes [pFileTag->type] + 3)) & ~3; *ppTag++ = (ilFileTag *)pFileTag; } else *ppTag++ = (ilFileTag *)NULL; @@ -384,7 +384,7 @@ static void ilAddImageToList ( /* Main image: if page # present, add to list in page order, else add to end */ case mainImage: if (pFileImage->p.nPages < 0) { /* no page #; add to end of list */ - if (pFileImage->p.pPrev = (ilFileImage)pFile->pFileImageTail) + if ((pFileImage->p.pPrev = (ilFileImage)pFile->pFileImageTail)) pFileImage->p.pPrev->pNext = (ilFileImage)pFileImage; else pFile->pFileImageHead = pFileImage; } @@ -1061,7 +1061,7 @@ register ilBool bigEndian; /* Add file image to list, if supported. An error is returned only if the file image is malformed; not if it is just unsupported. */ - if (error = ilReadTagsAndAddImageToList (pFile, &pPrevFileImage, pFileImage)) + if ((error = ilReadTagsAndAddImageToList (pFile, &pPrevFileImage, pFileImage))) goto LFIFatalError; /* fatal error returned; EXIT */ /* Read and flip offset to next IFD, at end of tags; save in pFile. */ diff --git a/cde/lib/DtHelp/il/iltiffread.c b/cde/lib/DtHelp/il/iltiffread.c index 315525a4..f14b91d9 100644 --- a/cde/lib/DtHelp/il/iltiffread.c +++ b/cde/lib/DtHelp/il/iltiffread.c @@ -298,9 +298,9 @@ int stripOffsetsIndex, stripByteCountsIndex, colorMapIndex, || (pACTag->nItems != nSamples) || (pACTag->type != IL_TAG_LONG)) return IL_ERROR_FILE_MALFORMED_TAG; - if (error = ilReadJPEGTags (pPriv->pFile, nSamples, (long *)pQTag->pItems, + if ((error = ilReadJPEGTags (pPriv->pFile, nSamples, (long *)pQTag->pItems, (long *)pDCTag->pItems, (long *)pACTag->pItems, - (ilJPEGData *)pPriv->pCompData)) + (ilJPEGData *)pPriv->pCompData))) return error; /* If restartInterval tag present, store value else default to 0 */ @@ -332,7 +332,7 @@ int stripOffsetsIndex, stripByteCountsIndex, colorMapIndex, hasCountBug = FALSE; hasOffsetBug = FALSE; - if (pSoftwareTag = tags[softwareIndex]) { + if ((pSoftwareTag = tags[softwareIndex])) { pName = (char *)pSoftwareTag->pItems; if ((pSoftwareTag->nItems >= 7) && (pName[0] == 'H') && (pName[1] == 'P') && (pName[2] == ' ') && (pName[3] == 'I') && (pName[4] == 'L') -- 2.25.1