Linux compilation of dtbuilder (Matthew Howkins)
authorPeter Howkins <flibble@users.sourceforge.net>
Thu, 12 Apr 2012 16:36:54 +0000 (17:36 +0100)
committerPeter Howkins <flibble@users.sourceforge.net>
Thu, 12 Apr 2012 16:36:54 +0000 (17:36 +0100)
18 files changed:
cde/programs/dtappbuilder/src/ab/Imakefile
cde/programs/dtappbuilder/src/ab/ab_utils.c
cde/programs/dtappbuilder/src/ab/appfw_stubs.c
cde/programs/dtappbuilder/src/ab/attch_ed_stubs.c
cde/programs/dtappbuilder/src/ab/brws.c
cde/programs/dtappbuilder/src/ab/brws_mthds.c
cde/programs/dtappbuilder/src/ab/cgen_props_stubs.c
cde/programs/dtappbuilder/src/ab/cgen_win_stubs.c
cde/programs/dtappbuilder/src/ab/dnd_ed_stubs.c
cde/programs/dtappbuilder/src/ab/help_ed_stubs.c
cde/programs/dtappbuilder/src/ab/message_ed_stubs.c
cde/programs/dtappbuilder/src/ab/palette_stubs.c
cde/programs/dtappbuilder/src/ab/proj.c
cde/programs/dtappbuilder/src/ab/projP_utils.c
cde/programs/dtappbuilder/src/ab/proj_utils.c
cde/programs/dtappbuilder/src/ab/ui_msg.c
cde/programs/dtappbuilder/src/abmf/lib_func_strings.c
cde/programs/dtappbuilder/src/abmf/lib_func_stringsP.h

index 1339d87fbb5b4e18d6f5f7b93823d13f1b772473..1b369c2a7c07d90bf72d3bea75eb403dc58a3b0b 100644 (file)
@@ -249,6 +249,12 @@ SYS_LIBRARIES = -lm $(ICONVSYSLIB) $(DYNLIBSYSLIB) $(REGEXSYSLIB)
 WAITTARGET = .WAIT
 #endif /* SunArchitecture */
 
+XCOMM On Linux once you link against a C++ library the whole program 
+XCOMM has to be linked with the C++ linker
+#if defined(LinuxDistribution)
+CCLINK = $(CXX)
+#endif
+
 PROGRAMS = dtbuilder
 LINTLIBS = $(XINPUTLIB) $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) $(XTOOLLIB) $(XLIB)
 
index 548c2677e7bfb8fb12b7866c7e8feeccc794f109..6a2c4af41a471229390b5a4e2fd72318bd014a34 100644 (file)
@@ -421,7 +421,7 @@ ab_show_window(
                    /* Window is iconified, unmap it so we can change its
                     * initial state and remap it as Opened
                     */
-                   ui_win_show(widget, False, NULL);
+                   ui_win_show(widget, False, XtGrabNone);
                }
                else /* Window is already Open */
                {
@@ -551,7 +551,7 @@ popdown_winCB(
     XtPointer   call_data
 )
 {
-    ui_win_show(shell, False, NULL);
+    ui_win_show(shell, False, XtGrabNone);
 }
 
 static void
@@ -1324,7 +1324,7 @@ exit_mboxCB(
 )
 {
     DTB_MODAL_ANSWER     op = (DTB_MODAL_ANSWER) client_data;
-    DTB_MODAL_ANSWER     *answerp = (DTB_MODAL_ANSWER) NULL;
+    DTB_MODAL_ANSWER     *answerp = NULL;
 
     XtVaGetValues(widget, XmNuserData, &answerp, NULL);
 
index f1698fa0c33f6f2d8c8a8cecd6e8cf67b67b9595..7b249acec2cce7e4dab8d4dc31956644ed856024 100644 (file)
@@ -709,14 +709,14 @@ appfw_editor_prevent_closeCB(
             * Do Apply and pop down dialog
             */
             appfw_editor_apply(proj_get_project());
-            ui_win_show(AB_appfw_dialog, False, NULL);
+            ui_win_show(AB_appfw_dialog, False, XtGrabNone);
        }
     }
     else
        /*
         * Pop down dialog if no edits pending
         */
-        ui_win_show(AB_appfw_dialog, False, NULL);
+        ui_win_show(AB_appfw_dialog, False, XtGrabNone);
 }
 
 /*** DTB_USER_CODE_END
@@ -1010,7 +1010,7 @@ appfw_applyCB(
 
     XtVaGetValues(widget, XmNuserData, &dismiss, NULL);
     if (dismiss)
-       ui_win_show(widget, False, NULL);
+       ui_win_show(widget, False, XtGrabNone);
 
     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
     
@@ -1038,7 +1038,7 @@ appfw_resetCB(
 
     XtVaGetValues(widget, XmNuserData, &dismiss, NULL);
     if (dismiss)
-       ui_win_show(widget, False, NULL);
+       ui_win_show(widget, False, XtGrabNone);
 
     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
     
index 32534549155d75b2e7d84173c3ceda278f77e576..8ce06d62d7f7e54a9d4f9e822e5a278c13dfbfe6 100644 (file)
@@ -3490,7 +3490,7 @@ attch_edP_prevent_closeCB(
      * No pending changes OR applied existing changes, so just 
      * dismiss the Attachments Editor 
      */
