dtinfo subtree dtinfo
authorUlrich Wilkens <mail@uwilkens.de>
Sun, 14 Oct 2012 15:03:44 +0000 (17:03 +0200)
committerJon Trulson <jon@radscan.com>
Mon, 15 Oct 2012 23:57:49 +0000 (17:57 -0600)
194 files changed:
cde/programs/dtinfo/dtinfo/Imakefile
cde/programs/dtinfo/dtinfo/install/Imakefile
cde/programs/dtinfo/dtinfo/install/lib/fonts/Imakefile
cde/programs/dtinfo/dtinfo/src/Agents/AddLibraryAgent.msg
cde/programs/dtinfo/dtinfo/src/Agents/AddLibraryAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/BookmarkEditMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/GraphicAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/HelpAgent.C
cde/programs/dtinfo/dtinfo/src/Agents/Imakefile
cde/programs/dtinfo/dtinfo/src/Agents/LibraryAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/ListViewMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/MapAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/MarkChooser.C
cde/programs/dtinfo/dtinfo/src/Agents/MarkIconMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/MarkListView.C
cde/programs/dtinfo/dtinfo/src/Agents/MessageAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/NodeHistoryAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/NodeListAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/NodePrintAgent.C
cde/programs/dtinfo/dtinfo/src/Agents/NodeWindowAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/NodeWindowAgentMotif.hh
cde/programs/dtinfo/dtinfo/src/Agents/OutlineListViewMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/PrefAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/PrintPanelAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/ScopeMenu.C
cde/programs/dtinfo/dtinfo/src/Agents/SearchHistoryListViewMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/SearchResultsAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/SearchResultsAgentMotif.hh
cde/programs/dtinfo/dtinfo/src/Agents/SearchScopeAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/SearchScopeList.C
cde/programs/dtinfo/dtinfo/src/Agents/UrlAgentMotif.C
cde/programs/dtinfo/dtinfo/src/Agents/create_macros.hh
cde/programs/dtinfo/dtinfo/src/Basic/Atomizer.hh
cde/programs/dtinfo/dtinfo/src/Basic/BitField.C
cde/programs/dtinfo/dtinfo/src/Basic/BitField.hh
cde/programs/dtinfo/dtinfo/src/Basic/Buffer.hh
cde/programs/dtinfo/dtinfo/src/Basic/FString.C
cde/programs/dtinfo/dtinfo/src/Basic/FolioObject.hh
cde/programs/dtinfo/dtinfo/src/Basic/Imakefile
cde/programs/dtinfo/dtinfo/src/Basic/List.C
cde/programs/dtinfo/dtinfo/src/Basic/Long_Lived.hh
cde/programs/dtinfo/dtinfo/src/Basic/NodeViewInfo.C
cde/programs/dtinfo/dtinfo/src/Basic/TOC_Element.C
cde/programs/dtinfo/dtinfo/src/Graphics/Imakefile
cde/programs/dtinfo/dtinfo/src/Graphics/PixmapGraphic.C
cde/programs/dtinfo/dtinfo/src/Graphics/PixmapGraphic.hh
cde/programs/dtinfo/dtinfo/src/Imakefile
cde/programs/dtinfo/dtinfo/src/Managers/CatMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/CatMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/ClientEventMgrX.hh
cde/programs/dtinfo/dtinfo/src/Managers/DatabaseMgrLEND.hh
cde/programs/dtinfo/dtinfo/src/Managers/EnvMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/EnvMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/GlobalHistoryMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/GlobalHistoryMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/GraphicsMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/GraphicsMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/Imakefile
cde/programs/dtinfo/dtinfo/src/Managers/InputMgrX.C
cde/programs/dtinfo/dtinfo/src/Managers/LibraryMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/LibraryMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/LocalHistoryMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/MapMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/MarkListMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/MarkMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/MarkMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/MessageMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/MessageMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/NodeMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/NodeMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/PrefMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/PrefMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/PrintMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/PrintMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/SearchMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/SearchMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/SearchResultsMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/SearchScopeMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/SearchScopeMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/ServiceMgrX.C
cde/programs/dtinfo/dtinfo/src/Managers/ServiceMgrX.hh
cde/programs/dtinfo/dtinfo/src/Managers/SessionMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/StyleSheetMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/StyleSheetMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/TtIpcMgr.C
cde/programs/dtinfo/dtinfo/src/Managers/TtIpcMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/TtIpcMgr.msg
cde/programs/dtinfo/dtinfo/src/Managers/UrlMgr.hh
cde/programs/dtinfo/dtinfo/src/Managers/WorkspaceMgr.hh
cde/programs/dtinfo/dtinfo/src/Marks/Imakefile
cde/programs/dtinfo/dtinfo/src/Marks/Mark.C
cde/programs/dtinfo/dtinfo/src/Marks/MarkBase_mmdb.C
cde/programs/dtinfo/dtinfo/src/Marks/Mark_mmdb.C
cde/programs/dtinfo/dtinfo/src/OliasSearch/Imakefile
cde/programs/dtinfo/dtinfo/src/OnlineRender/CanvasRenderer.C
cde/programs/dtinfo/dtinfo/src/OnlineRender/CanvasRenderer.msg
cde/programs/dtinfo/dtinfo/src/OnlineRender/FeatureSupport.C
cde/programs/dtinfo/dtinfo/src/OnlineRender/FontCache.C
cde/programs/dtinfo/dtinfo/src/OnlineRender/FontCache.hh
cde/programs/dtinfo/dtinfo/src/OnlineRender/Imakefile
cde/programs/dtinfo/dtinfo/src/OnlineRender/TableDefn.hh
cde/programs/dtinfo/dtinfo/src/Other/Imakefile
cde/programs/dtinfo/dtinfo/src/Other/WindowSystemMotif.C
cde/programs/dtinfo/dtinfo/src/Other/detached_bw.xpm
cde/programs/dtinfo/dtinfo/src/Other/graphic_unavailable.xpm
cde/programs/dtinfo/dtinfo/src/Preferences/Imakefile
cde/programs/dtinfo/dtinfo/src/Preferences/UserPreference.C
cde/programs/dtinfo/dtinfo/src/Preferences/WindowGeometryPref.hh
cde/programs/dtinfo/dtinfo/src/Query/Imakefile
cde/programs/dtinfo/dtinfo/src/Query/QueryEditor.C
cde/programs/dtinfo/dtinfo/src/Query/QueryGroup.C
cde/programs/dtinfo/dtinfo/src/Query/QueryGroupView.C
cde/programs/dtinfo/dtinfo/src/Query/QueryTerm.C
cde/programs/dtinfo/dtinfo/src/Query/QueryTerm.hh
cde/programs/dtinfo/dtinfo/src/Query/QueryTermView.C
cde/programs/dtinfo/dtinfo/src/Support/Imakefile
cde/programs/dtinfo/dtinfo/src/Support/InputNotifier.C
cde/programs/dtinfo/dtinfo/src/Support/List_base.hh
cde/programs/dtinfo/dtinfo/src/Support/Sender.C
cde/programs/dtinfo/dtinfo/src/Support/UtilityFunctions.C
cde/programs/dtinfo/dtinfo/src/Support/message_test.C
cde/programs/dtinfo/dtinfo/src/Support/xList.hh
cde/programs/dtinfo/dtinfo/src/Templates.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/Imakefile
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_BookcaseEntry.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Buffer.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Buffer.hh
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Common.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Exceptions.hh
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Factory.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_OQLParser.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_Path.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_PtrList.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_PtrList.hh
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_SearchEngine.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_SearchResults.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_SearchResultsEntry.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_SearchScope.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_SearchScope.hh
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_SearchZones.hh
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_String.C
cde/programs/dtinfo/dtinfo/src/UAS/Base/UAS_TextRun.C
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_BookcaseEntry.C
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_Parser.C
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_Parser.hh
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_SearchEngine.C
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_SearchResults.C
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_SearchResults.hh
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_SearchResultsEntry.C
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/Imakefile
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/TextParser.C
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/TextRun.C
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/TextTest.C
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/Tml_TextRenderer.C
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/Tml_TextRenderer.hh
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/Util_Classes/Imakefile
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/Util_Classes/dict_driver.C
cde/programs/dtinfo/dtinfo/src/UAS/Imakefile
cde/programs/dtinfo/dtinfo/src/UAS/MMDB/Imakefile
cde/programs/dtinfo/dtinfo/src/UAS/MMDB/MMDB.C
cde/programs/dtinfo/dtinfo/src/UAS/MMDB/MMDB_BookCase.hh
cde/programs/dtinfo/dtinfo/src/UAS/MMDB/MMDB_EmbeddedObject.hh
cde/programs/dtinfo/dtinfo/src/UAS/MMDB/MMDB_Factory.C
cde/programs/dtinfo/dtinfo/src/UAS/MMDB/MMDB_Library.C
cde/programs/dtinfo/dtinfo/src/UAS/MMDB/MMDB_Section.C
cde/programs/dtinfo/dtinfo/src/UAS/MMDB/MMDB_StyleSheet.C
cde/programs/dtinfo/dtinfo/src/UAS/MMDB/MMDB_StyleSheet.hh
cde/programs/dtinfo/dtinfo/src/UAS/Test/Fulcrum_Templates.C
cde/programs/dtinfo/dtinfo/src/UAS/Test/Imakefile
cde/programs/dtinfo/dtinfo/src/UAS/Test/UAS_Templates.C
cde/programs/dtinfo/dtinfo/src/UAS/Test/sdrv.C
cde/programs/dtinfo/dtinfo/src/UAS/Test/uasdrv.C
cde/programs/dtinfo/dtinfo/src/Widgets/Imakefile
cde/programs/dtinfo/dtinfo/src/Widgets/Pixmap.c
cde/programs/dtinfo/dtinfo/src/Widgets/Restraint.c
cde/programs/dtinfo/dtinfo/src/Widgets/Simple.c
cde/programs/dtinfo/dtinfo/src/Widgets/TabButton.c
cde/programs/dtinfo/dtinfo/src/cgm/Imakefile
cde/programs/dtinfo/dtinfo/src/cgm/cgmcmds.c
cde/programs/dtinfo/dtinfo/src/config.h
cde/programs/dtinfo/dtinfo/src/external-api/Imakefile
cde/programs/dtinfo/dtinfo/src/main.C
cde/programs/dtinfo/dtinfo/wwl/Imakefile
cde/programs/dtinfo/dtinfo/wwl/include/WWL/WArgList.h
cde/programs/dtinfo/dtinfo/wwl/include/WWL/WObject.h
cde/programs/dtinfo/dtinfo/wwl/include/WWL/WXmGadget.h
cde/programs/dtinfo/dtinfo/wwl/include/WWL/WXmManager.h
cde/programs/dtinfo/dtinfo/wwl/include/WWL/WXmPrimitive.h
cde/programs/dtinfo/dtinfo/wwl/include/WWL/wwl.h
cde/programs/dtinfo/dtinfo/wwl/src/Imakefile
cde/programs/dtinfo/dtinfo/wwl/src/WComposite.C
cde/programs/dtinfo/dtinfo/wwl/src/WObject.C
cde/programs/dtinfo/dtinfo/wwl/src/WXmMenu.C
cde/programs/dtinfo/dtinfo/wwl/src/WXmRadioBox.C

index ba43720a6488b3411c64189b9e35a0b9a8479963..32e89d1c61e56e9e22ad3d5b4d02272aa54e47d8 100644 (file)
@@ -5,6 +5,13 @@ XCOMM $TOG: Imakefile /main/9 1998/08/10 15:54:01 mgreess $
 
 SUBDIRS=wwl src install
 
+XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
+#undef  TopLevelProject
+#define TopLevelProject                DtInfo
+IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
+               -DProjectTmplFile='<DtInfo.tmpl>' \
+               -DProjectRulesFile='<DtInfo.rules>'
+
 MakeSubdirs($(SUBDIRS))
 
 DependSubdirs(wwl src)
index 3cfe67912761364e988de2de2aa8a62ae64f6765..28992c6489acb312ab13066c616e38e5a08b70cd 100644 (file)
@@ -5,5 +5,12 @@ XCOMM $TOG: Imakefile /main/8 1998/08/10 15:53:37 mgreess $
 
 SUBDIRS = lib
 
+XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
+#undef  TopLevelProject
+#define TopLevelProject                DtInfo
+IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
+               -DProjectTmplFile='<DtInfo.tmpl>' \
+               -DProjectRulesFile='<DtInfo.rules>'
+
 MakeSubdirs($(SUBDIRS))
 DependSubdirs($(SUBDIRS))
index df907b7c10b7acd32d1a51cd489eced62f38d1c8..af671a9766b05d51c306f9d0bd404d4b21560cef 100644 (file)
@@ -1,5 +1,10 @@
 XCOMM $XConsortium: Imakefile /main/6 1996/09/13 17:26:30 drk $
 
+#ifdef X11ProjectRoot
+FONTC = $(XPROJECTROOT)/bin/bdftopcf
+MKFONTDIR = $(XPROJECTROOT)/bin/mkfontdir
+#endif
+
 OBJS = FontObj(dtinfo)
 
 LinkSourceFile(dtinfo.bdf,$(CDESRC)/fontaliases/bdf)
index 8b1affed7bf2f3f0a421e1b30515b508bb7f114a..6d09a974248bbe34fe5dd1ee64d360502180b993 100644 (file)
@@ -38,4 +38,3 @@ $     (This string will be shown in a directory listing where there
 $       are no Infolibs found in the directory.)
 11     "No Infolibs Present"
 
-
index 684fcaf70810169cb6c40eb4e191fb5bfe30ca18..71f13aa4c51287eaf5fe3b1b579f869b7283197f 100644 (file)
@@ -46,7 +46,8 @@
 #define C_AddLibraryAgent
 #define C_HelpAgent
 #define L_Agents
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 #include "Other/XmStringLocalized.hh"
 #include "Managers/CatMgr.hh"
@@ -118,7 +119,7 @@ AddLibraryAgent::create_ui (Widget parent) {
     ON_ACTIVATE (f_ok, ok);
     ON_ACTIVATE (f_clr, clear);
     ON_ACTIVATE (canc, cancel);
-    help_agent().add_activate_help (help, "add_infolib_help");
+    help_agent().add_activate_help (help, (char*)"add_infolib_help");
 
     f_shell.Realize ();
     // XtVaSetValues(f_form, XmNinitialFocus, (Widget)f_text, NULL);
@@ -134,7 +135,7 @@ void
 AddLibraryAgent::clear () {
  // autoUnmanage must be set to False for this button to work properly
 
-    XmTextFieldSetString( f_text, "" );
+    XmTextFieldSetString( f_text, (char*)"" );
 }
 
 void
@@ -212,8 +213,8 @@ AddLibraryAgent::pick_dir () {
           CATGETS(Set_AddLibraryAgent, 10, "Dtinfo: Infolib Selection"));
     XmString no_libs_str = XmStringCreateLocalized(
           CATGETS(Set_AddLibraryAgent, 11, "No Infolibs Present"));
-    XmString patt_str = XmStringCreateLocalized( "*.dti" );
-    XmString infolibs_str = XmStringCreateLocalized( "Infolibs" );
+    XmString patt_str = XmStringCreateLocalized( (char*)"*.dti" );
+    XmString infolibs_str = XmStringCreateLocalized( (char*)"Infolibs" );
 
     // default initial directory on first entry
     char *buf = new char[256];
@@ -244,7 +245,7 @@ AddLibraryAgent::pick_dir () {
     XtSetArg(args[n], XmNpathMode, XmPATH_MODE_RELATIVE); n++;
 
     f_file_sel = XmCreateFileSelectionDialog(
-                      f_shell, "pick_dir_file", args, n );
+                      f_shell, (char*)"pick_dir_file", args, n );
 
     XmStringFree(basedir_str);
     XmStringFree(initdir_str);
index b612b8222cd6ba64f68e0d21ccaa3f8bc4357e38..20441d1b49e9e07f4d8d92b18c74fc6cb9703567 100644 (file)
@@ -87,7 +87,8 @@
 #include <WWL/WXmPushButtonGadget.h>
 #include <WWL/WXmSeparatorGadget.h>
 
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 int BookmarkEdit::g_modified_count = 0;
 
@@ -250,14 +251,14 @@ BookmarkEdit::create_ui()
   WXmPushButtonGadget help (form, "help", WAutoManage);
   mtfstring = CATGETS(Set_AgentLabel, 48, "Help");
   XtVaSetValues(help, XmNlabelString, (XmString)mtfstring, NULL);
-  help_agent().add_activate_help (help, "bookmark_edit_help");
+  help_agent().add_activate_help (help, (char*)"bookmark_edit_help");
   f_wm_delete_callback =
     new WCallback (*f_shell, window_system().WM_DELETE_WINDOW(),
                    this, (WWL_FUN) &BookmarkEdit::cancel);
 
   WXmSeparatorGadget   separator   (form,     "separator",   WAutoManage);
 
-  Widget notes_text = XmCreateScrolledText (form, "notes_text", NULL, 0);
+  Widget notes_text = XmCreateScrolledText (form, (char*)"notes_text", NULL, 0);
   f_notes_text = new WXmText (notes_text);
   f_notes_text->Manage();
 
@@ -295,11 +296,11 @@ BookmarkEdit::ok()
       f_mark_ptr->set_name (f_name_text->Value());
       f_mark_ptr->set_notes (f_notes_text->Value());
       // Save the mark to disk.
-      try
+      mtry
        {
          f_mark_ptr->save();
        }
-      catch_any()
+      mcatch_any()
        {
          message_mgr().error_dialog(
                CATGETS(Set_BookmarkEdit, 1, "Dtinfo: Bookmark Editor"));
index b8e95470019df2c1b8de3653ad5c69a5ee36a4c4..73daa3f20e36a021846d43b25eddc4b69d842adc 100644 (file)
@@ -80,7 +80,8 @@
 #include "Other/XmStringLocalized.hh"
 
 #include <Prelude.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 #include <string.h>
 #include <stdio.h>
 
@@ -142,7 +143,7 @@ GraphicAgent::~GraphicAgent()
                  pixmap);      // a scaled pixmap...give it back 
 
     }
-  if(f_shell != NULL)
+  if(f_shell != 0)
     f_shell.Destroy();
 }
 
@@ -153,7 +154,7 @@ GraphicAgent::~GraphicAgent()
 void 
 GraphicAgent::popup()
 {
-  if (f_shell == NULL)
+  if (f_shell == 0)
     create_ui();
 
   f_shell.Popup();
@@ -167,7 +168,7 @@ GraphicAgent::popup()
 void 
 GraphicAgent::display()
 {
-  if (f_shell == NULL)
+  if (f_shell == 0)
     create_ui();
     
   // assume all graphics are scalable for now.
@@ -240,7 +241,7 @@ GraphicAgent::create_ui()
   f_shell.SetDestroyCallback (this, (WWL_FUN) &GraphicAgent::ui_destroyed);
 
   DECL  (WXmForm,           form,         f_shell,      "form"         );
-  DECLM (WXmMenuBar,        menu_bar,     form,         "menu_bar"     );
+  DECLMC(WXmMenuBar,        menu_bar,     form,         "menu_bar"     );
 #ifdef hpux
   //
   //  rtp: hard-wire the menu bar's background, since
@@ -252,7 +253,7 @@ GraphicAgent::create_ui()
 
 #endif
   DECLM (WXmCascadeButton,  file,         menu_bar,     "file"         );
-  DECLM (WXmPulldownMenu,   file_menu,    menu_bar,     "file_menu"    );
+  DECLMC(WXmPulldownMenu,   file_menu,    menu_bar,     "file_menu"    );
   DECLM (WXmPushButton,     attach,       file_menu,    "attach"       );
   DECLM (WXmPushButton,     visit,        file_menu,    "visit"        );
   DECLM (WXmPushButton,     close,        file_menu,    "close"        );
@@ -282,7 +283,7 @@ GraphicAgent::create_ui()
     NULL);
 
   DECLM (WXmCascadeButton,  pan,          menu_bar,     "panner"       );
-  DECLM (WXmPulldownMenu,   panner_menu,  menu_bar,     "panner_menu"  );
+  DECLMC(WXmPulldownMenu,   panner_menu,  menu_bar,     "panner_menu"  );
   DECLM (WXmToggleButton,   none,         panner_menu,  "none"         );
   DECLM (WXmToggleButton,   up_left,      panner_menu,  "up_left"      );
   DECLM (WXmToggleButton,   up_right,     panner_menu,  "up_right"     );
@@ -327,8 +328,8 @@ GraphicAgent::create_ui()
 
   // NOTE: some code in this module depends upon the exact ordering of items
   // view menu will only be sensitive for scalable graphics 
-  DECL (WXmCascadeButton,   view,         menu_bar,     "view"         );
-  DECLM (WXmPulldownMenu,   view_menu,   menu_bar,     "view_menu"    );
+  DECL  (WXmCascadeButton,  view,          menu_bar,     "view"        );
+  DECLMC(WXmPulldownMenu,   view_menu,     menu_bar,     "view_menu"   );
   DECLM (WXmPushButton,     fit_gr_to_win, view_menu,    "fit_window"  );
   DECLM (WXmPushButton,     fit_win_to_gr, view_menu,    "fit_graphic" );
 
@@ -386,7 +387,7 @@ GraphicAgent::create_ui()
   f_view_menu = (WXmPulldownMenu*)(Widget)view_menu ;
 
   DECLM (WXmCascadeButton,  help,         menu_bar,      "help"        );
-  DECLM (WXmPulldownMenu,   help_menu,    menu_bar,      "help_menu"   );
+  DECLMC(WXmPulldownMenu,   help_menu,    menu_bar,      "help_menu"   );
   DECLM (WXmPushButton,     on_window,    help_menu,     "on_window"   );
   DECLM (WXmPushButton,     on_help,      help_menu,     "on_help"     );
 
@@ -480,8 +481,8 @@ GraphicAgent::create_ui()
   SET_CALLBACK_D (z_200,ValueChanged,zoom_callback,200);
   SET_CALLBACK_D (z_custom,ValueChanged,zoom_callback,0);
 
-  help_agent().add_activate_help (on_window, "graphic_on_window");
-  help_agent().add_activate_help (on_help,   "graphic_on_help");
+  help_agent().add_activate_help (on_window, (char*)"graphic_on_window");
+  help_agent().add_activate_help (on_help,   (char*)"graphic_on_help");
 
   view.Manage();
 
@@ -815,7 +816,7 @@ GraphicAgent::set_panner(WCallback *wcb)
   WXmToggleButton button(wcb->GetWidget());
   if (button.Set())
     {
-      unsigned int state = (unsigned int)wcb->ClientData();
+      size_t state = (size_t)wcb->ClientData();
       adjust_panner(state);
     }      
 }
