Silence lots of warnings in lib/DtHelp.
authorPascal Stumpf <Pascal.Stumpf@cubes.de>
Mon, 22 Jul 2013 16:44:04 +0000 (18:44 +0200)
committerJon Trulson <jon@radscan.com>
Mon, 22 Jul 2013 23:19:13 +0000 (17:19 -0600)
* 64bit warnings
* Missing prototypes
* explicit parentheses / brackets

There's still some work to be done, but, as always, it's a start ...

65 files changed:
cde/include/Xm/XmPrivate.h
cde/include/Xm/extractprototype.awk
cde/lib/DtHelp/Actions.c
cde/lib/DtHelp/CCDFUtil.c
cde/lib/DtHelp/Callbacks.c
cde/lib/DtHelp/Canvas.c
cde/lib/DtHelp/CanvasI.h
cde/lib/DtHelp/CanvasOs.c
cde/lib/DtHelp/CleanUp.c
cde/lib/DtHelp/Destroy.c
cde/lib/DtHelp/DisplayAreaP.h
cde/lib/DtHelp/Environ_c.c
cde/lib/DtHelp/Font.c
cde/lib/DtHelp/FontI.h
cde/lib/DtHelp/Format.c
cde/lib/DtHelp/FormatCCDF.c
cde/lib/DtHelp/FormatI.h
cde/lib/DtHelp/FormatMan.c
cde/lib/DtHelp/FormatSDL.c
cde/lib/DtHelp/FormatTerm.c
cde/lib/DtHelp/FormatUtil.c
cde/lib/DtHelp/GenUtils.c
cde/lib/DtHelp/GifUtils.c
cde/lib/DtHelp/GlobSearch.c
cde/lib/DtHelp/Graphics.c
cde/lib/DtHelp/HelpDialog.c
cde/lib/DtHelp/HelpQuickD.c
cde/lib/DtHelp/HelpUtil.c
cde/lib/DtHelp/HelpUtilI.h
cde/lib/DtHelp/Layout.c
cde/lib/DtHelp/LayoutUtil.c
cde/lib/DtHelp/LayoutUtilI.h
cde/lib/DtHelp/Obsolete.c
cde/lib/DtHelp/PathArea.c
cde/lib/DtHelp/Print.c
cde/lib/DtHelp/PrintI.h
cde/lib/DtHelp/Resize.c
cde/lib/DtHelp/Selection.c
cde/lib/DtHelp/SetList.c
cde/lib/DtHelp/SetListI.h
cde/lib/DtHelp/StringFuncs.c
cde/lib/DtHelp/XInterface.c
cde/lib/DtHelp/XInterfaceI.h
cde/lib/DtHelp/XUICreate.c
cde/lib/DtHelp/XbmUtils.c
cde/lib/DtHelp/bufio.c
cde/lib/DtHelp/decompress.c
cde/lib/DtHelp/il/ilX.c
cde/lib/DtHelp/il/ilconvert.c
cde/lib/DtHelp/il/ildata.c
cde/lib/DtHelp/il/ildecomp.h
cde/lib/DtHelp/il/ildecompg3.c
cde/lib/DtHelp/il/ildecompg4.c
cde/lib/DtHelp/il/ildecompg4.h
cde/lib/DtHelp/il/ildecompjpeg.c
cde/lib/DtHelp/il/ildither.c
cde/lib/DtHelp/il/ilimage.c
cde/lib/DtHelp/il/iljpgdecode.c
cde/lib/DtHelp/il/iljpgdecodejif.c
cde/lib/DtHelp/il/iljpgdedct.c
cde/lib/DtHelp/il/iljpgdehuff.c
cde/lib/DtHelp/il/ilpipe.c
cde/lib/DtHelp/il/ilscale.c
cde/lib/DtHelp/il/iltiff.c
cde/lib/DtHelp/il/iltiffread.c