-    ui_win_show(AB_attch_ed_dialog, False, NULL);
+    ui_win_show(AB_attch_ed_dialog, False, XtGrabNone);
 }
 
 static DTB_MODAL_ANSWER
@@ -3950,7 +3950,7 @@ attch_ed_okCB(
     AttchEditorSettingsRec      *ats = &attch_editor_settings_rec;
 
     attch_editor_apply(ats->cur_object);
-    ui_win_show(AB_attch_ed_dialog, False, NULL);
+    ui_win_show(AB_attch_ed_dialog, False, XtGrabNone);
 
     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
     
@@ -3971,7 +3971,7 @@ attch_ed_cancelCB(
     AttchEditorSettingsRec      *ats = &attch_editor_settings_rec;
 
     attch_editor_load(ats->cur_object);
-    ui_win_show(AB_attch_ed_dialog, False, NULL); 
+    ui_win_show(AB_attch_ed_dialog, False, XtGrabNone); 
 
     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
     
index 0d84ab02a894a6964267cce7093f4944cdab8866..cfbfb2a59b3b7c9e28b6a98ed5c2d16f1a9c9278 100644 (file)
@@ -1651,7 +1651,7 @@ brws_popdown
     if (!shell)
        return;
 
-    ui_win_show(shell, False, NULL);
+    ui_win_show(shell, False, XtGrabNone);
 }
 
 /*
index 2e71f3be7c15ab35316b4b2c12ad0b39637f4afa..c4b8f65d3c3384f7e2bec67dc52b4486360a3575 100644 (file)
 #define BRWS_DASH_WIDTH                3
 #define BRWS_NUM_DASHES                3
 
+#if !defined(linux)
 /*
  * Somehow the compiler is not picking up strdup()
  * from string.h properly...
  */
 extern char            *strdup();
+#endif
 
 /*
  * Misc functions used only in this file
index 4d6daf9bf311af5133b7e250848c4d4f9e1b6cbe..ae2fc7f9e476713313e38998a687a7daa4663563 100644 (file)
@@ -459,7 +459,7 @@ cgenP_ok_propsCB(
     
     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
     cgenP_apply_propsCB(widget, clientData, callData);
-    ui_win_show(dtb_cgen_props_cgen_props_dlg.cgen_props_dlg_shellform,False,NULL);
+    ui_win_show(dtb_cgen_props_cgen_props_dlg.cgen_props_dlg_shellform,False,XtGrabNone);
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
 
index a7b6105024f02dfdaf2d94b68ee67dcce8dfe8a4..84bd65e497ddb4a522c1dc0dd24a28e5c8e7a142 100644 (file)
@@ -305,7 +305,7 @@ cgenP_close_cgen_winCB(
     DtbCgenWinMainwindowInfo cgen_win =
                         (DtbCgenWinMainwindowInfo)clientData;
 
-    ui_win_show(cgen_win->mainwindow, False, NULL);
+    ui_win_show(cgen_win->mainwindow, False, XtGrabNone);
 
     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
     
index bbf59b874fe7ae552809f001b4a718f06dd67bbd..74cf4c0bd7f77097cf6677b3d167131f4d800039 100644 (file)
@@ -1024,12 +1024,12 @@ dnd_prevent_closeCB(
     {
        answer = do_auto_apply(widget, dds->curObj, dds->curObj);
        if (answer == DTB_ANSWER_ACTION1) 
-           ui_win_show(AB_dnd_dialog, False, NULL);
+           ui_win_show(AB_dnd_dialog, False, XtGrabNone);
     }
     else 
     {
        /* Nope, no pending changes, so just dismiss the Dnd Editor */
-       ui_win_show(AB_dnd_dialog, False, NULL); 
+       ui_win_show(AB_dnd_dialog, False, XtGrabNone); 
     }
 }
 
