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)
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))
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)
$ are no Infolibs found in the directory.)
11 "No Infolibs Present"
-
#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"
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);
AddLibraryAgent::clear () {
// autoUnmanage must be set to False for this button to work properly
- XmTextFieldSetString( f_text, "" );
+ XmTextFieldSetString( f_text, (char*)"" );
}
void
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];
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);
#include <WWL/WXmPushButtonGadget.h>
#include <WWL/WXmSeparatorGadget.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
int BookmarkEdit::g_modified_count = 0;
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();
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"));
#include "Other/XmStringLocalized.hh"
#include <Prelude.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <string.h>
#include <stdio.h>
pixmap); // a scaled pixmap...give it back
}
- if(f_shell != NULL)
+ if(f_shell != 0)
f_shell.Destroy();
}
void
GraphicAgent::popup()
{
- if (f_shell == NULL)
+ if (f_shell == 0)
create_ui();
f_shell.Popup();
void
GraphicAgent::display()
{
- if (f_shell == NULL)
+ if (f_shell == 0)
create_ui();
// assume all graphics are scalable for now.
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
#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" );
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" );
// 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" );
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" );
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();
WXmToggleButton button(wcb->GetWidget());
if (button.Set())
{
- unsigned int state = (unsigned int)wcb->ClientData();
+ size_t state = (size_t)wcb->ClientData();
adjust_panner(state);
}
}
if (button.Set())
{
- int scale = (unsigned int) wcb->ClientData();
+ size_t scale = (size_t) wcb->ClientData();
if (scale > 0)
{
set_zoom (scale);
#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"
n = 0;
XtSetArg(args[n], XmNtitle, "Dtinfo Help"); n++;
f_helper = DtCreateHelpDialog(app_shell,
- "helpdialog",
+ (char*)"helpdialog",
args, n);
}
{
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;
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
#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)
#include <sys/stat.h>
-#include <stream.h>
-#include <iostream.h>
+#include <sstream>
+#include <iostream>
+using namespace std;
#define C_xList
#define L_Support
#define C_MessageMgr
#define C_PrefMgr
#define C_EnvMgr
+#define C_GraphicsMgr
#define L_Managers
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++;
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++;
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++;
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++;
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++;
*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;
// 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,
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:")),
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*)"");
}
if (event->type == LeaveNotify || event->type == FocusOut)
{
- XmTextFieldSetString(agent->f_status_text, "");
+ XmTextFieldSetString(agent->f_status_text, (char*)"");
return;
}
}
UAS_Pointer<UAS_Common> d = NULL ;
- try {
+ mtry {
// (precise locator format parsing to be done in the UAS layer)
if( strchr( newLib, ':' ) && strchr( newLib, '/' ) ) {
#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.
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();
for (int i = 0; i < rootList.length(); i ++) {
if (doc_root == ((TOC_Element *) rootList[i])->toc()) {
in_subtree = TRUE;
+ inum = i;
break;
}
}
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);
}
// 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++;
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) {
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;
//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");
window_system().display(),
window,
item_id,
- "STRING",
+ (char*)"STRING",
(char*)buf, (long)strlen((char*)buf) + 1,
private_id, NULL);
} while(status == ClipboardLocked);
// 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();
void
ListView::activate (WCallback *)
{
- notify (ENTRY_ACTIVATE, (void *) f_selected_item);
+ notify (ENTRY_ACTIVATE, (void *)(size_t) f_selected_item);
}
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();
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);
#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();
#include <WWL/WXmLabelGadget.h>
#include <WWL/WXmPushButton.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#define CLASS MarkIcon
#include "create_macros.hh"
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)
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));
void
MarkIcon::update_icon (MarkCanvas *)
{
- Pixmap button_pixmap = NULL;
+ Pixmap button_pixmap = 0;
int multi = mark_count() > 1;
int anno = False;
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());
}
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);
}
MarkListView::~MarkListView()
{
- if (f_shell != NULL)
+ if (f_shell != 0)
f_shell.Destroy();
free_mark_list();
}
MarkListView::display()
{
Wait_Cursor bob;
- if (f_shell == NULL)
+ if (f_shell == 0)
create_ui();
if (!f_popped_up)
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();
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);
{
Wait_Cursor bob_dobbs;
- try
+ mtry
{
Xassert (f_selected_item > 0);
// Now `m' points to the selected Mark.
m.item()->view();
}
- catch(demoException &, demo)
+ mcatch(demoException &, demo)
{
message_mgr().demo_failure(demo);
}
i++, m++;
}
- Xassert (m != NULL);
+ Xassert (m != 0);
//
// XXXSWM: Need to check if this is the selected item.
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());
#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"
{
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);
// 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();
*
*/
-#include <stream.h>
+#include <sstream>
+using namespace std;
#include "UAS.hh"
NodeHistoryAgent::~NodeHistoryAgent()
{
- if (f_shell != NULL)
+ if (f_shell != 0)
f_shell.Destroy();
}
void
NodeHistoryAgent::display()
{
- if (f_shell == NULL)
+ if (f_shell == 0)
create_ui();
refresh_list();
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();
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);
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()];
if (bookString.Width(f_list.FontList()) >= SECTION_OFFSET)
{
- char* dots = "...";
+ char* dots = (char*)"...";
char* ungenerated = (char*)(bookString + WXmString(dots));
//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);
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();
*
*/
-#include <stream.h>
+#include <sstream>
+using namespace std;
#define C_FString
#define C_List
*/
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 --------------------------------------------
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);
// 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
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);
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
*
*/
-#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>
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++;
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++;
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++;
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,
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++;
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);
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);
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);
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);
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);
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++;
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++;
// 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,
#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
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");
#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);
#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
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
// 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");
// 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");
// 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");
// 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,
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");
// clear quick help
if (event->type == LeaveNotify || event->type == FocusOut)
{
- XmTextFieldSetString(agent->f_status_text, "");
+ XmTextFieldSetString(agent->f_status_text, (char*)"");
return;
}
else
{
// If the timeout has already happened, just clear the preview area.
- XmTextFieldSetString(f_status_text, "");
+ XmTextFieldSetString(f_status_text, (char*)"");
}
}
#endif
_DtCvSegPts **segs = NULL ;
- try
+ mtry
{
int ret_x, ret_y ;
// find the selection segment and offset
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];
else
throw(CASTEXCEPT Exception());
}
- catch_any()
+ mcatch_any()
{
if (! refmark)
message_mgr().error_dialog ((char*)UAS_String(CATGETS(Set_Messages, 10,
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,
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;
AnchorCanvas (f_viewport_agent->selection_range()),
mark_ptr);
}
- catch_any()
+ mcatch_any()
{
message_mgr().error_dialog (
(char*)UAS_String(CATGETS(Set_Messages, 12,
// 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
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
#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;
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*)"");
}
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
f_locked = lock_flag ;
}
- catch_any()
+ mcatch_any()
{
delete anchor ;
g_history_anchor = save_anchor ;
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;
// 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;
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,
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
#include <WWL/WComposite.h>
#include <WWL/WXmScrollBar.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <unistd.h>
#include <sys/param.h>
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++;
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);
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
static XtActionsRec actions_list[] =
{
- {"OutlineListBeginSelect", OutlineListView::_select_start},
- {"OutlineListEndSelect", OutlineListView::_select_end},
+ {(char*)"OutlineListBeginSelect", OutlineListView::_select_start},
+ {(char*)"OutlineListEndSelect", OutlineListView::_select_end},
};
if ((oe->type() == TOC_Element::TOC_ElementClass) && !expanded)
{
- try {
+ mtry {
UAS_ObjectType type = ((TOC_Element *) oe)->toc()->type();
switch (type)
{
break;
}
}
- catch_any()
+ mcatch_any()
{
message_mgr().error_dialog( (char*)UAS_String(CATGETS(
Set_UrlAgent, 5, "Document not found." )) ) ;
PrefAgent::display()
{
Wait_Cursor bob;
- if (f_shell == NULL)
+ if (f_shell == 0)
create_ui();
// Always reset on new popup.
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);
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");
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
#include <WWL/WXmFrame.h>
#include <WWL/WXmPushButton.h>
#include <WWL/WXmSeparator.h>
-#include <stream.h>
+#include <sstream>
+using namespace std;
#define CLASS PrintPanelAgent
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
// 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
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);
}
}
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);
}
// 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
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
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())
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())
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]))
{
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 ==
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;
*
*/
-#include "iostream.h"
+#include "iostream"
+using namespace std;
#include "UAS.hh"
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));
if (matchString.Width(header_font) >= scope_offset)
{
- char* dots = "...";
+ char* dots = (char*)"...";
char* ungenerated = (char*)(matchString + WXmString(dots));
#include "Managers/WString.hh"
#include <Prelude.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include "Registration.hh"
relevancy[0] += (char) ((re->relevance() * 8 ) / f_scale);
- WXmString rel (relevancy, OLIAS_FONT);
+ WXmString rel (relevancy, (char*)OLIAS_FONT);
WXmString book;
WXmString name;
}
else {
- char* dots = "...";
+ char* dots = (char*)"...";
WXmString temp_xmstring = book + WXmString(dots);
char *temp_str = (char*)temp_xmstring;
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]);
}
void
SearchResultsAgent::create_window()
{
- create_base_window ("results");
+ create_base_window ((char*)"results");
XmStringLocalized mtfstring;
String string;
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
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);
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));
inline
SearchResultsAgent::SearchResultsAgent()
-: f_work_proc_id (NULL), f_popped_up(FALSE)
+: f_work_proc_id (0), f_popped_up(FALSE)
{
}
#endif
#include <string.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <stdio.h>
#define CLASS SearchScopeAgent
SearchScopeAgent::display()
{
Wait_Cursor bob;
- if (f_shell == NULL)
+ if (f_shell == 0)
{
create_ui();
}
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;
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");
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();
// 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,
{
// this flag should be defined elsewhere-this could
// become a command-line option
- if (f_shell == NULL)
+ if (f_shell == 0)
{
create_ui();
}
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;
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);
// 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;
// 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)
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);
// 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();
UAS_List<UAS_Common>
SearchScopeAgent::list()
{
- if (f_shell == NULL)
+ if (f_shell == 0)
{
create_ui();
}
#endif
#include <string.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include "Other/XmStringLocalized.hh"
#include "Managers/CatMgr.hh"
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())
// 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;
{
// 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;
// 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;
// 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;
void
UrlAgent::display (NodeWindowAgent *prefWindow) {
- if (fShell == NULL)
+ if (fShell == 0)
create_ui ();
//f_form.Manage();
XmProcessTraversal( (Widget)fTextField, XmTRAVERSE_CURRENT );
}
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
d->retrieve();
}
}
- catch_any()
+ mcatch_any()
{
message_mgr().error_dialog( (char*)UAS_String(CATGETS(
Set_UrlAgent, ERR_LOCATOR_RESOLUTION,
}
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
}
}
}
- catch_any()
+ mcatch_any()
{
if ((!window_system().videoShell()->silent)) {
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...
// "Invalid access method in url.")));
// }
// }
-// catch_any() {
+// mcatch_any() {
// message_mgr().error_dialog ((char*)
// UAS_String(CATGETS(Set_Messages, 71,
// "Document creation failed.")));
void
UrlAgent::clear () {
- XmTextFieldSetString (fTextField, "");
+ XmTextFieldSetString (fTextField, (char*)"");
valueChanged ();
}
#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)
// 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 * ()
// 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;
// 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;
(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 ;
#ifdef DEBUG
bool is_used(BitHandle);
- ostream &BitField::dump(ostream &);
+ ostream &dump(ostream &);
#endif
private:
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); }
extern "C"
{
- extern int strlen(const char *);
+ extern size_t strlen(const char *);
extern char *strcpy(char *, const char *);
}
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; \
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
#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()
abort();
f_list_element[f_length] = &element;
f_length++;
- notify (APPENDED, (void *) (f_length - 1));
+ notify (APPENDED, (void *)(size_t) (f_length - 1));
}
// Insert the new element in the list.
f_list_element[location] = element;
f_length++;
- notify (INSERTED, (void *) location);
+ notify (INSERTED, (void *)(size_t) location);
}
// 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)); \
+ }
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;
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) ;
}
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" );
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;
}
#include "Prelude.h"
-#include <iostream.h>
+#include <iostream>
+using namespace std;
INIT_CLASS (TOC_Element);
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
#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()
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)
{
}
*/
#include "UAS.hh"
+// #include "Managers/GraphicsMgr.hh"
class GraphicsMgr;
class GraphicAgent ;
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
#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)
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
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
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)
#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()
#include <locale.h>
#include <stdlib.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <Dt/Dt.h>
#include <Dt/EnvControlP.h>
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);
#define CATALOG_PREFIX "dtinfo"
-#ifndef NULL
-#define NULL (char*)0
-#endif
-
class CatMgr
{
public:
~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); }
LONG_LIVED_HH(ClientEventMgr, client_event_manager);
};
+
+LONG_LIVED_HH2(ClientEventMgr, client_event_manager);
LONG_LIVED_HH(DatabaseMgr,database_mgr);
};
+LONG_LIVED_HH2(DatabaseMgr,database_mgr);
+
inline olias_server *
olias_db()
{
*/
#include <string.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <sys/stat.h>
#include <lib/DtSvc/DtUtil2/LocaleXlate.h>
#ifdef UseSessionMgmt
#define C_SessionMgr
#endif
+#define C_GraphicsMgr
#define L_Managers
#include "Managers/CatMgr.hh"
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(
{
// 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");
{
c = strrchr(buffer, '/');
if (c != NULL)
- *c = NULL;
+ *c = 0;
(void)mkdirs(buffer);
if (c != NULL)
*c = '/';
private:
LONG_LIVED_HH( EnvMgr, env );
};
+
+LONG_LIVED_HH2( EnvMgr, env ) ;
* Campbell, CA 95008
*
*/
-#include <stream.h>
+#include <sstream>
+using namespace std;
#include "UAS.hh"
#define C_GlobalHistoryMgr
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;
}
LONG_LIVED_HH (GlobalHistoryMgr,global_history_mgr);
};
+LONG_LIVED_HH2 (GlobalHistoryMgr,global_history_mgr);
+
struct HistoryDelete : public Destructable
{
#include "Prelude.h"
-#include <iostream.h>
+#include <iostream>
+using namespace std;
extern "C"
{
#include "../cgm/spec.h"
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);
}
if(!initialized)
{
- _DtGrRegisterConverter("CGM", processCGM, NULL, NULL, NULL);
+ _DtGrRegisterConverter((char*)"CGM", processCGM, NULL, NULL, NULL);
initialized = 1;
}
// if content_type is a NULL string, image type is unknown
if (content_type == "")
{
- image_type = "unknown";
+ image_type = (char*)"unknown";
}
else
{
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
//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() ;
-}
class PixmapGraphic;
class DetachGraphic;
+class ReAttachGraphic;
+class GraphicAgent;
+class DisplayGraphic;
#if defined(SVR4) || defined(hpux)
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
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; }
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
}
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(); }
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)
LIBNAME=Managers
+NormalCplusplusObjectRule()
+
INCLUDES=$(BROWSER_INCLUDES) $(COMMON_CLASS_INCLUDES)
#include "Classlist.mk"
#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()
#define L_Other
# include <Prelude.h>
-# include <stream.h>
+# include <sstream>
+using namespace std;
InputMgrX::InputMgrX () {
* 1315 Dell Avenue, Campbell, CA 95008
*
*/
-#include <stream.h>
+#include <sstream>
+#include <iostream>
+using namespace std;
#define C_LibraryMgr
#define C_NodeMgr
#define L_Support
#include "Prelude.h"
-#include <iostream.h>
+
+#include "utility/mmdb_exception.h"
LONG_LIVED_CC(LibraryMgr,library_mgr);
// 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)
{
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]);
else
message_mgr().error_dialog(window_system().get_message ("NoDocument"));
}
- catch(demoException &, demo)
+ mcatch(demoException &, demo)
{
message_mgr().demo_failure(demo);
}
private:
LONG_LIVED_HH(LibraryMgr,library_mgr);
};
+
+LONG_LIVED_HH2(LibraryMgr,library_mgr);
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;
private:
LONG_LIVED_HH(MapMgr,map_mgr);
};
+
+LONG_LIVED_HH2(MapMgr,map_mgr);
LONG_LIVED_HH(MarkListMgr,mark_list_mgr);
};
+LONG_LIVED_HH2(MarkListMgr,mark_list_mgr);
*/
#include <sys/param.h>
-#include <stream.h>
+#include <sstream>
+using namespace std;
#include "UAS.hh"
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
List_Iterator<MarkBase *> b (f_base_list);
- assert (b != NULL);
+ assert (b != 0);
MarkMoved move_message;
move_message.f_new_mark_ptr = b.item()->
LONG_LIVED_HH (MarkMgr,mark_mgr);
};
+
+LONG_LIVED_HH2 (MarkMgr,mark_mgr);
#include "Other/XmStringLocalized.hh"
#include <stdio.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
LONG_LIVED_CC (MessageMgr,message_mgr);
parent = window_system().toplevel();
}
- dialog = XmCreateMessageDialog(parent, "dialog", NULL, 0);
+ dialog = XmCreateMessageDialog(parent, (char*)"dialog", NULL, 0);
WXmString wxms = message_text;
XtVaSetValues(dialog,
{
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,
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);
}
// /////////////////////////////////////////////////////////////////////////
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
#define C_NodeWindowMgr
#define C_StyleSheetMgr
#define C_LibraryMgr
+#define C_GraphicsMgr
#define L_Managers
#define C_xList
#include "../OnlineRender/CanvasRenderer.hh"
#endif
-#include <strstream.h>
+#include <sstream>
class NodeWindowAgent;
class NodeHandle;
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
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")));
}
#endif
- istrstream input((char *) node_ptr->data());
+ istringstream input((char *) node_ptr->data());
- try
+ mtry
{
#ifdef FONT_SCALE_DEBUG
cerr << "PrefMgr::FontScale: " <<
DocParser docparser(resolver);
docparser.parse(input);
}
- catch_any()
+ mcatch_any()
{
ON_DEBUG(cerr << "NodeMgr::load...exception thrown" << endl);
delete gNodeViewInfo ;
LONG_LIVED_HH(NodeMgr,node_mgr);
};
+LONG_LIVED_HH2(NodeMgr,node_mgr);
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;
}
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)
#define C_NodeWindowMgr
#define C_StyleSheetMgr
#define C_LibraryMgr
+#define C_GraphicsMgr
#define L_Managers
#include "Prelude.h"
{
RCS_DEBUG("PrintNode::receive called.");
- int cd = (int)client_data;
+ size_t cd = (size_t)client_data;
// 1 == print request
if (cd == 1) {
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,
}
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
docparser.parse(input);
window_system().setPrinting(False);
}
- catch_any()
+ mcatch_any()
{
ON_DEBUG(cerr << "PrintMgr::load...exception thrown" << endl);
delete gNodeViewInfo ;
LONG_LIVED_HH(PrintMgr,print_mgr);
};
+LONG_LIVED_HH2(PrintMgr,print_mgr);
*
*/
-#include <stream.h>
+#include <sstream>
+using namespace std;
#include "Registration.hh"
#include "Managers/CatMgr.hh"
-#include <stream.h>
-
LONG_LIVED_CC(SearchMgr,search_mgr)
// Reconfigure search engine
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];
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);
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 ()
{
}
}
UAS_Pointer<UAS_List<UAS_TextRun> > current_hits ();
-friend SearchMgr &search_mgr();
+// friend SearchMgr &search_mgr();
private:
friend class SeReconfigure;
LONG_LIVED_HH(SearchMgr,search_mgr);
};
+LONG_LIVED_HH2(SearchMgr,search_mgr);
protected: //variables
LONG_LIVED_HH(SearchResultsMgr,search_results_mgr);
};
+
+LONG_LIVED_HH2(SearchResultsMgr,search_results_mgr);
#include "Prelude.h"
-#include <iostream.h>
+#include <iostream>
+using namespace std;
LONG_LIVED_CC(SearchScopeMgr,search_scope_mgr);
LONG_LIVED_HH(SearchScopeMgr,search_scope_mgr);
};
+LONG_LIVED_HH2(SearchScopeMgr,search_scope_mgr);
{
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];
locator = (char *) stream;
UAS_Pointer<UAS_Common> d;
- try
+ mtry
{
if (strchr (locator, ':'))
{
delete [] buffer;
}
}
- catch (demoException&, demo)
+ mcatch (demoException&, demo)
{
message_mgr().demo_failure(demo);
}
- catch_any()
+ mcatch_any()
{
d = NULL;
}
case OLIAS_DISPLAY_EVENT:
locator = ((OliasDisplayEvent *) event)->locator;
ON_DEBUG (printf (">>> external-api display <%s>\n", locator));
- try
+ mtry
{
if (strchr (locator, ':'))
{
}
}
}
- catch (demoException&, demo)
+ mcatch (demoException&, demo)
{
message_mgr().demo_failure(demo);
}
- catch_any()
+ mcatch_any()
{
d = NULL;
}
LONG_LIVED_HH(ServiceMgr,service_manager);
};
+LONG_LIVED_HH2(ServiceMgr,service_manager);
char *prior_session ; // prior session state file name, if any
} ;
+LONG_LIVED_HH2( SessionMgr, session ) ;
+
// class SessionMgrX : public SessionMgr
// {
*
*/
-#include <stream.h>
+#include <sstream>
+using namespace std;
// NOTE: this is just for the Xassert
#define C_MessageMgr
// 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 ;
fLastSS = onlineSS;
fCurrent = new StyleSheet;
UAS_String sstextStr = fLastSS->data();
- istrstream input ((char *) sstextStr);
+ istringstream input ((char *) sstextStr);
g_stylein = &input;
#ifdef DUMP_STYLESHEETS
{
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);
fLastSS = printSS;
fCurrent = new StyleSheet;
UAS_String sstextStr = fLastSS->data();
- istrstream input ((char *) sstextStr);
+ istringstream input ((char *) sstextStr);
g_stylein = &input;
#ifdef DUMP_STYLESHEETS
{
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);
LONG_LIVED_HH(StyleSheetMgr,style_sheet_mgr);
};
+LONG_LIVED_HH2(StyleSheetMgr,style_sheet_mgr);
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);
{
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);
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);
{
errmsg = LogToolTalkMessage (DtMsgLogError,
ERR_TT_OPEN,
- DFLTXT_OPEN,
+ (char*)DFLTXT_OPEN,
tt_state);
message_mgr().error_dialog( (char*)UAS_String(errmsg) );
XtFree(errmsg);
{
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);
#ifdef DEBUG
if (!WM_LOCALE_NAME)
printf( "Atom WM_LOCALE_NAME not interned\n" );
-#endif DEBUG
+#endif
if (!WM_LOCALE_NAME) return (char *)NULL;
#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;
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;
#ifdef DEBUG
printf( "desktop's locale is %s\n", dt_locale ) ;
-#endif DEBUG
+#endif
if (!dt_locale) return (char *)NULL;
else return dt_locale;
Tt_status tt_state ;
} ;
-
+LONG_LIVED_HH2( TtIpcMgr, tt_manager ) ;
$ $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.
LONG_LIVED_HH(UrlMgr,url_mgr);
};
+
+LONG_LIVED_HH2(UrlMgr,url_mgr);
// servicing of request (dynamic)
} ;
+LONG_LIVED_HH2( WorkspaceMgr, workspace ) ;
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
#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()
{
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!");
}
{
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
{
*
*/
-#include <stream.h>
+#include <sstream>
+using namespace std;
#define C_xList
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);
}
mark_base *base;
user_base::rw_flag_t mode = read_only ? user_base::READ : user_base::WRITE;
- try
+ mtry
{
if (!read_only)
{
}
}
}
- catch_any()
+ mcatch_any()
{
return (NULL);
}
// 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
}
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
}
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;
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"
#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()
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 ;
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];
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;
#endif
ColDefn* colcell;
- try {
+ mtry {
colcell = columns.at(kept);
}
- catch_any() {
+ mcatch_any() {
abort(); // consider it as fatal
}
end_try;
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;
}
// 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)
$
$ messages specific to CanvasRenderer (dtinfo I/F to DtCanvas/DtHelp)
$
+1 "Dtinfo: Canvas Renderer"
#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"
// if we still can't find one go with whatever.
else {
- xlfd = "-*-*-*-*-*-*-*-*-*-*-*-*-*";
+ xlfd = (char*)"-*-*-*-*-*-*-*-*-*-*-*-*-*";
}
#ifdef FONT_DEBUG
fprintf(stderr, "resulting in \"%s\".\n", xlfd);
int top = 0;
int bottom= 0;
- try
+ mtry
{
//const Feature *f = marginset->lookup(symbols[FIRST]);
const Feature *l = marginset->lookup(symbols[LEFT]);
bottom_margin = bottom;
}
- catch_noarg (StyleSheetException &)
+ mcatch_noarg (StyleSheetException &)
{
#ifdef DEBUG
cerr << "MarginFPtml: style sheet exception" << endl;
ColFormat *colf = new ColFormat ;
- try
+ mtry
{
const Feature *widthF = set->lookup (symbols[WIDTH]) ;
if (widthF)
colf->justify (justify);
}
}
- catch_any()
+ mcatch_any()
{
abort();
}
const FeatureSet* features;
- try
+ mtry
{
features = *local.lookup(symbols[ROW])->value();
}
- catch_any()
+ mcatch_any()
{
features = NULL;
}
#include "FontCache.hh"
#if defined DEBUG || defined SMALL_DEBUG || defined FONT_DEBUG
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#endif
#define C_List
f_charset.hash() + f_ptsize ;
}
+bool
FontEntry::operator==(const FontEntry &fe) const
{
return
FontEntry(const FontEntry &);
~FontEntry();
- operator ==(const FontEntry &) const;
+ bool operator ==(const FontEntry &) const;
unsigned hash() const;
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
#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
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
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:
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; }
CC_TPtrSlist<ColDefn> &columns() { return f_columns ; }
- operator==(const RowDefn &r) const
+ bool operator==(const RowDefn &r) const
{ return &r == this ; }
_DtCvFrmtOption vjustify ()
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; }
XCOMM $XConsortium: Imakefile /main/8 1996/08/21 15:43:18 drk $
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
CDEBUGFLAGS=-g
LIBNAME=Other
+NormalCplusplusObjectRule()
+
INCLUDES = $(BROWSER_INCLUDES)
#include "Classlist.mk"
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()
*
*/
+#include <X11/Shell.h>
#include <X11/Xmu/Editres.h>
#include <Xm/Xm.h>
#include <Xm/XmP.h>
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>
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 }
};
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)
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);
}
}
// 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,
},
};
// 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
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);
}
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);
#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 -------- //
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),
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
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");
}
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");
}
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");
}
{
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);
status = XmeXpmCreatePixmapFromData(f_display,
XtWindow((Widget)toplevel()),
- graphic_unavailable_data,
+ (char**)graphic_unavailable_data,
&temp_pixmap,
NULL, &xpm_attr);
temp_width = xpm_attr.width;
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 ;
#endif
if (status != XpmSuccess) {
- pixmap = NULL;
+ pixmap = 0;
*width = 0;
*height = 0;
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;
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;
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);
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);
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));
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;
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 ;
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){
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){
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){
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){
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 ;
/* 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 */
/* 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 */
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)
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
#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>
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);
S_ISREG(file_info.st_mode))
{
unlink (filename);
- link (backup, filename);
+ ret = link (backup, 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);
}
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++;
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;
}
{
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;
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;
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)
#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::
#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;
{
static int count = 0;
if (count++ == 0) {
- if (f_shell == NULL)
+ if (f_shell == 0)
create_ui();
if (f_query == NULL)
}
//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.
// 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);
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" );
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());
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;
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())
{
// 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)
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;
// 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()))
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;
-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
"%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
"%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.
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];
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();
(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
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));
#endif
#include <wchar.h>
-#ifdef USL
+#if defined(USL) || defined(linux) || defined(CSRG_BASED)
#include <wctype.h>
#endif
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; }
#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
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" );
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" );
static XtActionsRec actions_list[] =
{
- { "TermSelect", QueryTermView::_select },
+ { (char*)"TermSelect", QueryTermView::_select },
};
XtAppAddActions (window_system().app_context(),
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
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) {
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();
}
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
// 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" );
{
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); }
break;
default:
- if (f_pws_form != NULL)
+ if (f_pws_form != 0)
{
f_proximity_label.SetSensitive (False);
f_proximity_field.SetSensitive (False);
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"
#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
# define C_InputNotifier
# include <Prelude.h>
-# include <stream.h>
+# include <sstream>
+using namespace std;
#define CLASS InputNotifier
{ 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.
#include "Receiver.hh"
-#include <stream.h>
+#include <sstream>
+using namespace std;
// /////////////////////////////////////////////////////////////////
// class destructor - remove this sender from all receiver's lists
* 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>
#define EXPAND_TEMPLATES
#include "Prelude.h"
-#include <iostream.h>
+#include <iostream>
+using namespace std;
struct Message
{
};
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
#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
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
class RowDefn;
class UpdateMenu;
+#ifndef EXPAND_TEMPLATES
#define EXPAND_TEMPLATES
+#endif
#ifndef TEMPL_DEBUG
#ifdef DEBUG
#undef DEBUG
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),)
#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()
*/
// $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>
* 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
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;
void
UAS_Buffer::write (const char *string)
{
- int length = strlen (string);
+ ssize_t length = strlen (string);
write (length);
write (string, sizeof (char), length + 1);
}
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);
* 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
#include "Exceptions.hh"
#include "UAS_String.hh"
-#if defined(linux)
-#define CASTUASEXCEPT (UAS_Exception*)
-#else
#define CASTUASEXCEPT
-#endif
class UAS_Exception: public Exception {
protected:
* 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"
/* 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"
// 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");
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;
*/
// $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 () {
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];
}
#ifndef _UAS_PtrList_hh_
#define _UAS_PtrList_hh_
+class UAS_Exception;
+class UAS_String;
+
template <class T> class UAS_PtrList {
public:
UAS_PtrList ();
// $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
*/
// $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"
*/
// $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,
// $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);
#define FALSE 0
#endif
-typedef unsigned char bool;
+//typedef unsigned char bool;
class UAS_SearchScope;
#include "UAS_String.hh"
-typedef unsigned char bool;
+//typedef unsigned char mbool;
class UAS_SearchZones
{
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);
*/
// $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)
#include <assert.h>
#include <string.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include "config.h"
#include "Basic/Error.hh"
#include <assert.h>
#include <string.h>
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include "UAS_String.hh"
class DtSR_Parser : public UAS_OQLParser
{
public:
- DtSR_Parser::DtSR_Parser();
+ DtSR_Parser();
int stemming_suggested() { return f_completion_specified; }
#include <string.h>
#include <sys/stat.h>
-#include <fstream.h>
+#include <iostream>
+#include <fstream>
+using namespace std;
#include "Registration.hh"
#include "Managers/CatMgr.hh"
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);
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());
#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 {
}
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;
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')
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;
#define _DTSR_SEARCHRESULTS_HH_
#include "UAS_SearchResults.hh"
+#include "UAS_Collection.hh"
#include "DtSR_SearchResultsEntry.hh"
#include "DtSR_Stems.hh"
#include <limits.h>
#include <string.h>
-#include <strstream.h>
+#include <sstream>
#include <StyleSheet/DocParser.h>
#include <StyleSheet/Resolver.h>
}
#endif
- try
+ mtry
{
style_sheet_mgr().initOnlineStyleSheet(doc);
}
- catch_noarg (StyleSheetSyntaxError)
+// catch_noarg (StyleSheetSyntaxError)
+ mcatch_any()
{
#ifdef JOE_HATES_THIS
message_mgr().error_dialog(
}
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);
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
{
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);
}
#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
}
// 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)
{
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')) {
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
DEFINES=-DCDE_NEXT
+NormalCplusplusObjectRule()
+
INCLUDES=-I../.. $(EXCEPTIONS_INCLUDES) $(UAS_INCLUDES) $(DTSEARCH_INCLUDES) $(UTIL_CLASSES_INCLUDES) $(COMMON_CLASS_INCLUDES)
#include "Classlist.mk"
#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()
#include <stdlib.h>
#include <string.h>
-#include <strstream.h>
+#include <sstream>
+using namespace std;
#include "TextParser.hh"
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);
*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;
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;
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');
return NULL;
}
- ostrstream ret_text;
+ ostringstream ret_text;
while (textrun.get(line, 128, '\n')) {
if (textrun.get() != '\n') {
ret_text << off << '\t' << len << '\n' << '\0';
- return ret_text.str();
+ return (char *)ret_text.str().c_str();
}
char *
#include <stdio.h>
#include <stdlib.h>
-#include <strstream.h>
+#include <sstream>
+using namespace std;
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') {
#include <stdlib.h>
#include <string.h>
-#include <iostream.h>
-#include <strstream.h>
+#include <iostream>
+#include <sstream>
+using namespace std;
#include "TextParser.hh"
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);
#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)
{
}
#include <StyleSheet/Element.h>
#include <StyleSheet/Renderer.h>
-#include <strstream.h>
+#include <sstream>
+using namespace std;
#include "dti_cc/CC_Stack.h"
{
public:
- Tml_TextRenderer(ostrstream &, UAS_SearchZones &);
+ Tml_TextRenderer(ostringstream &, UAS_SearchZones &);
~Tml_TextRenderer();
FeatureSet * initialize();
int effective_zone(UAS_SearchZones::uas_zones);
- ostrstream &f_ostr;
+ ostringstream &f_ostr;
UAS_SearchZones &f_zones;
int f_current_level;
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))
// $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"
#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
MMDB \
$(SEARCH_SUBDIR)
+XCOMM Variables to switch on debug mode temporarily
+XCOMM CDEBUGFLAGS = -g -DDEBUG
+XCOMM CXXDEBUGFLAGS = -g -DDEBUG
+
make_libfiles($(LIBNAME),)
makelibT(Base)
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
#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()
* 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"
# 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 {
# 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 {
* 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"
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,
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;
#endif
# include "MMDB_StyleSheet.hh"
# include "MMDB_Factory.hh"
+# include "UAS_Collection.hh"
+# include "UAS_SearchEngine.hh"
char* g_mmdb_section_label;
* 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,
#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 {
// $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"
SEARCHENG=Fulcrum
#endif
+CXXEXTRA_DEFINES = -DEXPAND_TEMPLATES
+
+NormalCplusplusObjectRule()
+
#ifdef UseDtSearch
DTSEARCH_LIBS=-L/VOB/olias/library/dtsearch/solaris -lDtSr -lDtvis
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))
// $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"
*/
// $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>
* 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>
XCOMM $XConsortium: Imakefile /main/6 1996/08/21 15:45:28 drk $
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
LIBNAME= Widgets
LIBDIR = ../lib
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()
XtVaGetValues(XtParent(new),
XtNwidth, &width,
XtNheight, &height,
- 0);
+ (char*)0);
if (new->core.width == 0)
new->core.width = width ;
return XtGeometryYes ;
}
+#ifndef DEBUG
#define DEBUG
+#endif
static void
ReDisplay(w, event)
#endif
#include <stdio.h>
+#include <stdlib.h>
#include <ctype.h>
#include "RestraintP.h"
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
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);
/* extension */ NULL
},
{ /* simple fields */
- /* change_sensitive */ ChangeSensitive
+ /* change_sensitive */ (Bool (*)(Widget))ChangeSensitive
}
};
"%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)
#include "TabButtonP.h"
#include <stdio.h>
+#include <stdlib.h>
/* **************************************************************
* constant and type declarations
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 },
getcgm.c
+NormalCplusplusObjectRule()
NormalLibraryObjectRule()
NormalLibraryTarget(cgm, $(OBJS1))
} /* 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 */
}
// 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;
// for debugging statements if desired
#ifdef DEBUG
-#include <iostream.h>
+#include <iostream>
+using namespace std;
#include <stdio.h>
#endif
init.o \
comm.o
+NormalCplusplusObjectRule()
NormalLibraryObjectRule()
NormalLibraryTarget(olias,$(OBJS))
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
}
PrintNode_wp( XtPointer locator )
{
UrlAgent::print_document( (char *)locator);
- delete [] locator;
+ delete [] (char *)locator;
return (Boolean)True ; // must always return True
}
if (env().init(argc, argv) < 0)
exit(1);
- try
+ mtry
{
// don't set up for session management or tooltalk if
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);
}
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))
#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
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); }
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);
}
};
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);
}
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);
}
};
// /__ \/ 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"
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 \
#define LibHeaders NO
#define CplusplusSource YES
-DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
INCLUDES = -I../include
// $CurLog$ (Log at end)
//
-//#include <stream.h>
+//#include <sstream>
+//using namespace std;
#ifndef _XtintrinsicP_h
#include <X11/IntrinsicP.h>
#else // Not for doc
#include <WWL/WComposite.h>
-#include <stream.h>
+#include <sstream>
+using namespace std;
#define NL << '\n'; cout.flush()
/* $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
/* $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