index 46eb94d69477adf9e52084bf7cf34c3fd01dc230..aaa8b2c7520270edc1eb0366c5f594adc09967f0 100644 (file)
@@ -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,
index d6c46edbc14bdcefaacc153dc051d391f3faeabb..7340545e07da5883d4698d1e4b9a9c2315cec8f8 100644 (file)
@@ -69,4 +69,6 @@ function proto() {
 /_XmBulletinBoardSetDynDefaultButton/ { proto(); }
 /_XmBulletinBoardSizeUpdate/ { proto(); }
 /_XmManagerHelp/ { proto(); }
+/_XmPutScaledImage/ { proto(); }
+/_XmGeoSetupKid/ { proto(); }
 /XmeFlushIconFileCache/ { proto(); }
index 1d4a0aeb873c7d26d23e15cc40043857e657594c..cbefdc60ed4582fd29d3d53ee195c089c32f1339 100644 (file)
@@ -45,6 +45,7 @@
 /*
  * system includes
  */
+#include <stdlib.h>
 #include <Xm/Xm.h>
 
 /*
index f4a8370b5053842b6ed92a76a9b1bacd74fe97bb..78a9eb71c3146aa470c5006919a84c6ffe0b45f5 100644 (file)
@@ -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
index 10b9278343cbae15069b4cd44e962151ece6d786..e83e0dbd7debdad77b6cf3d90524d14b18637879 100644 (file)
@@ -57,6 +57,7 @@
 #include <Xm/AtomMgr.h>
 #include <Xm/DrawnB.h>
 #include <Xm/CutPaste.h>
+#include <Xm/XmPrivate.h>
 
 
 /*
@@ -67,6 +68,7 @@
 /*
  * private includes
  */
+#include "Access.h"
 #include "DisplayAreaP.h"
 #include "CallbacksI.h"
 #include "FontI.h"
index fed159bdd6f4a409290dceedecb8baae4cc838ee..141a552ac15abbfe12df0754828b033db3937b95 100644 (file)
@@ -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; */
   };
 
 /*****************************************************************************
index 1af7c981eb537c8d7e20daaa4bfd7a5230321386..85ed3f575bbd0aed115b855b44ab7fa7b976f984 100644 (file)
@@ -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     */
index 56e510d7c932e212e60dd9828e4a8d825a497426..cccb8cb39a2b37f24d7f7541b5a9bcd509f39a2d 100644 (file)
@@ -43,6 +43,7 @@
 /*
  * system includes
  */
+#include <unistd.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -59,6 +60,7 @@
  */
 #include "bufioI.h"
 #include "CanvasOsI.h"
+#include "FormatUtilI.h"
 
 #ifdef NLS16
 #endif
index ab917bd903a7ab73fd84f4bb0c3e7e759b3d3305..c9d984b6486b15fcaa66a74ccb99e9bf8168a535 100644 (file)
@@ -45,6 +45,7 @@
  * system includes
  */
 #include <stdlib.h>
+#include <X11/Intrinsic.h>
 
 /*
  * Canvas Engine includes
@@ -61,6 +62,7 @@
 #include "FontAttrI.h"
 #include "FormatUtilI.h"
 #include "RegionI.h"
+#include "StringFuncsI.h"
 #include "XInterfaceI.h"
 
 #ifdef NLS16
index ac92912ce4cbdd04bb2ffb7b4c4babf232dfcfbb..e3061be66a35b56c4caae632e6d2fe3984dffe53 100644 (file)
@@ -140,7 +140,7 @@ _DtHelpDisplayAreaDestroyCB (
     XtPointer call_data)
 {
     int      i;
-    int      strIdx;
+    long     strIdx;
     XrmName              xrmList[_DtHelpFontQuarkNumber];
     Display             *dpy;
     DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data;
index 7719e573e0df2fe930dde9ec047c29a50308de7e..95c8bb1fe4d702e9f996e81956ce52b0a154cc69 100644 (file)
@@ -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;
 
 /* 
index 9cffa9566c209d4a45c1b178811749258a75560e..4ffb05f6ff32d3d24e3ad6061048e002691575b3 100644 (file)
@@ -40,6 +40,7 @@
  **
  ********************************************************************
  ****************************<+>*************************************/
