소스 검색

dthelp: fix implicit-function-declaration warnings (mostly)

Jon Trulson 2 년 전
부모
커밋
4f16e12ed8

+ 2 - 4
cde/programs/dthelp/dthelpdemo/HelpCache.c

@@ -71,8 +71,6 @@ static Boolean GetFromCache(
     Widget parent,
     CacheListStruct **pCurrentNode);
 
-
-
 /* Global Main Help Dialog Widget */
 static Widget helpMain=NULL;
 static Widget versionMain=NULL;
@@ -443,7 +441,7 @@ void DisplayMan(
     }
   else
     {
-       TurnOnHourGlass(manWidget);
+       _DtHelpTurnOnHourGlass(manWidget);
   
        /* We already have a quick help dialog so re-use it */
        n = 0;
@@ -462,7 +460,7 @@ void DisplayMan(
        XtManageChild(manWidget); 
        XtMapWidget(XtParent(manWidget));    
        XRaiseWindow(XtDisplay(parent), XtWindow(XtParent(manWidget)));
-       TurnOffHourGlass(manWidget);       
+       _DtHelpTurnOffHourGlass(manWidget);       
 
      }
 

+ 8 - 0
cde/programs/dthelp/dthelpdemo/Main.c

@@ -56,11 +56,19 @@
 #include <Xm/Form.h>
 #include <Xm/Scale.h>
 #include <Xm/ToggleBG.h>
+#include <Xm/ToggleB.h>
 #include <Xm/RowColumn.h>
 #include <Xm/LabelG.h>
 
 /* DtHelp include header file section */
 #include <Dt/HelpQuickD.h>
+#include <DtI/HourGlassI.h>
+
+// HourGlass.c
+// Need to find out why these are used here rather than the ones in
+// DtI/HourGlassI.h
+void TurnOnHourGlass(Widget w);
+void TurnOffHourGlass(Widget w);
 
 /* Local header file include section */
 #include "Main.h"

+ 1 - 0
cde/programs/dthelp/dthelpprint/Initialize.c

@@ -46,6 +46,7 @@ $COPYRIGHT$:
 #include <sys/stat.h>  /* mkdir */
 #include <sys/types.h>
 
+#include "StringFuncsI.h"
 
 #include <X11/Xlibint.h>  /* _XGetHostname() */
 #include <X11/Xos.h>     /* FIX: remove? */

+ 16 - 4
cde/programs/dthelp/dthelpprint/PrintTopics.c

@@ -38,6 +38,10 @@ $COPYRIGHT$:
 ==$END$==============================================================*/
 #endif
 
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 600
+#endif
+
 #ifdef HAVE_CONFIG_H
 #include <autotools_config.h>
 #endif
@@ -71,13 +75,21 @@ $COPYRIGHT$:
 #include "Dt/LocaleXlate.h" /* from libDtHelp */
 #include "DtI/bufioI.h" /* from libDtHelp; required for AccessI.h */
 #include "DtI/FileUtilsI.h" /* from libDtHelp */
+#include "DtI/Access.h" /* from libDtHelp */
+#include "DtI/AccessI.h" /* from libDtHelp */
 #include "GenUtilsP.h" /* from libDtHelp */
 #include "HelpXlate.h" /* from libDtHelp */
+#include "ObsoleteP.h" /* from libDtHelp */
+
+// lib/DtHelp/FormatTerm.c
+int _DtHelpTermCreateCanvas(int maxColumns, _DtCvHandle *ret_canvas);
+int _DtHelpTermGetTopicData(_DtCvHandle canvasHandle,
+                            _DtHelpVolumeHdl volHandle,
+                            char *locationId,
+                            char ***helpList,
+                            DtHelpHyperLines **hyperList);
+
 
-/*#include "AccessI.h" ** from libDtHelp */
-/* I can't include AccessI.h because it redefines the Boolean type,
-which is also defined in Xt/Intrisincs.h.  I'm just including the
-prototypes from AccessI.h here. */
 extern char * _DtHelpCeGetVolumeLocale(VolumeHandle helpVolumeHandle);
 extern const char * _DtHelpCeGetVolumeCharSet(VolumeHandle helpVolumeHandle);
 

+ 1 - 0
cde/programs/dthelp/dthelpview/Util.c

@@ -64,6 +64,7 @@
 
 
 #include <DtI/HelposI.h>
+#include <DtI/HourGlassI.h>
 /* Local Includes */
 #include "Main.h"
 #include "UtilI.h"

+ 3 - 0
cde/programs/dthelp/parser/pass1/helptag/help.c

@@ -28,10 +28,13 @@
 
 #include "userinc.h"
 #include "globdec.h"
+#include "proto.h"
 
 #include "LocaleXlate.h"
 #include "XlationSvc.h"
 
+void m_mberr1(char *text, const char *arg);
+
 void assert_hometopic_exists(void)
 {
 static const char hometopic[] = "-HOMETOPIC";

+ 2 - 0
cde/programs/dthelp/parser/pass1/helptag/option.c

@@ -26,6 +26,8 @@
 #include "userinc.h"
 #include "globdec.h"
 
+void m_mberr1(char *text, const char *arg);
+
 #if defined(hpux) || defined(_AIX) || defined(sun)
 /* get definition of getenv(3c) for getting of environment variables */
 #include <stdlib.h>

+ 4 - 3
cde/programs/dthelp/parser/pass1/helptag/special.c

@@ -121,6 +121,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <strings.h>
 
 typedef wchar_t M_WCHAR;
 
@@ -146,9 +147,9 @@ if (argc < 3)
     { /*  Either one argument or none; not more */
     if (argc == 2)
 	{
-	if (!stricmp(argv[1], "b")) both = TRUE;
-	else if (!stricmp(argv[1], "s")) spec = TRUE;
-	else if (!stricmp(argv[1], "c")) coll = TRUE;
+	if (!strcasecmp(argv[1], "b")) both = TRUE;
+	else if (!strcasecmp(argv[1], "s")) spec = TRUE;
+	else if (!strcasecmp(argv[1], "c")) coll = TRUE;
 	else error = TRUE;
 	}
     else both = TRUE;