@@ -1195,7 +1195,7 @@ dnd_okCB(
     
     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
     dnd_applyCB(widget, clientData, callData);
-    ui_win_show(dtb_dnd_ed_dialog.dialog, False, NULL);
+    ui_win_show(dtb_dnd_ed_dialog.dialog, False, XtGrabNone);
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
 
@@ -1247,7 +1247,7 @@ dnd_cancelCB(
     
     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
     dnd_resetCB(widget, clientData, callData);
-    ui_win_show(dtb_dnd_ed_dialog.dialog, False, NULL);
+    ui_win_show(dtb_dnd_ed_dialog.dialog, False, XtGrabNone);
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
 
index cc8cb5fbe9fce1e1732a44fdb7dd299fdc59e59e..bba563fd2ea7bae5b3450dd85c0a3a0c1bcb8c21 100644 (file)
@@ -1083,12 +1083,12 @@ verify_closeCB(
     {
        answer = do_auto_apply(widget, HelpObj, HelpObj);
        if (answer == DTB_ANSWER_ACTION1) 
-           ui_win_show(AB_help_dialog, False, NULL);
+           ui_win_show(AB_help_dialog, False, XtGrabNone);
     }
     else 
     {
         /* Nope, no pending changes, so just dismiss the Help Editor */
-        ui_win_show(AB_help_dialog, False, NULL);
+        ui_win_show(AB_help_dialog, False, XtGrabNone);
     }
 }
 
@@ -1266,7 +1266,7 @@ help_okCB(
     prop_changebars_cleared(hes->prop_sheet);
 
     /* Dismiss the dialog */
-    ui_win_show(AB_help_dialog, False, NULL);
+    ui_win_show(AB_help_dialog, False, XtGrabNone);
 
     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
     
@@ -1292,7 +1292,7 @@ help_cancelCB(
     clear_editor_fields();
 
     /* Dismiss the dialog */
-    ui_win_show(AB_help_dialog, False, NULL);
+    ui_win_show(AB_help_dialog, False, XtGrabNone);
 
     /*** DTB_USER_CODE_END   ^^^ Add C variables and code above ^^^ ***/
     
index 1b0e5b4a4b85b5ba62647e65b90bc5129987f7a3..c93505e6cac27efc32d4ac6eecd6abdbd4598a86 100644 (file)
@@ -2183,7 +2183,7 @@ msgEdP_okCB(
      * applied successfully.  Otherwise, keep it up.
      */
     if (ChangesApplied)
-       ui_win_show(AB_msgEd_dialog, False, NULL);
+       ui_win_show(AB_msgEd_dialog, False, XtGrabNone);
 
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
@@ -2204,7 +2204,7 @@ msgEdP_cancelCB(
     msg_editor_clear();
 
     /* Dismiss the Message Editor */
-    ui_win_show(AB_msgEd_dialog, False, NULL);
+    ui_win_show(AB_msgEd_dialog, False, XtGrabNone);
 
     /*** DTB_USER_CODE_END   ^^^ Add C code above ^^^ ***/
 }
@@ -2494,14 +2494,14 @@ msgEdP_prevent_closeCB(
         answer = msgEdP_do_auto_apply(widget, mes->current_obj,
                                      mes->current_obj);
        if (answer == DTB_ANSWER_ACTION1)
-           ui_win_show(AB_msgEd_dialog, False, NULL);
+           ui_win_show(AB_msgEd_dialog, False, XtGrabNone);
     }
     else
     {   
          /* No pending changes. Just dismiss the 
          * Message Editor. 
          */
-       ui_win_show(AB_msgEd_dialog, False, NULL);
+       ui_win_show(AB_msgEd_dialog, False, XtGrabNone);
     }
 }
 
index 44c9a96ac15ca83bac7f5d969625de4d4a89d57c..40c5d1bc8a1202e2e8308d4fb956f6d33528d3fc 100644 (file)
@@ -159,7 +159,9 @@ static void         register_palette_info(
 **                                                                      **
 **************************************************************************/
 
+#if !defined(linux)
 extern char     *sys_errlist[];
+#endif
 
 static Widget  HelpDialog;
 
index befdce111714bfb063ccd2334a213adf650d4306..a2cb1fc5cda5b77ed7722e1c5b637af47158b3a4 100644 (file)
@@ -228,7 +228,9 @@ static XtTranslations proj_transtbl = NULL;
 static XRectangle       *rband_rect = NULL;
 static Boolean          mselect_adjust = False;
 
+#if !defined(linux)
 extern char             *sys_errlist[];
+#endif
 char                   Buf[MAXPATHLEN];        /* Work buffer */
 
 /*************************************************************************
@@ -338,7 +340,7 @@ popdown_proj_window(
     XtPointer   call_data
 )
 {
-    ui_win_show(widget, False, NULL);
+    ui_win_show(widget, False, XtGrabNone);
 }
 
 static void
index 50d663a51fd390c4efed43c1a672bc704d8eb082..e44764bdb49f2c975952c50ea8d4d8436e6e7267 100644 (file)
@@ -93,7 +93,9 @@ static void     mult_module_selected(
 **                                                                      **
 **************************************************************************/
 
+#if !defined(linux)
 extern char    *sys_errlist[];
+#endif
 char           Buf[MAXPATHLEN];        /* Work buffer */
 
 /*************************************************************************
index f133c28048946377c88352e8d1f3fc69410ec23d..0256c0f0aa265472ebf0a2b0b458a317b3b68722 100644 (file)
@@ -180,7 +180,9 @@ static void notify_proj_save_as_okCB(
 **                                                                      **
 **************************************************************************/
 
+#if !defined(linux)
 extern char             *sys_errlist[];
+#endif
 
 /*************************************************************************
 **                                                                      **
index 05aa4d318707bae2115ab31f470ad1b93effb527..dedf682eeb8fa20751ac78a41c429f72e181ff91 100644 (file)
@@ -547,7 +547,7 @@ prompt_ok_modal_dlgCB(
          * answerp, because that will cause ui_popup_modal_prompt() to
          * return to the routine which is calling it. 
          */
-       ui_win_show(widget, False, NULL);
+       ui_win_show(widget, False, XtGrabNone);
        *answerp = UI_ANSWER_OK;
     }
 }
@@ -570,7 +570,7 @@ prompt_cancel_modal_dlgCB(
      * answerp, because that will cause ui_popup_modal_prompt() to
      * return to the routine which is calling it.
      */
-    ui_win_show(widget, False, NULL);
+    ui_win_show(widget, False, XtGrabNone);
     *answerp = UI_ANSWER_CANCEL;
 }
 
index 30a0e2b0fef79eb9862326e814a772594ea36e1d..dacf362bd4ab4a2d15f6345579bb17c4c799ebef 100644 (file)
@@ -2123,7 +2123,7 @@ static LibFuncRec abmfP_lrc_modal_dlgCB =
     ")\n"
     "{\n"
     "    DTB_MODAL_ANSWER     op = (DTB_MODAL_ANSWER) client_data;\n"
-    "    DTB_MODAL_ANSWER     *answerp = (DTB_MODAL_ANSWER) NULL;\n"
+    "    DTB_MODAL_ANSWER     *answerp = NULL;\n"
     " \n"
     "    XtVaGetValues(widget, XmNuserData, &answerp, NULL);\n"
     " \n"
index 6954f6020df0810cd1875c07ed2c2a8b1df36492..6e5b5ab4537bb004d05dc2d5c9a30dd705f99e26 100644 (file)
@@ -52,8 +52,8 @@
 typedef struct
 {
     STRING     name;           /* name */
-    STRING     proto;          /* prototype */
-    STRING     def;            /* actual code */
+    char       proto[512];     /* prototype */
+    char       def[4096];      /* actual code */
 } LibFuncRec, *LibFunc;