+#include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index d34d96c23ba6499265e5a4eb5e87319c467e6e9b..34f61f4e999a3d220c8fc802d911a04c26919136 100644 (file)
@@ -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);
index 413d0d7bab930a091b4da68ab50c1e5f011e6083..f88288a570c58d2d5bcf8d07f0a0eeec0242dd34 100644 (file)
@@ -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
 }
index 8a9230961bdebf83ecd188128743b3efe32cb7ff..db913eca3ba26ca4d6e8a90566d0de0ef0779912 100644 (file)
@@ -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;
index 66bf31c37981c4bca7660f677978c6add715eae0..56c5eebe30be3509c3d3e5dea844c75988e169c2 100644 (file)
@@ -5206,7 +5206,7 @@ _DtHelpCeGetCcdfTitleChunks(
     _FrmtUiInfo                  *ui_info,
     void               ***ret_chunks)
 {
-    int                  type   = 0;
+    long         type   = 0;
     int                  result = 0;
     int                  offset;
     char        *fileName;
index a1b13bc7bd6349096a999be7cbc09f0c6c658db7..1369d5a2ce164878d775664cbb3079637b9da3b2 100644 (file)
@@ -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 */
index 3dd27177d5e17c8f36812665887ef6fea0d1a91b..cf7586263442d22d23fd2f647af446d5e6049143 100644 (file)
@@ -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,
index 34ea16417c22f656d0b636c555d2a8c9bc97093e..8a32490d4ba13ecc385ee0e87e80c63061f52843 100644 (file)
@@ -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;
index e117464652afe9e3b52acad9d653d7c490b6e596..c9790fd692b662ecfdf3d4468546c305de960c07 100644 (file)
@@ -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++)
index 327d275974314631df8854e5e413249a372b0770..21543d21012b355699778cb45ab6fd541a75b451 100644 (file)
@@ -47,6 +47,7 @@
 /*
  * system includes
  */
+#include <ctype.h>
 #include <errno.h>
 #include <limits.h>
 #include <locale.h>
index 8c737311ca6d2f622aa711b65b52453ac29d7724..97a145e9478109c11823f0a347018bc7e8f5d1bc 100644 (file)
@@ -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"
index ef6e22380251e60c6deb6fcc496dc43e2f1e0d8b..ca85d53d8c890568d9611750723413582249ba11 100644 (file)
@@ -71,6 +71,7 @@
 #include <string.h>
 #include <math.h>
 #include <assert.h>
+#include <Xm/XmPrivate.h>
 #include "GifUtilsI.h"
 
 #ifndef __STDC__
index 5d66b70e30a0d1082ca00c094eb2588ed298d0c5..5b60a89afb032ae5e54b65e5784664b6d86e865b 100644 (file)
@@ -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
index a5c8b1b400e123869476072fd58770e6067632a7..c3aa329f2c2f0809ca7656707d6c4ee87069ecc9 100644 (file)
@@ -89,6 +89,7 @@ static char rcs_id[]="$XConsortium: Graphics.c /main/23 1996/12/06 11:12:54 cde-
 #include <sys/stat.h>
 #include <X11/Xlib.h>
 #include <X11/XWDFile.h>
+#include <X11/ImUtil.h>
 #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 <Xm/Xm.h>
+#include <Xm/XmPrivate.h>
 #include <Dt/Dts.h>
 #include <Dt/xpm.h>
 