@@ -835,7 +836,7 @@ GraphicAgent::zoom_callback(WCallback *wcb)
   
   if (button.Set())
     {
-      int scale = (unsigned int) wcb->ClientData();
+      size_t scale = (size_t) wcb->ClientData();
       if (scale > 0)
        {
          set_zoom (scale);
index f0ca403881374add0c8a17150af98a1b9fd882e0..11e9099cada7b7ce547d8c3c01ba78f9e8585bcc 100644 (file)
@@ -81,7 +81,8 @@
 #include <Dt/Help.h>
 #include <Dt/HelpDialog.h>
 #include <stdio.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 #define CLASS HelpAgent
 #include "create_macros.hh"
@@ -164,7 +165,7 @@ HelpAgent::create_ui()
   n = 0;
   XtSetArg(args[n], XmNtitle, "Dtinfo Help"); n++;
   f_helper = DtCreateHelpDialog(app_shell,
-                                "helpdialog",
+                                (char*)"helpdialog",
                                 args, n);
 }
 
@@ -399,13 +400,13 @@ HelpAgent::get_locator_id(const Widget w)
 {
    XtResource   res;
    //res.resource_name   = (resourceName ? (String)resourceName : "helpcard");
-   res.resource_name   = "helpcard";
+   res.resource_name   = (char*)"helpcard";
    res.resource_class  = XtCString;
    res.resource_type   = XtRString;
    res.resource_size   = sizeof(String);
    res.resource_offset = 0;
    res.default_type    = XtRString;
-   res.default_addr    = NULL_LOCATORID;
+   res.default_addr    = (void*)NULL_LOCATORID;
 
    char         *wname = XtName(w);     // Just for gdb
    String       string;
index 8c14d01e2b10e4cc64d08ee5ccaf35bcfd9b81b2..5ea3c320d60f3e308921b3d794371780e3550929 100644 (file)
@@ -1,11 +1,14 @@
 XCOMM $XConsortium: Imakefile /main/8 1996/08/21 15:41:09 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 MAKEFILEDEPS=Classlist.mk
 
 LIBNAME=Agents
 
+NormalCplusplusObjectRule()
+
 #ifdef DoLicenseManagement
 INCLUDES=$(BROWSER_INCLUDES) $(MMDB_INCLUDES) $(LICENSE_L_INCLUDES)
 EXTRA_DEFINES=-DLICENSE_MANAGEMENT
@@ -23,8 +26,12 @@ make_msgs($(LIBNAME), $(MSGS))
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 #if defined(HPArchitecture)||defined(UXPArchitecture)
index aa5bbdb3d76f7d298b2d6dea1c4dab73d7f64bb9..a26c6eff520365261fc48a0827e353bb0eb0eab1 100644 (file)
@@ -51,8 +51,9 @@
 
 #include <sys/stat.h>
 
-#include <stream.h>
-#include <iostream.h>
+#include <sstream>
+#include <iostream>
+using namespace std;
 
 #define C_xList
 #define L_Support
@@ -85,6 +86,7 @@
 #define C_MessageMgr
 #define C_PrefMgr
 #define C_EnvMgr
+#define C_GraphicsMgr
 #define L_Managers
 
 
@@ -361,7 +363,7 @@ LibraryAgent::create_ui()
 
   n = 0;
   XtSetArg(args[n], XmNscrolledWindowChildType, XmMENU_BAR); n++;
-  Widget menu_bar = XmCreateMenuBar(mainw, "menu_bar", args, n);
+  Widget menu_bar = XmCreateMenuBar(mainw, (char*)"menu_bar", args, n);
 
   n = 0;
   XtSetArg(args[n], XmNorientation, XmHORIZONTAL); n++;
@@ -375,7 +377,7 @@ LibraryAgent::create_ui()
                                      mainw, args, n);
 
   // Menus
-  Widget fileM = XmCreatePulldownMenu(menu_bar, "file_menu", 0, 0);
+  Widget fileM = XmCreatePulldownMenu(menu_bar, (char*)"file_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, fileM); n++;
@@ -456,7 +458,7 @@ LibraryAgent::create_ui()
        NULL);
 
   // edit menu
-  Widget editM = XmCreatePulldownMenu(menu_bar, "edit_menu", 0, 0);
+  Widget editM = XmCreatePulldownMenu(menu_bar, (char*)"edit_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, editM); n++;
@@ -504,7 +506,7 @@ LibraryAgent::create_ui()
        NULL);
 
   // options menu
-  Widget optionsM = XmCreatePulldownMenu(menu_bar, "options_menu", 0, 0);
+  Widget optionsM = XmCreatePulldownMenu(menu_bar, (char*)"options_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, optionsM); n++;
@@ -572,7 +574,7 @@ LibraryAgent::create_ui()
        NULL);
 
   // windows menu
-  Widget windowsM = XmCreatePulldownMenu(menu_bar, "windows_menu", 0, 0);
+  Widget windowsM = XmCreatePulldownMenu(menu_bar, (char*)"windows_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, windowsM); n++;
@@ -637,7 +639,7 @@ LibraryAgent::create_ui()
        *CATGETS(Set_AgentLabel, 47, ""),
        NULL);
 
-  Widget helpM = XmCreatePulldownMenu(menu_bar, "help_menu", 0, 0);
+  Widget helpM = XmCreatePulldownMenu(menu_bar, (char*)"help_menu", 0, 0);
 
   // create help menu
   n = 0;
@@ -731,17 +733,17 @@ LibraryAgent::create_ui()
   // WXmPushButtonGadget tmp_pbg(tmp);
   // help_agent().add_activate_help (tmp_pbg, "doc_list_help");
   WXmPushButtonGadget on_overview_pbg(on_overview);
-  help_agent().add_activate_help (on_overview, "on_overview");
+  help_agent().add_activate_help (on_overview, (char*)"on_overview");
   WXmPushButtonGadget on_tasks_pbg(on_tasks);
-  help_agent().add_activate_help (on_tasks, "on_tasks");
+  help_agent().add_activate_help (on_tasks, (char*)"on_tasks");
   WXmPushButtonGadget on_reference_pbg(on_reference);
-  help_agent().add_activate_help (on_reference, "on_reference");
+  help_agent().add_activate_help (on_reference, (char*)"on_reference");
   WXmPushButtonGadget on_item_pbg(on_item);
   help_agent().add_context_help (on_item);
   WXmPushButtonGadget on_help_pbg(on_help);
-  help_agent().add_activate_help (on_help,  "on_help");
+  help_agent().add_activate_help (on_help,  (char*)"on_help");
   WXmPushButtonGadget on_about_pbg(on_about);
-  help_agent().add_activate_help (on_about, "on_about");
+  help_agent().add_activate_help (on_about, (char*)"on_about");
 
   // Tools
   f_view2 = XtCreateManagedWidget("view", xmPushButtonWidgetClass,
@@ -864,11 +866,11 @@ LibraryAgent::create_ui()
   XtVaSetValues(f_status_text, XmNvalue, string, NULL);
 
   // Search area
-  widget = XmCreatePulldownMenu(search_area, "scope_menu", 0, 0);
+  widget = XmCreatePulldownMenu(search_area, (char*)"scope_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, widget); n++;
-  XtManageChild(widget = XmCreateOptionMenu(search_area, "scope", args, n));
+  XtManageChild(widget = XmCreateOptionMenu(search_area, (char*)"scope", args, n));
   XtVaSetValues(widget,
        XmNlabelString,
        (XmString)XmStringLocalized(CATGETS(Set_AgentLabel, 59, "Search:")),
@@ -1013,7 +1015,7 @@ LibraryAgent::quick_helpEH (Widget w, XtPointer client_data,
   if (event->type == EnterNotify || event->type == FocusIn)
     XmTextFieldSetString(agent->f_status_text, (char*)client_data);
   else if (event->type == LeaveNotify || event->type != FocusOut)
-    XmTextFieldSetString(agent->f_status_text, "");
+    XmTextFieldSetString(agent->f_status_text, (char*)"");
 }
 
 
@@ -1052,7 +1054,7 @@ LibraryAgent::search_help (Widget, XtPointer client_data,
 
   if (event->type == LeaveNotify || event->type == FocusOut)
   {
-    XmTextFieldSetString(agent->f_status_text, "");
+    XmTextFieldSetString(agent->f_status_text, (char*)"");
     return;
   }
 
@@ -1170,7 +1172,7 @@ LibraryAgent::add_library(char* newLib, Widget parent)
     }
 
     UAS_Pointer<UAS_Common> d = NULL ;
-    try {
+    mtry {
         // (precise locator format parsing to be done in the UAS layer)
 
         if( strchr( newLib, ':' ) && strchr( newLib, '/' ) ) {
@@ -1232,7 +1234,7 @@ LibraryAgent::add_library(char* newLib, Widget parent)
 #endif
             sts = NOT_FOUND ;
        }
-    } catch_any () {
+    } mcatch_any () {
         // one case that will reach here, but get no MMDB interface error
         // is if a (close to) fully qualified locator format is entered,
         // but with keyword error.
@@ -1545,6 +1547,7 @@ LibraryAgent::track_to (UAS_Pointer<UAS_Common> &node_ptr)
   OutlineList &rootList = *(f_doc_tree_view->list());
   bool in_subtree = FALSE;
   UAS_Pointer<UAS_Common> doc_root = node_ptr;
+  int inum;
 
   // Trace up to the root.
   free_tracking_hierarchy();
@@ -1554,6 +1557,7 @@ LibraryAgent::track_to (UAS_Pointer<UAS_Common> &node_ptr)
       for (int i = 0; i < rootList.length(); i ++) {
        if (doc_root == ((TOC_Element *) rootList[i])->toc()) {
            in_subtree = TRUE;
+           inum = i;
            break;
        }
       }
@@ -1563,7 +1567,8 @@ LibraryAgent::track_to (UAS_Pointer<UAS_Common> &node_ptr)
   if (in_subtree)
     {
       ON_DEBUG (printf ("Found node <%s> in my doc list subtree <%s>\n",
-                       node_ptr->title(), my_root->title()));
+                   (char*)node_ptr->title(),
+                   (char*)((TOC_Element *) rootList[inum])->toc()->title()));
       // Track to the element, scrolling if necessary. 
       track (TRUE);
     }
@@ -1619,7 +1624,8 @@ LibraryAgent::track (bool scroll)
          // If the entry is expanded, it MUST have children. 
          Xassert (oe->has_children());
          OutlineList &kids = *(oe->children());
-         for (int i = 0; i < kids.length(); i++)
+         int i;
+         for (i = 0; i < kids.length(); i++)
            {
              // Keep track of how many expanded items we skip over.
              list_location++;
@@ -1742,7 +1748,8 @@ void
 LibraryAgent::library_removed (UAS_Pointer<UAS_Common> lib)
 {
     OutlineList &rootList = *(f_doc_tree_view->list());
-    for (int i = rootList.length() - 1; i >= 0; i --) {
+    int i;
+    for (i = rootList.length() - 1; i >= 0; i --) {
        TOC_Element *te = (TOC_Element *) rootList[i];
        if (te->toc()->get_library() == lib) {
            if (f_tracking_hierarchy && f_tracking_hierarchy->f_toc == lib) {
@@ -1974,13 +1981,13 @@ LibraryAgent::transferCB(Widget w, XtPointer client_data, XtPointer call_data)
        url = url + file;
 
        UAS_Pointer<UAS_Common> pIL;
-       try {
+       mtry {
            pIL = UAS_Common::create ((char*)url);
            if (! (pIL == (UAS_Pointer<UAS_Common>)NULL)) {
                pIL->retrieve();
            }
        }
-       catch_any() {
+       mcatch_any() {
            pIL = NULL;
        }
        end_try;
@@ -2009,7 +2016,7 @@ LibraryAgent::copy_to_clipbd()
   //Window window = XtWindowOfObject((Widget)f_shell);
   Window window = XtWindowOfObject(f_shell);
   long item_id = 0;
-  clip_label = XmStringCreateLocalized("Data");
+  clip_label = XmStringCreateLocalized((char*)"Data");
   Wait_Cursor bob;
   UAS_String nl("\n");
   
@@ -2040,7 +2047,7 @@ LibraryAgent::copy_to_clipbd()
                 window_system().display(),
                 window,
                 item_id,
-                "STRING",
+                (char*)"STRING",
                 (char*)buf, (long)strlen((char*)buf) + 1,
                 private_id, NULL);
   } while(status == ClipboardLocked);
index f3501f607cf5fc877efbf6acdf74ba1f08a35eeb..356e9117d1ff5bebee4a6a041cab0824d3c88551 100644 (file)
@@ -166,7 +166,7 @@ ListView::create_ui_objects()
   //  WXmLabelGadget label (form, "label", WAutoManage);
   WXmSeparator separator (form, "separator", WAutoManage);
   // NOTE: Fix WWL to have a scrolled list object!
-  Widget scrolled_list = XmCreateScrolledList (form, "list", NULL, 0);
+  Widget scrolled_list = XmCreateScrolledList (form, (char*)"list", NULL, 0);
   f_list = new WXmList (scrolled_list);
   f_list->Manage();
 
@@ -256,7 +256,7 @@ ListView::select (WCallback *wcb)
 void
 ListView::activate (WCallback *)
 {
-  notify (ENTRY_ACTIVATE, (void *) f_selected_item);
+  notify (ENTRY_ACTIVATE, (void *)(size_t) f_selected_item);
 }
   
 
index 4aa9b648b795de69e0886e41ad282b6f0cde1c76..266e82f026073b0a5eef75e1f991faa81883b1f2 100644 (file)
@@ -120,8 +120,8 @@ MapButton::MapButton (WComposite &parent,
   f_doc_ptr (doc_ptr),
   f_expanded (FALSE)
 {
-  ON_DEBUG (printf ("MapButton::MapButton (%s)\n", f_doc_ptr->title()));
-  static expandable_tree =
+  ON_DEBUG (printf ("MapButton::MapButton (%s)\n", (char*)f_doc_ptr->title()));
+  static bool expandable_tree =
     window_system().get_boolean_default ("ExpandableMap");
   UAS_List<UAS_Common> kids (f_doc_ptr->children());
   UAS_String t = f_doc_ptr->title();
@@ -483,7 +483,7 @@ MapAgent::create_ui()
   WXmForm bottomform (rootform, "bottomform");
   WXmPushButton close (bottomform, "close", WAutoManage);
   WXmPushButton help (bottomform, "help", WAutoManage);
-  help_agent().add_activate_help (help, "map_help");
+  help_agent().add_activate_help (help, (char*)"map_help");
 
   XtVaSetValues(close, XmNlabelString,
        (XmString)XmStringLocalized(CATGETS(Set_AgentLabel, 12, "Close")), NULL);
index b5360700ba54b894c68663abcc227a3e516e3d0f..96576c61c7007ea36425301f2acf1f1991b99fb7 100644 (file)
@@ -127,7 +127,7 @@ MarkChooser::create_ui (Widget parent,
 #endif
   DECLM (WXmSeparator,    sep,      f_form,    "separator");
 
-  Widget list = XmCreateScrolledList (f_form, "list", NULL, 0);
+  Widget list = XmCreateScrolledList (f_form, (char*)"list", NULL, 0);
   f_list = WXmList (list);
   f_list.Manage();
 
index a19e9c6cab196481f5ec6d1a64b479259721f732..6b9b72f730371e062d1e97d26183e01f81c21aa5 100644 (file)
@@ -76,7 +76,8 @@
 #include <WWL/WXmLabelGadget.h>
 #include <WWL/WXmPushButton.h>
 
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 #define CLASS MarkIcon
 #include "create_macros.hh"
@@ -94,7 +95,7 @@ MarkIcon::MarkIcon (Widget parent,
                    Widget chooser_parent,
                    MarkCanvas *mark, 
                    int ypos, int scrollbar_offset)
-: f_icon_char (NULL),
+: f_icon_char (0),
   f_selected (FALSE),
   f_y_position (ypos),
   f_chooser_parent (chooser_parent)
@@ -148,8 +149,8 @@ MarkIcon::register_actions()
 
  static XtActionsRec actions_list[] =
  { 
-      {"double_click",    &MarkIcon::static_double_click},
-      {"single_click",    &MarkIcon::static_single_click},
+      {(char*)"double_click",    &MarkIcon::static_double_click},
+      {(char*)"single_click",    &MarkIcon::static_single_click},
  };
 
  XtAppAddActions (window_system().app_context(), actions_list, XtNumber (actions_list));
@@ -323,7 +324,7 @@ MarkIcon::deselect (MarkCanvas *)
 void
 MarkIcon::update_icon (MarkCanvas *)
 {
-  Pixmap button_pixmap = NULL;
+  Pixmap button_pixmap = 0;
 
   int multi = mark_count() > 1;
   int anno  = False;
@@ -342,18 +343,18 @@ MarkIcon::update_icon (MarkCanvas *)
 
   if (anno) {
     if (multi)
-      button_pixmap = XmGetPixmap(window_system().screen(), "anno_double",
+      button_pixmap = XmGetPixmap(window_system().screen(),(char*)"anno_double",
                                  Foreground(), Background());
     else
-      button_pixmap = XmGetPixmap(window_system().screen(), "anno_single",
+      button_pixmap = XmGetPixmap(window_system().screen(),(char*)"anno_single",
                                  Foreground(), Background());
   }
   else {
     if (multi)
-      button_pixmap = XmGetPixmap(window_system().screen(), "mark_double",
+      button_pixmap = XmGetPixmap(window_system().screen(),(char*)"mark_double",
                                  Foreground(), Background());
     else
-      button_pixmap = XmGetPixmap(window_system().screen(), "mark_single",
+      button_pixmap = XmGetPixmap(window_system().screen(),(char*)"mark_single",
                                  Foreground(), Background());
   }
 
@@ -593,18 +594,18 @@ MarkIcon::swap_colors()
 
   if (anno) {
     if (multi)
-      button_pixmap = XmGetPixmap(window_system().screen(), "anno_double",
+      button_pixmap = XmGetPixmap(window_system().screen(),(char*)"anno_double",
                                  foreground, background);
     else
-      button_pixmap = XmGetPixmap(window_system().screen(), "anno_single",
+      button_pixmap = XmGetPixmap(window_system().screen(),(char*)"anno_single",
                                  foreground, background);
   }
   else {
     if (multi)
-      button_pixmap = XmGetPixmap(window_system().screen(), "mark_double",
+      button_pixmap = XmGetPixmap(window_system().screen(),(char*)"mark_double",
                                  foreground, background);
     else
-      button_pixmap = XmGetPixmap(window_system().screen(), "mark_single",
+      button_pixmap = XmGetPixmap(window_system().screen(),(char*)"mark_single",
                                  foreground, background);
   }
 
index 2264deca8fc0e04a1478f00c2351f4827c1bb981..b7d525b5b6d3ec9e0a05637f696599c5b1115b0c 100644 (file)
@@ -93,7 +93,7 @@ MarkListView::MarkListView()
 
 MarkListView::~MarkListView()
 {
-  if (f_shell != NULL)
+  if (f_shell != 0)
     f_shell.Destroy();
   free_mark_list();
 }
@@ -107,7 +107,7 @@ void
 MarkListView::display()
 {
   Wait_Cursor bob;
-  if (f_shell == NULL)
+  if (f_shell == 0)
     create_ui();
 
   if (!f_popped_up)
@@ -143,7 +143,7 @@ MarkListView::create_ui()
   DECLM (WXmPushButton,   close,        form,         "close");
   DECLM (WXmPushButton,   help,         form,         "help");
   DECLM (WXmSeparator,    sep,          form,         "separator");
-  Widget list = XmCreateScrolledList (form, "list", NULL, 0);
+  Widget list = XmCreateScrolledList (form, (char*)"list", NULL, 0);
   f_list = WXmList (list);
   f_list.Manage();
 
@@ -165,7 +165,7 @@ MarkListView::create_ui()
   ON_ACTIVATE (f_edit,edit);
   ON_ACTIVATE (f_delete,remove);
   ON_ACTIVATE (close,close);
-  help_agent().add_activate_help (help, "mark_list_help");
+  help_agent().add_activate_help (help, (char*)"mark_list_help");
 
   SET_CALLBACK (f_shell,Popdown,popdown);
 
@@ -279,7 +279,7 @@ MarkListView::view()
 {
   Wait_Cursor bob_dobbs;
 
-  try
+  mtry
     {
 
       Xassert (f_selected_item > 0);
@@ -295,7 +295,7 @@ MarkListView::view()
       // Now `m' points to the selected Mark.
       m.item()->view();
     }
-  catch(demoException &, demo)
+  mcatch(demoException &, demo)
     {
       message_mgr().demo_failure(demo);
     }
@@ -392,7 +392,7 @@ MarkListView::receive (MarkDeleted &msg, void* /*client_data*/)
       i++, m++;
     }
 
-  Xassert (m != NULL);
+  Xassert (m != 0);
 
   //
   //  XXXSWM: Need to check if this is the selected item.
@@ -429,7 +429,7 @@ MarkListView::receive (MarkChanged &msg, void* /*client_data*/)
       i++, m++;
     }
 
-  Xassert (m != NULL);
+  Xassert (m != 0);
 
   // Change the title of the entry, once it is found.
   WXmString title (msg.f_mark_ptr->name());
index ec1096a57ef37094cae86427aa1235978c405a5d..46834a23dcee9f028b73c718279d0a52604977ef 100644 (file)
@@ -69,7 +69,8 @@
 #include <WWL/WXmPushButton.h>
 #include <WWL/WXmTextField.h>
 #include <X11/X.h>
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 #define CLASS MessageAgent
 #include "create_macros.hh"
@@ -91,7 +92,7 @@ MessageAgent::create_ui(Widget parent)
 {
   f_popped_up = False;
   f_dialog = (WXmMessageDialog *)(Widget)
-             WXmMessageDialog(parent, "MessageDialog");
+             WXmMessageDialog(parent, (char*)"MessageDialog");
 
   f_text = (WXmTextField *)
            XtCreateWidget ("text", xmTextFieldWidgetClass, *f_dialog, NULL, 0);
@@ -586,7 +587,7 @@ MessageAgent::get_integer (const char *message, const char* title,
 
   // Set the dialog title.
   WXmDialogShell shell (XtParent(*f_dialog));
-  shell.Title (title? (char*)title : "File a Bug");
+  shell.Title (title? (char*)title : (char *)"File a Bug");
 
   // Set the dialog buttons.
   f_dialog->CancelPB().Manage();
index 13bb3871e24382d8dd9c567a6b78e498a5d3ee6e..1d1a266196ce9c83030c76b21eafb65c20f9da8a 100644 (file)
@@ -49,7 +49,8 @@
  * 
  */
 
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 #include "UAS.hh"
 
@@ -89,7 +90,7 @@
 
 NodeHistoryAgent::~NodeHistoryAgent()
 {
-  if (f_shell != NULL)
+  if (f_shell != 0)
     f_shell.Destroy();
 }
 
@@ -101,7 +102,7 @@ NodeHistoryAgent::~NodeHistoryAgent()
 void
 NodeHistoryAgent::display()
 {
-  if (f_shell == NULL)
+  if (f_shell == 0)
     create_ui();
 
   refresh_list();
@@ -152,7 +153,7 @@ NodeHistoryAgent::create_ui()
   mtfstring = CATGETS(Set_AgentLabel, 185, "Section");
   XtVaSetValues(sectionlabel, XmNlabelString, (XmString)mtfstring, NULL);
 
-  Widget scrolled_list =  XmCreateScrolledList (form, "list", NULL, 0);
+  Widget scrolled_list =  XmCreateScrolledList (form, (char*)"list", NULL, 0);
   f_list = WXmList (scrolled_list);
   f_list.Manage();
 
@@ -174,7 +175,7 @@ NodeHistoryAgent::create_ui()
   SET_CALLBACK (f_list,DefaultAction,view);
   ON_ACTIVATE (f_display,view);
   ON_ACTIVATE (close,close);
-  help_agent().add_activate_help (help, "node_hist_help");
+  help_agent().add_activate_help (help, (char*)"node_hist_help");
 
   global_history_mgr().UAS_Sender<HistoryAdd>::request (this);
   global_history_mgr().UAS_Sender<HistoryDelete>::request (this);
@@ -211,7 +212,7 @@ NodeHistoryAgent::create_ui()
 void
 NodeHistoryAgent::refresh_list()
 {
-  Xassert (f_list != NULL);
+  Xassert (f_list != 0);
 
   xList<UAS_Pointer<UAS_Common> > &hist_list = global_history_mgr().history_list();
   XmStringTable table = new XmString [hist_list.length()];
@@ -330,7 +331,7 @@ NodeHistoryAgent::compose_entry(UAS_String book, UAS_String section)
 
   if (bookString.Width(f_list.FontList()) >= SECTION_OFFSET)
   {
-    char* dots = "...";
+    char* dots = (char*)"...";
 
     char* ungenerated = (char*)(bookString + WXmString(dots));
 
index 8be2b0daebe3923180783c0e6e30306af2b476e6..e039ac4e1689d330718af07f769e6bd6c28d1ee6 100644 (file)
@@ -132,24 +132,24 @@ NodeListAgent::create_base_window (char *name)
 //Widget Class       Var Name        Parent           Widget Name
 //------------------ --------------- ---------------- ----------------
   f_form     = new WXmForm    (*f_shell, "form");
-  f_menu_bar = new WXmMenuBar (*f_form, "menu_bar" /* , WAutoManage */);
+  f_menu_bar = new WXmMenuBar (*f_form, (char*)"menu_bar" /* , WAutoManage */);
 
   WXmCascadeButton   file_cascade    (*f_menu_bar,    "file",           AM);
-  WXmPulldownMenu    file_menu       (*f_menu_bar,    "file_menu"         );
+  WXmPulldownMenu    file_menu       (*f_menu_bar,    (char*)"file_menu"  );
   WXmPushButton      close           (file_menu,      "close",          AM);
   WXmCascadeButton   edit_cascade    (*f_menu_bar,    "edit",           AM);
-  WXmPulldownMenu    edit_menu       (*f_menu_bar,    "edit_menu"         );
+  WXmPulldownMenu    edit_menu       (*f_menu_bar,    (char*)"edit_menu"  );
   WXmPushButton      undo            (edit_menu,      "undo",           AM);
   /*
   WXmCascadeButton   view_cascade    (*f_menu_bar,    "view",           AM);
-  WXmPulldownMenu    view_menu       (*f_menu_bar,    "view_menu"         );
+  WXmPulldownMenu    view_menu       (*f_menu_bar,    (char*)"view_menu"  );
   WXmCascadeButton   sort_cascade    (view_menu,      "sort",           AM);
-  WXmPulldownMenu    sort_menu       (*f_menu_bar,    "sort_menu"         );
+  WXmPulldownMenu    sort_menu       (*f_menu_bar,    (char*)"sort_menu"  );
   WXmPushButton      ooo             (sort_menu,      "ooo",            AM);
   */
 
   WXmCascadeButton   help_cascade    (*f_menu_bar,    "help",           AM);
-  WXmPulldownMenu    help_menu       (*f_menu_bar,    "help_menu"         );
+  WXmPulldownMenu    help_menu       (*f_menu_bar,    (char*)"help_menu"  );
   WXmPushButton      context         (help_menu,      "context",        AM);
   WXmPushButton      window          (help_menu,      "window",         AM);
 
@@ -173,7 +173,7 @@ NodeListAgent::create_base_window (char *name)
   
   f_list_form  = (WXmForm*)(Widget)WXmForm(*f_pane, "listform", AM);
 
-  Widget scrolled_list =  XmCreateScrolledList (*f_list_form, "list", NULL, 0);
+  Widget scrolled_list =  XmCreateScrolledList (*f_list_form, (char*)"list", NULL, 0);
 
   f_list = (WXmList*)scrolled_list ;
   f_list->Manage();
index 2240698ee35a0bbcd8f1c50d5800ad64987dbf56..1a5a7c6bbccdb24bfddfdba5e593d2db59e7d074 100644 (file)
@@ -50,7 +50,8 @@
  * 
  */
 
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 #define C_FString
 #define C_List
@@ -198,13 +199,13 @@ static char another_g_top_locator[4096] ;
  */
 static XtActionsRec DrawnBActions[] =
     {
-        {"DeSelectAll"    , _DtHelpDeSelectAll    },
-        {"SelectAll"      , _DtHelpSelectAll      },
-        {"ActivateLink"   , _DtHelpActivateLink   },
-        {"CopyToClipboard", _DtHelpCopyAction     },
-        {"PageUpOrDown"   , _DtHelpPageUpOrDown   },
-        {"PageLeftOrRight", _DtHelpPageLeftOrRight},
-        {"NextLink"       , _DtHelpNextLink       }
+        {(char*)"DeSelectAll"    , _DtHelpDeSelectAll    },
+        {(char*)"SelectAll"      , _DtHelpSelectAll      },
+        {(char*)"ActivateLink"   , _DtHelpActivateLink   },
+        {(char*)"CopyToClipboard", _DtHelpCopyAction     },
+        {(char*)"PageUpOrDown"   , _DtHelpPageUpOrDown   },
+        {(char*)"PageLeftOrRight", _DtHelpPageLeftOrRight},
+        {(char*)"NextLink"       , _DtHelpNextLink       }
     };
 
 //-------  Functions --------------------------------------------
@@ -224,7 +225,7 @@ _DtHelpCreatePrintArea(Widget parent,
     
     string_resolution =  
        XpGetOneAttribute(XtDisplay(parent), l_AppPrintData->f_print_data->print_context,
-                         XPDocAttr, "default-printer-resolution");
+                         XPDocAttr, (char*)"default-printer-resolution");
     resolution = atoi(string_resolution);
     XFree(string_resolution);
 
@@ -331,7 +332,7 @@ NodePrintAgent::create_ui(Widget parent)
     // Setup up an outer form to hold the different page elements 
 
     n = 0;
-    f_form = XmCreateForm(parent, "outer_page", NULL, n);
+    f_form = XmCreateForm(parent, (char*)"outer_page", NULL, n);
 
     //  make sure the DtHelpDialog's actions are declared in order to satisfy
     //  the need of the DisplayArea 
@@ -346,17 +347,17 @@ NodePrintAgent::create_ui(Widget parent)
     XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++;
     XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++;
     XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); n++; // bottom
-    footer_form = XmCreateForm(f_form, "footer", args, n);
+    footer_form = XmCreateForm(f_form, (char*)"footer", args, n);
 
     // Create a left attached label for the book name
 
-    label = XmStringCreate("", XmFONTLIST_DEFAULT_TAG);
+    label = XmStringCreate((char*)"", XmFONTLIST_DEFAULT_TAG);
     n = 0;
     XtSetArg(args[n], XmNalignment, XmALIGNMENT_BEGINNING); n++;
     XtSetArg(args[n], XmNlabelString, label); n++;
     XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++;
     XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++;
-    footer_book_name = XmCreateLabel(footer_form, "bookname", args, n);
+    footer_book_name = XmCreateLabel(footer_form, (char*)"bookname", args, n);
     XmStringFree(label);
 
     XtManageChild(footer_book_name);
@@ -370,13 +371,13 @@ NodePrintAgent::create_ui(Widget parent)
     XtSetArg(args[n], XmNlabelString, label); n++;
     XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++;
     XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++;
-    footer_page_no = XmCreateLabel(footer_form, "page_no", args, n);
+    footer_page_no = XmCreateLabel(footer_form, (char*)"page_no", args, n);
     XmStringFree(label);
 
     XtManageChild(footer_page_no);
     XtManageChild(footer_form);
 
-    f_help_dsp_area = _DtHelpCreatePrintArea(f_form, "DisplayArea", width, height);
+    f_help_dsp_area = _DtHelpCreatePrintArea(f_form, (char*)"DisplayArea", width, height);
     gHelpDisplayArea = f_help_dsp_area ;
 
     //  Setup Display Area attachments 
index b4cc6c35c71d120356bcb8cdd7c3d0cf3516e8de..caa33314fc065dc5e04ec112153de8a5ac018bac 100644 (file)
@@ -56,8 +56,9 @@
  * 
  */
 
-#include <stream.h>
-#include <iostream.h>
+#include <sstream>
+#include <iostream>
+using namespace std;
 
 #define C_FString
 #define C_List
 
 #include "OnlineRender/SegClientData.hh"
 
+#include "utility/mmdb_exception.h"
+
 #include <Xm/MainW.h>
 #include <Xm/RowColumn.h>
 #include <Xm/PushBG.h>
@@ -958,7 +961,7 @@ NodeWindowAgent::create_ui()
 
   n = 0;
   XtSetArg(args[n], XmNscrolledWindowChildType, XmMENU_BAR); n++;
-  Widget menu_bar = XmCreateMenuBar(mainw, "menu_bar", args, n);
+  Widget menu_bar = XmCreateMenuBar(mainw, (char*)"menu_bar", args, n);
 
   n = 0;
   XtSetArg(args[n], XmNorientation, XmHORIZONTAL); n++;
@@ -972,7 +975,7 @@ NodeWindowAgent::create_ui()
                                      mainw, args, n);
 
   // Menus
-  Widget fileM = XmCreatePulldownMenu(menu_bar, "file_menu", 0, 0);
+  Widget fileM = XmCreatePulldownMenu(menu_bar, (char*)"file_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, fileM); n++;
@@ -1031,7 +1034,7 @@ NodeWindowAgent::create_ui()
   XtVaSetValues(widget, XmNlabelString, (XmString)mtfstring, XmNmnemonic, mnemonic, NULL);
 
   // search menu
-  Widget searchM = XmCreatePulldownMenu(menu_bar, "search_menu", 0, 0);
+  Widget searchM = XmCreatePulldownMenu(menu_bar, (char*)"search_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, searchM); n++;
@@ -1111,7 +1114,7 @@ NodeWindowAgent::create_ui()
   XtVaSetValues(f_search_next, XmNlabelString, (XmString)mtfstring, XmNmnemonic, mnemonic, NULL);
 
   // go menu
-  Widget goM = XmCreatePulldownMenu(menu_bar, "go_menu", 0, 0);
+  Widget goM = XmCreatePulldownMenu(menu_bar, (char*)"go_menu", 0, 0);
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, goM); n++;
   widget = XtCreateManagedWidget("go", xmCascadeButtonGadgetClass,
@@ -1182,7 +1185,7 @@ NodeWindowAgent::create_ui()
   XtVaSetValues(widget, XmNlabelString, (XmString)mtfstring, XmNmnemonic, mnemonic, NULL);
 
   // marks menu
-  Widget markM = XmCreatePulldownMenu(menu_bar, "marks_menu", 0, 0);
+  Widget markM = XmCreatePulldownMenu(menu_bar, (char*)"marks_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, markM); n++;
@@ -1286,7 +1289,7 @@ NodeWindowAgent::create_ui()
        XtGetValues(f_create_bmrk, args, n);
        n = 0;
        XtSetArg(args[n], XmNlabelString,
-                XmStringConcat(XmStringCreate(icon, OLIAS_FONT),
+                XmStringConcat(XmStringCreate(icon, (char*)OLIAS_FONT),
                                string)); n++;
        XtSetValues(f_create_bmrk, args, n);
 
@@ -1296,7 +1299,7 @@ NodeWindowAgent::create_ui()
        XtGetValues(f_create_anno, args, n);
        n = 0;
        XtSetArg(args[n], XmNlabelString,
-                XmStringConcat(XmStringCreate(icon, OLIAS_FONT),
+                XmStringConcat(XmStringCreate(icon, (char*)OLIAS_FONT),
                                string)); n++;
        XtSetValues(f_create_anno, args, n);
 
@@ -1306,7 +1309,7 @@ NodeWindowAgent::create_ui()
        XtGetValues(f_move_mark, args, n);
        n = 0;
        XtSetArg(args[n], XmNlabelString,
-                XmStringConcat(XmStringCreate(icon, OLIAS_FONT),
+                XmStringConcat(XmStringCreate(icon, (char*)OLIAS_FONT),
                                string)); n++;
        XtSetValues(f_move_mark, args, n);
 
@@ -1315,7 +1318,7 @@ NodeWindowAgent::create_ui()
        XtGetValues(list_marks, args, n);
        n = 0;
        XtSetArg(args[n], XmNlabelString,
-                XmStringConcat(XmStringCreate(icon, OLIAS_FONT),
+                XmStringConcat(XmStringCreate(icon, (char*)OLIAS_FONT),
                                string)); n++;
        XtSetValues(list_marks, args, n);
 
@@ -1324,7 +1327,7 @@ NodeWindowAgent::create_ui()
        XtGetValues(f_edit_mark, args, n);
        n = 0;
        XtSetArg(args[n], XmNlabelString,
-                XmStringConcat(XmStringCreate(icon, OLIAS_FONT),
+                XmStringConcat(XmStringCreate(icon, (char*)OLIAS_FONT),
                                string)); n++;
        XtSetValues(f_edit_mark, args, n);
 
@@ -1333,13 +1336,13 @@ NodeWindowAgent::create_ui()
        XtGetValues(f_delete_mark, args, n);
        n = 0;
        XtSetArg(args[n], XmNlabelString,
-                XmStringConcat(XmStringCreate(icon, OLIAS_FONT),
+                XmStringConcat(XmStringCreate(icon, (char*)OLIAS_FONT),
                                string)); n++;
        XtSetValues(f_delete_mark, args, n);
     }
 
   // options menu
-  Widget optionsM = XmCreatePulldownMenu(menu_bar, "options_menu", 0, 0);
+  Widget optionsM = XmCreatePulldownMenu(menu_bar, (char*)"options_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, optionsM); n++;
@@ -1393,7 +1396,7 @@ NodeWindowAgent::create_ui()
   XtVaSetValues(search_areaT, XmNlabelString, (XmString)mtfstring, XmNmnemonic, mnemonic, NULL);
 
   // windows menu
-  Widget windowsM = XmCreatePulldownMenu(menu_bar, "windows_menu", 0, 0);
+  Widget windowsM = XmCreatePulldownMenu(menu_bar, (char*)"windows_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, windowsM); n++;
@@ -1423,7 +1426,7 @@ NodeWindowAgent::create_ui()
 
 
   // help menu
-  Widget helpM = XmCreatePulldownMenu(menu_bar, "help_menu", 0, 0);
+  Widget helpM = XmCreatePulldownMenu(menu_bar, (char*)"help_menu", 0, 0);
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, helpM); n++;
   widget = XtCreateManagedWidget("help", xmCascadeButtonGadgetClass,
@@ -1513,13 +1516,13 @@ NodeWindowAgent::create_ui()
   
 #endif
 
-  help_agent().add_activate_help ((Widget)on_overview, "on_overview");
-  help_agent().add_activate_help ((Widget)on_tasks, "on_tasks");
-  help_agent().add_activate_help ((Widget)on_reference, "on_reference");
-  help_agent().add_activate_help ((Widget)on_reference, "on_reference");
+  help_agent().add_activate_help ((Widget)on_overview, (char*)"on_overview");
+  help_agent().add_activate_help ((Widget)on_tasks, (char*)"on_tasks");
+  help_agent().add_activate_help ((Widget)on_reference, (char*)"on_reference");
+  help_agent().add_activate_help ((Widget)on_reference, (char*)"on_reference");
   help_agent().add_context_help ((Widget)on_item);
-  help_agent().add_activate_help ((Widget)on_help, "on_help");
-  help_agent().add_activate_help ((Widget)on_about, "on_about");
+  help_agent().add_activate_help ((Widget)on_help, (char*)"on_help");
+  help_agent().add_activate_help ((Widget)on_about, (char*)"on_about");
 
 
   // Tools
@@ -1682,11 +1685,11 @@ NodeWindowAgent::create_ui()
   f_form = XtCreateWidget("form", xmFormWidgetClass, mainw, args, n);
 
 
-  f_title_menu = (WXmPulldownMenu*)(Widget)WXmPulldownMenu((WComposite&)f_form, "title_menu");
+  f_title_menu = (WXmPulldownMenu*)(Widget)WXmPulldownMenu((WComposite&)f_form, (char*)"title_menu");
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, (Widget) f_title_menu); n++;
   f_title_option = (WXmOptionMenu*)(Widget)
-                   WXmOptionMenu ((WComposite&)f_form, "title", AM, args, n);
+                   WXmOptionMenu ((WComposite&)f_form, (char*)"title", AM, args, n);
   help_agent().add_help_cb ((Widget)*f_title_option);
 
   f_tab_area = (WXmRowColumn*)(Widget) WXmRowColumn (f_form, "tab_area");
@@ -1714,8 +1717,8 @@ NodeWindowAgent::create_ui()
 #ifdef DEBUG
 #ifdef MONITOR
 
-  WXmCascadeButton   windows_cascade (menu_bar,       "windows"       , AM);
-  WXmPulldownMenu    windows_menu    (menu_bar,       "windows_menu"      );
+  WXmCascadeButton   windows_cascade (menu_bar,     "windows"       ,   AM);
+  WXmPulldownMenu    windows_menu    (menu_bar,     (char*)"windows_menu" );
   WXmPushButton(windows_menu, "monitor", AM).
     SetActivateCallback(this, (WWL_FUN)&NodeWindowAgent::monitor, (void*)1);
 
@@ -1725,9 +1728,9 @@ NodeWindowAgent::create_ui()
 #endif
 #endif
 
-#ifdef DEBUG
+#ifdef NODEBUG
   WXmCascadeButton   debug_cascade     (menu_bar,   "debug"                );
-  WXmPulldownMenu    debug_menu        (menu_bar,   "debug_menu"           );
+  WXmPulldownMenu    debug_menu        (menu_bar,   (char*)"debug_menu"    );
   WXmToggleButton    command_processor (debug_menu, "command_processor", AM);
   WXmPushButton             document_id       (debug_menu, "document_id",       AM);
 #endif
@@ -1742,7 +1745,7 @@ NodeWindowAgent::create_ui()
 
   f_help_dsp_area = (DtHelpDispAreaStruct*)
     _DtHelpCreateDisplayArea(WXmForm(*f_frame, "inform", WAutoManage),//parent
-                            "display_area",    // name
+                            (char*)"display_area",     // name
                             _DtHelpSTATIC,     // vert flag
                             _DtHelpAS_NEEDED,  // horz flag
                             FALSE,             // traversal flag
@@ -1763,20 +1766,20 @@ NodeWindowAgent::create_ui()
 
   // create detach graphic popup menu
   f_detach_menu = XmCreatePopupMenu(
-                       f_help_dsp_area->dispWid, "detach_graphic", NULL, 0);
-  f_detach_button = XmCreatePushButton(f_detach_menu, "Detach Graphic", NULL, 0);
+                       f_help_dsp_area->dispWid, (char*)"detach_graphic", NULL, 0);
+  f_detach_button = XmCreatePushButton(f_detach_menu, (char*)"Detach Graphic", NULL, 0);
   XtAddCallback(f_detach_button, XmNactivateCallback, detach_grCB, this);
   XtManageChild(f_detach_button);
   mtfstring =  CATGETS(Set_AgentLabel, 124, "Detach Graphic");
   XtVaSetValues(f_detach_button, XmNlabelString, (XmString)mtfstring, NULL);
 
-  f_attach_button = XmCreatePushButton(f_detach_menu, "Attach Graphic", NULL, 0);
+  f_attach_button = XmCreatePushButton(f_detach_menu, (char*)"Attach Graphic", NULL, 0);
   XtAddCallback(f_attach_button, XmNactivateCallback, attach_grCB, this);
   XtManageChild(f_attach_button);
   mtfstring =  CATGETS(Set_AgentLabel, 265, "Attach Graphic");
   XtVaSetValues(f_attach_button, XmNlabelString, (XmString)mtfstring, NULL);
 
-  f_raise_button = XmCreatePushButton(f_detach_menu, "Raise Graphic", NULL, 0);
+  f_raise_button = XmCreatePushButton(f_detach_menu, (char*)"Raise Graphic", NULL, 0);
   XtAddCallback(f_raise_button, XmNactivateCallback, raise_grCB, this);
   XtManageChild(f_raise_button);
   mtfstring =  CATGETS(Set_AgentLabel, 264, "Raise Graphic");
@@ -1787,22 +1790,22 @@ NodeWindowAgent::create_ui()
 
   // create link preview popup menu
   f_preview_menu = XmCreatePopupMenu(
-                       f_help_dsp_area->dispWid, "preview_menu", NULL, 0);
+                       f_help_dsp_area->dispWid, (char*)"preview_menu", NULL, 0);
 
-  f_preview_label = XmCreateLabel(f_preview_menu, "pre_label", NULL, 0);
+  f_preview_label = XmCreateLabel(f_preview_menu, (char*)"pre_label", NULL, 0);
   XtManageChild(f_preview_label);
 
-  widget = XmCreateSeparator(f_preview_menu, "sep", NULL, 0);
+  widget = XmCreateSeparator(f_preview_menu, (char*)"sep", NULL, 0);
   XtVaSetValues(widget, XmNseparatorType, XmDOUBLE_LINE, NULL);
   XtManageChild(widget);
 
-  widget = XmCreatePushButton(f_preview_menu, "widget", NULL, 0);
+  widget = XmCreatePushButton(f_preview_menu, (char*)"widget", NULL, 0);
   XtAddCallback(widget, XmNactivateCallback, go_to_linkCB, this);
   XtManageChild(widget);
   mtfstring =  CATGETS(Set_AgentLabel, 168, "Display Link");
   XtVaSetValues(widget, XmNlabelString, (XmString)mtfstring, NULL);
 
-  widget = XmCreatePushButton(f_preview_menu, "widget", NULL, 0);
+  widget = XmCreatePushButton(f_preview_menu, (char*)"widget", NULL, 0);
   XtAddCallback(widget, XmNactivateCallback, open_new_nodeCB, this);
   XtManageChild(widget);
   mtfstring =  CATGETS(Set_AgentLabel, 64, "New Window");
@@ -1810,33 +1813,33 @@ NodeWindowAgent::create_ui()
 
   // create default popup menu
   f_default_menu = XmCreatePopupMenu(
-                       f_help_dsp_area->dispWid, "default_menu", NULL, 0);
+                       f_help_dsp_area->dispWid, (char*)"default_menu",NULL, 0);
 
-  f_node_next3 = XmCreatePushButton(f_default_menu, "f_node_next3", NULL, 0);
+  f_node_next3 = XmCreatePushButton(f_default_menu, (char*)"f_node_next3", NULL, 0);
   XtAddCallback(f_node_next3, XmNactivateCallback, node_nextCB, this);
   XtManageChild(f_node_next3);
   mtfstring =  CATGETS(Set_AgentLabel, 96, "Next Section");
   XtVaSetValues(f_node_next3, XmNlabelString, (XmString)mtfstring, NULL);
 
-  f_node_prev3 = XmCreatePushButton(f_default_menu, "f_node_prev3", NULL, 0);
+  f_node_prev3 = XmCreatePushButton(f_default_menu, (char*)"f_node_prev3", NULL, 0);
   XtAddCallback(f_node_prev3, XmNactivateCallback, node_previousCB, this);
   XtManageChild(f_node_prev3);
   mtfstring =  CATGETS(Set_AgentLabel, 94, "Previous Section");
   XtVaSetValues(f_node_prev3, XmNlabelString, (XmString)mtfstring, NULL);
 
-  widget = XmCreateSeparator(f_default_menu, "sep", NULL, 0);
+  widget = XmCreateSeparator(f_default_menu, (char*)"sep", NULL, 0);
   XtManageChild(widget);
 
-  widget = XmCreatePushButton(f_default_menu, "widget", NULL, 0);
+  widget = XmCreatePushButton(f_default_menu, (char*)"widget", NULL, 0);
   XtAddCallback(widget, XmNactivateCallback, show_locatorCB, this);
   XtManageChild(widget);
   mtfstring =  CATGETS(Set_AgentLabel, 68, "Show Locator");
   XtVaSetValues(widget, XmNlabelString, (XmString)mtfstring, NULL);
 
-  widget = XmCreateSeparator(f_default_menu, "sep", NULL, 0);
+  widget = XmCreateSeparator(f_default_menu, (char*)"sep", NULL, 0);
   XtManageChild(widget);
 
-  widget = XmCreatePushButton(f_default_menu, "widget", NULL, 0);
+  widget = XmCreatePushButton(f_default_menu, (char*)"widget", NULL, 0);
   XtAddCallback(widget, XmNactivateCallback, printCB, this);
   XtManageChild(widget);
   mtfstring =  CATGETS(Set_AgentLabel, 70, "Print");
@@ -1953,11 +1956,11 @@ NodeWindowAgent::create_ui()
 
 
   // Search area
-  widget = XmCreatePulldownMenu(search_area, "scope_menu", 0, 0);
+  widget = XmCreatePulldownMenu(search_area, (char*)"scope_menu", 0, 0);
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, widget); n++;
-  XtManageChild(widget = XmCreateOptionMenu(search_area, "scope", args, n));
+  XtManageChild(widget = XmCreateOptionMenu(search_area, (char*)"scope", args, n));
   help_agent().add_help_cb (widget);
 
   textstore = new UAS_String(CATGETS(Set_AgentQHelp, 60,
@@ -2004,7 +2007,7 @@ NodeWindowAgent::create_ui()
   XtSetArg(args[n], XmNrightWidget, widget); n++;
   XtSetValues(*f_search_text, args, n);
   
-#ifdef DEBUG
+#ifdef NODEBUG
   /* -------- Debugging setup.  Should be a function. -------- */
   
   bool debugging = window_system().get_boolean_app_resource("debug");
@@ -2271,7 +2274,7 @@ NodeWindowAgent::search_help (Widget, XtPointer client_data,
   // clear quick help
   if (event->type == LeaveNotify || event->type == FocusOut)
   {
-    XmTextFieldSetString(agent->f_status_text, "");
+    XmTextFieldSetString(agent->f_status_text, (char*)"");
     return;
   }
 
@@ -2997,7 +3000,7 @@ NodeWindowAgent::unpreview()
   else
     {
       // If the timeout has already happened, just clear the preview area. 
-      XmTextFieldSetString(f_status_text, "");
+      XmTextFieldSetString(f_status_text, (char*)"");
     }
 }
 
@@ -3079,7 +3082,7 @@ NodeWindowAgent::make_bookmark (Boolean edit, MarkCanvas* refmark)
 #endif
 
   _DtCvSegPts **segs = NULL ;
-  try
+  mtry
   {
       int ret_x, ret_y ;
       // find the selection segment and offset
@@ -3125,7 +3128,8 @@ NodeWindowAgent::make_bookmark (Boolean edit, MarkCanvas* refmark)
       unsigned int length      = 0;
       unsigned int offset      = 0;
 
-      for (int i = 0; segs[i]; i++)
+      int i;
+      for (i = 0; segs[i]; i++)
       {
        _DtCvSegPts* segpts = segs[i];
 
@@ -3227,7 +3231,7 @@ NodeWindowAgent::make_bookmark (Boolean edit, MarkCanvas* refmark)
     else
        throw(CASTEXCEPT Exception());
   }
-  catch_any()
+  mcatch_any()
   {
       if (! refmark)
        message_mgr().error_dialog ((char*)UAS_String(CATGETS(Set_Messages, 10,
@@ -3506,14 +3510,14 @@ void
 NodeWindowAgent::delete_mark()
 {
   Xassert (MarkCanvas::selected_mark() != NULL);
-  try
+  mtry
     {
       MarkCanvas::selected_mark()->mark_ptr()->remove();
 
       XtSetSensitive(f_create_bmrk, False);
       XtSetSensitive(f_create_anno, False);
     }
-  catch_any()
+  mcatch_any()
     {
       message_mgr().error_dialog (
                (char*)UAS_String(CATGETS(Set_Messages, 11,
@@ -3556,7 +3560,7 @@ NodeWindowAgent::move_markCB(Widget, XtPointer client_data, XtPointer)
   UAS_Pointer<Mark> mark_ptr = MarkTml::selected_mark()->mark_ptr();
   Wait_Cursor bob;
   // Create a new mark based on the old one at the new location.
-  try
+  mtry
     {
       f_viewport_agent->mark_creator (this); // 94/10/27 yuji bug fix for TC-530
       UAS_Pointer<UAS_Common> d;
@@ -3564,7 +3568,7 @@ NodeWindowAgent::move_markCB(Widget, XtPointer client_data, XtPointer)
                            AnchorCanvas (f_viewport_agent->selection_range()),
                            mark_ptr);
     }
-  catch_any()
+  mcatch_any()
     {
       message_mgr().error_dialog (
                (char*)UAS_String(CATGETS(Set_Messages, 12,
@@ -3624,7 +3628,7 @@ NodeWindowAgent::detach_graphic()
 
   // Display an instructional dialog.
   WXmMessageDialog
-    info_dialog ((Widget)f_shell, "detach_msg",
+    info_dialog ((Widget)f_shell, (char*)"detach_msg",
                  WArgList (XmNdialogType, XmDIALOG_INFORMATION, NULL));
   WXmDialogShell shell (info_dialog.Parent());
   // set window title
@@ -3829,7 +3833,7 @@ NodeWindowAgent::display (UAS_Pointer<UAS_Common> &node_ptr)
   
   int sameNode = f_node_view_info && f_node_view_info->node_ptr() == node_ptr;
   if (sameNode && !g_style_sheet_update && !f_history_display) {
-    extern char g_top_locator[];
+//    extern char g_top_locator[];
 #ifdef JBM
     // need to change this to pass in the locator to SetTopic so the
     // Canvas knows where to scroll to when it displays
@@ -3988,12 +3992,12 @@ NodeWindowAgent::do_bookmarks(bool move_to_mark)
 #endif
   while (i)
     {
-      try {
+      mtry {
        MarkCanvas *mc = add_mark (i.item());
        if (g_view_mark() == i.item())
          jump_to = mc ;
       }
-      catch_any()
+      mcatch_any()
        {
 #ifdef BOOKMARK_DEBUG    
          cerr << "error adding bookmark " << i.item()->name() << endl;
@@ -4293,7 +4297,7 @@ NodeWindowAgent::quick_helpEH (Widget w, XtPointer client_data,
   if (event->type == EnterNotify || event->type == FocusIn)
     XmTextFieldSetString(agent->f_status_text, (char*)client_data);
   else if (event->type == LeaveNotify || event->type != FocusOut)
-    XmTextFieldSetString(agent->f_status_text, "");
+    XmTextFieldSetString(agent->f_status_text, (char*)"");
 }
 
 
@@ -4368,7 +4372,7 @@ NodeWindowAgent::re_display()
   bool lock_flag = f_locked ;
   f_locked = False ; // have to force it to happen regardless of lock 
   
-  try
+  mtry
     {
       
       node_mgr().set_preferred_window(this); // make re-display happen in this window 
@@ -4377,7 +4381,7 @@ NodeWindowAgent::re_display()
       f_locked = lock_flag ;
       
     }
-  catch_any()
+  mcatch_any()
     {
       delete anchor ;
       g_history_anchor = save_anchor ;
@@ -4558,7 +4562,8 @@ NodeWindowAgent::create_canvas_mark(_DtCvHandle  canvas,
   UAS_List<UAS_String> marks_loc_list;
   marks_loc_list = marks_loc.splitFields(',');
 
-  for (int i = 0; i < marks_loc_list.length(); i++)
+  int i;
+  for (i = 0; i < marks_loc_list.length(); i++)
   {
     UAS_String& mark_loc = *marks_loc_list[i];
     unsigned int vcc, offset, length;
@@ -5073,7 +5078,7 @@ MarkViewer::receive (ViewMark &message, void* /*client_data*/)
   // Slight hack... Set a global that tells the ViewportAgent to
   // select and jump to the specified mark when the corresponding
   // node is displayed (see "jump_to" below).  15:17 02-Dec-93 DJB
-  try
+  mtry
     {
       g_view_mark() = message.f_mark_ptr;
 
@@ -5083,14 +5088,14 @@ MarkViewer::receive (ViewMark &message, void* /*client_data*/)
 
       section->retrieve();
     }
-  catch_noarg(demoException &)
+  mcatch_noarg(demoException &)
     {
       // this is a hack. what should happen, is that the catch_any below this
       // should only be catching a specific (or set of) exception so that others
       // can pass through - 14:32 06/ 1/94 - jbm
       rethrow ;
     }
-  catch_any()
+  mcatch_any()
     {
       message_mgr().info_dialog (
                (char*)UAS_String(CATGETS(Set_Messages, 15,
index efecee3cec9b0b29bfe0ee3554cfb33c6b2559ac..9821259dfba9ad49006114645db061e6b0515792 100644 (file)
@@ -62,6 +62,9 @@ class MarkCreated;
 class MarkDeleted;
 class MarkCanvas ;
 class MarkIcon ;
+// class DetachGraphic;
+// class ReAttachGraphic;
+// class DisplayGraphic;
 
 class GraphicsHandler ;
 // self is used by some MACROS somewhere, but the X include files use
index acdeceda104e530907fd57534160db472a2c3a2d..af237935db6d419df64b618b7186f9bdbb08d468 100644 (file)
@@ -72,7 +72,8 @@
 #include <WWL/WComposite.h>
 #include <WWL/WXmScrollBar.h>
 
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 #include <unistd.h>
 #include <sys/param.h>
 
@@ -110,7 +111,7 @@ OutlineListView::OutlineListView (const WComposite &parent, const char *name,
   f_tracking_element (NULL),
   f_library_agent (NULL)
 {
-  static serial_number = 1;
+  static int serial_number = 1;
 
   // Assign a unique serial number to this outline list. 
   f_serial_number = serial_number++;
@@ -186,7 +187,7 @@ icon_width(Widget w)
   else
     string[0] = OLIAS_PLACEHOLDER_ICON;
   string[1] = '\0';
-  XmString thing = XmStringCreate (string, OLIAS_FONT);
+  XmString thing = XmStringCreate (string, (char*)OLIAS_FONT);
 
   Dimension rval = XmStringWidth(defaultList, thing);
   XmStringFree (thing);
@@ -385,7 +386,7 @@ OutlineListView::create_xm_string (OutlineElement *oe, int base_level,
   else
     s[oe->level() - base_level + 1 + track] = '\0';
   
-  next = XmStringCreate (s, OLIAS_FONT);
+  next = XmStringCreate (s, (char*)OLIAS_FONT);
   
 #ifdef NotDefined
   // Concat the parts 
@@ -798,8 +799,8 @@ OutlineListView::register_actions()
   
   static XtActionsRec actions_list[] =
     {
-      {"OutlineListBeginSelect",   OutlineListView::_select_start},
-      {"OutlineListEndSelect",     OutlineListView::_select_end},
+      {(char*)"OutlineListBeginSelect",   OutlineListView::_select_start},
+      {(char*)"OutlineListEndSelect",     OutlineListView::_select_end},
     };
   
   
@@ -1184,7 +1185,7 @@ OutlineListView::activate (WCallback *wcb)
 
   if ((oe->type() == TOC_Element::TOC_ElementClass) && !expanded)
     {
-      try {
+      mtry {
           UAS_ObjectType type = ((TOC_Element *) oe)->toc()->type();
           switch (type)
           {
@@ -1223,7 +1224,7 @@ OutlineListView::activate (WCallback *wcb)
              break;
           }
         }
-      catch_any()
+      mcatch_any()
         {
           message_mgr().error_dialog( (char*)UAS_String(CATGETS(
                            Set_UrlAgent, 5, "Document not found." )) ) ;
index 0609b2e5277a9f57846bff2ade5b852707389577..6da545687e758aeb5ba18b44d8fa94687a649e70 100644 (file)
@@ -284,7 +284,7 @@ void
 PrefAgent::display()
 {
   Wait_Cursor bob;
-  if (f_shell == NULL)
+  if (f_shell == 0)
     create_ui();
 
   // Always reset on new popup. 
@@ -321,8 +321,8 @@ PrefAgent::create_ui()
                 NULL);
 
   DECL  (WXmForm,         form,         f_shell,      "form");
-  DECLM (WXmOptionMenu,   options,      form,         "options");
-  DECL  (WXmPulldownMenu, options_menu, form,         "options_menu");
+  DECLMC(WXmOptionMenu,   options,      form,         "options");
+  DECLC (WXmPulldownMenu, options_menu, form,         "options_menu");
 
   mtfstring = CATGETS(Set_AgentLabel, 186, "Preferences for");
   XtVaSetValues(options, XmNlabelString, (XmString)mtfstring, NULL);
@@ -348,7 +348,7 @@ PrefAgent::create_ui()
   SET_CALLBACK (f_apply,Activate,apply);
   SET_CALLBACK (f_reset,Activate,reset);
   SET_CALLBACK (cancel,Activate,cancel);
-  help_agent().add_activate_help (help, "preferences_help");
+  help_agent().add_activate_help (help, (char*)"preferences_help");
 
   DECLM (WXmFrame,        frame,        form,         "frame");
   DECL  (WXmForm,         container,    frame,        "container");
@@ -1064,13 +1064,13 @@ PrefAgent::get_geometry (WCallback *wcb)
   WXmTextField text_field ((Widget)wcb->ClientData());
   char *shell_name;
   if (text_field == f_map_geo)
-    shell_name = "map";
+    shell_name = (char*)"map";
   else if (text_field == f_browse_geo)
-    shell_name = "nodeview";
+    shell_name = (char*)"nodeview";
     
   // Display an instructional dialog. 
   WXmMessageDialog
-    info_dialog ((Widget)f_shell, "geometry_msg",
+    info_dialog ((Widget)f_shell, (char*)"geometry_msg",
                 WArgList (XmNdialogType, XmDIALOG_INFORMATION, NULL));
   WXmDialogShell shell (info_dialog.Parent());
   // set window title
index fa6ec1bed7bdb76881c1242c0beeb710eef24c2f..210ed792a8ff6f8fa9a368230f4081e5cd5f6dda 100644 (file)
@@ -97,7 +97,8 @@
 #include <WWL/WXmFrame.h>
 #include <WWL/WXmPushButton.h>
 #include <WWL/WXmSeparator.h>
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 #define CLASS PrintPanelAgent
 
@@ -476,7 +477,7 @@ CreatePrintShell(Widget widget, AppPrintData* p)
        p->f_print_shell = XmPrintSetup(widget, 
                                        XpGetScreenOfContext(p->f_print_data->print_display,
                                                             p->f_print_data->print_context),
-                                       "PrintShell", NULL, 0);
+                                       (char*)"PrintShell", NULL, 0);
 
 
        //  set the global variable to this value so that the create_ui function in 
@@ -598,17 +599,17 @@ CreatePrintSetup(Widget parent, AppPrintData* p)
 
        // resources common to silent and noisy printing cases
 
-       XtSetArg(args[n], DtNcopies, window_system().videoShell()->copies); n++;
+       XtSetArg(args[n], (char*)DtNcopies, window_system().videoShell()->copies); n++;
        
        // set print to file if file name given 
        if ((char *)window_system().videoShell()->file_name != NULL) {
-           XtSetArg(args[n], DtNfileName, (char *)window_system().videoShell()->file_name); n++;
-           XtSetArg(args[n], DtNprintDestination, DtPRINT_TO_FILE); n++;
+           XtSetArg(args[n], (char*)DtNfileName, (char *)window_system().videoShell()->file_name); n++;
+           XtSetArg(args[n], (char*)DtNprintDestination, DtPRINT_TO_FILE); n++;
        }
 
        // printer name
        if ((char *)window_system().videoShell()->printer != NULL) {
-           XtSetArg(args[n], DtNprinterName, (char *)window_system().videoShell()->printer); n++;
+           XtSetArg(args[n], (char*)DtNprinterName, (char *)window_system().videoShell()->printer); n++;
        }
 
        // if silent printing we won't need a dialog
@@ -620,11 +621,11 @@ CreatePrintSetup(Widget parent, AppPrintData* p)
 
            if (XtIsApplicationShell(parent)) {
                p->f_print_dialog =
-                   DtCreatePrintSetupBox(parent, "PrintSetup", args, n);
+                   DtCreatePrintSetupBox(parent, (char*)"PrintSetup", args, n);
            }
            else {      
                p->f_print_dialog =
-                   DtCreatePrintSetupBox(XtParent(parent), "PrintSetup", args, n);
+                   DtCreatePrintSetupBox(XtParent(parent), (char*)"PrintSetup", args, n);
            }
        }    
 
@@ -638,18 +639,18 @@ CreatePrintSetup(Widget parent, AppPrintData* p)
                CATGETS(Set_PrintPanelAgent, 1, "Dtinfo: Print"));
 
            XtSetArg(args[n], XmNdialogTitle, title); n++;
-           XtSetArg(args[n], DtNworkAreaLocation, DtWORK_AREA_BOTTOM); n++;
+           XtSetArg(args[n], (char*)DtNworkAreaLocation, DtWORK_AREA_BOTTOM); n++;
  
            // if parent widget is an application shell, use it, otherwise use
            // the grandparent
 
            if (XtIsApplicationShell(parent)) {
                p->f_print_dialog =
-                   DtCreatePrintSetupDialog(parent, "PrintSetup", args, n); 
+                   DtCreatePrintSetupDialog(parent, (char*)"PrintSetup", args, n);
            }
            else {
                p->f_print_dialog =
-                   DtCreatePrintSetupDialog(XtParent(parent), "PrintSetup", args, n); 
+                   DtCreatePrintSetupDialog(XtParent(parent), (char*)"PrintSetup", args, n);
            }
 //         XmStringFree(title);
        }
@@ -672,7 +673,7 @@ CreatePrintSetup(Widget parent, AppPrintData* p)
 
        // add context help for dialog
 
-       help_agent().add_activate_help(p->f_print_dialog, "print_panel_help");
+       help_agent().add_activate_help(p->f_print_dialog, (char*)"print_panel_help");
     }
 
     //  update message area
index c69438cd8f3a082f5211e365898b1492a1e98745..8ce103ddfa70d00feb4a322cb8d49bea52595869 100644 (file)
@@ -128,7 +128,7 @@ ScopeMenu::fill_menu()
   ON_DEBUG(cerr << "Scope Popup" << endl);
 
   int first = TRUE;
-  for (; s != NULL; s++)
+  for (; s != 0; s++)
     {
       
       // in case we are not using Current Section
@@ -136,7 +136,7 @@ ScopeMenu::fill_menu()
        f_current_scope = s.item();
 
       ON_DEBUG(cerr << "\t" << f_current_scope->name() << endl);
-      ON_DEBUG(f_current_scope->dump_items());
+//    ON_DEBUG(f_current_scope->dump_items());
 
       // Add a separator when they change from read only to changable. 
       if (old_read_only != s.item()->read_only())
@@ -227,7 +227,7 @@ ScopeMenu::receive (ScopeCreated &msg, void *client_data)
   else
   {
     // Scan the current menu to find the correct insertion position. 
-    for (; s != NULL; s++, position++)
+    for (; s != 0; s++, position++)
     {
       scope = s.item();
       if (need_sep != scope->read_only())
@@ -284,7 +284,8 @@ ScopeMenu::receive (ScopeDeleted &msg, void *client_data)
   XtSetArg(args[n], XmNchildren, &kids); n++;
   XtGetValues(f_pull_menu, args, n);
 
-  for (int i = 0; i < num_kids; i++)
+  int i;
+  for (i = 0; i < num_kids; i++)
     {
       if (XmIsSeparator (kids[i]))
       {
@@ -345,7 +346,8 @@ ScopeMenu::receive (ScopeRenamed &msg, void *client_data)
   XtSetArg(args[n], XmNchildren, &kids); n++;
   XtGetValues(f_pull_menu, args, n);
 
-  for (int i = 0; i < num_kids; i++)
+  int i;
+  for (i = 0; i < num_kids; i++)
     {
       if (XmIsPushButtonGadget (kids[i]) &&
          msg.f_search_scope ==
@@ -363,7 +365,7 @@ ScopeMenu::receive (ScopeRenamed &msg, void *client_data)
   List_Iterator<UAS_SearchScope *> s (scope_list);
 
   // find the new position in the list
-  for (; s != NULL; s++)
+  for (; s != 0; s++)
     {
       if (s.item() == msg.f_search_scope)
        continue;
index 07797790149cfbd6caaae596883f83a11216d35a..99e2d5eed0475919d8a0ceb52a6ddba961613fb9 100644 (file)
@@ -47,7 +47,8 @@
  * 
  */
 
-#include "iostream.h"
+#include "iostream"
+using namespace std;
 
 #include "UAS.hh"
 
@@ -112,7 +113,7 @@ SearchHistoryListView::display_value(FolioObject *object)
 
   if ((allowance = scope_field_width - scopeString.Width(fontlist)) < 0)
   {
-    char* dots = "...";
+    char* dots = (char*)"...";
 
     // need to free ungenerated at the end
     char* ungenerated = (char*)(scopeString + WXmString(dots));
@@ -210,7 +211,7 @@ SearchHistoryListView::child_create_ui_pre(WXmForm &form)
 
   if (matchString.Width(header_font) >= scope_offset)
   {
-    char* dots = "...";
+    char* dots = (char*)"...";
 
     char* ungenerated = (char*)(matchString + WXmString(dots));
 
index 1ad384632cae9183c8980fc47496fd57293da1bc..4cd165853bd9092f15127296329e2a27ecd80dd9 100644 (file)
@@ -74,7 +74,8 @@
 #include "Managers/WString.hh"
 
 #include <Prelude.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 #include "Registration.hh"
 
@@ -137,7 +138,7 @@ SearchResultsAgent::form_result_string (UAS_Pointer<UAS_SearchResultsEntry> re)
     relevancy[0] += (char) ((re->relevance() * 8 ) / f_scale);
 
 
-  WXmString rel  (relevancy, OLIAS_FONT);
+  WXmString rel  (relevancy, (char*)OLIAS_FONT);
 
   WXmString book;
   WXmString name;
@@ -171,7 +172,7 @@ SearchResultsAgent::form_result_string (UAS_Pointer<UAS_SearchResultsEntry> re)
   }
   else {
 
-    char* dots = "...";
+    char* dots = (char*)"...";
 
     WXmString temp_xmstring = book + WXmString(dots);
     char *temp_str = (char*)temp_xmstring;
@@ -379,7 +380,8 @@ SearchResultsAgent::fill_list(UAS_List<UAS_SearchResultsEntry>& rlist)
   XmString *t = string_table;
 
   int string_count = 0 ;
-  for (int i = 0; i < rlist.length(); i ++) {
+  int i;
+  for (i = 0; i < rlist.length(); i ++) {
       string_count++ ;
       *t++ = form_result_string (rlist[i]);
   }
@@ -445,7 +447,7 @@ SearchResultsAgent::fill_list(UAS_List<UAS_SearchResultsEntry>& rlist)
 void
 SearchResultsAgent::create_window()
 {
-  create_base_window ("results");
+  create_base_window ((char*)"results");
 
   XmStringLocalized mtfstring;
   String           string;
@@ -453,7 +455,7 @@ SearchResultsAgent::create_window()
   string = CATGETS(Set_SearchResultsAgent, 1, "Dtinfo: Search Results");
   XtVaSetValues((Widget)*f_shell, XmNtitle, string, NULL);
 
-  help_agent().add_activate_help(f_help, "results_help");
+  help_agent().add_activate_help(f_help, (char*)"results_help");
 
 #define AM WAutoManage
   // NOTE: need form to contain things in the same row 'cause of resizing
@@ -486,7 +488,7 @@ SearchResultsAgent::create_window()
   mtfstring = CATGETS(Set_AgentLabel, 221, "Query:");
   XtVaSetValues(query_label, XmNlabelString, (XmString)mtfstring, NULL);
   
-  Widget textw = XmCreateScrolledText (*f_pane, "query_text", NULL, 0);
+  Widget textw = XmCreateScrolledText (*f_pane, (char*)"query_text", NULL, 0);
   f_query_text = new WXmText (textw);
   f_query_text->Manage();
 //  WXmPushButton      editq           (*f_panel,       "edit_query",     AM);
@@ -527,7 +529,7 @@ SearchResultsAgent::create_window()
     header.FontList(header_font);
   }
 
-  int offset = WXmString(relevancy, OLIAS_FONT).Width(f_list->FontList());
+  int offset = WXmString(relevancy,(char*)OLIAS_FONT).Width(f_list->FontList());
   header.LeftOffset(offset); 
 
   WXmPrimitive prim(XtParent(*f_list));
index 96b78339a88e2981aa6c5943812e092997ca96d6..1b2fe58da1cf82f95ee33d198e3565f1b88c3664 100644 (file)
@@ -93,6 +93,6 @@ protected: // variables
 
 inline
 SearchResultsAgent::SearchResultsAgent()
-: f_work_proc_id (NULL), f_popped_up(FALSE)
+: f_work_proc_id (0), f_popped_up(FALSE)
 {
 }
index 4b9f1da88ea34b48ccc2075764a258ef6da29ce6..d91a8c12636dd7b194c57ccf6bd1c010d5a4fdde 100644 (file)
 #endif
 
 #include <string.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 #include <stdio.h>
 
 #define CLASS SearchScopeAgent
@@ -419,7 +420,7 @@ void
 SearchScopeAgent::display()
 {
   Wait_Cursor bob;
-  if (f_shell == NULL)
+  if (f_shell == 0)
     {
       create_ui();
     }
@@ -459,7 +460,7 @@ SearchScopeAgent::fill_option_menu()
   WComposite menu (f_scope_option.SubMenuId());
 
   ON_DEBUG (printf ("There are %d user scopes:\n", f_scope_list.length()));
-  for (; i != NULL; i++)
+  for (; i != 0; i++)
   {
     if (i.item()->read_only())
       continue;
@@ -490,11 +491,11 @@ SearchScopeAgent::create_ui()
   XtVaSetValues((Widget)f_shell, XmNtitle, string, NULL);
 
   DECL  (WXmForm,         form,           f_shell,     "form");
-  DECL  (WXmPulldownMenu, scope_menu,     form,        "scope_menu");
+  DECLC (WXmPulldownMenu, scope_menu,     form,        "scope_menu");
   Arg args[1];
   int n = 0;
   XtSetArg(args[n], XmNsubMenuId, (Widget) scope_menu); n++;
-  f_scope_option = WXmOptionMenu (form, "scope_option", WAutoManage, args, n);
+  f_scope_option = WXmOptionMenu (form, (char*)"scope_option", WAutoManage, args, n);
   ASSN  (WXmPushButton,   f_unnamed,      scope_menu,  "unnamed");
 
   mtfstring = CATGETS(Set_AgentLabel, 212, "Scope Name");
@@ -546,7 +547,7 @@ SearchScopeAgent::create_ui()
   ON_ACTIVATE (f_delete,delete_scope);
   ON_ACTIVATE (f_reset,reset);
   ON_ACTIVATE (close,close);
-  help_agent().add_activate_help (help, "scope_editor_help");
+  help_agent().add_activate_help (help, (char*)"scope_editor_help");
   
   form.ShadowThickness (0);
   form.Manage();
@@ -711,10 +712,10 @@ SearchScopeAgent::scope_name_prompt()
           // Check for name in use.
           List_Iterator<UAS_SearchScope *> s (f_scope_list);
           if (strcasecmp (scope_name, "unnamed") != 0)
-            for (; s != NULL; s++)
+            for (; s != 0; s++)
               if (strcmp (scope_name, s.item()->name()) == 0)
                 break;
-          if (s != NULL)
+          if (s != 0)
             {
               message_mgr().error_dialog (
                (char*)UAS_String(CATGETS(Set_Messages, 21,
@@ -797,7 +798,7 @@ SearchScopeAgent::create_scope (const char *name,
 {
   // this flag should be defined elsewhere-this could
   // become a command-line option
-  if (f_shell == NULL)
+  if (f_shell == 0)
     {
       create_ui();
     }
@@ -962,7 +963,7 @@ SearchScopeAgent::rename_scope()
 
   int position = 1, old_position = -1;
   List_Iterator<UAS_SearchScope *> s (f_scope_list);
-  for (; s != NULL; s++)
+  for (; s != 0; s++)
     {
       if (s.item()->read_only())
         continue;
@@ -989,7 +990,7 @@ SearchScopeAgent::rename_scope()
       f_scope_list.remove_handle(f_current_scope);
       f_scope_list.remove (f_current_scope);
       ON_DEBUG (printf ("ScopeAgent: Inserting before <%s>\n",
-                        s != NULL ? s.item()->name() : "LAST"));
+                        s != 0 ? s.item()->name() : "LAST"));
       // add handle and scope back in appropriate location
       f_scope_list.add_handle(data_handle, position-1);
       f_scope_list.insert_before (s, f_current_scope);
@@ -1106,7 +1107,7 @@ SearchScopeAgent::save_unnamed_scope (const char *name)
 
   // Scan the current menu to find the correct insertion position. 
   List_Iterator<UAS_SearchScope *> s (f_scope_list);
-  for (; s != NULL; s++, position++)
+  for (; s != 0; s++, position++)
     {
       if (s.item()->read_only())
         continue;
@@ -1606,7 +1607,8 @@ SearchScopeAgent::add_infolib(UAS_Pointer<UAS_Common> &lib)
 
   // See if infolib is already in list--if it's there, 
   // don't add it again.
-  for (int i = 0; i < ol->length(); i++)
+  int i;
+  for (i = 0; i < ol->length(); i++)
   {
     oe = ((OutlineElement *) (*ol)[i]);
     if (((TOC_Element *)oe)->toc() == lib)
@@ -1685,7 +1687,8 @@ SearchScopeAgent::remove_infolib(UAS_Pointer<UAS_Common> &lib)
   BitHandle handle = f_infolib_list->data_handle();
 
   f_infolib_list->clear();
-  for (int i = 0; i < ol->length(); i ++)
+  int i;
+  for (i = 0; i < ol->length(); i ++)
     ((OutlineElement *) (*ol)[i])->set_expanded (handle);
 
   f_infolib_list->set_list (ol, handle);
@@ -1815,7 +1818,7 @@ SearchScopeAgent::rebuild_scope_list()
   // Delete all named scopes so list can be rebuilt.
   List_Iterator<UAS_SearchScope *> si (f_scope_list);
 
-  for (; si != NULL; si++)
+  for (; si != 0; si++)
   {
     scope = si.item();
 
@@ -1933,7 +1936,7 @@ SearchScopeAgent::update_option_menu(UAS_String &scope_name)
 UAS_List<UAS_Common>
 SearchScopeAgent::list()
 {
-  if (f_shell == NULL)
+  if (f_shell == 0)
   {
     create_ui();
   }
index 9a9c9fee2f6d29bf7642f032095a3855593b3f45..455ea6a1358123442def4cd49c0283171aa6f169 100644 (file)
@@ -82,7 +82,8 @@
 #endif
 
 #include <string.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 #include "Other/XmStringLocalized.hh"
 #include "Managers/CatMgr.hh"
@@ -149,7 +150,7 @@ SearchScopeList::save()
   Buffer buffer, temp_buffer;
 
   // for each search scope do
-  for (; i != NULL; i++)
+  for (; i != 0; i++)
   {
     scope = i.item();
     if (scope->deleted() || scope->read_only())
@@ -224,7 +225,7 @@ SearchScopeList::save()
   // Now dump the name of each of the scopes.
   buffer.reset();
   const char *name;
-  for (i.reset(); i != NULL; i++)
+  for (i.reset(); i != 0; i++)
   {
     if (i.item()->read_only())
       continue;
@@ -532,13 +533,14 @@ SearchScopeList::remove_handle(UAS_SearchScope *scope)
 {
     // first, find index into search scope list
     List_Iterator<UAS_SearchScope *> s (this);
-    for (int i = 0; s != NULL && s.item() != scope; s++, i++);
+    int i;
+    for (i = 0; s != 0 && s.item() != scope; s++, i++);
     // if can't find scope in list then something is hosed
     if (s == NULL)
         return;
     // next, find the bit handle located at this index in handle list
     List_Iterator<BitHandle> h (f_handle_list);
-    for (int j = 0; j < i && h != NULL; j++, h++);
+    for (int j = 0; j < i && h != 0; j++, h++);
     // if this happens then something is hosed
     if (h == NULL)
         return;
@@ -554,7 +556,8 @@ SearchScopeList::lookup_handle(UAS_SearchScope *scope)
   // first, find index into search scope list
   List_Iterator<UAS_SearchScope *> s (this);
 
-  for (int i = 0; s != NULL && s.item() != scope; s++, i++);
+  int i;
+  for (i = 0; s != 0 && s.item() != scope; s++, i++);
   // if can't find scope in list then something is hosed
   if (s == NULL)
     return 0;
@@ -562,7 +565,7 @@ SearchScopeList::lookup_handle(UAS_SearchScope *scope)
   // next, find the bit handle located at this index in handle list
   List_Iterator<BitHandle> h (f_handle_list);
 
-  for (int j = 0; j < i && h != NULL; j++, h++);
+  for (int j = 0; j < i && h != 0; j++, h++);
   // if this happens then something is hosed
   if (h == NULL)
     return 0;
index 655a31cb52fd713c77c696355d30235d999a0709..dccfa465e0672a0477be393edbce64fbce681270 100644 (file)
@@ -86,7 +86,7 @@ UrlAgent::~UrlAgent () {
 
 void
 UrlAgent::display (NodeWindowAgent *prefWindow) {
-    if (fShell == NULL)
+    if (fShell == 0)
        create_ui ();
     //f_form.Manage();
     XmProcessTraversal( (Widget)fTextField, XmTRAVERSE_CURRENT );
@@ -126,7 +126,7 @@ UrlAgent::document( char   *locator,
   }
 
   UAS_Pointer<UAS_Common> d = NULL ;
-  try
+  mtry
     {
       // perform basic syntax tests, but rely on the
       // precise format parsing to be done in the UAS layer
@@ -171,7 +171,7 @@ UrlAgent::document( char   *locator,
           d->retrieve();
         }
     }
-  catch_any()
+  mcatch_any()
     {
       message_mgr().error_dialog( (char*)UAS_String(CATGETS(
                        Set_UrlAgent, ERR_LOCATOR_RESOLUTION,
@@ -253,7 +253,7 @@ UrlAgent::print_document(char *locator)
     }
     
     UAS_Pointer<UAS_Common> d = NULL ;
-    try
+    mtry
     {
        // perform basic syntax tests, but rely on the
        // precise format parsing to be done in the UAS layer
@@ -332,7 +332,7 @@ UrlAgent::print_document(char *locator)
            }
         }
     }
-    catch_any()
+    mcatch_any()
        {
            
            if ((!window_system().videoShell()->silent)) {
@@ -407,7 +407,7 @@ UrlAgent::create_ui () {
     ON_ACTIVATE (fApply,displayDocument);
     ON_ACTIVATE (close,close);
     ON_ACTIVATE (fClear,clear);
-    help_agent().add_activate_help (help, "open_url_help");
+    help_agent().add_activate_help (help, (char*)"open_url_help");
 
     //
     //  A few clean up things...
@@ -475,7 +475,7 @@ UrlAgent::displayDocument () {
 //             "Invalid access method in url.")));
 //     }
 //    }
-//    catch_any() {
+//    mcatch_any() {
 //     message_mgr().error_dialog ((char*)
 //             UAS_String(CATGETS(Set_Messages, 71,
 //             "Document creation failed.")));
@@ -508,6 +508,6 @@ UrlAgent::modifyVerify (WCallback *wcb) {
 
 void
 UrlAgent::clear () {
-    XmTextFieldSetString (fTextField, "");
+    XmTextFieldSetString (fTextField, (char*)"");
     valueChanged ();
 }
index 14e29d2ea70424f309190536d6dd4c1027252476..be27a61476cb90e72877db0a074ef76698760564 100644 (file)
@@ -3,7 +3,9 @@
 #define _create_macros_hh
 
 #define DECL(TYPE,VAR,PARENT,NAME) TYPE VAR (PARENT, NAME)
+#define DECLC(TYPE,VAR,PARENT,NAME) TYPE VAR (PARENT, (char*)NAME)
 #define DECLM(TYPE,VAR,PARENT,NAME) TYPE VAR (PARENT, NAME, WAutoManage)
+#define DECLMC(TYPE,VAR,PARENT,NAME) TYPE VAR (PARENT, (char*)NAME, WAutoManage)
 #define ASSN(TYPE,VAR,PARENT,NAME) VAR = TYPE (PARENT, NAME)
 #define ASSNM(TYPE,VAR,PARENT,NAME) VAR = TYPE (PARENT, NAME, WAutoManage)
 
index 56dcea0731d3bf45e1a4596c5df11cef1afb2bf6..4f79b6c11f6022a22c817a7f8d691c0472a16983 100644 (file)
@@ -37,9 +37,9 @@ public: // functions
 // them and they can be eliminated.
 
 #ifndef __osf__
-  int value() { return ((int) f_value); }
+  size_t value() { return ((size_t) f_value); }
   operator int () 
-    { return ((int) f_value); }
+    { return ((size_t) f_value); }
 #endif
 
   operator const char * ()
index 1d952bca9056f61d3e1df44825d0d8325b36e3c6..635b430e8736c5412aa85bc5fb9231665e0b3dab 100644 (file)
@@ -146,7 +146,8 @@ BitField::get_handle()
   // find first free bit
 
   // first find first free word
-  for (int word = 0 ; word < f_num_words ; word++ )
+  int word;
+  for (word = 0 ; word < f_num_words ; word++ )
     if ( word_has_zero_bit(f_bits_in_use[word]) )
       break;
 
@@ -179,7 +180,8 @@ BitField::get_handle()
 
 
   // now find first free byte in word 
-  for (int byte = 0 ; byte < bytes_per_word ; byte++ )
+  int byte;
+  for (byte = 0 ; byte < bytes_per_word ; byte++ )
     if (byte_has_zero_bit(get_byte(byte, f_bits_in_use[word])))
       break;
   
@@ -187,7 +189,8 @@ BitField::get_handle()
     (f_bits_in_use[word] >> (byte * bits_per_byte)) & 0xFF ;
 
   // now check byte for zero bit
-  for (int bit = 0 ; bit < bits_per_byte ; bit++ )
+  int bit;
+  for (bit = 0 ; bit < bits_per_byte ; bit++ )
     if ((the_byte & mask[bit]) == 0)
       break ;
 
index f901018cc85fec83930bfc372e6a56e3583d56e0..1d198b7b8e9573a6d6bae4ddb64945ae8fb45604 100644 (file)
@@ -57,7 +57,7 @@ public:
 
 #ifdef DEBUG
   bool is_used(BitHandle);
-  ostream      &BitField::dump(ostream &);
+  ostream      &dump(ostream &);
 #endif
 
 private:
index 4af99dfbf0297cfedb86f954a616d6cb23088ab2..fd1c4af325da741c43ce985662db4006a105f21b 100644 (file)
@@ -54,8 +54,8 @@ public:
   void write (const int integer);
 
 #ifndef __osf__
-  void write (const unsigned int integer)
-    { write ((int) ((void *) integer)); }
+  void write (const size_t integer)
+    { write ((size_t) ((void *) integer)); }
 #else
   void write (const unsigned int integer)
     { write ((int) integer); }
index fc351e5127df54c43d1d9e8822d18ea6ef3160b7..a646a5ebc8bd7bc43ef33c1124d67b147ac52b0c 100644 (file)
@@ -56,7 +56,7 @@
 
 extern "C"
 {
-  extern int strlen(const char *);
+  extern size_t strlen(const char *);
   extern char *strcpy(char *, const char *);
 }
 
index bd1b19805bb2f4f9864a9bc55d0599e392ccec61..a5ae2a05bc285e3bc92958e451bb83a3e93ac0c7 100644 (file)
@@ -38,7 +38,7 @@ typedef void (FolioObject::* notify_handler_t)
   static ClassType C##Class
 #define INIT_CLASS(C) \
   ClassType C::type() const { return (C##Class); } \
-  ClassType C::C##Class = (ClassType) &C::C##Class
+  ClassType C::C##Class = (size_t) &C::C##Class
 #else
 #define DEF_CLASS(C) \
   virtual ClassType type() const; \
index 944a1f41308a0398b197f3863d884dd3b49f0972..884a9d29a5334d38d4ced83133aab8eb70c31bb2 100644 (file)
@@ -1,11 +1,14 @@
 XCOMM $XConsortium: Imakefile /main/6 1996/08/21 15:41:35 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 MAKEFILEDEPS=Classlist.mk
 
 LIBNAME=Basic
 
+NormalCplusplusObjectRule()
+
 #if defined(UseWideChars) && defined(SunArchitecture) && (OSMajorVersion == 4)
 INCLUDES=$(BROWSER_INCLUDES) $(MMDB_INCLUDES) -I/VOB/olias/library/Xwchar/src -I/VOB/olias/library/binstall/include
 #else
@@ -24,8 +27,12 @@ SpecialCPlusPlusObjectRule(NodeDisplayDataTml.o NodeViewInfo.o,,$(LICENSE_L_INCL
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 DependTarget()
index c2b73ab1d73084106b936359ecb13b4f15911aca..5243f23e44daf0374fc93337b3d92a6254a21832 100644 (file)
@@ -147,7 +147,7 @@ List::append (FolioObject &element)
     abort();
   f_list_element[f_length] = &element;
   f_length++;
-  notify (APPENDED, (void *) (f_length - 1));
+  notify (APPENDED, (void *)(size_t) (f_length - 1));
 }
 
 
@@ -200,7 +200,7 @@ List::insert (unsigned int location, FolioObject *element)
   // Insert the new element in the list.
   f_list_element[location] = element;
   f_length++;
-  notify (INSERTED, (void *) location);
+  notify (INSERTED, (void *)(size_t) location);
 }
 
 
index b41338777b8f618455d23fa5250f49c7512cc7d0..d0fd88c5120a655b7af12aa7873c107b432ba654 100644 (file)
@@ -39,14 +39,14 @@ private:
 
 // Macros to easily create access functions.
 
-#define LONG_LIVED_HH(CLASS,FUNC)   \
-  friend CLASS &FUNC();             \
-  static CLASS * CONCAT(g_,FUNC)
-
-#define LONG_LIVED_CC(CLASS,FUNC)             \
-  CLASS * CLASS::CONCAT(g_,FUNC);             \
-  CLASS &FUNC() {                             \
-    if (CLASS::CONCAT(g_,FUNC) == NULL)       \
-      CLASS::CONCAT(g_,FUNC) = new CLASS();   \
-    return (*CLASS::CONCAT(g_,FUNC));         \
-  }             
+#define LONG_LIVED_HH(CLASS,FUNC)   friend CLASS &FUNC(); \
+                                    static CLASS * CONCAT(g_,FUNC)
+
+#define LONG_LIVED_HH2(CLASS,FUNC)  CLASS &FUNC();
+
+#define LONG_LIVED_CC(CLASS,FUNC)   CLASS * CLASS::CONCAT(g_,FUNC);         \
+                                    CLASS &FUNC() {                         \
+                                      if (CLASS::CONCAT(g_,FUNC) == NULL)   \
+                                      CLASS::CONCAT(g_,FUNC) = new CLASS(); \
+                                      return (*CLASS::CONCAT(g_,FUNC));     \
+                                    }
index 96e5902feefc417451ef6fa75592695160e02682..ef417d7f012a44f659e9d5717652d44c4882a6be 100644 (file)
@@ -117,7 +117,7 @@ cleanup(_DtCvSegment *segment)
          break;
        case _DtCvSTRING:
             if (segment->handle.string.string)
-                delete (segment->handle.string.string);
+                delete (char*)(segment->handle.string.string);
          if (segment->client_use) {
            delete (SegClientData*)segment->client_use;
            segment->client_use = NULL;
@@ -188,7 +188,8 @@ NodeViewInfo::~NodeViewInfo()
     while (gli)
     {
 #ifdef DEBUG
-      printf( "delete UAS_Pointer<Graphic> gli.item() = %p\n", gli.item() );
+      printf( "delete UAS_Pointer<Graphic> gli.item() = %p\n",
+               (void*)gli.item() );
 #endif
       f_pixmap_list.remove(gli) ;
     }
@@ -204,14 +205,14 @@ NodeViewInfo::add_graphic(UAS_Pointer<Graphic> &pg)
   f_pixmap_list.append(pg);
 
 #ifdef DEBUG
-  printf( "NodeViewInfo: add UAS_Pointer<Graphic> %p\n", pg );
+  printf( "NodeViewInfo: add UAS_Pointer<Graphic> %p\n", (void*)pg );
   if (f_pixmap_list != NULL)
   {
       List_Iterator<UAS_Pointer<Graphic> > gli (f_pixmap_list) ;
       printf( "graphics list is now: " );
       while (gli)
       {
-        printf( " %p ", gli.item() );
+        printf( " %p ", (void*)gli.item() );
         gli++;
       }
       printf( "\n" );
@@ -530,7 +531,7 @@ highlight_search_hit(_DtCvSegment* seg, unsigned int vcc, unsigned int len)
                if (sibling->handle.string.string)
                    free (sibling->handle.string.string);
                if (sibling->client_use) {
-                   delete sibling->client_use;
+                   delete (SegClientData*)sibling->client_use;
                    sibling->client_use = NULL;
                }
 
index 4319a0ffbe23526c1a7a1c599c51afbf23c17dcd..2509f7998638c153c24cc9375d4d3571a1b00b36 100644 (file)
@@ -53,7 +53,8 @@
 
 #include "Prelude.h"
 
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 INIT_CLASS (TOC_Element);
 
index fd6f9f5941171ee7afa73875bd3529240cede8e9..4abbd863945bfea09d8e136053d9538b76300646 100644 (file)
@@ -1,11 +1,14 @@
 XCOMM $XConsortium: Imakefile /main/5 1996/08/21 15:41:55 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 MAKEFILEDEPS=Classlist.mk
 
 LIBNAME=Graphics
 
+NormalCplusplusObjectRule()
+
 INCLUDES=$(BROWSER_INCLUDES) $(MMDB_INCLUDES)
 
 #ifdef DoLicenseManagement
@@ -21,8 +24,12 @@ make_libfiles($(LIBNAME), $(CLASSES))
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 DependTarget()
index 175b96724ffda26949e999adf9509f30566c3404..dc3183b752594d11e3dd3abd1755272994c9c722 100644 (file)
@@ -80,11 +80,11 @@ PixmapGraphic::PixmapGraphic(Pixmap pixmap, Dimension width, Dimension height,
   f_width (width),
   f_height (height),
   f_flag (flag),
-  f_colormap(NULL),
+  f_colormap(0),
   f_num_colors(0),
   f_colors(NULL),
   f_tiff_context(NULL),
-  f_agent(NULL)
+  f_agent(0)
 {
 }
 
index 4667f183d637cac2627bb568c11e4d01e692683a..96e0596f14733cf58f1340f2fe4856d18a1ad6df 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "UAS.hh"
+// #include "Managers/GraphicsMgr.hh"
 
 class GraphicsMgr;
 class GraphicAgent ;
index e9300b57aec41570ba7847e75937c87f2232b566..fd839ee4adf4703022d1c2c35896aa69d553c973 100644 (file)
@@ -1,11 +1,14 @@
 XCOMM $TOG: Imakefile /main/48 1998/08/10 15:52:48 mgreess $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 PROGRAM_NAME=dtinfo
 
 MAKEFILEDEPS=Classlist.mk
 
+NormalCplusplusObjectRule()
+
 #if defined(RsArchitecture) || defined(AIXArchitecture)
 LOCAL_LDFLAGS=-blibpath:/usr/dt/lib:/X11/lib:/usr/lib/threads:/usr/lib:/lib
 #endif
@@ -22,6 +25,13 @@ SUBDIRS=Widgets $(CLASSLIBS) Messages cgm
 #define IHaveSubdirs
 #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CXXDEBUGFLAGS=$(CXXDEBUGFLAGS)'
 
+XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
+#undef  TopLevelProject
+#define TopLevelProject                DtInfo
+IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
+               -DProjectTmplFile='<DtInfo.tmpl>' \
+               -DProjectRulesFile='<DtInfo.rules>'
+
 DependSubdirs($(SUBDIRS))
 
 #if defined(SVR4) && defined(i386)
@@ -32,6 +42,8 @@ SYS_LIBRARIES=-lm -liconv /usr/lib/libpthreads.a -blibpath:/usr/dt/lib:/X11/lib:
 SYS_LIBRARIES=-lm -lfs
 #elif defined(HPArchitecture)
 SYS_LIBRARIES=$(DYNAMIC) -lm
+#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
+SYS_LIBRARIES=-lm -L$(XPROJECTROOT)/lib
 #else
 SYS_LIBRARIES=-lm
 #endif
@@ -299,7 +311,7 @@ all:: Prelude.h dfiles messages Dtinfo
 
 includes:: Prelude.h dfiles messages
 
-#if defined(HPArchitecture) ||defined (AIXArchitecture) || defined(UXPArchitecture) || (defined(SunArchitecture) && CplusplusCompilerMajorVersion < 4) || defined(AlphaArchitecture) || defined(USLArchitecture)
+#if defined(HPArchitecture) ||defined (AIXArchitecture) || defined(UXPArchitecture) || (defined(SunArchitecture) && CplusplusCompilerMajorVersion < 4) || defined(AlphaArchitecture) || defined(USLArchitecture) || defined(FreeBSDArchitecture)
 # ifndef Dont_Use_Templates_Repository
 #  define Dont_Use_Templates_Repository
 UAS_INCLUDES=-I./UAS/Base
@@ -324,6 +336,9 @@ SpecialCPlusPlusObjectRule(Templates.o,,-ptf $(SUBDIR_TEMPL_INCLUDES))
 SpecialCPlusPlusExpandRule(Templates..c,,-ptf -DMakeOperatorNewPublic)
 #elif defined(DoLicenseManagement)
 SpecialCPlusPlusObjectRule(Templates.o,,-ptf $(LICENSE_L_INCLUDES))
+#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture)
+SpecialCPlusPlusObjectRule(Templates.o,,$(SUBDIR_TEMPL_INCLUDES))
+SpecialCPlusPlusExpandRule(Templates..c,,-DMakeOperatorNewPublic)
 #else
 SpecialCPlusPlusObjectRule(Templates.o,,-ptf $(SUBDIR_TEMPL_INCLUDES))
 SpecialCPlusPlusExpandRule(Templates..c,,-ptf -DMakeOperatorNewPublic)
@@ -460,4 +475,8 @@ InstallNonExecFile(Olias.hlp,$(INSTALL_HELP_DIR)/C)
 #endif
 InstallNonExecFile($(PROGRAM_NAME).cat,$(INSTALL_MSG_CAT_DIR)/C)
 
+XCOMM Variables to switch on debug mode temporarily
+XCOMM CDEBUGFLAGS = -g -DDEBUG
+XCOMM CXXDEBUGFLAGS = -g -DDEBUG
+
 DependTarget()
index 55be5ba42ad5b0c450c5acdc8b9f262d8791b5a9..30825dd6949a1b9c997e306c4cabf3505f04dadf 100644 (file)
@@ -30,7 +30,8 @@
 #include <locale.h>
 #include <stdlib.h>
 
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 #include <Dt/Dt.h>
 #include <Dt/EnvControlP.h>
@@ -66,9 +67,9 @@ CatMgr::CatMgr() : f_msg(NULL), f_default(NULL)
     else {
 #ifdef DEBUG   
        cerr << "(WARNING) catopen failed." << '\n' << flush;
-       static char* cat_not_found = "default message not found.";
+       static char* cat_not_found = (char*)"default message not found.";
 #else
-       static char* cat_not_found = "";
+       static char* cat_not_found = (char*)"";
 #endif
        f_default = new char[strlen(cat_not_found) + 1];
        strcpy(f_default, cat_not_found);
index b1f2d7777cce2cb083ccfe6ad320da0b1ecfc431..56a6cbcf99cf2d856ba6d8a3fbfc3562d8bc9bb9 100644 (file)
 
 #define CATALOG_PREFIX "dtinfo"
 
-#ifndef NULL
-#define NULL   (char*)0
-#endif
-
 class CatMgr
 {
   public:
@@ -23,7 +19,7 @@ class CatMgr
     ~CatMgr();
     static CatMgr& msg_catalog_mgr() { return *f_msg_catalog_mgr; }
 
-    char* catgets(int set, int msg, const char* def = NULL);
+    char* catgets(int set, int msg, const char* def = (char*)0);
 
     static int is_open(nl_catd catd)
                        { return ((catd != (nl_catd)-1) ? 1 : 0); }
index 2031408976fa12f2bfafb97a4c0fbf29a5b57e03..0332d467e0b26189ed0a578a463951202b276c44 100644 (file)
@@ -14,3 +14,5 @@ private:
 
   LONG_LIVED_HH(ClientEventMgr, client_event_manager);
 };
+
+LONG_LIVED_HH2(ClientEventMgr, client_event_manager);
index 7d07a1b58a86e66c1e781955eb0794040cba41f4..5a2f7141fa0473bea33fd9e4668a0377ef9eacf1 100644 (file)
@@ -15,6 +15,8 @@ private:
   LONG_LIVED_HH(DatabaseMgr,database_mgr);
 };
 
+LONG_LIVED_HH2(DatabaseMgr,database_mgr);
+
 inline olias_server *
 olias_db()
 {
index d4c9487fc9f5868b9cb7eecc9f55208dafafe3b7..486926287519ad39c448a911bf394434f7f2aa1c 100644 (file)
@@ -42,7 +42,8 @@
  */
 
 #include <string.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 #include <sys/stat.h>
 
 #include <lib/DtSvc/DtUtil2/LocaleXlate.h>
@@ -69,6 +70,7 @@
 #ifdef UseSessionMgmt
 #define C_SessionMgr
 #endif
+#define C_GraphicsMgr
 #define L_Managers
 
 #include "Managers/CatMgr.hh"
@@ -144,7 +146,7 @@ EnvMgr::EnvMgr() : f_argv(NULL),
   if(!check_user_path())
   {
     create_user_path();
-    help_agent().display_help ("doc_list_help");
+    help_agent().display_help ((char*)"doc_list_help");
   }
 
   UAS_Collection::request(
@@ -216,7 +218,7 @@ EnvMgr::init(int argc_i, char** argv_i)
   {
     // link up indirect paths to mmdb code... ;-)
     static char buffer[256];
-    sprintf (buffer, "MMDB_PATH=%s", f_infolibsStr );
+    sprintf (buffer, "MMDB_PATH=%s", (char *)f_infolibsStr );
     putenv (buffer);
 
     char *where = getenv ("DTINFO_MARKSPECPATH");
@@ -935,7 +937,7 @@ EnvMgr::mkdirs(char *pathname)
   {
     c = strrchr(buffer, '/');
     if (c != NULL)
-      *c = NULL;
+      *c = 0;
     (void)mkdirs(buffer);
     if (c != NULL)
       *c = '/';
index eb67bed8ecb4eabc55aebe55c80e4ea77b27955e..ffa585c4f1da26020526f35601188a52db1d2f30 100644 (file)
@@ -113,3 +113,5 @@ private:   // data
 private:
   LONG_LIVED_HH( EnvMgr, env );
 };
+
+LONG_LIVED_HH2( EnvMgr, env ) ;
index fbae44d479cfdc479313895c56a6b84286e57dcd..cc004e6b1aa07668434fd3fd04605f0eb0d7d2e2 100644 (file)
@@ -46,7 +46,8 @@
  *                  Campbell, CA  95008
  * 
  */
-#include <stream.h>
+#include <sstream>
+using namespace std;
 #include "UAS.hh"
 
 #define C_GlobalHistoryMgr
@@ -163,7 +164,7 @@ GlobalHistoryMgr::add (UAS_Pointer<UAS_Common> &node_ptr)
 
   for (i = 0; hl; hl++, i++)
     {
-      ON_DEBUG (printf ("%2d: Checking <%s>\n", i, hl.item()->title()));
+      ON_DEBUG (printf ("%2d: Checking <%s>\n", i, (char*)hl.item()->title()));
       if (hl.item() == node_ptr)
          break;
     }
index 425ad437363271431037e91810824616e09b9eea..5d04af160384ad0af916ea7f4377b1555a1b38e3 100644 (file)
@@ -57,6 +57,8 @@ private:
   LONG_LIVED_HH (GlobalHistoryMgr,global_history_mgr);
 };
 
+LONG_LIVED_HH2 (GlobalHistoryMgr,global_history_mgr);
+
 
 struct HistoryDelete : public Destructable
 {
index 22af86aa02c69bd6c7a46b1e3f18b8672112ec3e..00e7cb91e68a64d97bf1919fd1ce04654e9340bd 100644 (file)
@@ -70,7 +70,8 @@
 
 #include "Prelude.h"
 
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 extern "C"
 {
 #include "../cgm/spec.h"
@@ -111,7 +112,7 @@ GraphicsMgr::get_graphic (UAS_Pointer<Graphic> &gr)
     if (window_system().printing()) {
        string_resolution = XpGetOneAttribute(window_system().printDisplay(), 
                                              l_AppPrintData->f_print_data->print_context,
-                                             XPDocAttr, "default-printer-resolution") ;
+                                             XPDocAttr, (char*)"default-printer-resolution") ;
        resolution = atoi(string_resolution);
        XFree(string_resolution);       
     }
@@ -162,7 +163,7 @@ GraphicsMgr::get_graphic (const UAS_String &imdata,
 
   if(!initialized)
   {
-    _DtGrRegisterConverter("CGM", processCGM, NULL, NULL, NULL);
+    _DtGrRegisterConverter((char*)"CGM", processCGM, NULL, NULL, NULL);
     initialized = 1;
   }
 
@@ -172,7 +173,7 @@ GraphicsMgr::get_graphic (const UAS_String &imdata,
   // if content_type is a NULL string, image type is unknown
   if (content_type == "")
   {
-    image_type = "unknown";
+    image_type = (char*)"unknown";
   } 
   else
   {
@@ -254,17 +255,17 @@ GraphicsMgr::get_graphic (const UAS_String &imdata,
 
   if (!strcasecmp (image_type, "XBM")) {
     // match up infolib name for XBM to DtGr library
-    image_type = "BM";
+    image_type = (char*)"BM";
   }
 
   if (!strcasecmp (image_type, "XPM")) {
     // match up infolib name for XPM to DtGr library
-    image_type = "PM";
+    image_type = (char*)"PM";
   }
 
 #ifdef XWD_TEST
   if (!image_type || !strcasecmp (image_type, "unknown"))
-    image_type = "XWD" ;
+    image_type = (char*)"XWD" ;
 #endif
 
   // Context struct is required for TIFF data type only
@@ -577,80 +578,3 @@ GraphicsMgr::init_gr(UAS_Pointer<Graphic> &gr)
   //ga->set_graphic(gr);
 }
 
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-//
-//  Graphic implementation
-//
-///////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////
-
-Graphic::Graphic (UAS_Pointer<UAS_Common> &doc, const UAS_String &locator):
-       fPixmap (0),
-       fDetachedPixmap (0),
-       fDetached (0),
-       fObj (doc->create_embedded_object (locator)) {
-}
-
-Graphic::~Graphic () {
-    //graphics_mgr().uncache(this);
-    //graphics_mgr().remove_detached(this);
-#ifdef DEBUG
-    printf( "for Graphic %p, delete PixmapGraphic %p\n", this, fPixmap );
-#endif
-    delete fPixmap;
-    delete fDetachedPixmap;
-}
-
-
-// If this one is called instead of the null arg version, the resulting
-// PixmapGraphic instance is not tracked nor recorded by this instance
-PixmapGraphic *
-Graphic::pixmap_graphic (UAS_String& imdata,
-                         unsigned int imlen,
-                         UAS_String& imtype, unsigned short scale) {
-    PixmapGraphic *the_pixmap;
-    //UAS_Pointer<Graphic> tmp(this);
-    //if (fPixmap)
-    //   delete fPixmap;
-
-    the_pixmap = graphics_mgr().get_graphic (imdata, imlen, imtype, scale);
-    return the_pixmap;
-}
-
-PixmapGraphic *
-Graphic::pixmap_graphic () {
-    UAS_Pointer<Graphic> tmp(this);
-    // fPixmap records the PixmapGraphic & pixmap once created (and only
-    // if created via this method) for this instance of Graphic
-    if (!fPixmap)
-       fPixmap = graphics_mgr().get_graphic (tmp);
-    return fPixmap;
-}
-
-PixmapGraphic *
-Graphic::detached_graphic () {
-    if (!fDetachedPixmap)
-       fDetachedPixmap = graphics_mgr().detached_graphic();
-    return fDetachedPixmap;
-}
-
-UAS_String Graphic::title()
-{
-  return fObj->title();
-}
-
-UAS_String Graphic::content_type()
-{
-  return fObj->content_type();
-}
-
-UAS_String Graphic::locator()
-{
-  return fObj->locator() ;
-}
-
-UAS_String Graphic::id()
-{
-  return fObj->id() ;
-}
index 8110cbd1b78ac3c351594ebc196b34887787007f..a745f2136906fb6e3c9ae4d859f5f3ae8f656b3f 100644 (file)
@@ -26,6 +26,9 @@
 
 class PixmapGraphic;
 class DetachGraphic;
+class ReAttachGraphic;
+class GraphicAgent;
+class DisplayGraphic;
 
 
 #if defined(SVR4) || defined(hpux)
@@ -78,6 +81,8 @@ private:
   LONG_LIVED_HH(GraphicsMgr,graphics_mgr);
 };
 
+LONG_LIVED_HH2(GraphicsMgr,graphics_mgr);
+
 //
 //  Now (as of CDE development), instead of using the Graphic class
 //  (which was changed to UAS_EmbeddedObject), we use this Graphic
@@ -89,8 +94,23 @@ private:
 
 class Graphic: public UAS_Base {
     public:
-       Graphic (UAS_Pointer<UAS_Common> &, const UAS_String &);
-       ~Graphic ();
+       Graphic (UAS_Pointer<UAS_Common> &doc, const UAS_String &locator):
+               fPixmap (0),
+               fDetachedPixmap (0),
+               fDetached (0),
+               fObj (doc->create_embedded_object (locator)) {
+       }
+
+       ~Graphic () {
+           //graphics_mgr().uncache(this);
+           //graphics_mgr().remove_detached(this);
+#ifdef DEBUG
+           printf("for Graphic %p, delete PixmapGraphic %p\n", this, fPixmap );
+#endif
+           delete fPixmap;
+           delete fDetachedPixmap;
+       }
+
 
     public:
        unsigned int is_detached () const { return fDetached; }
@@ -98,9 +118,35 @@ class Graphic: public UAS_Base {
        PixmapGraphic *graphic () {
            return is_detached () ? detached_graphic() : pixmap_graphic();
        }
-       PixmapGraphic *pixmap_graphic ();
-       PixmapGraphic *pixmap_graphic (UAS_String&, unsigned int, UAS_String&, unsigned short);
-       PixmapGraphic *detached_graphic();
+
+       PixmapGraphic *pixmap_graphic () {
+           UAS_Pointer<Graphic> tmp(this);
+           // fPixmap records the PixmapGraphic & pixmap once created (and only
+           // if created via this method) for this instance of Graphic
+           if (!fPixmap)
+               fPixmap = graphics_mgr().get_graphic (tmp);
+           return fPixmap;
+       }
+
+       // If this one is called instead of the null arg version, the resulting
+       // PixmapGraphic instance is not tracked nor recorded by this instance
+       PixmapGraphic *pixmap_graphic (UAS_String& imdata,
+                         unsigned int imlen,
+                         UAS_String& imtype, unsigned short scale) {
+           PixmapGraphic *the_pixmap;
+           //UAS_Pointer<Graphic> tmp(this);
+           //if (fPixmap)
+           //   delete fPixmap;
+
+           the_pixmap = graphics_mgr().get_graphic(imdata,imlen,imtype,scale);
+           return the_pixmap;
+       }
+
+       PixmapGraphic *detached_graphic () {
+           if (!fDetachedPixmap)
+               fDetachedPixmap = graphics_mgr().detached_graphic();
+           return fDetachedPixmap;
+       }
 
        //
        //  Pass-throughs for UAS_EmbeddedObject (and all of its
@@ -116,10 +162,15 @@ class Graphic: public UAS_Base {
        }
        void cancel_retrieval () { fObj->cancel_retrieval (); }
        void flush () { fObj->flush(); }
-       UAS_String locator ();
-       UAS_String content_type();
-       UAS_String title ();
-       UAS_String id ();
+
+       UAS_String locator() { return fObj->locator(); }
+
+       UAS_String content_type() { return fObj->content_type(); }
+
+       UAS_String title() { return fObj->title(); }
+
+       UAS_String id() { return fObj->id(); }
+
        UAS_ObjectType type () { return fObj->type (); }
 
        unsigned int llx () { return fObj->llx(); }
index b2fb93b0ca37ab6408990db924246429a402bc03..56e05641b32ef94e5ebe03f8fe18468b309cd914 100644 (file)
@@ -1,7 +1,8 @@
 XCOMM $XConsortium: Imakefile /main/9 1996/08/21 15:42:26 drk $
 
 XCOMM NodeMgr.o and PrintMgr.o need STYLE_SHEET_INCLUDES.
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(STYLE_SHEET_INCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES) $(STYLE_SHEET_INCLUDES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 DEFINES=-DCDE_NEXT $(BYTE_ORDER_DEFINES)
 
@@ -20,6 +21,8 @@ MAKEFILEDEPS=Classlist.mk
 
 LIBNAME=Managers
 
+NormalCplusplusObjectRule()
+
 INCLUDES=$(BROWSER_INCLUDES) $(COMMON_CLASS_INCLUDES)
 
 #include "Classlist.mk"
@@ -43,8 +46,12 @@ make_msgs($(LIBNAME), $(MSGS))
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 DependTarget()
index 1fa94b6521e57e33699a5cafa40bc43b54702a15..4d986142f5ec377ab2fd0847bb183a34f8698a02 100644 (file)
@@ -46,7 +46,8 @@
 #define L_Other
 
 # include <Prelude.h>
-# include <stream.h>
+# include <sstream>
+using namespace std;
 
 
 InputMgrX::InputMgrX () {
index 2a4a933db4e4a4394e4cbde5a7b34d0591610a54..4815ede3fc0b0ad476b19be8a82519b045952a5b 100644 (file)
@@ -40,7 +40,9 @@
  *                  1315 Dell Avenue, Campbell, CA  95008
  *
  */
-#include <stream.h>
+#include <sstream>
+#include <iostream>
+using namespace std;
 
 #define C_LibraryMgr
 #define C_NodeMgr
@@ -57,7 +59,8 @@
 #define L_Support
 
 #include "Prelude.h"
-#include <iostream.h>
+
+#include "utility/mmdb_exception.h"
 
 LONG_LIVED_CC(LibraryMgr,library_mgr);
 
@@ -170,7 +173,8 @@ LibraryMgr::display (UAS_Pointer<UAS_Common> &toc)
   //  First, check to see if the object to display is already
   //  in our list.
   //
-  for (int i = 0; i < fObjList.length(); i ++)
+  int i;
+  for (i = 0; i < fObjList.length(); i ++)
   {
     if (fObjList[i] == toc)
     {
@@ -419,7 +423,7 @@ LibraryMgr::init(UAS_List<UAS_String> &infolibpaths)
   UAS_List<UAS_String> locList = UAS_Common::rootLocators ();
 
   for (i = 0; i < locList.length(); i ++) {
-    try
+    mtry
     {
       UAS_Pointer<UAS_Common> d =
           UAS_Common::create (*(UAS_String*)locList[i]);
@@ -435,7 +439,7 @@ LibraryMgr::init(UAS_List<UAS_String> &infolibpaths)
       else
         message_mgr().error_dialog(window_system().get_message ("NoDocument"));
     }
-    catch(demoException &, demo)
+    mcatch(demoException &, demo)
     {
       message_mgr().demo_failure(demo);
     }
index 173068f3e19fd688532cb25ee22e542056ba4c3e..b092b9033384241dc4a27a4c9ab7c299c5bfeb4a 100644 (file)
@@ -66,3 +66,5 @@ private: // variables
 private:
   LONG_LIVED_HH(LibraryMgr,library_mgr);
 };
+
+LONG_LIVED_HH2(LibraryMgr,library_mgr);
index 769bfcafaa5a2d09f9ea61ba2871ea419df5d3ec..379dad5af5b1f16d1378532b8b1f6c5b50de99e6 100644 (file)
@@ -120,7 +120,8 @@ LocalHistoryMgr::truncate()
 void
 LocalHistoryMgr::append (UAS_Pointer<UAS_Common> &doc_ptr)
 {
-  ON_DEBUG (printf ("&&&&& APPENDING <%s> to history\n", doc_ptr->title()));
+  ON_DEBUG (printf ("&&&&& APPENDING <%s> to history\n",
+               (char*)doc_ptr->title()));
   LocalHistoryEntry *entry = new LocalHistoryEntry (doc_ptr);
   truncate();
   entry->f_previous = f_current;
index f264f71edf1f8262433e71a9a683b5a2109b4230..9f9c0eeb2343582f732d5a310dc4300b6a6c5388 100644 (file)
@@ -43,3 +43,5 @@ protected: // variables
 private:
   LONG_LIVED_HH(MapMgr,map_mgr);
 };
+
+LONG_LIVED_HH2(MapMgr,map_mgr);
index fb7f90769080f990343e7787ad48ddc9d50dbcdb..8cac10cc61e180142f36dff45a79ae2ceacec6ab 100644 (file)
@@ -44,3 +44,4 @@ private:
   LONG_LIVED_HH(MarkListMgr,mark_list_mgr);
 };
 
+LONG_LIVED_HH2(MarkListMgr,mark_list_mgr);
index 720e13926f1fb0ddd62fb83d4c7c1586cdd18205..4006c60bb2ca2698d2993554cf68083b2cbdeae3 100644 (file)
@@ -51,7 +51,8 @@
  */
 
 #include <sys/param.h>
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 #include "UAS.hh"
 
@@ -239,7 +240,7 @@ MarkMgr::create_mark (UAS_Pointer<UAS_Common> &doc_ptr, const Anchor &anchor,
 
   List_Iterator<MarkBase *> b (f_base_list);
 
-  assert (b != NULL);
+  assert (b != 0);
 
   // Trim leading and trailing space and check for an empty name.
 #ifdef UseWideChars
@@ -328,7 +329,7 @@ MarkMgr::move_mark (UAS_Pointer<UAS_Common> &doc_ptr, const Anchor &anchor,
 
   List_Iterator<MarkBase *> b (f_base_list);
 
-  assert (b != NULL);
+  assert (b != 0);
 
   MarkMoved move_message;
   move_message.f_new_mark_ptr = b.item()->
index 42a40e0001b69d797ca55b322bed5d21e7248666..24791fec0f8f5942c1a83868f87891c8155cfe2a 100644 (file)
@@ -72,3 +72,5 @@ private:
 
   LONG_LIVED_HH (MarkMgr,mark_mgr);
 };
+
+LONG_LIVED_HH2 (MarkMgr,mark_mgr);
index c66a18b7c36f4ab80bb940b08c11f28fe28cfcb5..2b5d24675b50f1df2b6a66617074ecb3799e7771 100644 (file)
@@ -60,7 +60,8 @@
 #include "Other/XmStringLocalized.hh"
 
 #include <stdio.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 LONG_LIVED_CC (MessageMgr,message_mgr);
 
@@ -257,7 +258,7 @@ MessageMgr::create_dialog (unsigned char dialog_type,
       parent = window_system().toplevel();
   }
 
-  dialog = XmCreateMessageDialog(parent, "dialog", NULL, 0);
+  dialog = XmCreateMessageDialog(parent, (char*)"dialog", NULL, 0);
 
   WXmString wxms = message_text;
   XtVaSetValues(dialog,
@@ -470,7 +471,7 @@ MessageMgr::question_dialog (char *message_text, Widget parent)
 {
   if(parent == NULL)
     parent = (Widget)window_system().toplevel();
-  Widget dialog = XmCreateInformationDialog(parent, "dialog", NULL, 0);
+  Widget dialog = XmCreateInformationDialog(parent, (char*)"dialog", NULL, 0);
   XtUnmanageChild(XmMessageBoxGetChild(dialog, XmDIALOG_HELP_BUTTON));
   WXmString wxms = message_text;
   XtVaSetValues(dialog,
@@ -559,7 +560,7 @@ File \"%s,\" line %d.",
     f_booklist_message.displayError (buffer, window_system().toplevel());
   else
     f_nodeview_message.displayError (buffer, parent);
-  quit_dialog ("We strongly suggest you quit now, Ok?", parent);
+  quit_dialog ((char*)"We strongly suggest you quit now, Ok?", parent);
 }
 
 // /////////////////////////////////////////////////////////////////////////
index f4004a9387c579c60062d9a5abec6ac738ca7f3a..e1bab10d105b706a0221942e61c4d948feccd85f 100644 (file)
@@ -89,12 +89,14 @@ private:
   LONG_LIVED_HH(MessageMgr,message_mgr);
 };
 
+LONG_LIVED_HH2(MessageMgr,message_mgr);
+
 
 
 #ifdef __STDC__
 #define Xassert(STMT) \
 if (!(STMT)) { \
-  message_mgr().assert_failed (#STMT, __FILE__, __LINE__); \
+  message_mgr().assert_failed ((char*)#STMT, (char*)__FILE__, __LINE__); \
   return; \
 };
 #else
index a288fb5712b9b3fbbfa5f761cf2d81dcc2ac2bde..4b016466362c80f9a66390729a28f93cb9f4757f 100644 (file)
@@ -66,6 +66,7 @@
 #define C_NodeWindowMgr
 #define C_StyleSheetMgr
 #define C_LibraryMgr
+#define C_GraphicsMgr
 #define L_Managers
 
 #define C_xList
@@ -90,7 +91,7 @@
 #include "../OnlineRender/CanvasRenderer.hh"
 #endif
 
-#include <strstream.h>
+#include <sstream>
 
 class NodeWindowAgent;
 class NodeHandle;
@@ -110,7 +111,7 @@ void
 DisplayNode::receive (UAS_DocumentRetrievedMsg &message, void *client_data)
 {
     ON_DEBUG (cerr <<"Got Node display message!" << endl);
-    int cd = (int)client_data;
+    size_t cd = (size_t)client_data;
     
     //  0 == display request
 
@@ -340,11 +341,11 @@ NodeMgr::load(UAS_Pointer<UAS_Common> &node_ptr)
     styleparse();
   }
 #else
-  try
+  mtry
     {
       style_sheet_mgr().initOnlineStyleSheet(node_ptr);
     }
-  catch_noarg (StyleSheetSyntaxError)
+  mcatch_noarg (StyleSheetSyntaxError)
     {
       message_mgr().error_dialog(
                (char*)UAS_String(CATGETS(Set_Messages, 39, "File a Bug")));
@@ -361,9 +362,9 @@ NodeMgr::load(UAS_Pointer<UAS_Common> &node_ptr)
   }
 #endif
 
-  istrstream input((char *) node_ptr->data());
+  istringstream input((char *) node_ptr->data());
 
-  try
+  mtry
     {
 #ifdef FONT_SCALE_DEBUG
       cerr << "PrefMgr::FontScale: " <<
@@ -376,7 +377,7 @@ NodeMgr::load(UAS_Pointer<UAS_Common> &node_ptr)
       DocParser docparser(resolver);
       docparser.parse(input);
     }
-  catch_any()
+  mcatch_any()
     {
       ON_DEBUG(cerr << "NodeMgr::load...exception thrown" << endl);
       delete gNodeViewInfo ;
index 2f6777583b8bb8b4db66ff714d36f79444c229f0..7ed575cb9eac327ebae59d7d9adf513a0e5759bb 100644 (file)
@@ -81,4 +81,5 @@ private:  // variables
   LONG_LIVED_HH(NodeMgr,node_mgr);
 };
 
+LONG_LIVED_HH2(NodeMgr,node_mgr);
 
index 541313221cf41b97840a591c82201d2390ff88dd..53fe92b38533775872472472ed303f47b20baf25 100644 (file)
@@ -122,13 +122,13 @@ PrefMgr::display()
 void
 PrefMgr::sync()
 {
-  try
+  mtry
     {
       UserPreference::flush_preferences();
     }
-  catch_any()
+  mcatch_any()
     {
-      message_mgr().error_dialog ("Unable to save preferences.");
+      message_mgr().error_dialog ((char*)"Unable to save preferences.");
     }
   end_try;
 }
index f8cecddd666d62812229f79a82176ff6243c91af..9b78a44c66a11d13cd5601fd76343012d8152e6f 100644 (file)
@@ -87,6 +87,8 @@ private:
   LONG_LIVED_HH(PrefMgr,pref_mgr);
 };
 
+LONG_LIVED_HH2(PrefMgr,pref_mgr);
+
 inline
 PrefMgr::PrefMgr()
 : f_pref_agent (NULL), f_last_symbol (NULL), f_last_preference (NULL)
index fe5f105847951883abc65e46443814721b7b76c3..81929e7cca042839cfc82ab24778d9350ca6da82 100644 (file)
@@ -66,6 +66,7 @@
 #define C_NodeWindowMgr
 #define C_StyleSheetMgr
 #define C_LibraryMgr
+#define C_GraphicsMgr
 #define L_Managers
 
 #include "Prelude.h"
@@ -105,7 +106,7 @@ PrintNode::receive (UAS_DocumentRetrievedMsg &message, void *client_data)
 {
     RCS_DEBUG("PrintNode::receive called.");
 
-    int cd = (int)client_data;
+    size_t cd = (size_t)client_data;
 
     //  1 == print request
     if (cd == 1) {
@@ -206,11 +207,11 @@ PrintMgr::load(UAS_Pointer<UAS_Common> &node_ptr)
   extern void stylerestart(FILE *);
   extern NodeViewInfo *gNodeViewInfo;
 
-  try
+  mtry
     {
       style_sheet_mgr().initPrintStyleSheet(node_ptr);
     }
-  catch_noarg (StyleSheetSyntaxError)
+  mcatch_noarg (StyleSheetSyntaxError)
     {
       message_mgr().error_dialog(
          (char*)UAS_String(CATGETS(Set_Messages, 39, 
@@ -219,9 +220,9 @@ PrintMgr::load(UAS_Pointer<UAS_Common> &node_ptr)
     }
   end_try ;
 
-  istrstream input((char *) node_ptr->data());
+  istringstream input((char *) node_ptr->data());
 
-  try
+  mtry
     {
       window_system().setPrinting(True);
       // assign node_ptr to global variable that TmlRenderer can pick up 
@@ -232,7 +233,7 @@ PrintMgr::load(UAS_Pointer<UAS_Common> &node_ptr)
       docparser.parse(input);
       window_system().setPrinting(False);
     }
-  catch_any()
+  mcatch_any()
     {
       ON_DEBUG(cerr << "PrintMgr::load...exception thrown" << endl);
       delete gNodeViewInfo ;
index 62336d0d572b4e0cfeb1b88f1db2fca41e7170e0..e4c981df58e0bd7649954301f67d0ef737b71dde 100644 (file)
@@ -80,4 +80,5 @@ private:
     LONG_LIVED_HH(PrintMgr,print_mgr);
 };
 
+LONG_LIVED_HH2(PrintMgr,print_mgr);
 
index b679ed08e983510099c82932250b5cd54ddcf404..8d2d88f6ee982af467db870e2df6446c16ee1e54 100644 (file)
@@ -44,7 +44,8 @@
  * 
  */
 
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 #include "Registration.hh"
 
@@ -76,8 +77,6 @@
 
 #include "Managers/CatMgr.hh"
 
-#include <stream.h>
-
 LONG_LIVED_CC(SearchMgr,search_mgr)
 
 // Reconfigure search engine
@@ -184,7 +183,7 @@ SearchMgr::history_entry_activate (FolioObject *, u_int,
                                   void *notify_data, void *)
 {
   Wait_Cursor bob;
-  u_int which_item = (int) notify_data;
+  size_t which_item = (size_t) notify_data;
 
   ResultID *rid = (ResultID *) f_search_history_list[which_item];
 
@@ -206,7 +205,8 @@ SearchMgr::search_history_list_view()
   if (f_search_history_list_view == NULL)
     {
       f_search_history_list_view =
-       new SearchHistoryListView (&f_search_history_list, "search_history");
+       new SearchHistoryListView (&f_search_history_list,
+        (char*)"search_history");
       f_search_history_list_view->AddDependent
        ((notify_handler_t) &SearchMgr::history_entry_activate,
         ListView::ENTRY_ACTIVATE);
@@ -253,16 +253,16 @@ SearchMgr::parse_and_search (char *query, UAS_SearchScope *scope) {
   if (f_search_section.length()) {
     scope->search_zones().section ((char*)f_search_section);
   }
-  try
+  mtry
   {
       tmp_results = search_engine().search (query, *scope);
   }
-  catch (UAS_Exception&, e)
+  mcatch (UAS_Exception&, e)
   {
-      message_mgr().error_dialog ((char*)e->message());
+      message_mgr().error_dialog ((char*)e.message());
       return;
   }
-  catch_any ()
+  mcatch_any ()
   {
 
   }
index ac3d29e99ebee0e0e649d8254d5fda378ec99dee..781346d9bf408e88cb2127767215cf55a25ec64f 100644 (file)
@@ -57,7 +57,7 @@ public: // functions
   }
   UAS_Pointer<UAS_List<UAS_TextRun> > current_hits ();
 
-friend SearchMgr &search_mgr();
+// friend SearchMgr &search_mgr();
 
 private:
   friend class SeReconfigure;
@@ -81,5 +81,6 @@ private:
   LONG_LIVED_HH(SearchMgr,search_mgr);
 };
 
+LONG_LIVED_HH2(SearchMgr,search_mgr);
 
 
index 09c18ab65a82a433d0668fb7df844b6c29d51ace..42e909c865f0d2df8df1cbe46689302226379c18 100644 (file)
@@ -41,3 +41,5 @@ protected: // functions
 protected: //variables
   LONG_LIVED_HH(SearchResultsMgr,search_results_mgr);
 };
+
+LONG_LIVED_HH2(SearchResultsMgr,search_results_mgr);
index b90ec303620abd165e803210c6ad9b508716ec6f..52f55f1b170cdd1e7c80b77a5fe04b6c23ed6e53 100644 (file)
@@ -67,7 +67,8 @@
 
 
 #include "Prelude.h"
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 LONG_LIVED_CC(SearchScopeMgr,search_scope_mgr);
 
index 2ff03043cc05952efa34a584795bccb203aae961..484c91412454ff5ac204746e57c32983fe1302f6 100644 (file)
@@ -54,4 +54,5 @@ private:
   LONG_LIVED_HH(SearchScopeMgr,search_scope_mgr);
 };
 
+LONG_LIVED_HH2(SearchScopeMgr,search_scope_mgr);
 
index 8da527d4db00be7a0ca5e005afac90cb212c6eb2..411f4ffa4b4d5791754f33c5e36eea34e6a39285 100644 (file)
@@ -133,13 +133,13 @@ ServiceMgr::create_atoms()
     {
       enum { XA_OLIAS_WINDOW_ID_ATOM, XA_OLIAS_EVENT_ATOM,
             XA_OLIAS_REPLY_ATOM, NUM_ATOMS }; 
-      static char *atom_names[] = { OLIAS_WINDOW_ID_ATOM, OLIAS_EVENT_ATOM,
-            OLIAS_REPLY_ATOM }; 
+      static const char *atom_names[] = { OLIAS_WINDOW_ID_ATOM,
+            OLIAS_EVENT_ATOM, OLIAS_REPLY_ATOM };
 
       Atom atoms[XtNumber(atom_names)];
 
-      XInternAtoms (window_system().display(), atom_names,
-                   XtNumber(atom_names), False, atoms);
+      XInternAtoms (window_system().display(), (char**)atom_names,
+                   XtNumber((char**)atom_names), False, atoms);
 
       _XA_OLIAS_WINDOW_ID = atoms[XA_OLIAS_WINDOW_ID_ATOM];
       _XA_OLIAS_EVENT = atoms[XA_OLIAS_EVENT_ATOM];
@@ -265,7 +265,7 @@ ServiceMgr::process_olias_event (Window client,
   locator = (char *) stream;
 
   UAS_Pointer<UAS_Common> d;
-  try
+  mtry
     {
       if (strchr (locator, ':'))
        {
@@ -285,11 +285,11 @@ ServiceMgr::process_olias_event (Window client,
          delete [] buffer;
        }
     }
-  catch (demoException&, demo)
+  mcatch (demoException&, demo)
     {
       message_mgr().demo_failure(demo);
     }
-  catch_any()
+  mcatch_any()
     {
       d = NULL;
     }
@@ -408,7 +408,7 @@ olias_send_event (Widget, OliasEvent *event)
       case OLIAS_DISPLAY_EVENT:
        locator = ((OliasDisplayEvent *) event)->locator;
        ON_DEBUG (printf (">>> external-api display <%s>\n", locator));
-       try
+       mtry
          {
            if (strchr (locator, ':'))
              {
@@ -433,11 +433,11 @@ olias_send_event (Widget, OliasEvent *event)
                  }
              }
          }
-       catch (demoException&, demo)
+       mcatch (demoException&, demo)
          {
            message_mgr().demo_failure(demo);
          }
-       catch_any()
+       mcatch_any()
          {
            d = NULL;
          }
index e9f58ca4920599288855e6a2632c08a4762a69be..c1d7548a9f7162a67477e4c043b201ac3da2233b 100644 (file)
@@ -54,5 +54,6 @@ private:
   LONG_LIVED_HH(ServiceMgr,service_manager);
 };
 
+LONG_LIVED_HH2(ServiceMgr,service_manager);
 
 
index da11f5421e16268f908c2b9f01fd53774a659fe2..74f17d86154614955e493bc26d4b1d8302300433 100644 (file)
@@ -47,6 +47,8 @@ class SessionMgr : public Long_Lived
     char       *prior_session ;  // prior session state file name, if any
 } ;
 
+LONG_LIVED_HH2( SessionMgr, session ) ;
+
 
 // class SessionMgrX : public SessionMgr
 // {
index f7ca9f1236b1c9645fa50f687b92c324f102d71d..d14ff81a80cfebb80ec81ca5c34bf5618c1570c1 100644 (file)
@@ -47,7 +47,8 @@
  * 
  */
 
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 // NOTE: this is just for the Xassert
 #define C_MessageMgr
@@ -101,14 +102,14 @@ StyleSheetMgr::font_preference_modified()
   // scale is only updated when a new node is displayed. This is
   // managed by having NodeMgr create a CanvasRenderer and passing in
   // the current font scale value
-  try
+  mtry
     {
       g_style_sheet_update = TRUE;
       // load new style sheet
       node_mgr().re_display_all();
       g_style_sheet_update = FALSE;
     }
-  catch_any()
+  mcatch_any()
     {
       Xassert(0 == "StyleSheetMgr::font_preference_modified()");
       g_style_sheet_update = FALSE ;
@@ -146,7 +147,7 @@ StyleSheetMgr::initOnlineStyleSheet (UAS_Pointer<UAS_Common> &doc) {
     fLastSS = onlineSS;
     fCurrent = new StyleSheet;
     UAS_String sstextStr = fLastSS->data();
-    istrstream input ((char *) sstextStr);
+    istringstream input ((char *) sstextStr);
     g_stylein = &input;
 #ifdef DUMP_STYLESHEETS
   {
@@ -159,17 +160,17 @@ StyleSheetMgr::initOnlineStyleSheet (UAS_Pointer<UAS_Common> &doc) {
        stylerestart (0);
     fStyleSheetRead = 1;
 
-    try {
+    mtry {
        styleparse ();
     }
-    catch_noarg (StyleSheetSyntaxError) {
+    mcatch_noarg (StyleSheetSyntaxError) {
        fLastSS = 0;
        delete fCurrent;
        { //  Don't remove these curlies. For destructors before rethrow
        fCurrent = new StyleSheet;
        const char *def =
        "* { wrap: \"word\", break: \"line\", margin: { left: 20, right: 20} }";
-       istrstream definput(def);
+       istringstream definput(def);
        input.unsetf (ios::skipws);
        g_stylein = &definput;
        stylerestart(0);
@@ -204,7 +205,7 @@ StyleSheetMgr::initPrintStyleSheet (UAS_Pointer<UAS_Common> &doc) {
     fLastSS = printSS;
     fCurrent = new StyleSheet;
     UAS_String sstextStr = fLastSS->data();
-    istrstream input ((char *) sstextStr);
+    istringstream input ((char *) sstextStr);
     g_stylein = &input;
 #ifdef DUMP_STYLESHEETS
   {
@@ -217,17 +218,17 @@ StyleSheetMgr::initPrintStyleSheet (UAS_Pointer<UAS_Common> &doc) {
        stylerestart (0);
     fStyleSheetRead = 1;
 
-    try {
+    mtry {
        styleparse ();
     }
-    catch_noarg (StyleSheetSyntaxError) {
+    mcatch_noarg (StyleSheetSyntaxError) {
        fLastSS = 0;
        delete fCurrent;
        { //  Don't remove these curlies. For destructors before rethrow
        fCurrent = new StyleSheet;
        const char *def =
        "* { wrap: \"word\", break: \"line\", margin: { left: 20, right: 20} }";
-       istrstream definput(def);
+       istringstream definput(def);
        input.unsetf (ios::skipws);
        g_stylein = &definput;
        stylerestart(0);
index ab5d2818e0e082fe5210e122e40f013dcabe5b6e..639c9d91abb3889904c1f0aa3c25b6a516a2a269 100644 (file)
@@ -49,4 +49,5 @@ private:
   LONG_LIVED_HH(StyleSheetMgr,style_sheet_mgr);
 };
 
+LONG_LIVED_HH2(StyleSheetMgr,style_sheet_mgr);
 
index 5fde53ed16e3b8c9a3eea45f41c50c898a235722..ceb950e33cfc3134275906ef7e6d42ddfc92f2ec 100644 (file)
@@ -142,7 +142,7 @@ LogToolTalkMessage (
     statmsg = tt_status_message(status);
     errmsg = XtMalloc(strlen(errfmt) + strlen(statmsg) + 2);
     if (! strlen(errfmt))
-      errfmt = "%s";
+      errfmt = (char*)"%s";
     sprintf(errmsg, errfmt, statmsg);
 
     DtMsgLogMessage ("Dtinfo", msg_type, errfmt, errmsg);
@@ -182,7 +182,7 @@ TtIpcMgr::TtIpcMgr()
   {
       errmsg = LogToolTalkMessage (DtMsgLogError, 
                                   ERR_TT_DISPLAY_AS_SESSION,
-                                  DFLTXT_DISPLAY_AS_SESSION,
+                                  (char*)DFLTXT_DISPLAY_AS_SESSION,
                                   tt_state);
       message_mgr().error_dialog( (char*)UAS_String(errmsg) ) ;
       XtFree (errmsg);
@@ -222,7 +222,7 @@ TtIpcMgr::TtIpcMgr()
 
              errmsg = LogToolTalkMessage (DtMsgLogError, 
                                           ERR_TT_PTYPE_DECLARE,
-                                          DFLTXT_PTYPE_DECLARE,
+                                          (char*)DFLTXT_PTYPE_DECLARE,
                                           tt_state);
               message_mgr().error_dialog( (char*)UAS_String(errmsg) );
              XtFree(errmsg);
@@ -232,7 +232,7 @@ TtIpcMgr::TtIpcMgr()
       {
         errmsg = LogToolTalkMessage (DtMsgLogError,
                                     ERR_TT_OPEN,
-                                    DFLTXT_OPEN,
+                                    (char*)DFLTXT_OPEN,
                                     tt_state);
         message_mgr().error_dialog( (char*)UAS_String(errmsg) );
        XtFree(errmsg);
@@ -242,7 +242,7 @@ TtIpcMgr::TtIpcMgr()
   {
     errmsg = LogToolTalkMessage (DtMsgLogError, 
                                 ERR_TT_DEFAULT_AS_SESSION,
-                                DFLTXT_DEFAULT_AS_SESSION,
+                                (char*)DFLTXT_DEFAULT_AS_SESSION,
                                 tt_state);
     message_mgr().error_dialog( (char*)UAS_String(errmsg) );
     XtFree(errmsg);
@@ -827,7 +827,7 @@ locale_of_desktop()
 #ifdef DEBUG
         if (!WM_LOCALE_NAME)
             printf( "Atom WM_LOCALE_NAME not interned\n" );
-#endif DEBUG
+#endif
 
         if (!WM_LOCALE_NAME)   return (char *)NULL;
 
@@ -838,7 +838,7 @@ locale_of_desktop()
 #ifdef DEBUG
         if (!_DT_SM_WINDOW_INFO)
             printf( "Atom _DT_SM_WINDOW_INFO not interned\n" );
-#endif DEBUG
+#endif
 
         if (!_DT_SM_WINDOW_INFO)  return (char *)NULL;
 
@@ -856,8 +856,8 @@ locale_of_desktop()
             printf(
              "null value from Atom _DT_SM_WINDOW_INFO for SM window ID\n" );
         else
-            printf( "dtsession window is %x\n", *sm_prop_window );
-#endif DEBUG
+            printf( "dtsession window is %lx\n", *sm_prop_window );
+#endif
 
         if (!sm_prop_window)   return (char *)NULL;
 
@@ -872,7 +872,7 @@ locale_of_desktop()
 
 #ifdef DEBUG
         printf( "desktop's locale is %s\n", dt_locale ) ;
-#endif DEBUG
+#endif
 
         if (!dt_locale)   return (char *)NULL;
         else              return dt_locale;
index 86a11f4fc6ec62ce490dacaa6f9808b39cf795d0..be507fb6045040ac7f374b4bb6a6ef965ddcfe49 100644 (file)
@@ -83,5 +83,5 @@ class TtIpcMgr : public Long_Lived
     Tt_status   tt_state ;
 } ;
 
-
+LONG_LIVED_HH2( TtIpcMgr, tt_manager ) ;
 
index aa8592df0bc9fe50e3d9f121e4f73e57a52df6da..fd270da642c0846f14339bc12985f98beb6f31e6 100644 (file)
@@ -1,5 +1,4 @@
 $ $XConsortium: TtIpcMgr.msg /main/4 1996/08/14 14:30:36 rcs $
-$ $XConsortium: TtIpcMgr.msg /main/4 1996/08/14 14:30:36 rcs $
 $
 $ (c) Copyright 1996 Digital Equipment Corporation.
 $ (c) Copyright 1996 Hewlett-Packard Company.
index 24363b9423750b914a68b5abf2ea1bf21dc2210f..753fdb44fe4a35870b77276694b25812b9cff823 100644 (file)
@@ -17,3 +17,5 @@ class UrlMgr: public Long_Lived {
 
        LONG_LIVED_HH(UrlMgr,url_mgr);
 };
+
+LONG_LIVED_HH2(UrlMgr,url_mgr);
index 11b9f1369091fc3f35d13463eaa065bdd07f2d59..91ebc8280d4fb7a8c3c3da97188852f3caa05811 100644 (file)
@@ -61,5 +61,6 @@ class WorkspaceMgr : public Long_Lived
                                        //  servicing of request (dynamic)
 } ;
 
+LONG_LIVED_HH2( WorkspaceMgr, workspace ) ;
 
 
index 1d1daa77d50e2272ea6cde297de4cca7d130da5c..50eab7ce0806e041eb68054fac9099d209d4d382 100644 (file)
@@ -1,6 +1,9 @@
 XCOMM $XConsortium: Imakefile /main/6 1996/08/21 15:42:50 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
+
+NormalCplusplusObjectRule()
 
 MAKEFILEDEPS=Classlist.mk
 
@@ -18,8 +21,12 @@ make_libfiles($(LIBNAME), $(CLASSES))
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 DependTarget()
index f27ec4b8608e1af37208bfa4043b5a9ee7b02b0f..86b3facaabe4f4167fd71f2328c5a036816018d3 100644 (file)
@@ -74,7 +74,7 @@ Mark::~Mark()
 {
   ON_DEBUG (printf ("Mark::~Mark() @ 0x%p\n", this));
   if (f_reference_count != 0)
-    message_mgr().error_dialog ("Attempt to delete mark with references!");
+   message_mgr().error_dialog((char*)"Attempt to delete mark with references!");
 }
 
 
@@ -95,7 +95,7 @@ Mark::save()
 {
   if (f_deleted)
     {
-      message_mgr().error_dialog ("Cannot save changes to deleted mark.");
+      message_mgr().error_dialog((char*)"Cannot save changes to deleted mark.");
     }
   else
     {
index e3cfb308a431a90116eb36b5dc9794445edb9507..149d079b1a0e9d8ac27deaf1e74ef9dd59a1a50b 100644 (file)
@@ -47,7 +47,8 @@
  * 
  */
 
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 
 #define C_xList
@@ -98,11 +99,11 @@ MarkBase_mmdb::open (const char *filename, bool read_only)
 
   mark_base *base;
   user_base::rw_flag_t mode = read_only ? user_base::READ : user_base::WRITE;
-  try
+  mtry
     {
       base = new mark_base (filename, "mark_base", "", mode);
     }
-  catch_any()
+  mcatch_any()
     {
       return (NULL);
     }
@@ -128,7 +129,7 @@ MarkBase_mmdb::create (const char *filename, bool read_only)
   mark_base *base;
   user_base::rw_flag_t mode = read_only ? user_base::READ : user_base::WRITE;
 
-  try
+  mtry
     {
       if (!read_only)
        {
@@ -152,7 +153,7 @@ MarkBase_mmdb::create (const char *filename, bool read_only)
            }
        }
     }
-  catch_any()
+  mcatch_any()
     {
       return (NULL);
     }
@@ -261,12 +262,12 @@ MarkBase_mmdb::get_marks (UAS_Pointer<UAS_Common> &doc_ptr,
          // Assure that the oid_t has not been deleted. qfc 7-6-93
           if (id.eq (oid_t (c_code_t(0), 0)) == false)
            {
-             try
+             mtry
                {
                  Mark_mmdb *m = find_mark (id, doc_ptr);
                  list.append (m);
                }
-             catch_any()
+             mcatch_any()
                {
                  // ignore failure for now! DJB 
                }
@@ -291,12 +292,12 @@ MarkBase_mmdb::get_all_marks (xList<UAS_Pointer<Mark> > &list)
   for (i = f_mark_base->first(); i != 0; f_mark_base->next(i))
     {
       oid_t id = f_mark_base->get_mark_oid (i);
-      try
+      mtry
        {
          m = find_mark (id, null_doc);
          list.append (m);
        }
-      catch_any()
+      mcatch_any()
        {
          // ignore any errors for now -- DJB
        }
index 2383551ef8865fa5a7e7a8ed19b51679711c25ec..5f3eb27cd2c5a54a85b75521a87c132afbdf66cd 100644 (file)
@@ -227,12 +227,12 @@ Mark_mmdb::restore()
   int sz;
   char *str;
 
-  try
+  mtry
     {
       sz = f_user_mark->mark_value()->size();
       str = f_user_mark->mark_value()->get();
     }
-  catch_any()
+  mcatch_any()
     {
       delete this;
       rethrow;
index fac1154ffb45ad4887edb0331af7333cecb12b74..335e9f2c58c1b4512c8d0637113fce4eaeb33a71 100644 (file)
@@ -1,6 +1,12 @@
 XCOMM $XConsortium: Imakefile /main/4 1996/08/21 15:42:57 drk $
+
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
+
 MAKEFILEDEPS=Classlist.mk
 LIBNAME=OliasSearch
+
+NormalCplusplusObjectRule()
+
 INCLUDES=$(BROWSER_INCLUDES)
 
 #include "Classlist.mk"
@@ -11,8 +17,12 @@ make_libfiles($(LIBNAME), $(CLASSES))
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 DependTarget()
index f5ea39dc21b7cd07a0eadb46a9250fb7d7ee3a1f..1aced9ebceb6c0325b9d609ad15dd4ebcd2f1657 100644 (file)
@@ -1029,7 +1029,7 @@ CanvasRenderer::handle_olias_attributes(ElementFeatures  &features,
       pGS->pix = graphic->pixmap();
       pGS->width = graphic->width() ;
       pGS->height = graphic->height();
-      pGS->mask = NULL ;
+      pGS->mask = 0 ;
       pGS->pixels = NULL ;
       pGS->num_pixels = 0 ;
 
@@ -1565,7 +1565,7 @@ CanvasRenderer::really_insert_string (_DtCvSegment *container,
     cerr << " indx: " << ret_indx << " " << font << endl;
 #endif
   }
-  strseg->handle.string.font = (_DtCvPointer) ret_indx ;
+  strseg->handle.string.font = (_DtCvPointer)(size_t) ret_indx ;
 
    // copy data into new memory to hand over to the canvas
   char *string = new char[size + 1];
@@ -2159,7 +2159,8 @@ TGDefn::find_format(const char *name, int* index)
 
   CC_TPtrSlistIterator<ColFormat> cf_cursor (f_colformats);
       
-  for (int nth = 0; ++cf_cursor; nth++)
+  int nth;
+  for (nth = 0; ++cf_cursor; nth++)
     {
       if (cf_cursor.key()->name() == NULL)
        continue;
@@ -2329,10 +2330,10 @@ TGDefn::build()
 #endif
 
        ColDefn* colcell;
-       try {
+       mtry {
          colcell = columns.at(kept);
        }
-       catch_any() {
+       mcatch_any() {
          abort(); // consider it as fatal
        }
        end_try;
@@ -2392,10 +2393,10 @@ TGDefn::build()
        fprintf(stderr, "[vc,kept,count]=[%d,%d,%d]\n", vc, kept, count);
 #endif
        ColDefn* colcell;
-       try {
+       mtry {
          colcell = columns.at(kept);
        }
-       catch_any() {
+       mcatch_any() {
          abort();
        }
        end_try;
@@ -2448,7 +2449,8 @@ TGDefn::build()
   }
   
   // temp for now deal with blank spots in the table
-  for (unsigned r = 0 ; r < num_rows ; r++)
+  unsigned r;
+  for (r = 0 ; r < num_rows ; r++)
     for (unsigned c = 0; c < num_columns ;  c++)
       {
        if (grid[r][c] == NULL)
index d49335a95ef467c4ffdfd4b0aea2829409d57421..2bb4ec3ca561835a4158de8d29ae7faca325d546 100644 (file)
@@ -4,4 +4,5 @@ $set    Set_CanvasRenderer
 $
 $ messages specific to CanvasRenderer (dtinfo I/F to DtCanvas/DtHelp)
 $
+1      "Dtinfo: Canvas Renderer"
 
index e8c8c7331ca748413be808ffce79060f1a2ed0f4..182fc47bcd8f8a9166e4791420b2b889acd6d041 100644 (file)
@@ -52,7 +52,8 @@
 #include "FeatureValue.h"
 #include "StyleSheetExceptions.h"
 #include <utility/funcs.h>
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 #include <Dt/CanvasP.h>
 #include "CanvasRenderer.hh"
@@ -607,7 +608,7 @@ CanvasRenderer::_dofont(const FeatureSet &fs, Symbol** symbols)
        // if we still can't find one go with whatever.
 
        else {
-           xlfd = "-*-*-*-*-*-*-*-*-*-*-*-*-*";
+           xlfd = (char*)"-*-*-*-*-*-*-*-*-*-*-*-*-*";
        }
 #ifdef FONT_DEBUG
        fprintf(stderr, "resulting in \"%s\".\n", xlfd);
@@ -811,7 +812,7 @@ CanvasRenderer::domargin(ElementFeatures    &return_features,
   int top   = 0;
   int bottom= 0;
 
-  try
+  mtry
   {
     //const Feature *f = marginset->lookup(symbols[FIRST]);
     const Feature *l = marginset->lookup(symbols[LEFT]);
@@ -833,7 +834,7 @@ CanvasRenderer::domargin(ElementFeatures    &return_features,
     bottom_margin = bottom;
 
   }
-  catch_noarg (StyleSheetException &)
+  mcatch_noarg (StyleSheetException &)
     {
 #ifdef DEBUG
       cerr << "MarginFPtml: style sheet exception" << endl;
@@ -1573,7 +1574,7 @@ CanvasRenderer::docolformat(ElementFeatures       &return_features,
   ColFormat *colf = new ColFormat ;
   
 
-  try
+  mtry
     {
       const Feature *widthF = set->lookup (symbols[WIDTH]) ;
       if (widthF)
@@ -1616,7 +1617,7 @@ CanvasRenderer::docolformat(ElementFeatures       &return_features,
          colf->justify (justify);
        }
     }
-  catch_any()
+  mcatch_any()
     {
       abort();
     }
@@ -1738,11 +1739,11 @@ CanvasRenderer::dorow (ElementFeatures  &return_features,
 
   const FeatureSet* features;
 
-  try
+  mtry
     {
       features = *local.lookup(symbols[ROW])->value();
     }
-  catch_any()
+  mcatch_any()
     {
       features = NULL;
     }
index 89edb689a1380e29f7a3de5c5b7bce0beb35b043..e071bf0a362dfe3feaf92f458efe5780ac5db9ea 100644 (file)
@@ -40,7 +40,8 @@
 #include "FontCache.hh"
 
 #if defined DEBUG || defined SMALL_DEBUG || defined FONT_DEBUG
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 #endif
 
 #define C_List
@@ -132,6 +133,7 @@ FontEntry::hash() const
         f_charset.hash() + f_ptsize ;
 }
 
+bool
 FontEntry::operator==(const FontEntry &fe) const
 {
   return
index c4d4c1a29e3dbdf9a90e38cfd4b6a44123f1df22..e59dbdb21b79cf95690ea8c22975c00617555aa0 100644 (file)
@@ -49,7 +49,7 @@ public:
   FontEntry(const FontEntry &);
   ~FontEntry();
 
-  operator ==(const FontEntry &) const;
+  bool operator ==(const FontEntry &) const;
 
   unsigned hash() const;
 
index e1632bdd702794cfadbd486f3f95777479b1958c..76437b8aa9972c8177dd204ae1e4b036b8bf3847 100644 (file)
@@ -1,9 +1,12 @@
 XCOMM $XConsortium: Imakefile /main/8 1996/08/21 15:43:09 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 LIBNAME=OnlineRender
 
+NormalCplusplusObjectRule()
+
 INCLUDES=$(BROWSER_INCLUDES) $(MMDB_INCLUDES) $(STYLE_SHEET_INCLUDES) \
 $(COMMON_CLASS_INCLUDES) 
 DEFINES=-DCDE_NEXT
@@ -30,7 +33,9 @@ dfiles:
 #ifdef UXPArchitecture
 SpecialCPlusPlusObjectRule(ORTemplates.o,, +Tall_tmpls -DEXPAND_TEMPLATES)
 SpecialCPlusPlusExpandRule(ORTemplates..c,ORTemplates.C,+Tall_tmpls -DEXPAND_TEMPLATES)
-#else
+#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture)
+SpecialCPlusPlusObjectRule(ORTemplates.o,,-DEXPAND_TEMPLATES)
+SpecialCPlusPlusExpandRule(ORTemplates..c,ORTemplates.C,-DEXPAND_TEMPLATES)
 #endif
 #if defined(UseWideChars) && defined(SunArchitecture) && (OSMajorVersion == 4)
 WC_FLAGS=-I/VOB/olias/library/Xwchar/src
@@ -45,9 +50,13 @@ SpecialCPlusPlusObjectRule($(WC_OBJS),,$(WC_FLAGS))
 RealLibrary($(LIBNAME),$(OBJS),$(LIBDIR))
 #else
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
-SimpleLibraryT($(LIBNAME),$(OBJS),$(LIBDIR))
+SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
-SimpleLibrary($(LIBNAME),$(OBJS),$(LIBDIR))
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 #endif
 
index 14ddfb40fa986635bbfe2c12e32e09142b773fef..1af83d882bdff6b361ecb28291d8d5c2542a4d19 100644 (file)
@@ -32,7 +32,7 @@ public:
   int          rowsep()                { return f_rowsep; }
   void         rowsep(int v)           { f_rowsep = v; }
 
-  operator==(const ColFormat &c) const
+  bool operator==(const ColFormat &c) const
     { return &c == this ; }
 
 private:
@@ -84,7 +84,7 @@ public:
   void       colend(char *e) { f_colend = e; }
   const char* colend()        { return f_colend; }
 
-  operator==(const ColDefn &c) const
+  bool operator==(const ColDefn &c) const
     { return &c == this ; }
 
   _DtCvFrmtOption justify() { return f_justify; }
@@ -126,7 +126,7 @@ public:
 
   CC_TPtrSlist<ColDefn> &columns() { return f_columns ; }
 
-  operator==(const RowDefn &r) const
+  bool operator==(const RowDefn &r) const
     { return &r == this ; }
 
   _DtCvFrmtOption vjustify ()          
@@ -163,7 +163,7 @@ public:
 
   void setup_cell(_DtCvSegment*, ColDefn*, RowDefn*, ColFormat*, ColFormat*);
 
-  operator==(const TGDefn& t) const
+  bool operator==(const TGDefn& t) const
     { return &t == this ; } 
 
   _DtCvFrmtOption justify() { return f_justify; }
index f63690ad246b105ea29cf90604dfe7723bb89026..499ef5b53bdbc5557befe3dc82c47758fbc093b0 100644 (file)
@@ -1,6 +1,6 @@
 XCOMM $XConsortium: Imakefile /main/8 1996/08/21 15:43:18 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
 
 CDEBUGFLAGS=-g
 
@@ -8,6 +8,8 @@ MAKEFILEDEPS=Classlist.mk
 
 LIBNAME=Other
 
+NormalCplusplusObjectRule()
+
 INCLUDES = $(BROWSER_INCLUDES)
 
 #include "Classlist.mk"
@@ -18,9 +20,13 @@ make_libfiles($(LIBNAME), $(CLASSES))
 make_msgs($(LIBNAME), $(MSGS))
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
+SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 DependTarget()
index 5dc01ef95242a0598f28804f7428d3b4adf683f0..7025be7048a27d3ec64d4c4877489bdf177539ab 100644 (file)
@@ -49,6 +49,7 @@
  * 
  */
 
+#include <X11/Shell.h>
 #include <X11/Xmu/Editres.h>
 #include <Xm/Xm.h>
 #include <Xm/XmP.h>
@@ -170,7 +171,7 @@ static unsigned char anno_double_bits[] = {
    0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xea, 0x2f, 0x0a, 0x20, 0xfa, 0x3f,
    0x02, 0x08, 0xfe, 0x0f, 0x00, 0x00};
 
-#ifdef SVR4
+#if defined(SVR4) || defined(linux) || defined(CSRG_BASED)
 #include <signal.h>
 #else
 #include <sys/signal.h>
@@ -193,26 +194,26 @@ extern "C" {
 extern Boolean print_server_error;
 
 static String fallbacks[] = {
-"Dtinfo.Print*background:white",
-"Dtinfo.Print*renderTable:-dt-application-bold-r-normal-serif-0-0-0-0-p-0-iso8859-1",
-"Dtinfo.Print*shadowThickness:0",
-"Dtinfo.Print*highlightThickness:0",
-"Dtinfo.Print*pform.marginHeight: 1in",
-"Dtinfo.Print*pform.marginWidth: 1in",
-"Dtinfo.Print*ptext.Attachment:attach_form",
+(char*)"Dtinfo.Print*background:white",
+(char*)"Dtinfo.Print*renderTable:-dt-application-bold-r-normal-serif-0-0-0-0-p-0-iso8859-1",
+(char*)"Dtinfo.Print*shadowThickness:0",
+(char*)"Dtinfo.Print*highlightThickness:0",
+(char*)"Dtinfo.Print*pform.marginHeight: 1in",
+(char*)"Dtinfo.Print*pform.marginWidth: 1in",
+(char*)"Dtinfo.Print*ptext.Attachment:attach_form",
 NULL
 };
 
 
 static XtActionsRec DrawnBActions[] =
     {
-        {"DeSelectAll"    , _DtHelpDeSelectAll    },
-        {"SelectAll"      , _DtHelpSelectAll      },
-        {"ActivateLink"   , _DtHelpActivateLink   },
-        {"CopyToClipboard", _DtHelpCopyAction     },
-        {"PageUpOrDown"   , _DtHelpPageUpOrDown   },
-        {"PageLeftOrRight", _DtHelpPageLeftOrRight},
-        {"NextLink"       , _DtHelpNextLink       }
+        {(char*)"DeSelectAll"    , _DtHelpDeSelectAll    },
+        {(char*)"SelectAll"      , _DtHelpSelectAll      },
+        {(char*)"ActivateLink"   , _DtHelpActivateLink   },
+        {(char*)"CopyToClipboard", _DtHelpCopyAction     },
+        {(char*)"PageUpOrDown"   , _DtHelpPageUpOrDown   },
+        {(char*)"PageLeftOrRight", _DtHelpPageLeftOrRight},
+        {(char*)"NextLink"       , _DtHelpNextLink       }
     };
 
 
@@ -244,11 +245,11 @@ public:
 
 WindowSystem::WindowSystem (int &argc, char *argv[])
 : f_shell_list (20),
-  f_default_pixmap (NULL),
+  f_default_pixmap (0),
   f_defpix_width (0),
   f_defpix_height (0),
   f_printing(False),
-  f_detached_pixmap(NULL),
+  f_detached_pixmap(0),
   f_cursor_stack_pos(-1),
   f_dtinfo_font(NULL),
   f_dtinfo_space_font(NULL)
@@ -283,9 +284,9 @@ WindowSystem::WindowSystem (int &argc, char *argv[])
   if (count && names)
   {
     f_dtinfo_font = XmFontListEntryLoad(f_display, *names,
-                                       XmFONT_IS_FONT, "olias");
+                                       XmFONT_IS_FONT, (char*)"olias");
     f_dtinfo_space_font = XmFontListEntryLoad(f_display, *names,
-                                             XmFONT_IS_FONT, "ospace");
+                                             XmFONT_IS_FONT, (char*)"ospace");
     XFreeFontNames(names);
   }
 }
@@ -409,43 +410,43 @@ extern "C" { void tml_dp_set_font_display(Display *); }
 
 // include "dbg" so we can use the startup script -debug flag independently 
 XrmOptionDescRec options[] = {
-  {"-debug",           "*debug",         XrmoptionNoArg,  "True"},
-  {"-dbg",             "*debug",         XrmoptionNoArg,  "True"},
-  {"-author",          "*author",        XrmoptionNoArg,  "True"},
-  {"-readonly",                "*readonly",      XrmoptionNoArg,  "True"},
-  {"-ro",              "*readonly",      XrmoptionNoArg,  "True"},
-  {"-autohelp",         "*AutomaticHelp", XrmoptionNoArg,  "On"},
-  {"-nofonts",         "*NoFonts",       XrmoptionNoArg,  "True"},
-  {"-print",            "printOnly",      XrmoptionNoArg,  "True"},
-  {"-hierarchy",        "hierarchy",      XrmoptionNoArg,  "True"},
-  {"-printer",          "printer",        XrmoptionSepArg, NULL},
-  {"-copies",           "copies",         XrmoptionSepArg, NULL},
-  {"-paperSize",        "paperSize",      XrmoptionSepArg, NULL},
-  {"-silent",           "silent",         XrmoptionNoArg,  "True"},
-  {"-outputFile",       "outputFile",     XrmoptionSepArg, NULL}
+  {(char*)"-debug",    (char*)"*debug",        XrmoptionNoArg,  (char*)"True"},
+  {(char*)"-dbg",      (char*)"*debug",        XrmoptionNoArg,  (char*)"True"},
+  {(char*)"-author",   (char*)"*author",       XrmoptionNoArg,  (char*)"True"},
+  {(char*)"-readonly", (char*)"*readonly",     XrmoptionNoArg,  (char*)"True"},
+  {(char*)"-ro",       (char*)"*readonly",     XrmoptionNoArg,  (char*)"True"},
+  {(char*)"-autohelp", (char*)"*AutomaticHelp",XrmoptionNoArg,  (char*)"On"},
+  {(char*)"-nofonts",  (char*)"*NoFonts",      XrmoptionNoArg,  (char*)"True"},
+  {(char*)"-print",    (char*)"printOnly",     XrmoptionNoArg,  (char*)"True"},
+  {(char*)"-hierarchy",        (char*)"hierarchy",     XrmoptionNoArg,  (char*)"True"},
+  {(char*)"-printer",  (char*)"printer",       XrmoptionSepArg, NULL},
+  {(char*)"-copies",   (char*)"copies",        XrmoptionSepArg, NULL},
+  {(char*)"-paperSize",        (char*)"paperSize",     XrmoptionSepArg, NULL},
+  {(char*)"-silent",   (char*)"silent",        XrmoptionNoArg,  (char*)"True"},
+  {(char*)"-outputFile",(char*)"outputFile",   XrmoptionSepArg, NULL}
 };
 
 static XtResource VideoResources[] =
 {
-  {"printOnly", "PrintOnly", XmRBoolean, sizeof (Boolean),
+  {(char*)"printOnly", (char*)"PrintOnly", XmRBoolean, sizeof (Boolean),
        XtOffsetOf (VideoShell, print_only), XmRImmediate, (XtPointer)False,
   },
-  {"outputFile", "OutputFile", XmRString, sizeof (char *),
+  {(char*)"outputFile", (char*)"OutputFile", XmRString, sizeof (char *),
        XtOffsetOf (VideoShell, file_name), XmRImmediate, (XtPointer)NULL,
   },
-  {"hierarchy", "Hierarchy", XmRBoolean, sizeof (Boolean),
+  {(char*)"hierarchy", (char*)"Hierarchy", XmRBoolean, sizeof (Boolean),
        XtOffsetOf (VideoShell, hierarchy), XmRImmediate, (XtPointer)False,
   },
-  {"printer", "Printer", XmRString, sizeof (char *),
+  {(char*)"printer", (char*)"Printer", XmRString, sizeof (char *),
        XtOffsetOf (VideoShell, printer), XmRImmediate, (XtPointer)NULL,
   },
-  {"copies", "Copies", XmRInt, sizeof (int),
+  {(char*)"copies", (char*)"Copies", XmRInt, sizeof (int),
        XtOffsetOf (VideoShell, copies), XmRImmediate, (XtPointer)1,
   },
-  {"paperSize", "PaperSize", XmRString, sizeof (char *),
+  {(char*)"paperSize", (char*)"PaperSize", XmRString, sizeof (char *),
        XtOffsetOf (VideoShell, paper_size), XmRImmediate, (XtPointer)NULL,
   },
-  {"silent", "Silent", XmRBoolean, sizeof (Boolean),
+  {(char*)"silent", (char*)"Silent", XmRBoolean, sizeof (Boolean),
        XtOffsetOf (VideoShell, silent), XmRImmediate, (XtPointer)False,
   },
 };
@@ -521,7 +522,7 @@ xevent_error_aborter(Display *display, XErrorEvent* error_event)
     // log error
 
     _DtPrintDefaultErrorSafe(display, error_event, error_msg, _DTINFO_BUFSIZE);
-    _DtSimpleError("dtinfo", DtWarning, NULL, error_msg, NULL);
+    _DtSimpleError((char*)"dtinfo", DtWarning, NULL, error_msg, NULL);
     
     // if the error occured on the print display we're going to set 
     // a variable so that and when the job is done, right before calling
@@ -566,7 +567,8 @@ WindowSystem::init()
 
   if (f_display == (Display*)NULL)
   {
-      fprintf(stderr, CATGETS(Set_WindowSystem, 3, "Unable to open display.\n"));
+      fprintf(stderr, "%s",
+               CATGETS(Set_WindowSystem, 3, "Unable to open display.\n"));
       exit(1);
   }
     
@@ -586,7 +588,7 @@ WindowSystem::init()
   f_toplevel = f_video_shell->widget;
 
   if (DtAppInitialize( f_application_context,
-               f_display, f_toplevel, f_argv[0], CLASS_NAME) == False)
+               f_display, f_toplevel, f_argv[0], (char*)CLASS_NAME) == False)
   {
      /* DtAppInitialize() has already logged an appropriate error msg */
      exit(-1);
@@ -606,8 +608,8 @@ WindowSystem::init()
 #endif
 
   // Create atom used elsewhere by agents
-  f_wm_delete_window = XmInternAtom (f_display, "WM_DELETE_WINDOW", False);
-  XA_WM_STATE = XmInternAtom (f_display, "WM_STATE", False);
+  f_wm_delete_window = XmInternAtom (f_display, (char*)"WM_DELETE_WINDOW", False);
+  XA_WM_STATE = XmInternAtom (f_display, (char*)"WM_STATE", False);
 
   // -------- Add some converters -------- //
 
@@ -633,9 +635,9 @@ WindowSystem::init()
   f_screen = XtScreen(f_toplevel);
   f_nofonts = get_boolean_default ("NoFonts");
 
-  f_locked_pixmap = NULL;
-  f_semilocked_pixmap  = NULL;
-  f_unlocked_pixmap = NULL; 
+  f_locked_pixmap = 0;
+  f_semilocked_pixmap  = 0;
+  f_unlocked_pixmap = 0;
 
   XImage *mark_single =
        XCreateImage(f_display, DefaultVisualOfScreen(f_screen),
@@ -669,10 +671,10 @@ WindowSystem::init()
   anno_double->bitmap_bit_order = LSBFirst;
   anno_double->bitmap_unit = 8;
 
-  XmInstallImage(mark_single, "mark_single");
-  XmInstallImage(mark_double, "mark_double");
-  XmInstallImage(anno_single, "anno_single");
-  XmInstallImage(anno_double, "anno_double");
+  XmInstallImage(mark_single, (char*)"mark_single");
+  XmInstallImage(mark_double, (char*)"mark_double");
+  XmInstallImage(anno_single, (char*)"anno_single");
+  XmInstallImage(anno_double, (char*)"anno_double");
 }
 
 Pixmap 
@@ -686,7 +688,7 @@ WindowSystem::locked_pixmap(Widget w)
                      XmNbackground, &bg,
                      NULL);
        
-       f_locked_pixmap = XmGetPixmap (f_screen, "locked.xbm", fg, bg);
+       f_locked_pixmap = XmGetPixmap (f_screen, (char*)"locked.xbm", fg, bg);
        if (f_locked_pixmap == XmUNSPECIFIED_PIXMAP) {
            fprintf(stderr, "Couldn't load locked.xbm.\n");
        }
@@ -707,7 +709,7 @@ WindowSystem::unlocked_pixmap(Widget w)
                      XmNbackground, &bg,
                      NULL);
        
-       f_unlocked_pixmap = XmGetPixmap (f_screen, "unlocked.xbm", fg, bg);
+       f_unlocked_pixmap = XmGetPixmap (f_screen, (char*)"unlocked.xbm", fg, bg);
        if (f_unlocked_pixmap == XmUNSPECIFIED_PIXMAP) {
            fprintf(stderr, "Couldn't load locked.xbm.\n");
        }
@@ -727,7 +729,7 @@ WindowSystem::semilocked_pixmap(Widget w)
                      XmNbackground, &bg,
                      NULL);
        
-       f_semilocked_pixmap = XmGetPixmap (f_screen, "semilocked.xbm", fg, bg);
+       f_semilocked_pixmap = XmGetPixmap (f_screen, (char*)"semilocked.xbm", fg, bg);
        if (f_semilocked_pixmap == XmUNSPECIFIED_PIXMAP) {
            fprintf(stderr, "Couldn't load locked.xbm.\n");
        }
@@ -1010,7 +1012,7 @@ WindowSystem::core_dump_handler (int signal_number)
 {
   if ((XtWindow ((Widget)window_system().toplevel())) != 0)
     {
-      WXmMessageDialog byebye (window_system().toplevel(), "core_dump");
+      WXmMessageDialog byebye (window_system().toplevel(), (char*)"core_dump");
       XtVaSetValues((Widget)byebye, XmNmessageString,
        (XmString)XmStringLocalized(CATGETS(Set_WindowSystem, 2,
                                            "Bombing...")), NULL);
@@ -1102,7 +1104,7 @@ WindowSystem::default_pixmap (Dimension *width, Dimension *height)
        
        status = XmeXpmCreatePixmapFromData(f_display,
                                            XtWindow((Widget)toplevel()),
-                                           graphic_unavailable_data,
+                                           (char**)graphic_unavailable_data,
                                            &temp_pixmap,
                                            NULL, &xpm_attr);
        temp_width = xpm_attr.width;
@@ -1162,7 +1164,7 @@ WindowSystem::detached_pixmap(Dimension *width, Dimension *height)
 
       int status = XmeXpmCreatePixmapFromData(f_display,
                                           XtWindow((Widget)toplevel()),
-                                          detached_pixmap_data,
+                                          (char**)detached_pixmap_data,
                                           &f_detached_pixmap,
                                           NULL, &xpm_attr);
       f_detached_width = xpm_attr.width ;
@@ -1206,7 +1208,7 @@ WindowSystem::read_pixmap(const char *pname,
 #endif
 
   if (status != XpmSuccess) {
-    pixmap = NULL;
+    pixmap = 0;
     *width = 0;
     *height = 0;
 
@@ -1233,7 +1235,7 @@ WindowSystem::get_boolean_default (const char *name)
   resource[0].resource_class = (char *) name;
   resource[0].resource_type = XtRBoolean;
   resource[0].resource_size = sizeof(Boolean);
-  resource[0].resource_offset = NULL;
+  resource[0].resource_offset = 0;
   resource[0].default_type = XtRImmediate;
   resource[0].default_addr = False;
 
@@ -1253,7 +1255,7 @@ WindowSystem::get_int_default (const char *name)
   resource[0].resource_class = (char *) name;
   resource[0].resource_type = XtRInt;
   resource[0].resource_size = sizeof(int);
-  resource[0].resource_offset = NULL;
+  resource[0].resource_offset = 0;
   resource[0].default_type = XtRImmediate ;
   resource[0].default_addr = 0;
 
@@ -1272,9 +1274,9 @@ WindowSystem::get_string_default (const char *name)
   resource[0].resource_class = (char *) name;
   resource[0].resource_type = XtRString;
   resource[0].resource_size = sizeof(String);
-  resource[0].resource_offset = NULL;
+  resource[0].resource_offset = 0;
   resource[0].default_type = XtRString;
-  resource[0].default_addr = "";
+  resource[0].default_addr = (void *) "";
 
   XtGetApplicationResources(toplevel(), &string, resource, 1, NULL, 0);
 
@@ -1292,9 +1294,9 @@ WindowSystem::get_geometry_default (const char *name)
   resource[0].resource_class = (char *) name;
   resource[0].resource_type = XtRString;
   resource[0].resource_size = sizeof(String);
-  resource[0].resource_offset = NULL;
+  resource[0].resource_offset = 0;
   resource[0].default_type = XtRString;
-  resource[0].default_addr = "0x0";
+  resource[0].default_addr = (void *) "0x0";
 
   XtGetApplicationResources(toplevel(), &string, resource, 1, NULL, 0);
 
@@ -1318,7 +1320,7 @@ WindowSystem::get_color_default(const char *name)
   resource[0].resource_class = (char *) name;
   resource[0].resource_type = XtRPixel;
   resource[0].resource_size = sizeof(Pixel);
-  resource[0].resource_offset = NULL;
+  resource[0].resource_offset = 0;
   resource[0].default_type = XtRImmediate ;
   resource[0].default_addr = (XtPointer)
     WhitePixelOfScreen(DefaultScreenOfDisplay(f_display));
@@ -1337,10 +1339,10 @@ WindowSystem::get_message (const char *message_name)
   static char default_message[256];
 
   resource[0].resource_name = (char *) message_name;
-  resource[0].resource_class = "Message";
+  resource[0].resource_class = (char*)"Message";
   resource[0].resource_type = XtRString;
   resource[0].resource_size = sizeof(String);
-  resource[0].resource_offset = NULL;
+  resource[0].resource_offset = 0;
   resource[0].default_type = XtRString;
   resource[0].default_addr = default_message;
 
@@ -1411,7 +1413,7 @@ WindowSystem::make_space (int space_to_fill, Widget w)
       space_array[i] = OLIAS_SPACE32 ;
     space_array[i] = 0 ;
   } 
-  WXmString string_32(space_array, OLIAS_SPACE_FONT) ;
+  WXmString string_32(space_array, (char*)OLIAS_SPACE_FONT) ;
 
   
   space_array[0] = 0 ;
@@ -1420,7 +1422,7 @@ WindowSystem::make_space (int space_to_fill, Widget w)
       space_array[i] = OLIAS_SPACE16 ;
     space_array[i] = 0 ;
   } 
-  WXmString string_16(space_array, OLIAS_SPACE_FONT) ;
+  WXmString string_16(space_array, (char*)OLIAS_SPACE_FONT) ;
 
   space_array[0] = 0 ;
   if (eight != 0){
@@ -1428,7 +1430,7 @@ WindowSystem::make_space (int space_to_fill, Widget w)
       space_array[i] = OLIAS_SPACE08 ;
     space_array[i] = 0 ;
   }
-  WXmString string_8(space_array, OLIAS_SPACE_FONT) ;
+  WXmString string_8(space_array, (char*)OLIAS_SPACE_FONT) ;
 
   space_array[0] = 0 ;
   if (four != 0){
@@ -1436,7 +1438,7 @@ WindowSystem::make_space (int space_to_fill, Widget w)
       space_array[i] = OLIAS_SPACE04 ;
     space_array[i] = 0 ;
   }
-  WXmString string_4(space_array, OLIAS_SPACE_FONT) ;
+  WXmString string_4(space_array, (char*)OLIAS_SPACE_FONT) ;
 
   space_array[0] = 0 ;
   if (two != 0){
@@ -1444,7 +1446,7 @@ WindowSystem::make_space (int space_to_fill, Widget w)
       space_array[i] = OLIAS_SPACE02 ;
     space_array[i] = 0 ;
   }
-  WXmString string_2(space_array, OLIAS_SPACE_FONT) ;
+  WXmString string_2(space_array, (char*)OLIAS_SPACE_FONT) ;
 
   space_array[0] = 0 ;
   if (one != 0){
@@ -1452,7 +1454,7 @@ WindowSystem::make_space (int space_to_fill, Widget w)
       space_array[i] = OLIAS_SPACE01 ;
     space_array[i] = 0 ;
   }
-  WXmString string_1(space_array, OLIAS_SPACE_FONT) ;
+  WXmString string_1(space_array, (char*)OLIAS_SPACE_FONT) ;
 
   WXmString space = string_32 + string_16 + string_8 + string_4 + string_2 + string_1 ;
 
index 421b9f2395fb0f48000611cf63b797020db15ceb..97f6e581189b38f23058ac88b9fc6870a28c0538 100644 (file)
@@ -1,6 +1,6 @@
 /* XPM */
 /* $XConsortium: detached_bw.xpm /main/2 1996/07/24 16:07:03 drk $ */
-static char *detached_pixmap_data[] = {
+static char const* detached_pixmap_data[] = {
 /* width height ncolors chars_per_pixel */
 "84 109 2 1",
 /* colors */
index d70f0dfeacfb791ccdf785d3b8396cf116dbaa14..228413b7e379e90166325f80ecdeee0d2ac202c7 100644 (file)
@@ -1,6 +1,6 @@
 /* XPM */
 /* $XConsortium: graphic_unavailable.xpm /main/2 1996/07/24 16:07:25 drk $ */
-static char *graphic_unavailable_data[] = {
+static char const* graphic_unavailable_data[] = {
 /* width height ncolors chars_per_pixel */
 "173 28 2 1",
 /* colors */
index 8d41a8c4dab230b83051896bf44edf4141bca610..f0c56e47ac636c8afb6160e46e9d8a2e15a90630 100644 (file)
@@ -1,12 +1,14 @@
 XCOMM $XConsortium: Imakefile /main/6 1996/08/21 15:43:25 drk $
 
 #define CplusplusSource        YES
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
 
 MAKEFILEDEPS=Classlist.mk
 
 LIBNAME=Preferences
 
+NormalCplusplusObjectRule()
+
 INCLUDES=$(BROWSER_INCLUDES)
 
 
@@ -16,7 +18,13 @@ OBJS=$(SRCS:.C=.o)
 
 make_libfiles($(LIBNAME), $(CLASSES))
 
+#if defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+    defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+#else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+#endif
 
 LOCAL_LIBRARIES=$(EXCLIB) -lPreferences
 
index 1d74cc18881211cbc9ce2a65ca309258aa3c5b4f..b4148fe3e4a75670ac4d7673cae195f3a8aae068 100644 (file)
@@ -63,7 +63,7 @@
 #include <ctype.h>
 #include <stdio.h>
 #include <unistd.h>
-#if !defined(hpux) && !defined(__osf__) && !defined(USL)
+#if !defined(hpux) && !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
 #include <sysent.h>
 #endif
 #include <sys/types.h>
@@ -132,6 +132,7 @@ PreferenceRecord::form_filename()
 void
 revert_from_backup (const char *filename)
 {
+  int ret;
   // Failed, so look for the backup file.
   char backup[256], original[256];
   sprintf (backup, "%s.bak", filename);
@@ -141,7 +142,7 @@ revert_from_backup (const char *filename)
       S_ISREG(file_info.st_mode))
     {
       unlink (filename);
-      link (backup, filename);
+      ret = link (backup, filename);
     }
 }
 
@@ -149,14 +150,16 @@ revert_from_backup (const char *filename)
 int
 read_version (FILE *stream)
 {
+  size_t ret1;
+  int ret2;
   // Make sure the file is valid.
   char V = '-';
-  fread (&V, 1, 1, stream);
+  ret1 = fread (&V, 1, 1, stream);
   if (V != 'V')
     return (0);
   // Nab the version from the file. 
   int version = 0;
-  fscanf (stream, "%d", &version);
+  ret2 = fscanf (stream, "%d", &version);
   return (version);
 }
 
@@ -164,10 +167,11 @@ read_version (FILE *stream)
 int
 read_update_count (FILE *stream)
 {
+  char *ret;
   char buffer[256], *p;
   int update_count;
 
-  fgets (buffer, 256, stream);
+  ret = fgets (buffer, 256, stream);
   p = buffer;
   while (*p != ',' && *p != '\0')
     p++;
@@ -276,7 +280,7 @@ PreferenceRecord::write_prefs()
   if (update_count != g_update_count)
     {
       bool doit = message_mgr().
-       question_dialog ("Preferences have changed on disk.\nOverwrite?");
+       question_dialog ((char*)"Preferences have changed on disk.\nOverwrite?");
       if (!doit)
        return;
     }
@@ -347,14 +351,14 @@ PreferenceRecord::lookup (const char *key)
 {
   if (g_update_count == -1)
     {
-      try
+      mtry
        {
          read_prefs();
        }
-      catch_any()
+      mcatch_any()
        {
          // This will only happen the first time through. 
-         message_mgr().error_dialog ("Unable to read preferences.");
+         message_mgr().error_dialog ((char*)"Unable to read preferences.");
          g_update_count = 0;
        }
       end_try;
index 31beebac7b2929081221d2366ba9db42792b2fab..eea4ec03899e7114615c17a0edf5e70896569e31 100644 (file)
@@ -32,7 +32,7 @@ public:
   WindowGeometry()
     : ulx(0), uly(0), width(100), height(100)
     { }
-  operator == (const WindowGeometry &wg)
+  bool operator == (const WindowGeometry &wg)
     { return (ulx == wg.ulx && uly == wg.uly &&
              width == wg.width && height == wg.height); }
   int ulx, uly;
index 4e7610b497f569a076130a5c80c3963c639e8982..beb330bf7a65cca12db02898d6b37621e6fd90ae 100644 (file)
@@ -1,11 +1,13 @@
 XCOMM $XConsortium: Imakefile /main/7 1996/08/21 15:43:32 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 MAKEFILEDEPS=Classlist.mk
 
 LIBNAME=Query
 
+NormalCplusplusObjectRule()
 
 INCLUDES=$(BROWSER_INCLUDES) $(COMMON_CLASS_INCLUDES)
 
@@ -36,8 +38,12 @@ make_msgs($(LIBNAME), $(MSGS))
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 clean::
index bf2b91771a6d0060ac6ce623e198e137eb1ed95f..77f0d342c609d6f9dd09a4cdc7de59b7cac9c841 100644 (file)
 #include <WWL/WXmPanedWindow.h>
 
 #include <string.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 #define CLASS QueryEditor
 #include "../Agents/create_macros.hh"
 
+#include "utility/mmdb_exception.h"
+
 //static bool g_allow_query_text_change;
   
 QueryEditor *QueryEditor::f_query_editor;
@@ -126,7 +129,7 @@ QueryEditor::display()
 {
   static int count = 0;
   if (count++ == 0) {
-    if (f_shell == NULL)
+    if (f_shell == 0)
       create_ui();
 
     if (f_query == NULL)
@@ -243,7 +246,7 @@ QueryEditor::edit_query (QueryGroup *query)
     }
 
   //g_allow_query_text_change = TRUE;
-  f_query_text.Value ("");
+  f_query_text.Value ((char*)"");
   //g_allow_query_text_change = FALSE;
 
   // Move the input focus to the term view.
@@ -277,20 +280,20 @@ QueryEditor::create_ui()
 
   // Main form and menu bar. 
   WXmForm form                      (f_shell,    "form"                );
-  WXmMenuBar menu_bar               (form,       "menu_bar"            );
+  WXmMenuBar menu_bar               (form,       (char*)"menu_bar"     );
 
-  WXmPulldownMenu scope_menu        (form,       "scope_menu");
+  WXmPulldownMenu scope_menu        (form,       (char*)"scope_menu"   );
   Arg args[1];
   int n = 0;
   XtSetArg(args[n], XmNsubMenuId, (Widget) scope_menu); n++;
-  f_scope_option = WXmOptionMenu    (form,       "scope_option", AM, args, n);
+  f_scope_option = WXmOptionMenu    (form,       (char*)"scope_option", AM, args, n);
 
   mtfstring = CATGETS(Set_AgentLabel, 212, "Scope Name");
   XtVaSetValues(f_scope_option, XmNlabelString, (XmString)mtfstring, NULL);
 
   // Menu definitions.   how about using AddPushButton (name, obj, fun)??
   WXmCascadeButton edit_cascade     (menu_bar,   "edit",             AM);
-  WXmPulldownMenu edit_menu         (menu_bar,   "edit_menu"           );
+  WXmPulldownMenu edit_menu         (menu_bar,   (char*)"edit_menu"    );
   f_cut_btn = WXmPushButton         (edit_menu,  "cut",              AM);
   f_copy_btn = WXmPushButton        (edit_menu,  "copy",             AM);
   f_paste_btn = WXmPushButton       (edit_menu,  "paste",            AM);
@@ -346,7 +349,7 @@ QueryEditor::create_ui()
   mtfstring =  CATGETS(Set_AgentLabel, 48, "Help");
   XtVaSetValues(help, XmNlabelString, (XmString)mtfstring, NULL);
 
-  help_agent().add_activate_help (help, "query_editor_help");
+  help_agent().add_activate_help (help, (char*)"query_editor_help");
 
   // Main "work" area 
   WXmPanedWindow pane               (form,       "pane"                );
@@ -356,7 +359,7 @@ QueryEditor::create_ui()
   mtfstring =  CATGETS(Set_AgentLabel, 230, "Query");
   XtVaSetValues(qlabel, XmNlabelString, (XmString)mtfstring, NULL);
   
-  f_query_text = WXmScrolledText    (qform,      "qtext",            AM);
+  f_query_text = WXmScrolledText    (qform,      (char*)"qtext",     AM);
 //  f_query_text.SetEditable(False);
   f_query_area = WXmScrolledWindow  (pane,       "query_area",       AM);
   XtUnmanageChild (f_query_area.HorizontalScrollBar());
@@ -430,11 +433,11 @@ QueryEditor::search_activate()
   UAS_SearchScope *scope =
     (UAS_SearchScope *) WXmPushButton (f_scope_option.MenuHistory()).UserData();
 
-  try {
+   mtry {
       // Search manager owns query from this point on.  Don't delete it here. 
       search_mgr().parse_and_search (human_readable, scope);
    }
-   catch (demoException &, demo) {
+   mcatch (demoException &, demo) {
       message_mgr().demo_failure(demo);
    }
    end_try;
@@ -557,7 +560,7 @@ QueryEditor::fill_menu()
   List_Iterator<UAS_SearchScope *> s (scope_list);
   bool old_read_only = TRUE;
 
-  for (; s != NULL; s++)
+  for (; s != 0; s++)
     {
       // Add a separator when they change from read only to changable. 
       if (old_read_only != s.item()->read_only())
@@ -628,7 +631,7 @@ QueryEditor::receive (ScopeCreated &msg, void* /*client_data*/)
   {
     // Scan the current menu to find the correct insertion position. 
     UAS_SearchScope *scope;
-    for (; s != NULL; s++, position++)
+    for (; s != 0; s++, position++)
     {
       scope = s.item();
       if (scope->read_only() != need_sep)
@@ -671,7 +674,8 @@ QueryEditor::receive (ScopeDeleted &msg, void* /*client_data*/)
   WidgetList kids = WComposite(f_scope_option.SubMenuId()).Children();
   int num_kids = WComposite(f_scope_option.SubMenuId()).NumChildren();
   int separator_pos = -1;
-  for (int i = 0; i < num_kids; i++)
+  int i;
+  for (i = 0; i < num_kids; i++)
     {
       if (XmIsSeparator (kids[i]))
        separator_pos = i + 1;
@@ -706,7 +710,8 @@ QueryEditor::receive (ScopeRenamed &msg, void* /*client_data*/)
   // First find renamed button in our list.
   WidgetList kids = WComposite(f_scope_option.SubMenuId()).Children();
   int num_kids = WComposite(f_scope_option.SubMenuId()).NumChildren();
-  for (int i = 0; i < num_kids; i++)
+  int i;
+  for (i = 0; i < num_kids; i++)
     {
       if (msg.f_search_scope ==
          ((UAS_SearchScope *) WXmPushButton (kids[i]).UserData()))
@@ -723,7 +728,7 @@ QueryEditor::receive (ScopeRenamed &msg, void* /*client_data*/)
   List_Iterator<UAS_SearchScope *> s (scope_list);
 
   // find the new position in the list
-  for (; s != NULL; s++)
+  for (; s != 0; s++)
     {
       if (s.item() == msg.f_search_scope)
        continue;
index bebbf90478b897c2ffac3c4f19d8c843c8e46872..aea5d34c01cbcab05a3efaa29a0de0ebc2260d41 100644 (file)
@@ -72,7 +72,7 @@ static int operator_precedence[] =
   -1, 0, 0, 1, 2, 2
 };
 
-static char *fulcrum_formats[] =
+static const char *fulcrum_formats[] =
 { "",                                                // NONE 
   "\\Cu %s %s \\C}",                                // OR
   "\\Ct\\Cu %s %s \\C} \\Cx\\Ct %s %s \\C}\\C}",     // XOR 
@@ -86,7 +86,7 @@ static char *fulcrum_formats[] =
   "%s\\C-w",                                         // COMPLETION
   "\\C0p %s \\C}" };                                 // PHRASE 
 
-static char *infix_formats[] =
+static const char *infix_formats[] =
 #ifdef DtinfoClient
 { "", "(%s | %s)", "(%s ^ %s)", "(%s & %s)",
   "(%s % %s%%s)", "(%s < %s%%s)",  // %%s is loc to insert proximity 
@@ -99,14 +99,14 @@ static char *infix_formats[] =
   "%s weight %%s", "%s scope %s", "not %s", "%s*", "\"%s\"" };
 #endif
 
-static char *infix_pformats[] =
+static const char *infix_pformats[] =
 { "", "(%s or %s%)", "(%s xor %s%)", "(%s and %s)",
   "(%s near %s%%s)", "(%s before %s%%s)",  // %%s is loc to insert proximity 
   " within %s",                        // proximity string to insert
   "%%s weight %s", "%s scope %s", "not %s", "%s*", "\"%s\"" };
 
 // Order of these correspond to query_type_t enum in QueryGroup.hh 
-static char **formats[] = { fulcrum_formats, infix_formats };
+static const char **formats[] = { fulcrum_formats, infix_formats };
 
 // The buffer is used to format the query.  As each term is processed
 // a NULL-terminated string is tacked on to the end of the buffer.
@@ -381,7 +381,7 @@ QueryGroup::gen_query_internal (query_type_t query_type)
 int
 QueryGroup::format (query_type_t query_type, QueryTerm *term)
 {
-  char *s = "\001s", *tmp;
+  char *s = (char*)"\001s", *tmp;
   // Need two buffers for alternating writes. 
   // Allocate a buffer with enough room for term plus operators.
   static char *buf[2];
@@ -489,7 +489,7 @@ QueryGroup::reduce (query_type_t query_type,
   char *proximity = proximity_stack.pop ();
 
   if (*proximity == '\0') {
-      proximity = "32";  // NOTE: Hard coded proximity. 12:39 02/09/93 DJB 
+      proximity = (char*)"32"; // NOTE: Hard coded proximity. 12:39 02/09/93 DJB
   }
 
   connective_t opt = (connective_t) operator_stack.pop();
index 7e02fc047890d4d17dafab8c2ecc899b8f668261..61bc68a14e94f466e301f84b9124ac43e4d4050a 100644 (file)
@@ -130,7 +130,7 @@ QueryGroupView::QueryGroupView (QueryGroup *group, Widget parent)
                         (XtEventHandler) &QueryGroupView::resize,
                         (Widget) f_restraint);
       // Store the min width in UserData...
-      f_restraint.UserData ((XtPointer) f_restraint.Width());
+      f_restraint.UserData ((XtPointer)(size_t) f_restraint.Width());
     }
   // Make sure the restraint widget isn't too narrow.
   else
@@ -192,7 +192,7 @@ QueryGroupView::resize (Widget, Widget w,
     return;
 
   WRestraint restraint (w);
-  Dimension min_width = (Dimension) (int) restraint.UserData();
+  Dimension min_width = (Dimension) (size_t) restraint.UserData();
 
   ON_DEBUG(printf ("Group Form Resized: (event %d)\n", event->type));
 
index eaaaf56ac81502e2889a5ecaff7a37491837eb3d..783662a7909a2610ebfc7ef633e11fad64682a53 100644 (file)
@@ -81,7 +81,7 @@
 #endif
 
 #include <wchar.h>
-#ifdef USL
+#if defined(USL) || defined(linux) || defined(CSRG_BASED)
 #include <wctype.h>
 #endif
 
index 8573ab06bf8640f1aceda55ddc3b6d360cb78669..60576b7bad1bce4eb08f13f649316d93bf78b3c7 100644 (file)
@@ -76,7 +76,7 @@ public:
   void proximity (char *s)
     { free (f_proximity); f_proximity = s; }
   char *scope()
-    { return (""); }
+    { return ((char*)""); }
   static unsigned int avail_caps() { return f_caps; }
   static void avail_caps(unsigned int caps) { f_caps = caps; }
 
index 6318714bd428ed3392ae623b8f8e93ea2e3a3c48..0f9e4be01c8af2a7a7b1bc189b54f1f20e33a829 100644 (file)
 #include <WWL/WXmPushButton.h>
 
 #include <stdlib.h>
-#ifdef SVR4
-#include <limits.h>
-#endif
-#ifdef SYSV
+#if defined(SVR4) || defined(SYSV) || defined(linux) || defined(CSRG_BASED)
 #include <limits.h>
 #endif
 
@@ -173,11 +170,11 @@ QueryTermView::create_ui()
   ASSN  (WXmForm,         f_form,           f_form,       "qterm_view"      );
   // What is this widget used for? - 6/28/94 kamiya
   ASSN  (WXmToggleButton, f_select_toggle,  f_form,       "select"          );
-  DECL  (WXmPulldownMenu, prefix_menu,      f_form,       "prefix_menu"     );
+  DECLC (WXmPulldownMenu, prefix_menu,      f_form,       "prefix_menu"     );
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, (Widget) prefix_menu); n++;
-  f_prefix = WXmOptionMenu    (f_form, "prefix", WAutoManage, args, n);
+  f_prefix = WXmOptionMenu    (f_form, (char*)"prefix", WAutoManage, args, n);
 
   DECLM (WXmPushButtonGadget, contains,     prefix_menu,  "contains"        );
   DECLM (WXmPushButtonGadget, not_contains, prefix_menu,  "not_contains"    );
@@ -199,11 +196,11 @@ QueryTermView::create_ui()
     mtfstring = CATGETS(Set_AgentLabel, 235, "Doesn\'t Start With");
     XtVaSetValues(not_starts, XmNlabelString, (XmString)mtfstring, NULL);
   }
-  DECL  (WXmPulldownMenu, connect_menu,     f_form,       "connect_menu"    );
+  DECLC (WXmPulldownMenu, connect_menu,     f_form,       "connect_menu"    );
 
   n = 0;
   XtSetArg(args[n], XmNsubMenuId, (Widget) connect_menu); n++;
-  f_connective = WXmOptionMenu (f_form, "connective", WAutoManage, args, n);
+  f_connective = WXmOptionMenu (f_form, (char*)"connective", WAutoManage, args, n);
 
   DECLM (WXmPushButtonGadget,   none,       connect_menu, " "               );
   DECLM (WXmPushButtonGadget,   orgad,      connect_menu, "or"              );
@@ -369,7 +366,7 @@ QueryTermView::register_actions()
 
   static XtActionsRec actions_list[] =
   {
-    { "TermSelect", QueryTermView::_select },
+    { (char*)"TermSelect", QueryTermView::_select },
   };
 
   XtAppAddActions (window_system().app_context(),
@@ -414,7 +411,7 @@ QueryTermView::invert_colors()
   for (i = 0; i < num; i++)
     SET_COLORS (children[i]);
 
-  if (f_weight_field != NULL)
+  if (f_weight_field != 0)
     {
       SET_COLORS (f_weight_field);
 #ifndef UseQSearch
@@ -432,7 +429,7 @@ QueryTermView::invert_colors()
 void
 QueryTermView::set_prefix (WCallback *wcb)
 {
-  f_query_term->prefix ((u_int) wcb->ClientData());
+  f_query_term->prefix ((size_t) wcb->ClientData());
 #ifdef UseQSearch
   if (f_weight_field)
        if ( (int)wcb->ClientData() == QueryTerm::PFX_CONTAIN) {
@@ -477,7 +474,7 @@ QueryTermView::set_connective (WCallback *wcb)
       new QueryTermView (term, f_parent, this, f_next);
     }
   // Set it in the term. 
-  f_query_term->connective ((u_int) wcb->ClientData());
+  f_query_term->connective ((size_t) wcb->ClientData());
   query_editor().query_changed();
 }
 
@@ -489,7 +486,7 @@ QueryTermView::set_connective (WCallback *wcb)
 void
 QueryTermView::pw_activate (WCallback *)
 {
-  if (f_pws_form == NULL)
+  if (f_pws_form == 0)
     create_fields();
 
   // change attachments of some widgets - 6/28/94 kamiya
@@ -591,7 +588,7 @@ QueryTermView::create_fields()
   // sensitivity is stored in the label object.  11:53 01/14/93 DJB 
   // this shouldn't cause a 64 bit conversion problem - rCs
 
-  int proximity_sensitive = (int) (Widget) f_proximity_label;
+  size_t proximity_sensitive = (size_t) (Widget) f_proximity_label;
   
   ASSN  (WXmForm,         f_pws_form,        f_form,       "pws_form"        );
   ASSNM (WXmLabelGadget,  f_proximity_label, f_pws_form,   "proximity_label" );
@@ -793,7 +790,7 @@ QueryTermView::prev_connective_changed()
     {
       case C_NEAR:
       case C_BEFORE:
-        if (f_pws_form != NULL)
+        if (f_pws_form != 0)
          {
            f_proximity_label.SetSensitive (True);
            f_proximity_field.SetSensitive (True);        }
@@ -802,7 +799,7 @@ QueryTermView::prev_connective_changed()
        break;
 
       default:
-       if (f_pws_form != NULL)
+       if (f_pws_form != 0)
          {
            f_proximity_label.SetSensitive (False);
            f_proximity_field.SetSensitive (False);
index 0a46ce1d373b85d831cee009e12060d498eb709c..786629dfb627048e8f040684648ae25e04b55cfd 100644 (file)
@@ -1,12 +1,15 @@
 XCOMM $XConsortium: Imakefile /main/5 1996/08/21 15:43:45 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 MAKEFILEDEPS=Classlist.mk
 
 LIBNAME=Support
 LIBDIR=../lib
 
+NormalCplusplusObjectRule()
+
 INCLUDES=-I.. $(EXCEPTIONS_INCLUDES) $(UAS_INCLUDES)
 
 #include "Classlist.mk"
@@ -18,6 +21,9 @@ make_libfiles($(LIBNAME), $(CLASSES))
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 NotSoSimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR), $(OTHEROBJS))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+NotSoSimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR), $(OTHEROBJS))
 #else
 NotSoSimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR), $(OTHEROBJS))
 #endif
index 7ced94d0762d26e946bc03670c502ea5f9205d96..6c90b8b201339411299630dac37ba8e3b2fb8063 100644 (file)
@@ -25,7 +25,8 @@
 # define C_InputNotifier
 
 # include <Prelude.h>
-# include <stream.h>
+# include <sstream>
+using namespace std;
 
 #define CLASS InputNotifier
 
index bde1e8c56b45d8b2eec8c892f8844efcfc95900f..f3c02b66cd70f840bf2e5ac31b56adf531b85779 100644 (file)
@@ -93,7 +93,7 @@ protected:
     { return (f_current); }
 #ifndef DEC
   int operator!=(int i)
-    { return (f_current != (Link_base *)i); }
+    { return (f_current != (Link_base *)(size_t)i); }
 #endif
 
   // For internal List_base usage. 
index ed493e794243b6cfa118322e192e46973ad19a5f..ddfac1547336e7c505327c17cadbe6d938d8ff3c 100644 (file)
@@ -52,7 +52,8 @@
 
 #include "Receiver.hh"
 
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 // /////////////////////////////////////////////////////////////////
 // class destructor - remove this sender from all receiver's lists
index 8f0f4f9f2625bbc53aca387f217dd86d99c15cbd..a9bb532078b04f04506bc8e8a94479e0ab28e2a5 100644 (file)
@@ -21,7 +21,8 @@
  * Floor, Boston, MA 02110-1301 USA
  */
 // $XConsortium: UtilityFunctions.cc /main/4 1996/06/11 16:35:41 cde-hal $
-#include <stream.h>
+#include <sstream>
+using namespace std;
 # include "UtilityFunctions.hh"
 
 UAS_List<UAS_Common>
index b32bb70c15fd151588633329fad0e991074f2154..5268383b1804fcb2c7a171e927ea5cc3f16b532d 100644 (file)
@@ -54,7 +54,8 @@
 #define EXPAND_TEMPLATES
 
 #include "Prelude.h"
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 struct Message
 {
index 83658e2abb1a810c2f77181f9f5807bfdc441a91..1acea26c352819e2da78a085de7174b030e968ae 100644 (file)
@@ -49,7 +49,7 @@ private:
 };
 
 template <class T>
-#if defined(__uxp__) || defined(_IBMR2) || defined(__osf__) || defined(USL) || defined(linux)
+#if defined(__uxp__) || defined(_IBMR2) || defined(__osf__) || defined(USL) || defined(linux) || defined(CSRG_BASED)
 class xList : public List_base
 #else
 class xList : private List_base
@@ -60,7 +60,7 @@ class xList : private List_base
 #ifdef SC3
 friend class List_Iterator<T>;
 #else
-#if !defined(_IBMR2) && !defined(__osf__) && !defined(USL) && !defined(linux)
+#if !defined(_IBMR2) && !defined(__osf__) && !defined(USL) && !defined(linux) && !defined(CSRG_BASED)
 template <class T> friend class List_Iterator;
 #endif
 #endif
@@ -96,7 +96,7 @@ public:
 
 
 template <class T>
-#if defined(_IBMR2) || defined(__osf__) || defined(linux)
+#if defined(_IBMR2) || defined(__osf__) || defined(linux) || defined(CSRG_BASED)
 class List_Iterator : public List_Iterator_base
 #else
 class List_Iterator : private List_Iterator_base
index 3319678df56746359b36b2e5652ca213ee626357..376645c2b99a6cee7d90ef5b758f7bbc8ab62c61 100644 (file)
@@ -84,7 +84,9 @@ class ColFormat;
 class RowDefn;
 class UpdateMenu;
 
+#ifndef EXPAND_TEMPLATES
 #define EXPAND_TEMPLATES
+#endif
 #ifndef TEMPL_DEBUG
 #ifdef DEBUG
 #undef DEBUG
index a5f3e1ce469a5ae6c3ad8734940d4237414d88d0..c87de53122a6f6865dae34849812b31e3d51f69f 100644 (file)
@@ -1,12 +1,15 @@
 XCOMM $XConsortium: Imakefile /main/7 1996/08/21 15:44:17 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 MAKEFILEDEPS=Classlist.mk
 
 LIBNAME=Base
 LIBDIR=../lib
 
+NormalCplusplusObjectRule()
+
 INCLUDES=-I. -I.. -I../.. -I../Support $(EXCEPTIONS_INCLUDES) $(COMMON_CLASS_INCLUDES)
 
 make_libfiles($(LIBNAME),)
@@ -19,8 +22,12 @@ OBJS=$(SRCS:.C=.o)
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 DependTarget()
index 363d3ad63cf7a07ce680a11aa13e291064f6666f..e2c21d870f01c0224fc43a18e355bc33d0ad70a0 100644 (file)
@@ -22,6 +22,8 @@
  */
 // $TOG: UAS_BookcaseEntry.C /main/5 1998/04/17 11:40:44 mgreess $
 #include "UAS_BookcaseEntry.hh"
+#include "UAS_Exceptions.hh"
+#include "UAS_Collection.hh"
 
 #include <string.h>
 
index 5d4a9ab2e45328408055ea89c7429e66b74b4109..a9f7644d3db997108e1976e46c58dbc1e1dc9681 100644 (file)
@@ -21,9 +21,9 @@
  * Floor, Boston, MA 02110-1301 USA
  */
 // $XConsortium: UAS_Buffer.cc /main/3 1996/06/11 16:36:44 cde-hal $
-#include "UAS_Buffer.hh"
 #include <string.h>
 #include <stdio.h>
+#include "UAS_Buffer.hh"
 
 // If necessary in the future, we can rework UAS_Buffer class to provide
 // global buffer by default and private buffers on request.  SWM
@@ -112,7 +112,7 @@ static int g_int;
 static char *const g_intbuf = (char *) &g_int;
 
 void
-UAS_Buffer::write (const int integer)
+UAS_Buffer::write (const ssize_t integer)
 {
   char *inbuf = (char *) &integer;
 
@@ -146,7 +146,7 @@ UAS_Buffer::read (int *integer)
 void
 UAS_Buffer::write (const char *string)
 {
-  int length = strlen (string);
+  ssize_t length = strlen (string);
   write (length);
   write (string, sizeof (char), length + 1);
 }
index f100f7e05e3fb4d7584835408a72c663b7a48ebd..e1fb41f3c6d30e21f977355eb6d647cd82526978 100644 (file)
@@ -30,9 +30,9 @@ public:
   void reset()
     { f_point = f_start; }
 
-  void write (const int integer);
+  void write (const ssize_t integer);
   void write (const unsigned int integer)
-    { write ((int) ((void *) integer)); }
+    { write ((ssize_t) ((void *)(ssize_t) integer)); }
   void write (const char *string);
   void write (const char *bytes, unsigned int size, unsigned int length);
 
index 93ac535c4cdd8b9562d8d043c440e4485bfd3567..ce84fe3a1b5db8c2ad027ad52df66c47a1fc3fa4 100644 (file)
  * Floor, Boston, MA 02110-1301 USA
  */
 // $TOG: UAS_Common.C /main/10 1998/04/17 11:41:00 mgreess $
-# include <stream.h>
+# include <sstream>
+using namespace std;
 # include "UAS_Common.hh"
 # include "UAS_Factory.hh"
 # include "UAS_Exceptions.hh"
 # include "UAS_SearchEngine.hh"
 # include "UAS_Collection.hh"
 # include "UAS_StyleSheet.hh"
+# include "UAS_EmbeddedObject.hh"
 
 # define CLASS UAS_Common
 
index 7a4c70a7b06a4055f9c8d52797fb327a92b8bd04..d597d9422afd74cb93c13a226fb878d570e1279e 100644 (file)
@@ -5,11 +5,7 @@
 #include "Exceptions.hh"
 #include "UAS_String.hh"
 
-#if defined(linux)
-#define CASTUASEXCEPT (UAS_Exception*)
-#else
 #define CASTUASEXCEPT
-#endif
 
 class UAS_Exception: public Exception {
     protected:
index 88d054a3454f511c31c53ced0f88cd4cc01f3bc7..65376c31f12ebd8be26f57aff091b4a219a81da6 100644 (file)
  * Floor, Boston, MA 02110-1301 USA
  */
 // $XConsortium: UAS_Factory.C /main/9 1996/10/04 12:33:17 cde-hal $
-# include <stream.h>
+# include <sstream>
+using namespace std;
 # include <string.h>
 # include "UAS_Pointer.hh"
 # include "UAS_String.hh"
 # include "UAS_Factory.hh"
 # include "UAS_Common.hh"
 # include "UAS_Exceptions.hh"
+# include "UAS_Collection.hh"
+# include "UAS_EmbeddedObject.hh"
 
 #include "Managers/CatMgr.hh"
 #include "Registration.hh"
index e34d6bb7fd373314b43a1f4a66001f9d53a808d2..94f95e5bd802bbb39ca7eb0b086dcfb14f0ba8f8 100644 (file)
 /*     Copyright (c) 1995 FUJITSU LIMITED      */
 /*     All Rights Reserved                     */
 
-#if defined(__uxp__) || defined(USL)
+#if defined(__uxp__) || defined(USL) || defined(linux)
 #include <string.h>
 #else
 #include <strings.h>
 #endif
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 #include <assert.h>
 
 #include "Exceptions.hh"
@@ -119,11 +120,11 @@ UAS_OQLParser::parse(const char *oql)
     // initialize input parameters 
     f_input_ptr = oql;
 
-    try {
+    mtry {
        GetSymbol();
        ERecognize();
     }
-    catch_any()
+    mcatch_any()
     {
 #ifdef DEBUG
        fprintf(stderr, "(WARNING) OQLParser could not parse expression\n");
@@ -609,109 +610,109 @@ UAS_OQLParser::determine_caps()
     unsigned int caps = 0;
 
     caps |= 0x01 << OQL_AND;
-    try {
+    mtry {
        se_construct(AND, word, word, "");
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_AND);
     }
     end_try;
 
     caps |= 0x01 << OQL_OR;
-    try {
+    mtry {
        se_construct(OR, word, word, "");
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_OR);
     }
     end_try;
 
     caps |= 0x01 << OQL_XOR;
-    try {
+    mtry {
        se_construct(XOR, word, word, "");
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_XOR);
     }
     end_try;
 
     caps |= 0x01 << OQL_NOT;
-    try {
+    mtry {
        se_construct(NOT, word, "", "");
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_NOT);
     }
     end_try;
 
     caps |= 0x01 << OQL_WEIGHT;
-    try {
+    mtry {
        se_construct(WEIGHT, word, digits, "");
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_WEIGHT);
     }
     end_try;
 
     caps |= 0x01 << OQL_COMPLETION;
-    try {
+    mtry {
        se_construct(COMPLETION, word, "", "");
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_COMPLETION);
     }
     end_try;
 
     caps |= 0x01 << OQL_PHRASE;
-    try {
+    mtry {
        se_construct(PHRASE, word, word, "");
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_PHRASE);
     }
     end_try;
 
     caps |= 0x01 << OQL_QUOTED_PHRASE;
-    try {
+    mtry {
        se_construct(QUOTED_PHRASE, quoted_phrase, "", "");
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_QUOTED_PHRASE);
     }
     end_try;
 
     caps |= 0x01 << OQL_NEAR;
-    try {
+    mtry {
        se_construct(NEAR, word, word, "");
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_NEAR);
     }
     end_try;
 
     caps |= 0x01 << OQL_BEFORE;
-    try {
+    mtry {
        se_construct(BEFORE, word, word, "");
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_BEFORE);
     }
     end_try;
 
     caps |= 0x01 << OQL_NEAR_WITHIN;
-    try {
+    mtry {
        se_construct(NEAR_WITHIN, word, word, digits);
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_NEAR_WITHIN);
     }
     end_try;
 
     caps |= 0x01 << OQL_BEFORE_WITHIN;
-    try {
+    mtry {
        se_construct(BEFORE_WITHIN, word, word, digits);
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        caps &= ~(0x01 << OQL_BEFORE_WITHIN);
     }
     end_try;
index cfece57947f4d0f8137ea7eae58e3e5191b776e9..97d78bbe99e7e5e36dcdfe7718308f1ae8437640 100644 (file)
@@ -22,6 +22,8 @@
  */
 // $XConsortium: UAS_Path.cc /main/3 1996/06/11 16:38:39 cde-hal $
 # include "UAS_Path.hh"
+# include "UAS_Collection.hh"
+# include "UAS_Exceptions.hh"
 
 UAS_Pointer<UAS_Common>
 UAS_Path::first () {
index 7bd8a94eee9e582921db630f3c4b254bf4020ad3..5762392fcbff1a250bace26ee7563fa43a794364 100644 (file)
@@ -77,7 +77,7 @@ T *
 UAS_PtrList<T>::item (int i) const {
     if (i < 0 || i >= fNumItems)
        throw (UAS_Exception (
-               (char*)UAS_String(CATGETS(Set_UAS_Base, 4, "File a Bug"))));
+           (char*)UAS_String(CATGETS(Set_UAS_Base, 4, "File a Bug"))));
     return fItems[i];
 }
 
index 506f926ea3cd1c0cb5618194d7f6d12aa85f1d1d..3fb4a3120e575363e53e39dde6fd31f295ee422a 100644 (file)
@@ -2,6 +2,9 @@
 #ifndef _UAS_PtrList_hh_
 #define _UAS_PtrList_hh_
 
+class UAS_Exception;
+class UAS_String;
+
 template <class T> class UAS_PtrList {
     public:
        UAS_PtrList ();
index 5dd7d5b1dfce0b377bea55e96ab579c4a170c15c..670113120cb1068ebf43705ed0b12a65078e5587 100644 (file)
@@ -23,7 +23,7 @@
 // $XConsortium: UAS_SearchEngine.cc /main/4 1996/06/11 16:39:22 cde-hal $
 # include "UAS_Exceptions.hh"
 #include "UAS_SearchEngine.hh"
-
+#include "UAS_Collection.hh"
 #include "UAS_OQLParser.hh"
 
 #define CLASS UAS_SearchEngine
index 5b5c0c99e1d3169164158d3eabb856601ed500e1..e3eb1b7264dc2a65d49c7d4caa42a6a96da02090 100644 (file)
@@ -22,3 +22,5 @@
  */
 // $XConsortium: UAS_SearchResults.cc /main/3 1996/06/11 16:39:32 cde-hal $
 #include "UAS_SearchResults.hh"
+#include "UAS_Exceptions.hh"
+#include "UAS_Collection.hh"
index 8c83b6b5cfe06941ebbad526f870b62c44f90db1..64e336e8c2755180dcd9fd09a13e4b54f1b1c238 100644 (file)
@@ -22,6 +22,8 @@
  */
 // $XConsortium: UAS_SearchResultsEntry.cc /main/3 1996/06/11 16:39:43 cde-hal $
 # include "UAS_SearchResultsEntry.hh"
+# include "UAS_Exceptions.hh"
+# include "UAS_Collection.hh"
 
 UAS_SearchResultsEntry::UAS_SearchResultsEntry (const char *id,
                                                 const char *book,
index 2d7385510676cb663613cf87ebd381967463aea7..8a04dd5e5adc0d75bec5caa546b185bfb018528e 100644 (file)
 // $XConsortium: UAS_SearchScope.C /main/6 1996/09/14 13:10:00 cde-hal $
 #include "UAS_Exceptions.hh"
 #include "UAS_SearchScope.hh"
+#include "UAS_Collection.hh"
 
 #include <string.h>
-#include <stream.h>
+#include <iostream>
+#include <sstream>
+using namespace std;
 
 #define CLASS UAS_SearchScope
 STATIC_SENDER_CC (ScopeCreated);
index 29945634ae725d8bd05c4912d05bc8a69582ffa2..6206d342791dc15c001ed07b88dafa1dc747107a 100644 (file)
@@ -15,7 +15,7 @@
 #define FALSE 0
 #endif
 
-typedef unsigned char bool;
+//typedef unsigned char bool;
 
 class UAS_SearchScope;
 
index abac18fc5a3b9b63194cf826a6e56735e1251bd3..504dc1fc47589211655fd50475183473acf02bfc 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "UAS_String.hh"
 
-typedef unsigned char bool;
+//typedef unsigned char mbool;
 
 class UAS_SearchZones
 {
index c42f682c39585059f933eddc50e3a94e69705d08..0375d14b15acf1b25c97f0049d6b605dded7770d 100644 (file)
@@ -196,7 +196,8 @@ UAS_String::splitFields (const char separator) const {
     UAS_List<UAS_String> rval;
     UAS_Pointer<UAS_String> cur;
     int start = 0;
-    for (int i = 0; i < fStringRep->fDataSize; i ++) {
+    int i;
+    for (i = 0; i < fStringRep->fDataSize; i ++) {
        if (fStringRep->fData[i] == separator) {
            cur = new UAS_String(&(fStringRep->fData[start]),
                                i - start, UAS_OWNER);
index 65e0dafaa303d115a8ba6993e653c0f0e661ad23..154feb0b33106a0b8a02d7f8f3c99e5dcd5b9ab7 100644 (file)
@@ -22,6 +22,9 @@
  */
 // $XConsortium: UAS_TextRun.cc /main/3 1996/06/11 16:40:55 cde-hal $
 #include "UAS_TextRun.hh"
+#include "UAS_Exceptions.hh"
+#include "UAS_SearchEngine.hh"
+#include "UAS_Collection.hh"
 
 UAS_TextRun::UAS_TextRun (unsigned int off, unsigned int len)
 :f_offset(off), f_length(len)
index 07c47034d56d053696cdf03859efe8b438e30bc6..5ba3a691fdfd6f19f56b8a3d6b447e4cf7aa4f60 100644 (file)
@@ -27,7 +27,8 @@
 #include <assert.h>
 #include <string.h>
 
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 #include "config.h"
 #include "Basic/Error.hh"
index 47e9dbd26e1324f6c17df3e689da1cce821adab2..ccf467379e7210b941f6e745f7607c360563ad85 100644 (file)
@@ -27,7 +27,8 @@
 #include <assert.h>
 #include <string.h>
 
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 #include "UAS_String.hh"
 
index c05f0d367ef206a8616c31577ec0b91405aa0f94..66314dedd5afd8c55a4a96617aeab73143e1ae40 100644 (file)
@@ -13,7 +13,7 @@
 class DtSR_Parser : public UAS_OQLParser
 {
 public:
-  DtSR_Parser::DtSR_Parser();
+  DtSR_Parser();
 
   int stemming_suggested() { return f_completion_specified; }
 
index 7c19626b05eafe6be094705831da98afb51fdf65..fef2f6ff27a1fc0e6c251b547bd254765ccfc874 100644 (file)
@@ -29,7 +29,9 @@
 #include <string.h>
 #include <sys/stat.h>
 
-#include <fstream.h>
+#include <iostream>
+#include <fstream>
+using namespace std;
 
 #include "Registration.hh"
 #include "Managers/CatMgr.hh"
@@ -189,7 +191,7 @@ UpdateConfigFile(UAS_PtrList<const char> *bcases, UAS_String ocf_path)
        return 0;
 
     ofstream dtiocf((char*)ocf_path,
-                       ios::out | ios::trunc | ios::nocreate);
+                       ios::out | ios::trunc);
     if (! dtiocf) { // could not open ocf_path in specified mode
 #ifdef DEBUG
        fprintf(stderr, "(ERROR) could not open %s\n", (char*)ocf_path);
@@ -268,13 +270,13 @@ DtSR_SearchEngine::~DtSR_SearchEngine()
 DtSR_SearchEngine::DtSR_SearchEngine()
     : f_dbnames(NULL), f_dbcount(0), f_valid_bc_map(0)
 {
-    char* ocf_path = tempnam(NULL, ".DtSR_");
+    char* ocf_path = mktemp((char*)".DtSR_XXXXXX");
     f_config_path = ocf_path;
 
     if (ocf_path)
        free(ocf_path);
 
-    ofstream dtiocf((char*)f_config_path, ios::out | ios::noreplace);
+    ofstream dtiocf((char*)f_config_path, ios::out);  // TODO
     if (! dtiocf) // could not open ocf_path in specified mode
        throw(CASTEXCEPT Exception());
 
@@ -302,7 +304,7 @@ DtSR_SearchEngine::init(UAS_PtrList<const char> *bcases)
 #ifdef DEBUG
        fprintf(stderr, "(DEBUG) DtSearch is being initialized.\n");
 #endif
-       status = DtSearchInit("DtSearch", NULL, 0, (char*)f_config_path,
+       status = DtSearchInit((char*)"DtSearch", NULL, 0, f_config_path,
                                        NULL, &f_dbnames, &f_dbcount);
     }
     else {
@@ -548,10 +550,10 @@ DtSR_SearchEngine::search(UAS_String oql, UAS_SearchScope& scope,
     }
 
     UAS_String aus_query;
-    try {
+    mtry {
        aus_query = f_oql_parser->parse((char*)oql);
     }
-    catch_any() { // OQL parse failed
+    mcatch_any() { // OQL parse failed
        rethrow;
     }
     end_try;
@@ -641,7 +643,8 @@ DtSR_SearchEngine::search(UAS_String oql, UAS_SearchScope& scope,
            Dict<UAS_String, int> bookid_dict(NULL, False);
            UAS_ObjList<int> &books = targets[n]->book_list();
            // register bookids in Dict<UAS_String, int>
-           for (int i = 0; i < books.numItems(); i++) {
+           int i;
+           for (i = 0; i < books.numItems(); i++) {
                UAS_Pointer<UAS_Common> bcase(bookcases[index]->bcase());
                UAS_String bookid = resolve_bookid(bcase, books[i]);
                if ((char*)bookid == (int)NULL || *(char*)bookid == '\0')
index 4dc862327649f8150d4ac3c9ec1bec97d47223c4..94b3fb8cb09599ae3dda38661d1ef8e3c2eea7cd 100644 (file)
@@ -140,7 +140,8 @@ DtSR_SearchResults::merge(UAS_Pointer<DtSR_SearchResults> & res)
        if (! (position < ndocs))
            break;
 
-       for (int j = position; j < ndocs; j++) {
+       int j;
+       for (j = position; j < ndocs; j++) {
            if (f_results[j]->relevance() > res->f_results[i]->relevance())
                continue;
 
index cf56d6824296958b78991067b1f5178cf23d46be..ea6c837c32aa7867bbc3c8bd3efadc2b64dfd050 100644 (file)
@@ -3,6 +3,7 @@
 #define _DTSR_SEARCHRESULTS_HH_
 
 #include "UAS_SearchResults.hh"
+#include "UAS_Collection.hh"
 #include "DtSR_SearchResultsEntry.hh"
 #include "DtSR_Stems.hh"
 
index 245ca2bbed5482108aad6a29c14bb662decb157d..51e259406bc6856d02b4242c36dd588cd74e6909 100644 (file)
@@ -28,7 +28,7 @@
 #include <limits.h>
 #include <string.h>
 
-#include <strstream.h>
+#include <sstream>
 
 #include <StyleSheet/DocParser.h>
 #include <StyleSheet/Resolver.h>
@@ -272,11 +272,12 @@ DtSR_SearchResultsEntry::create_matches()
     }
 #endif
 
-    try
+    mtry
        {
            style_sheet_mgr().initOnlineStyleSheet(doc);
        }
-    catch_noarg (StyleSheetSyntaxError)
+//  catch_noarg (StyleSheetSyntaxError)
+    mcatch_any()
        {
 #ifdef JOE_HATES_THIS
            message_mgr().error_dialog(
@@ -287,10 +288,10 @@ DtSR_SearchResultsEntry::create_matches()
        }
     end_try;
 
-    istrstream input((char *)doc->data());
-    ostrstream output;
+    istringstream input((char *)doc->data());
+    ostringstream output;
     
-    try
+    mtry
        {
            Tml_TextRenderer    renderer(output, f_search_res->search_zones());
            Resolver resolver(*gPathTab, renderer);
@@ -298,15 +299,15 @@ DtSR_SearchResultsEntry::create_matches()
 
            docparser.parse(input);
        }
-    catch_any()
+    mcatch_any()
        {
            ON_DEBUG(cerr << "DtSR_SearchResultsEntry::create_matches...exception thrown" << '\n' << flush);
            rethrow;
        }
     end_try;
 
-    char* text = output.str();
-    *(text + output.pcount()) = '\0';
+    char* text = (char*)output.str().c_str();
+    *(text + output.str().size()) = '\0';
 
 #ifdef DUMP_NODES
     {
@@ -345,12 +346,12 @@ DtSR_SearchResultsEntry::create_matches()
     if (f_language == DtSrLaJPN) { // do not trust DtSearchHighlight!
        int count        = f_search_res->stems(f_dbn)->count();
 
-       ostrstream stemsbuf;
+       ostringstream stemsbuf;
        for (int i = 0; i < count; i++) {
            stemsbuf << (f_search_res->stems(f_dbn)->stems())[i] << '\n';
        }
-       char* stems = stemsbuf.str();
-       *(stems + stemsbuf.pcount()) = '\0';
+       char* stems = (char*)stemsbuf.str().c_str();
+       *(stems + stemsbuf.str().size()) = '\0';
 
        parseout = StringParser::hilite(text, count, stems);
 
@@ -374,7 +375,7 @@ DtSR_SearchResultsEntry::create_matches()
        }
 
 #ifdef DEBUG
-       fprintf(stderr, "(DEBUG) %d hit found in %s\n", n_kwics, (char*)f_id);
+       fprintf(stderr, "(DEBUG) %ld hit found in %s\n", n_kwics, (char*)f_id);
 #endif
     }
 
@@ -383,11 +384,11 @@ DtSR_SearchResultsEntry::create_matches()
 
     // convert kwics to textrun
     if (parseout == NULL && kwics) {
-       ostrstream textrunbuf;
+       ostringstream textrunbuf;
        for (int i = 0; i < n_kwics; i++)
            textrunbuf << kwics[i].offset << '\t' << kwics[i].length << '\n';
-       parseout = textrunbuf.str();
-       *(parseout + textrunbuf.pcount()) = '\0';
+       parseout = (char*)textrunbuf.str().c_str();
+       *(parseout + textrunbuf.str().size()) = '\0';
     }
     else if (parseout == NULL)
     {
@@ -400,7 +401,7 @@ DtSR_SearchResultsEntry::create_matches()
     fprintf(stderr, "(DEBUG) byte offset and length\n%s", parseout);
 #endif
 
-    istrstream textruns(parseout);
+    istringstream textruns(parseout);
 
     char linebuf[128];
     while (textruns.get(linebuf, 128, '\n')) {
index cd7d34e139d4a2ac0c22815f1c25083f88ec4557..09c2939dd497db5ee92aa3870106ca89a88b4823 100644 (file)
@@ -1,6 +1,7 @@
 XCOMM $XConsortium: Imakefile /main/8 1996/08/21 15:44:56 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 MAKEFILEDEPS=Classlist.mk
 
@@ -12,6 +13,8 @@ UTIL_CLASSES_INCLUDES=-I./Util_Classes
 
 DEFINES=-DCDE_NEXT
 
+NormalCplusplusObjectRule()
+
 INCLUDES=-I../.. $(EXCEPTIONS_INCLUDES) $(UAS_INCLUDES) $(DTSEARCH_INCLUDES) $(UTIL_CLASSES_INCLUDES) $(COMMON_CLASS_INCLUDES)
 
 #include "Classlist.mk"
@@ -22,8 +25,12 @@ make_msgs($(LIBNAME), $(MSGS))
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 DependTarget()
index 021b954b8fff709dfdf6238f89fb59ff0118bef3..72c9d9bcd3926513c276fc47f071d83962af53a2 100644 (file)
@@ -29,7 +29,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <strstream.h>
+#include <sstream>
+using namespace std;
 
 #include "TextParser.hh"
 
@@ -57,7 +58,7 @@ StringParser::brute_force(const char* text_in, int n_of_pats,
 
     int npat;
     for (npat = 0; *patterns && n_of_pats > 0; npat++, n_of_pats--) {
-       char* del = strchr(patterns, '\n');
+       char* del = (char *)strchr(patterns, '\n');
        if (del != NULL) { // more pattern specified
            pat_tbl[npat] = new char[del - patterns + 1];
            strncpy(pat_tbl[npat], patterns, del - patterns);
@@ -160,18 +161,18 @@ StringParser::brute_force(const char* text_in, int n_of_pats,
                    *p = *p - 0x20;
            }
        }
-       ostrstream capitalized;
+       ostringstream capitalized;
        for (p = (unsigned char*)text_in; *p; p++) {
            if (*p < 0x7B && *p > 0x60) // a ... z
                capitalized << (char)(*p - 0x20); // capitalize
            else
                capitalized << *p;
        }
-       text_in = caped_text = capitalized.str();
-       *(char*)(text_in + capitalized.pcount()) = '\0';
+       text_in = caped_text = (char *)capitalized.str().c_str();
+       *(char*)(text_in + capitalized.str().size()) = '\0';
     }
 
-    ostrstream text_run;
+    ostringstream text_run;
 
     for (int index = 0; index < text_len;) {
        unsigned int candidate = (1 << npat) - 1;
@@ -235,7 +236,7 @@ StringParser::brute_force(const char* text_in, int n_of_pats,
     if (caped_text)
        delete[] caped_text;
 
-    char* ret_text = text_run.str();
+    char* ret_text = (char *)text_run.str().c_str();
 
     if (ret_text == NULL)
        return NULL;
@@ -254,7 +255,7 @@ StringParser::project_textrun(const char* org_textrun)
     if (org_textrun == NULL || *org_textrun == '\0')
        return NULL;
 
-    istrstream textrun(org_textrun);
+    istringstream textrun(org_textrun);
 
     char line[128];
     textrun.get(line, 128, '\n');
@@ -279,7 +280,7 @@ StringParser::project_textrun(const char* org_textrun)
        return NULL;
     }
 
-    ostrstream ret_text;
+    ostringstream ret_text;
 
     while (textrun.get(line, 128, '\n')) {
        if (textrun.get() != '\n') {
@@ -321,7 +322,7 @@ StringParser::project_textrun(const char* org_textrun)
 
     ret_text << off << '\t' << len << '\n' << '\0';
 
-    return ret_text.str();
+    return (char *)ret_text.str().c_str();
 }
 
 char *
index a2fba4154ca0034cb73eff10c7dfedc1a72919b4..e4e6e048f46f79c0ae502756bea97e5ffeb148a6 100644 (file)
@@ -28,7 +28,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <strstream.h>
+#include <sstream>
+using namespace std;
 
 main(int argc, char** argv)
 {
@@ -49,13 +50,13 @@ main(int argc, char** argv)
        return 1;
     }
 
-    ostrstream text;
+    ostringstream text;
 
     char ch;
     while (cin.get(ch)) text << ch;
 
-    char* buf = text.str();
-    *(buf + text.pcount()) = '\0';
+    char* buf = (char *)text.str().c_str();
+    *(buf + text.str().size()) = '\0';
     char* p = buf;
 
     if (buf == NULL || *buf == '\0') {
index ce7f060286ea33aad835802702f839de00c94559..83194e52b37295d00fb868cd414e8784dcc95aec 100644 (file)
@@ -29,8 +29,9 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <iostream.h>
-#include <strstream.h>
+#include <iostream>
+#include <sstream>
+using namespace std;
 
 #include "TextParser.hh"
 
@@ -57,13 +58,13 @@ main(int argc, char** argv)
        sprintf(patterns, "%s%s\n", patterns, argv[i]);
     }
 
-    ostrstream text;
+    ostringstream text;
 
     char ch;
     while (cin.get(ch)) text << ch;
 
-    char* buf = text.str();
-    *(buf + text.pcount()) = '\0';
+    char* buf = (char *)text.str().c_str();
+    *(buf + text.str().size()) = '\0';
 
     char* match = StringParser::brute_force(buf, npat, patterns);
 
index 8f31ec4c6dc744e4d587550a932fa9ae9365f38a..3e559b7b42b5fc12824525942c3dd78563946309 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "StyleSheet/FeatureValue.h"
 
-Tml_TextRenderer::Tml_TextRenderer(ostrstream &ostr, UAS_SearchZones &zones) :
+Tml_TextRenderer::Tml_TextRenderer(ostringstream &ostr, UAS_SearchZones &zones) :
        f_ostr(ostr), f_zones(zones)
 {
 }
index 0803e8bfb656ed0d016a46ed2bcff08acf3c46e6..b0b9b72a644c5ded586b94db5a8dda4865a04261 100644 (file)
@@ -9,7 +9,8 @@
 #include <StyleSheet/Element.h>
 #include <StyleSheet/Renderer.h>
 
-#include <strstream.h>
+#include <sstream>
+using namespace std;
 
 #include "dti_cc/CC_Stack.h"
 
@@ -29,7 +30,7 @@ class Tml_TextRenderer : public Renderer
 {
   public:
 
-    Tml_TextRenderer(ostrstream &, UAS_SearchZones &);
+    Tml_TextRenderer(ostringstream &, UAS_SearchZones &);
     ~Tml_TextRenderer();
 
     FeatureSet * initialize();
@@ -50,7 +51,7 @@ class Tml_TextRenderer : public Renderer
 
     int effective_zone(UAS_SearchZones::uas_zones);
 
-    ostrstream         &f_ostr;
+    ostringstream      &f_ostr;
     UAS_SearchZones    &f_zones;
 
     int f_current_level;
index d9748dbb917057c715b7376bf257a415ab6030ec..700747c5d0cac9b60442af9a5ddd6656c08c3a10 100644 (file)
@@ -1,6 +1,8 @@
 XCOMM $XConsortium: Imakefile /main/3 1996/06/11 16:42:48 cde-hal $
 Libs = ../../libUAS.a $(EXCLIB) $(MMDB_LIBS) $(MISC_LIB) -lm
 
+NormalCplusplusObjectRule()
+
 INCLUDES=-g -I../.. $(EXCEPTIONS_INCLUDES)
 
 SimpleCPlusPlusProgram(dict_driver, dict_driver.o Dict_Templates.o, $(Libs))
index 4c25509a5d03f98622e0928262b6607c0afdc6f9..12001f6947ac1cb4b96a40a68dbe21e7a0dc4998 100644 (file)
@@ -23,7 +23,8 @@
 // $XConsortium: dict_driver.cc /main/3 1996/06/11 16:42:53 cde-hal $
 #include <string.h>
 
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 
 #include "Exceptions.hh"
 #include "UAS_Exceptions.hh"
index 958009533db9fe3016be4702fbb60525ba741a54..37b3e4fd0e4cd5edad9efd78c140d062585fc303 100644 (file)
@@ -6,6 +6,13 @@ LIBNAME=UAS
 #define IHaveSubdirs
 #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CXXDEBUGFLAGS=$(CXXDEBUGFLAGS)'
 
+XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
+#undef  TopLevelProject
+#define TopLevelProject                DtInfo
+IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
+               -DProjectTmplFile='<DtInfo.tmpl>' \
+               -DProjectRulesFile='<DtInfo.rules>'
+
 DependSubdirs($(SUBDIRS))
 
 #ifdef UseDtSearch
@@ -19,6 +26,10 @@ Base \
 MMDB \
 $(SEARCH_SUBDIR)
 
+XCOMM Variables to switch on debug mode temporarily
+XCOMM CDEBUGFLAGS = -g -DDEBUG
+XCOMM CXXDEBUGFLAGS = -g -DDEBUG
+
 make_libfiles($(LIBNAME),)
 
 makelibT(Base)
index 6a8abba8ed57d020124009851fa264944c785659..3666e23e3eba59134bee4a6d9e9544467d4fdac0 100644 (file)
@@ -1,12 +1,15 @@
 XCOMM $XConsortium: Imakefile /main/9 1996/08/21 15:45:19 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
 
 MAKEFILEDEPS=Classlist.mk
 
 LIBNAME=MMDB
 LIBDIR=../lib
 
+NormalCplusplusObjectRule()
+
 #ifdef UseDtSearch
 SEARCHENG_INCLUDES=$(DTSEARCH_INCLUDES)
 #else
@@ -26,8 +29,12 @@ OBJS=$(SRCS:.C=.o)
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 SimpleLibraryT($(LIBNAME), $(OBJS), $(LIBDIR))
+#elif defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+      defined(LinuxArchitecture)
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #else
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
 #endif
 
 DependTarget()
index 60ba83424b6b7091bfead326cf4e417f9292a5fb..58fffcbe1c9085dd0a0351531bdd613d2a56f720 100644 (file)
  * Floor, Boston, MA 02110-1301 USA
  */
 // $TOG: MMDB.C /main/8 1998/04/17 11:42:22 mgreess $
-#include <stream.h>
+#include <sstream>
+using namespace std;
 #include "MMDB.hh"
 #include "UAS_Exceptions.hh"
 #include "UAS_Buffer.hh"
 #include "UAS_Common.hh"
 #include "UAS_Msgs.hh"
 #include "MMDB_Factory.hh"
+#include "UAS_Collection.hh"
 
 #include "Managers/CatMgr.hh"
 #include "Registration.hh"
index 87aac6719f18fef7c1716a8d6a5924fe80b3923a..bdc7adfd70426b41938b5dec89e6e819816f4c9e 100644 (file)
@@ -3,6 +3,8 @@
 # define _MMDB_BookCase_hh_
 
 # include "UAS_Common.hh"
+# include "UAS_Collection.hh"
+# include "UAS_Exceptions.hh"
 # include "MMDB_Common.hh"
 
 class MMDB_BookCase: public UAS_Common, public MMDB_Common {
index d200ce66d8435ecc0bac422a119331391b3a6572..1899dc8fadfcf8959e820c03fef07a164b22d1e1 100644 (file)
@@ -3,6 +3,8 @@
 # define _MMDB_EmbeddedObject_hh_
 
 # include "UAS_EmbeddedObject.hh"
+# include "UAS_Collection.hh"
+# include "UAS_Exceptions.hh"
 # include "MMDB_Common.hh"
 
 class MMDB_EmbeddedObject: public UAS_EmbeddedObject, public MMDB_Common {
index 0fccf738324f8e285c4af84f6b360ded0ad5380d..f4146c127bdcc684eda89f188f5f6b370b130ddd 100644 (file)
  * You should have received a copy of the GNU Lesser General Public
  * License along with these librararies and programs; if not, write
  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
+
  */
 // $TOG: MMDB_Factory.C /main/15 1998/04/17 11:42:43 mgreess $
-# include <stream.h>
+# include <sstream>
+using namespace std;
 # include "UAS_Exceptions.hh"
 # include "MMDB_Factory.hh"
 # include "UAS_Exceptions.hh"
@@ -76,10 +77,10 @@ MMDB_Factory::createMMDB (const UAS_String &infoLibPath) {
            UAS_Common::send_message (badPath);
            return rval;
        }
-       try {
+       mtry {
            rval = new MMDB (infoLibPath);
            fMMDBList.append (rval);
-       } catch_any() {
+       } mcatch_any() {
 #if 0
            char buf[BUFSIZ];
            (void) sprintf (buf, CATGETS(Set_UAS_MMDB, 3,
index 0c7207cd5279264446985fcbffc37b0ccd8c7661..9acfec81a2fbfe0b9c265c395ed652b8f869d914 100644 (file)
@@ -117,7 +117,8 @@ MMDB_Library::name () {
     if (f_name == "")
     {
       UAS_List<UAS_Common> kids = children();
-      for (int i = 0; i < kids.length(); i++)
+      int i;
+      for (i = 0; i < kids.length(); i++)
       {
         if (kids[i]->type() == UAS_BOOKCASE)
           break;
index 800a905d5d7356be8f30dfeb3c2007a05cc2fd08..35657f2b0c7b433b197f81febf913372332ac0c7 100644 (file)
@@ -30,6 +30,8 @@
 #endif
 # include "MMDB_StyleSheet.hh"
 # include "MMDB_Factory.hh"
+# include "UAS_Collection.hh"
+# include "UAS_SearchEngine.hh"
 
 char* g_mmdb_section_label;
 
index 05b7d2cd46bc89ad1534354205e78409caa16a8b..df8ea618696c0437b19e71f192005c6b0d2d0b27 100644 (file)
@@ -21,7 +21,8 @@
  * Floor, Boston, MA 02110-1301 USA
  */
 // $XConsortium: MMDB_StyleSheet.C /main/4 1996/09/04 01:36:27 cde-hal $
-# include <stream.h>
+# include <sstream>
+using namespace std;
 # include "MMDB_StyleSheet.hh"
 
 MMDB_StyleSheet::MMDB_StyleSheet (MMDB &theMMDB,
index a17d0d0cc669b0dcac9a5b6f7f8f9c04f1ed4721..86949f5878dacf99b598244488da0d7ea71672b1 100644 (file)
@@ -3,6 +3,8 @@
 #define _MMDB_StyleSheet_hh_
 
 # include "UAS_StyleSheet.hh"
+# include "UAS_Collection.hh"
+# include "UAS_Exceptions.hh"
 # include "MMDB_Common.hh"
 
 class MMDB_StyleSheet: public UAS_StyleSheet, public MMDB_Common {
index 2cfa3fc0154055ce9b6a040d75d09ff5944cc1bd..0ceeb056b73d69c777e869dcb59a712901ea6718 100644 (file)
@@ -23,7 +23,8 @@
 // $XConsortium: Fulcrum_Templates.cc /main/3 1996/06/11 16:44:22 cde-hal $
 # define EXPAND_TEMPLATES
 
-# include <stream.h>
+# include <sstream>
+using namespace std;
 # include "Exceptions.hh"
 # include "UAS_Exceptions.hh"
 # include "UAS_PtrList.hh"
index ca28701348f79124f301c1fa62275ac7c1316045..2d968a0ad66172f29a84b62c8fc6cedf2b274bf4 100644 (file)
@@ -5,6 +5,10 @@ SEARCHENG=DtSearch
 SEARCHENG=Fulcrum
 #endif
 
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
+
+NormalCplusplusObjectRule()
+
 #ifdef UseDtSearch
 
 DTSEARCH_LIBS=-L/VOB/olias/library/dtsearch/solaris -lDtSr -lDtvis
@@ -32,9 +36,16 @@ PREF_LIB_OBJS = $(PREF_LIB_SRCS:.C=.o)
 
 make_libfiles($(LIBNAME),)
 
+#if defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+    defined(LinuxArchitecture)
 SimpleLibrary($(PREF_LIB_NAME), $(PREF_LIB_OBJS), $(LIBDIR))
-
 SimpleLibraryT(uasdrv, uasdrv.o,)
+#else
+SimpleLibrary($(PREF_LIB_NAME), $(PREF_LIB_OBJS), $(LIBDIR))
+SimpleLibraryT(uasdrv, uasdrv.o,)
+XCOMM RealLibrary($(PREF_LIB_NAME), $(PREF_LIB_OBJS), $(LIBDIR))
+XCOMM RealLibraryT(uasdrv, uasdrv.o,)
+#endif
 
 SimpleCPlusPlusProgram(sdrv, sdrv.o dlstub.o UAS_Templates.o, $(Libs))
 SimpleCPlusPlusProgram(uasdrv, uasdrv.o dlstub.o libuasdrvT.a, $(Libs))
index ba9ce2afd2f011eb379278e7257bc5ae50445cd3..b97447e3d15bcb3eccd8c93f24ed91be7f17b03e 100644 (file)
@@ -23,7 +23,8 @@
 // $XConsortium: UAS_Templates.cc /main/3 1996/06/11 16:44:45 cde-hal $
 # define EXPAND_TEMPLATES
 
-# include <stream.h>
+# include <sstream>
+using namespace std;
 # include "Exceptions.hh"
 # include "UAS_Exceptions.hh"
 # include "UAS_Common.hh"
index 050bd6520f3a7d26b80cfc542c62ac2dd90a5519..49d70974854d7f42121c6678c4e5d3caf0ee5d55 100644 (file)
@@ -22,7 +22,8 @@
  */
 // $XConsortium: sdrv.C /main/5 1996/09/27 19:02:52 drk $
 #include <stdio.h>
-#include <stream.h>
+#include <sstream>
+using namespace std;
 #include <strings.h>
 #include <assert.h>
 #include <errno.h>
index 8f9d0d79c3bbcd959c6befc8c02e7f0c5e9a21de..b767b2905604e3d40cfe09f91846c8bcecce9658 100644 (file)
@@ -21,7 +21,8 @@
  * Floor, Boston, MA 02110-1301 USA
  */
 // $XConsortium: uasdrv.cc /main/4 1996/06/11 16:45:11 cde-hal $
-# include <stream.h>
+# include <sstream>
+using namespace std;
 # include <stdio.h>
 
 
index 85acacf6e2287a592e57d665657c445992f078a2..1894211b6f7c8f8df0f98bc9f10fb72326f18c9e 100644 (file)
@@ -1,6 +1,6 @@
 XCOMM $XConsortium: Imakefile /main/6 1996/08/21 15:45:28 drk $
 
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
 
 LIBNAME= Widgets
 LIBDIR = ../lib
@@ -23,10 +23,17 @@ OBJS2 = $(SRCS2:.C=.o)
 SRCS = $(SRCS1) $(SRCS2)
 OBJS = $(OBJS1) $(OBJS2)
 
+NormalCplusplusObjectRule()
 NormalLibraryObjectRule()
 
 INCLUDES=$(CDEINCLUDES) $(WWL_INCLUDES) $(EXCEPTIONS_INCLUDES)
 
+#if defined(OpenBSDArchitecture) || defined(FreeBSDArchitecture) || \
+    defined(LinuxArchitecture)
 SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+#else
+SimpleLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+XCOMM RealLibrary($(LIBNAME), $(OBJS), $(LIBDIR))
+#endif
 
 DependTarget()
index 46c3e30dc9ab6eec2211dbbc6e1f07e3140bf6b1..96b684a5461e65a057d4532698ad81bc55612262 100644 (file)
@@ -117,7 +117,7 @@ Cardinal *nargs ;
     XtVaGetValues(XtParent(new),
                  XtNwidth, &width,
                  XtNheight, &height,
-                 0);
+                 (char*)0);
 
     if (new->core.width == 0)
       new->core.width = width ;
@@ -214,7 +214,9 @@ XtWidgetGeometry *proposed, *answer;
   return XtGeometryYes ;
 }
 
+#ifndef DEBUG
 #define DEBUG
+#endif
 
 static void
 ReDisplay(w, event)
index 5fb9446ed6be4ba2eea9b48df32310c9f84ba98b..866daabf5c94d30247f32f0893a28f79f9f563be 100644 (file)
@@ -54,6 +54,7 @@
 #endif
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <ctype.h>
 #include "RestraintP.h"
 
@@ -289,7 +290,7 @@ ChangeManaged (RestraintWidget w)
   ON_DEBUG(printf ("Restraint::ChangeManaged: my size = %d x %d\n",
                   w->core.width, w->core.height));
   ON_DEBUG(printf ("  Num children = %d, child = 0x%p\n",
-                  w->composite.num_children, child));
+                  w->composite.num_children, (void*)child));
 
   /* If this is our first child, compute initial sizing. */
   /* Tried using !XtIsRealized (w) to do this stuff when were
@@ -297,7 +298,7 @@ ChangeManaged (RestraintWidget w)
      widget being realized before it has a child.  This code will
      handle both cases correctly. */
   ON_DEBUG(printf ("  Checking for width calc\n    child = 0x%p, first = %d\n",
-                  child, w->restraint.had_child));
+                  (void*)child, w->restraint.had_child));
   if (child != NULL && w->restraint.had_child == False)
     {
       compute_width (w, child);
index 9f68d840e2525d4ab98f3b520310a86ccd106c21..bd033102d68c0fa22501d9c18665e73d87a375e0 100644 (file)
@@ -129,7 +129,7 @@ SimpleClassRec simpleClassRec = {
     /* extension               */      NULL
   },
   { /* simple fields */
-    /* change_sensitive                */      ChangeSensitive
+    /* change_sensitive                */      (Bool (*)(Widget))ChangeSensitive
   }
 };
 
@@ -167,7 +167,7 @@ static void ClassPartInitialize(class)
                "%s Widget: The Simple Widget class method 'change_sensitive' is undefined.\nA function must be defined or inherited.",
                c->core_class.class_name);
        XtWarning(buf);
-       c->simple_class.change_sensitive = ChangeSensitive;
+       c->simple_class.change_sensitive = (Bool (*)(Widget))ChangeSensitive;
     }
 
     if (c->simple_class.change_sensitive == XtInheritChangeSensitive)
index 15ba97a8bd66445321d688e8a466ee159946bbea..e3d73aedd621afaf82f3819027782d8c4c1d0eaa 100644 (file)
@@ -43,6 +43,7 @@
 
 #include "TabButtonP.h"
 #include <stdio.h>
+#include <stdlib.h>
 
 /* **************************************************************
  * constant and type declarations
@@ -185,7 +186,7 @@ static XtResource resources[] =
     XmRImmediate, (XtPointer) True  },
   { XmNarmColor, XmCArmColor, XmRPixel, sizeof (Pixel),
     XtOffsetOf (struct _XyzTabButtonRec, tab.arm_color),
-    XmRCallProc, (XtPointer) _XmSelectColorDefault },
+    XmRCallProc, (XtPointer)(size_t) _XmSelectColorDefault },
   { XmNarmPixmap, XmCArmPixmap, XmRPrimForegroundPixmap, sizeof (Pixmap),
     XtOffsetOf (struct _XyzTabButtonRec, tab.arm_pixmap),
     XmRImmediate, (XtPointer) XmUNSPECIFIED_PIXMAP },
index 95e4bd7ff2a178285d4702b734418f9065ea3dc1..4ee78585e831a2c3bfa6559543ed314990c7cd02 100644 (file)
@@ -55,6 +55,7 @@ SRCS1=        cgmcmds.c \
        getcgm.c
 
 
+NormalCplusplusObjectRule()
 NormalLibraryObjectRule()
 NormalLibraryTarget(cgm, $(OBJS1))
 
index 64e0f1e58c34f762df3fa0d36fd1a85cfb8c09b3..f8f90d957170b6aa185a5dd9defdaadbe093204c 100644 (file)
@@ -1468,7 +1468,7 @@ static void getRLPixels(unsigned char *dat_ptr, cgm_s_type *cgm_s,
     } /* end of row */
     /* may have to skip to end of row */
     if (bitOffset) ++dat_ptr; /* incomplete byte */
-    if (((int) dat_ptr - (int) rowPtr) % 2) ++dat_ptr; /* need to round up */
+    if (((size_t) dat_ptr - (size_t) rowPtr) % 2) ++dat_ptr; /* need round up */
   } /* end of cell array */
 }
 
index 0c68b04a3489992aacd2612e843a46821d892f5b..89c0b190c43e6254510fcfb69d9f1f4c7e13e401 100644 (file)
@@ -81,7 +81,7 @@ char *gettext(char *text)
 // definitely defined in other include files
 #define TRUE 1
 #define FALSE 0
-typedef unsigned char bool;
+//typedef unsigned char bool;
 
 typedef char  int8;
 typedef short int16;
@@ -145,7 +145,8 @@ typedef unsigned char  u_char;
 
 // for debugging statements if desired
 #ifdef DEBUG
-#include <iostream.h>
+#include <iostream>
+using namespace std;
 #include <stdio.h>
 #endif
 
index f44bb0a1b1bd8622fa3e1abe0bd50751ae2aa970..ce259cc19294d7321dfee6a4295bb549b7718498 100644 (file)
@@ -13,6 +13,7 @@ OBJS = \
        init.o \
        comm.o
 
+NormalCplusplusObjectRule()
 NormalLibraryObjectRule()
 
 NormalLibraryTarget(olias,$(OBJS))
index 591ad0806446b2eca171c9be33ba5124e02edcc1..f05c2745a9b715b595f4ab706571eac265c058c0 100644 (file)
@@ -153,7 +153,7 @@ Boolean
 DisplayNode_wp( XtPointer locator )
 {
   UrlAgent::document( (char *)locator, 1 );    // arg2 = force new window
-  delete [] locator;
+  delete [] (char *)locator;
 
   return (Boolean)True ;                       // must always return True
 }
@@ -209,7 +209,7 @@ Boolean
 PrintNode_wp( XtPointer locator )
 {
   UrlAgent::print_document( (char *)locator);
-  delete [] locator;
+  delete [] (char *)locator;
   return (Boolean)True ;                        // must always return True
 }
 
@@ -281,7 +281,7 @@ main(int argc, char **argv)
     if (env().init(argc, argv) < 0)
        exit(1);
     
-    try
+    mtry
     {
        
        // don't set up for session management or tooltalk if
@@ -315,12 +315,16 @@ main(int argc, char **argv)
        
        window_system.run();
     }
-    catch (Exception &, e)
+    mcatch (Exception &, e)
     {
        char buffer[256];
        sprintf (buffer,
                 "Internal Error: Exception got away.\nFile: %s, Line: %d",
+#ifdef C_API
                 e.file(), e.line());
+#else
+                __FILE__, __LINE__);
+#endif
        message_mgr().error_dialog (buffer);
        exit (1);
     }
index 13d22ab7a0fa4104dfaca8ede35dca6e0d1bc5a2..e2a61a92fd730c0cd6573703f00ea43fed2f9ade 100644 (file)
@@ -4,5 +4,12 @@ XCOMM $TOG: Imakefile /main/8 1998/08/10 15:54:24 mgreess $
 
 SUBDIRS=src
 
+XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
+#undef  TopLevelProject
+#define TopLevelProject                DtInfo
+IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
+               -DProjectTmplFile='<DtInfo.tmpl>' \
+               -DProjectRulesFile='<DtInfo.rules>'
+
 MakeSubdirs($(SUBDIRS))
 DependSubdirs($(SUBDIRS))
index 9ad5f9dae5378f4fa56123cd410b2081748881b6..61beed9421da3f0e3ab06bf1517793b2d92f0992 100644 (file)
@@ -45,9 +45,9 @@
 #define WArgList_h
 
 // Allow setting of resources by name in arg list
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
 #define CASTRNAM (char*)
-#define CASTVAL  (void*)
+#define CASTVAL  (void*)(size_t)
 #else
 #define CASTRNAM
 #define CASTVAL
index d96006bf98e537041a595a84ba5e4822d7daca62..cf55e31040e8507d2b9abfc9e03d1234a33b2a5f 100644 (file)
@@ -76,8 +76,8 @@ inline                WObject (const WObject& w) {
 
 inline         operator Widget () const { return widget; }
 #ifndef DEC
-inline int     operator== (int i)      { return (Widget)i == widget; }
-inline int     operator!= (int i)      { return (Widget)i != widget; }
+inline int     operator== (int i)      { return (Widget)(size_t)i == widget; }
+inline int     operator!= (int i)      { return (Widget)(size_t)i != widget; }
 #endif
 inline  WObject &operator = (const Widget w) { widget = w; return *this; }
 inline WidgetClass Class () const      { return XtClass (widget); }
index 0fd197c84a59c4be243a87924e3128336a3f0f78..609bb33a681e4c9657ff9dd7278fe0f11f819b23 100644 (file)
@@ -102,115 +102,115 @@ public :
    DEFINE_GETTER_SETTER (SkipAdjust,         Boolean,        "skipAdjust")
 
    inline void LeftAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void LeftAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "leftOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "leftOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void LeftAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "leftPosition";
+        a.name = CASTRNAM "leftPosition";
       } else {
-        a.name = "leftOffset";  
+        a.name = CASTRNAM "leftOffset";
       }
       a.value = (XtArgVal)poffset;  _Set(a);
    }
 
    inline void LeftAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "leftPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "leftOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "leftPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "leftOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
 
    inline void RightAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void RightAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "rightOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "rightOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void RightAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "rightPosition";
+        a.name = CASTRNAM "rightPosition";
       } else {
-        a.name = "rightOffset";  
+        a.name = CASTRNAM "rightOffset";
       }
       a.value = (XtArgVal)poffset;  _Set(a);
    }
 
    inline void RightAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "rightPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "rightOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "rightPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "rightOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
  
    inline void TopAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "topWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "topWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void TopAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "topOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "topWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "topOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "topWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void TopAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "topPosition";
+        a.name = CASTRNAM "topPosition";
       } else {
-        a.name = "topOffset";  
+        a.name = CASTRNAM "topOffset";
       }
       a.value = (XtArgVal)poffset;  _Set(a);
    }
 
    inline void TopAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "topPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "topOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "topPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "topOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
 
    inline void BottomAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void BottomAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "bottomOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "bottomOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void BottomAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "bottomPosition";
+        a.name = CASTRNAM "bottomPosition";
       } else {
-        a.name = "bottomOffset";  
+        a.name = CASTRNAM "bottomOffset";
       }
       a.value = (XtArgVal)poffset;  _Set(a);
    }
 
    inline void BottomAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "bottomPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "bottomOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "bottomPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "bottomOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
 
 };
index fcab222c3ca91df4830a0922d386ad5c7defc023..c36bfd81f6f63721b4f8014cbd3e54b7f732fe78 100644 (file)
@@ -105,119 +105,119 @@ public :
    DEFINE_GETTER_SETTER (SkipAdjust,         Boolean,        "skipAdjust")
 
    inline void LeftAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void LeftAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "leftOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "leftOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void LeftAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "leftPosition";
+        a.name = CASTRNAM "leftPosition";
         a.value = (XtArgVal)poffset;  _Set(a);
       } else {
-        a.name = "leftOffset";  
+        a.name = CASTRNAM "leftOffset";
         a.value = (XtArgVal)poffset;  _Set(a);
       }
    }
 
    inline void LeftAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "leftPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "leftOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "leftPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "leftOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
 
    inline void RightAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void RightAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "rightOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "rightOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void RightAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "rightPosition";
+        a.name = CASTRNAM "rightPosition";
         a.value = (XtArgVal)poffset;  _Set(a);
       } else {
-        a.name = "rightOffset";  
+        a.name = CASTRNAM "rightOffset";
         a.value = (XtArgVal)poffset;  _Set(a);
       }
    }
 
    inline void RightAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "rightPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "rightOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "rightPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "rightOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
  
    inline void TopAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "topWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "topWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void TopAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "topOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "topWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "topOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "topWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void TopAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "topPosition";
+        a.name = CASTRNAM "topPosition";
         a.value = (XtArgVal)poffset;  _Set(a);
       } else {
-        a.name = "topOffset";  
+        a.name = CASTRNAM "topOffset";
         a.value = (XtArgVal)poffset;  _Set(a);
       }
    }
 
    inline void TopAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "topPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "topOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "topPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "topOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
 
    inline void BottomAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void BottomAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "bottomOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "bottomOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void BottomAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "bottomPosition";
+        a.name = CASTRNAM "bottomPosition";
         a.value = (XtArgVal)poffset;  _Set(a);
       } else {
-        a.name = "bottomOffset";  
+        a.name = CASTRNAM "bottomOffset";
         a.value = (XtArgVal)poffset;  _Set(a);
       }
    }
 
    inline void BottomAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "bottomPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "bottomOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "bottomPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "bottomOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
 
 
index 25f82072cf9f7d34f4a364dec75ee3a600f4d5d9..14e390f9439698dcab22a586740268a30e4af00e 100644 (file)
@@ -114,24 +114,24 @@ public :
    DEFINE_GETTER_SETTER (SkipAdjust,         Boolean,        "skipAdjust")
 
    inline void LeftAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void LeftAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "leftOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "leftOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
 
    inline void LeftAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "leftPosition";
+        a.name = CASTRNAM "leftPosition";
         a.value = (XtArgVal)poffset;  _Set(a);
       } else {
-        a.name = "leftOffset";  
+        a.name = CASTRNAM "leftOffset";
         a.value = (XtArgVal)poffset;  _Set(a);
       }
    }
@@ -141,96 +141,96 @@ public :
 
    inline void LeftAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "leftPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "leftOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "leftPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "leftOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
 
    inline void RightAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void RightAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "rightOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "rightOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void RightAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "rightPosition";
+        a.name = CASTRNAM "rightPosition";
         a.value = (XtArgVal)poffset;  _Set(a);
       } else {
-        a.name = "rightOffset";  
+        a.name = CASTRNAM "rightOffset";
         a.value = (XtArgVal)poffset;  _Set(a);
       }
    }
 
    inline void RightAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "rightPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "rightOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "rightPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "rightOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
  
    inline void TopAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "topWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "topWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void TopAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "topOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "topWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "topOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "topWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void TopAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "topPosition";
+        a.name = CASTRNAM "topPosition";
         a.value = (XtArgVal)poffset;  _Set(a);
       } else {
-        a.name = "topOffset";  
+        a.name = CASTRNAM "topOffset";
         a.value = (XtArgVal)poffset;  _Set(a);
       }
    }
 
    inline void TopAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "topPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "topOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "topPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "topOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
 
    inline void BottomAttachment( unsigned char to_what, Widget w ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void BottomAttachment( unsigned char to_what, Widget w, int offset ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-       a.name = "bottomOffset";     a.value = (XtArgVal)offset;  _Set(a);
-       a.name = "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+       a.name = CASTRNAM "bottomOffset";     a.value = (XtArgVal)offset;  _Set(a);
+       a.name = CASTRNAM "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
    }
 
    inline void BottomAttachment( unsigned char to_what, int poffset ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
       if( to_what == XmATTACH_POSITION ) {
-        a.name = "bottomPosition";
+        a.name = CASTRNAM "bottomPosition";
         a.value = (XtArgVal)poffset;  _Set(a);
       } else {
-        a.name = "bottomOffset";  
+        a.name = CASTRNAM "bottomOffset";
         a.value = (XtArgVal)poffset;  _Set(a);
       }
    }
 
    inline void BottomAttachment( unsigned char to_what, int position,
                              int offset ) {
-      Arg a; a.name = "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
-      a.name = "bottomPosition"; a.value = (XtArgVal)position;  _Set(a);
-      a.name = "bottomOffset";   a.value = (XtArgVal)offset;  _Set(a);
+      Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
+      a.name = CASTRNAM "bottomPosition"; a.value = (XtArgVal)position;  _Set(a);
+      a.name = CASTRNAM "bottomOffset";   a.value = (XtArgVal)offset;  _Set(a);
    }
 
 };
index 44e4cbb17bb53198b5552c03542a78116180733b..c78668fa3ffc295637c818ddafe6ecba09dbe87d 100644 (file)
 // /__   \/     F-91405 ORSAY Cedex                   +33 (1) 69 41 66 29
 
 #include <X11/Intrinsic.h>
+#if !defined(linux) && !defined(CSRG_BASED)
 #include <generic.h>
+#else
+#define name2(__n1,__n2)       __paste2(__n1,__n2)
+#define __paste2(__p1,__p2)    __p1##__p2
+#endif
 
 #include <Xm/Xm.h>
 #include "WXmString.h"
@@ -73,23 +78,23 @@ class WComposite;
  typedef void  (* XtProc)();
 #endif
 
+#if defined(linux) || defined(CSRG_BASED)
+#define CASTRNAM (char*)
+#define CASTVAL  (void*)(size_t)
+#else
+#define CASTRNAM
+#define CASTVAL
+#endif
+
 #define        DEFINE_GETTER(rsc,typ,rnam) \
 inline typ rsc() const \
 { Arg a; typ __value; \
-  a.name = rnam; a.value = (XtArgVal)&__value; \
+  a.name = CASTRNAM rnam; a.value = (XtArgVal)&__value; \
   _Get(a); return __value; }
 
 #define        DEFINE_SETTER(rsc,typ,rnam) \
 inline void rsc(typ val) const \
-{ Arg a; a.name = rnam; a.value = (XtArgVal)val; _Set(a); }
-
-#if defined(linux)
-#define CASTRNAM (char*)
-#define CASTVAL  (void*)
-#else
-#define CASTRNAM
-#define CASTVAL
-#endif
+{ Arg a; a.name = CASTRNAM rnam; a.value = (XtArgVal)val; _Set(a); }
 
 #define        DEFINE_ARG(rsc,typ,rnam) \
 inline WArgList& rsc(typ val, WArgList& _w) const \
index 0a8c09eaa9aae1d30787c18a60c20ae83532458b..fce9dcb3cf661ed20008930ec97682b72367afb3 100644 (file)
@@ -8,7 +8,7 @@ XCOMM $XConsortium: Imakefile /main/7 1996/08/21 15:49:34 drk $
 #define LibHeaders     NO
 
 #define CplusplusSource        YES
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
 
 INCLUDES = -I../include
 
index 86d5294ee88b3e7b275b463eac0faa391f5734f7..c924c274a468f7c3ee48b80088d4ac430a45164b 100644 (file)
@@ -29,7 +29,8 @@
 //     $CurLog$        (Log at end)
 //
 
-//#include <stream.h>
+//#include <sstream>
+//using namespace std;
 
 #ifndef _XtintrinsicP_h
 #include <X11/IntrinsicP.h>
index 1bdaf30a5283b2eb5e299b45769e7e242cb00804..e10a10e7af790f8983741b8b67316d946ae2e1ea 100644 (file)
@@ -257,7 +257,8 @@ WObject :: SetCallback (const char* name, WWL* obj, WWL_FUN fun)
 #else // Not for doc
 
 #include <WWL/WComposite.h>
-#include <stream.h>
+#include <sstream>
+using namespace std;
 
 #define NL << '\n'; cout.flush()
 
index a94941a057d49210f45e160c2cb0bafd6ab08590..34e247d434f88ad6a8a2f7cd1a4fbf6bcf0549da 100644 (file)
@@ -23,7 +23,8 @@
 /* $XConsortium: WXmMenu.cc /main/3 1996/06/11 17:03:45 cde-hal $ */
 
 #ifndef STREAMH
-#include <stream.h>
+#include <sstream>
+using namespace std;
 #endif
 
 #ifndef _WXmMenu_h
index e426914e91cb2988f8b21eebee4876493cdf5d2e..aefed77e7c7dc617c8bfd8952d8e767edcf6134a 100644 (file)
@@ -23,7 +23,8 @@
 /* $XConsortium: WXmRadioBox.cc /main/3 1996/06/11 17:03:50 cde-hal $ */
 
 #ifndef STREAMH
-#include <stream.h>
+#include <sstream>
+using namespace std;
 #endif
 
 #ifndef _WXmRadioBox_h