+#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
index 408d7773b0f2d4e5f2c6414cc4e4a999cbc83604..415425a398b5f6d823a21c1d3115dddadf218e5a 100644 (file)
@@ -65,6 +65,7 @@
 #include <Xm/SeparatoG.h>
 #include <Xm/CascadeB.h>
 #include <Xm/CascadeBG.h>
+#include <Xm/XmPrivate.h>
 
 /* 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 <Dt/Help.h>
 #include "HelpI.h"
index 141dd309d539e5a0ce781c792974f024173e33ac..aa5eaff494e80b2d44a19467ad331a42a6bed69f 100644 (file)
@@ -62,6 +62,7 @@
 #include <Xm/SeparatoG.h>
 #include <Xm/Frame.h>
 #include <Xm/RepType.h>
+#include <Xm/XmPrivate.h>
 
 /* Copied from Xm/GeoUtilsI.h */
 extern XmGeoMatrix _XmGeoMatrixAlloc( 
@@ -79,6 +80,7 @@ extern XmGeoMatrix _XmGeoMatrixAlloc(
 #include <Dt/Help.h>
 #include "HelpP.h"
 #include "DisplayAreaI.h"
+#include "DisplayAreaP.h"
 #include "StringFuncsI.h"
 #include "HelpQuickDP.h"
 #include "HelpQuickDI.h"
index 8b8166245c275d50a6b409e8533c541993d282ed..1ef61b5aace05fb2629c38185bde03b06639c33d 100644 (file)
@@ -67,6 +67,7 @@
 #include "Access.h"
 #include "bufioI.h"
 #include "DisplayAreaI.h"
+#include "DisplayAreaP.h"
 
 #include <Dt/Help.h>
 #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"
index e565a183c4fa6bafa56b0b7fff657b83cc5333ab..85c645519b2e7705568a7cfc66ae8afa1f645104 100644 (file)
@@ -393,7 +393,7 @@ void _DtHelpDisplayFormatError(
  * Purpose:        This routine inits common help stuff
  *
  ****************************************************************************/
-void _DtHelpInitCommonHelpInit(
+void _DtHelpCommonHelpInit(
     _DtHelpCommonHelpStuff * help);
 
 /*****************************************************************************
index d8bbc807d87d5477bc085a1f850b37f6883b2642..bb939ed187373e8cc85e42caccaf21418970dc24 100644 (file)
@@ -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     */
index 99b797563abbd33d366dd57d3d23bfcb1ef5718c..489d7b4604624c68c720201705619878e2af6c52 100644 (file)
@@ -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
index 77869a2b36dbcfab2458c3b010d0226ec91122f3..9120a848beac6abfef983f5ef23b78ddc78360d7 100644 (file)
@@ -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. */
index 0362e74adf87406ca37e7479f8e410d9ca636b38..398cd8874a5af89efc040772ae657661ae901380 100644 (file)
@@ -58,7 +58,9 @@
  * private includes
  */
 #include "ObsoleteP.h"
+#include "bufioI.h"
 #include "Access.h"
+#include "AccessI.h"
 
 #ifdef NLS16
 #endif
index 12f063781843261bf799c40da456212035878e94..a3bd1ce9432a9b291967476c16232f9f2a3a3eb4 100644 (file)
@@ -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"
 
 /*
index d0bd81e36798bf20413d706598488f42546e62c1..254b377b4f7e9ad52672946455fe241b01f3179e 100644 (file)
@@ -62,6 +62,7 @@
 #include <Xm/RowColumn.h>
 #include <Xm/MwmUtil.h>
 #include <Xm/Protocols.h>
+#include <Xm/ToggleB.h>
 
 #include <X11/Intrinsic.h>
 #include <X11/Shell.h>
  */
 #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"
index fb756ed81f12a9cd6c1963464531bc83a96ef72b..dcb12fa72d4e480545633a6809e1b1fe7a8caa77 100644 (file)
@@ -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. */
index b69462c0e25d2ba9fc73f1db659d2f484883e63c..9d0d451270ab486c3982cabb9caca32cea6bfc9f 100644 (file)
@@ -49,6 +49,7 @@
 /*
  * private includes
  */
+#include "Access.h"
 #include "DisplayAreaP.h"
 #include "CallbacksI.h"
 #include "ResizeI.h"
index 7a6e2b190653284272552f438d45fb3bbc915dea..d6a4ba14f7d203a35fbfff588e9254ec43c35f02 100644 (file)
@@ -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;
 
                /*
index fbd7b3b2a55834ff14937dc14eba240b42b09d86..d77276115e1108c3ccca13c116d2c3bce620c9a2 100644 (file)
@@ -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"
index 4b3f88f90ef1447c4514be05170c73b46e8630cc..490734a871ea67b234f9908b1ff36c58fb033d36 100644 (file)
@@ -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
 }
index 0b8f6f96600808367907dbd92c7d005607300ded..fba79eec81fd5d03857650fa6cd3cd862a885723 100644 (file)
@@ -51,7 +51,7 @@
 #include <errno.h>
 #include <locale.h>  /* getlocale(), LOCALE_STATUS, LC_xxx */
 
-#if defined(_AIX) || defined(USL) || defined(__uxp__)
+#if defined(_AIX) || defined(USL) || defined(__uxp__) || defined(CSRG_BASED)
 #include <ctype.h>
 #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;
index 2db2e79e48cba68a69eb48428dde806500dea1ab..21a75bfa4dca24bf8fe50e5d487d0ecb3d99a1fd 100644 (file)
@@ -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)
index 89f24354053e2c350fa56b692eeb0cf9b7b58562..f5a2a116cb8da433c29f8feffcf1d24eb7e4de50 100644 (file)
@@ -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. */
index 368b6d514df01ba0550fc5c7608f86a4dce412f6..9a9932e100a6433d46810036654f41329eff123d 100644 (file)
@@ -55,6 +55,7 @@
 #include <Xm/DrawnB.h>
 #include <Xm/Form.h>
 #include <Xm/ScrollBar.h>
+#include <Xm/XmPrivate.h>
 
 /*
  * Canvas Engine
@@ -66,6 +67,7 @@
  * private includes
  */
 #include "bufioI.h"
+#include "Access.h"
 #include "DisplayAreaP.h"
 #include "CallbacksI.h"
 #include "XUICreateI.h"
index a76d111d8e5093bb5f01452b6eda5602cbf7e4e7..b12a4447cfc7dcd313e8671e6134cc5fe4e1cea4 100644 (file)
@@ -74,6 +74,7 @@ from the X Consortium.
  * without the other).
  */
 
+#include <X11/IntrinsicP.h>
 #include <X11/Xlibint.h>
 #include <X11/Xos.h>
 #include <X11/Xutil.h>
@@ -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;
index dcccd226aa87673221e70d8d8961cfd4b260298a..e1b6e639854d8497354ed4d158d0c94335eb91a1 100644 (file)
@@ -100,7 +100,7 @@ BufFileRawSkip (
     return count;
 }
 
-static
+static int
 BufFileRawFlush (
     int                c,
     BufFilePtr f )
index c21d80877657147a3f0c797a5fafcb6b912ba2aa..b32a1c203ab9d2150dfa6d76c94758067b2a220f 100644 (file)
@@ -31,6 +31,7 @@
  */
 
 /* #include "fontmisc.h" */
+#include <unistd.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #include <stdio.h>
index 79cf4ffdaf3e8b63ad24af5ab5e6c5330666b663..315cf6828cb5e569dc77eef82d841d99f74d33fe 100644 (file)
@@ -46,6 +46,7 @@
 #include "ilpipelem.h"
 #include "ilerrors.h"
 
+#include <Xm/XmPrivate.h>
 
 #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 */
index 1ba03e26cef1c0c11f043d192d2064384ddd5d1e..7086c5f3694e9ac5f59aec3b2988cdcdcf2fb865 100644 (file)
@@ -38,6 +38,7 @@
 ***-------------------------------------------------------------------*/
 
 #include "ilint.h"
+#include "ilpipeint.h"
 #include "ilpipelem.h"
 #include "ilconvert.h"
 #include "ilerrors.h"
index 887e206cde23aa823e72c65e8b0cc660b97aa286..7671542d0396ec44f98f31a66f04367b2d7abdd6 100644 (file)
@@ -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) */
index 17db93a225ee1f3d5f469e060bd712b35f282569..9900565ba0399799c088301592fbef35e39a0f3c 100644 (file)
@@ -75,4 +75,10 @@ IL_EXTERN ilBool _ilDecompPackbits (
     ilImageFormat      *pimformat
     );
 
+IL_EXTERN ilBool _ilDecompJPEG (
+    ilPipe              pipe,
+    ilPipeInfo         *pInfo,
+    ilImageDes         *pDes
+    );
+
 #endif
index 5e08d194a6ea26bde4c53f0168c7c08bdd3d0b2f..dda06aa1b7c8b278508f8d5ac19329cae64b98d3 100644 (file)
@@ -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 */
 
index 747b777045c0dc0c00cc5f2f4f3ebc025289b900..5532ea1dcbf0efb41f5579ecd2798c256f42b1c4 100644 (file)
@@ -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;
index f914709ff1af30da14033755681db5bf2d466055..4494bfad7906548fd368422fa689e5954104a9d6 100644 (file)
@@ -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
+);
index 117d31fe0ac7b4a02e4d7f4776460a700407bf3c..703413e9c25ad6db74cefa76dcfa3614c12d14a5 100644 (file)
@@ -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
index 46ba1e73ffc02f58754000054801658f96756ca9..181da9b46eb430dc579f79aca78cbff996ae9364 100644 (file)
@@ -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. */
index c74a63ea4f61ef66caa9fd55b8d9e8c00cac73dd..357b106c1a1974687158415acaefffada9263a7a 100644 (file)
@@ -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;
index 4e3ee945838dd2e0885ae3e027cb15aaf6599551..8bae80a0953991a5e7b5ec10cf7cae9bdc0bfe66 100644 (file)
@@ -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 */
index 51c796d92b099b4ce174ff46a3a01b7f2405af98..22c6bf5bd285a84e973736ee27b84dc3a6450bd8 100644 (file)
@@ -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 */
index dfa5658de97404cf58cae99032311aa7239d97dc..73efbeb11ad8a9a8e6087a4b353044644754a42e 100644 (file)
@@ -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 */
     )
index c126569b42a10cd4eb25e89ecba772a53c9ded3b..45cc1ee8ee170d3aa872884bb1dcce37e362db1e 100644 (file)
@@ -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;
             }
         }
index 19a9ab517f3ebb241f0a5e20146cfcf16971f468..944c4769be6f67a65b2b3c9e0377723e0d815534 100644 (file)
@@ -44,6 +44,7 @@
 
 #include <stdlib.h>
 
+#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;
index fc21e64da6b49defe7a56d3d06bc6ad70ead79b4..c07c1fac7917ca2ecb4eaede4a112e18186e969d 100644 (file)
@@ -41,6 +41,7 @@
 #include "ilpipelem.h"
 #include "ilscaleint.h"
 #include "ilerrors.h"
+#include "ilconvert.h"
 
 #define LONGSZ        4
 #ifdef LSB_BIT_ORDER
index 3263fed69c5ca8cf8d7987e72522d7f127a0e092..18db350d3224f5b3881bb0742897de8c0280536e 100644 (file)
@@ -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. */
index 315525a4895e8e493e33d6870c88bb6550471c6d..f14b91d9a54d4185455bde8bf8979c72c9180565 100644 (file)
@@ -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')