#define TemplateObjs $(TEMPLATE_OBJS)
-#if defined(i386Architecture) || defined(AMD64Architecture) || defined(AlphaArchitecture)
+#if defined(i386Architecture) || defined(AMD64Architecture) || defined(AlphaArchitecture) || defined(ARMArchitecture)
# define ByteOrderDefines LittleEndianDefines
#elif defined(HAL32V7Architecture) || defined(SunArchitecture) || defined(AIXArchitecture) || defined(HPArchitecture) || defined(UXPArchitecture)
# define ByteOrderDefines BigEndianDefines
#define HasBSD44Sockets YES
#define HasZlib YES
+#ifndef CppCmd
#if OSMajorVersion >= 5
#define CppCmd /usr/bin/cpp -traditional
#define PreProcessCmd /usr/bin/cpp -traditional
#define CppCmd /usr/libexec/cpp -traditional
#define PreProcessCmd /usr/libexec/cpp -traditional
#endif
+#endif
+
#undef InstallCmd
#define InstallCmd /usr/bin/install
#undef KornShell
#define MkdirHierCmd mkdir -p
+#ifndef CcCmd
#define CcCmd gcc
#ifndef DefaultCCOptions
#define DefaultCCOptions -pipe
#endif
+#endif
#define CplusplusLibC -lstdc++
#endif
#endif
-#ifdef i386Architecture
-# define OptimizedCDebugFlags DefaultGcc2i386Opt
-#else
-# define OptimizedCDebugFlags -O2 -fno-strict-aliasing
+#ifndef OptimizedCDebugFlags
+# ifdef i386Architecture
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# else
+# define OptimizedCDebugFlags -O2 -fno-strict-aliasing
+# endif
#endif
#ifdef HasGcc2
#ifdef i386Architecture
-# define OptimizedCDebugFlags -O2
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 -fno-strict-aliasing
+# endif
# if OSMajorVersion < 1
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
# else
# define ServerExtraSysLibs -li386
# endif
#else
-# define OptimizedCDebugFlags -O2
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 -fno-strict-aliasing
+# endif
# if defined(SparcArchitecture)
# define ServerOSDefines -DDDXOSINIT
# else
# define HasAgpGart YES
+# ifndef DefaultGcc2i386Opt
+# define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
+# endif
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# endif
+
# define LdPostLib -L/usr/X11R6/lib -L/usr/local/lib
# define ServerExtraSysLibs -lamd64
# define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
# endif
# endif
-# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# endif
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraSysLibs -li386
# define LdPostLib -L/usr/X11R6/lib -L/usr/local/lib
#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
#define CplusplusLibC -lstdc++
+#ifndef CplusplusOptions
#define CplusplusOptions -Wall -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch
+#endif
+#ifndef LibraryCplusplusOptions
#define LibraryCplusplusOptions -Wall -Wpointer-arith -Wno-unused -Wno-write-strings -Wno-switch
+#endif
#define ArchitectureDefines -DOPENBSD_ARCHITECTURE
#endif /* SparcArchitecture */
#ifdef ARMArchitecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# endif
# define LinuxMachineDefines -D__arm__
# define LSBBitOrder YES
#endif /* ARMArchitecture */
#ifdef i386Architecture
-# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# endif
# define LinuxMachineDefines -D__i386__
/* For DtHelp TIFF processing routines. */
# define LSBBitOrder YES
#endif /* i386Architecture */
#ifdef AMD64Architecture
-# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# endif
# define LinuxMachineDefines -D__x86_64__
/* For DtHelp TIFF processing routines. */
# define LSBBitOrder YES
#endif /* AMD64Architecture */
#ifdef PpcArchitecture
-# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# endif
# define LinuxMachineDefines -D__powerpc__
#endif /* PpcArchitecture */
#ifdef AlphaArchitecture
-# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# endif
# define LinuxMachineDefines -D__alpha__
#endif /* AlphaArchitecture */
#ifdef Mc68020Architecture
-# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# endif
# define LinuxMachineDefines -D__mc68000__
# define StandardCppDefines -traditional
#endif /* Mc68020Architecture */
XCOMM We need to build Motif documentation as part of CDE
MakeDirectories(Makefiles,m-guides)
Makefiles::
- $(RM) m-guides/?*; \
+ $(RM) -r m-guides/?*; \
cd m-guides; \
if test -f ../$(MDOCSRC)/C/guides/bookcase.bc; \
then $(LN) ../$(MDOCSRC)/C/guides/?* .; \
else $(CP) /dev/null ./Imakefile; \
- $(LN) ../$(MDOCSRC)/C/guides/common .; \
+ $(MKDIRHIER) ./common; \
+ $(LN) ../../guides/common/ManLinksMotif.sgm common/ManLinks.sgm; \
fi; \
cd ..
--- /dev/null
+<!-- $XConsortium: ManLinksMotif.sgm /main/1 2014/03/26 11:36:34 uw $ -->
+
+<!entity cdeman.XmFontList "<link linkend=CDEMDOC.MAN1.RSML.1><filename moreinfo=RefEntry>XmFontList</filename>(3)</link>">
+<!entity cdeman.XmText "<link linkend=CDEMDOC.MAN2.RSML.1><filename moreinfo=RefEntry>XmText</filename>(3)</link>">
+<!entity cdeman.XmInstallImage "<link linkend=CDEMDOC.MAN3.RSML.1><filename moreinfo=RefEntry>XmInstallImage</filename>(3)</link>">
+<!entity cdeman.VendorShell "<link linkend=CDEMDOC.MAN4.RSML.1><filename moreinfo=RefEntry>VendorShell</filename>(3)</link>">
+<!entity cdeman.XmGetPixmap "<link linkend=CDEMDOC.MAN5.RSML.1><filename moreinfo=RefEntry>XmGetPixmap</filename>(3)</link>">
+<!entity cdeman.VirtualBindings "<link linkend=CDEMDOC.MAN6.RSML.1><filename moreinfo=RefEntry>VirtualBindings</filename>(3)</link>">
+<!entity cdeman.Composite "<link linkend=CDEMDOC.MAN7.RSML.1><filename moreinfo=RefEntry>Composite</filename>(3)</link>">
+<!entity cdeman.Constraint "<link linkend=CDEMDOC.MAN8.RSML.1><filename moreinfo=RefEntry>Constraint</filename>(3)</link>">
+<!entity cdeman.Core "<link linkend=CDEMDOC.MAN9.RSML.1><filename moreinfo=RefEntry>Core</filename>(3)</link>">
+<!entity cdeman.XmList "<link linkend=CDEMDOC.MAN10.RSML.1><filename moreinfo=RefEntry>XmList</filename>(3)</link>">
+<!entity cdeman.XmManager "<link linkend=CDEMDOC.MAN11.RSML.1><filename moreinfo=RefEntry>XmManager</filename>(3)</link>">
+<!entity cdeman.XmTextField "<link linkend=CDEMDOC.MAN12.RSML.1><filename moreinfo=RefEntry>XmTextField</filename>(3)</link>">
+<!entity cdeman.XmBulletinBoard "<link linkend=CDEMDOC.MAN13.RSML.1><filename moreinfo=RefEntry>XmBulletinBoard</filename>(3)</link>">
+<!entity cdeman.XmForm "<link linkend=CDEMDOC.MAN14.RSML.1><filename moreinfo=RefEntry>XmForm</filename>(3)</link>">
+<!entity cdeman.XmRowColumn "<link linkend=CDEMDOC.MAN15.RSML.1><filename moreinfo=RefEntry>XmRowColumn</filename>(3)</link>">
+<!entity cdeman.XmLabel "<link linkend=CDEMDOC.MAN16.RSML.1><filename moreinfo=RefEntry>XmLabel</filename>(3)</link>">
+<!entity cdeman.XmPrimitive "<link linkend=CDEMDOC.MAN17.RSML.1><filename moreinfo=RefEntry>XmPrimitive</filename>(3)</link>">
+<!entity cdeman.XmFrame "<link linkend=CDEMDOC.MAN18.RSML.1><filename moreinfo=RefEntry>XmFrame</filename>(3)</link>">
+<!entity cdeman.XmCreateDragIcon "<link linkend=CDEMDOC.MAN19.RSML.1><filename moreinfo=RefEntry>XmCreateDragIcon</filename>(3)</link>">
+<!entity cdeman.XmDragIcon "<link linkend=CDEMDOC.MAN20.RSML.1><filename moreinfo=RefEntry>XmDragIcon</filename>(3)</link>">
+<!entity cdeman.XmDragStart "<link linkend=CDEMDOC.MAN21.RSML.1><filename moreinfo=RefEntry>XmDragStart</filename>(3)</link>">
+<!entity cdeman.XmDragContext "<link linkend=CDEMDOC.MAN22.RSML.1><filename moreinfo=RefEntry>XmDragContext</filename>(3)</link>">
+<!entity cdeman.XmDropSiteRegister "<link linkend=CDEMDOC.MAN23.RSML.1><filename moreinfo=RefEntry>XmDropSiteRegister</filename>(3)</link>">
+<!entity cdeman.XmDropSite "<link linkend=CDEMDOC.MAN24.RSML.1><filename moreinfo=RefEntry>XmDropSite</filename>(3)</link>">
+<!entity cdeman.XmDropSiteUpdate "<link linkend=CDEMDOC.MAN25.RSML.1><filename moreinfo=RefEntry>XmDropSiteUpdate</filename>(3)</link>">
+<!entity cdeman.XmDropTransfer "<link linkend=CDEMDOC.MAN26.RSML.1><filename moreinfo=RefEntry>XmDropTransfer</filename>(3)</link>">
+<!entity cdeman.XmDropTransferStart "<link linkend=CDEMDOC.MAN27.RSML.1><filename moreinfo=RefEntry>XmDropTransferStart</filename>(3)</link>">
+<!entity cdeman.XmDropSiteUnregister "<link linkend=CDEMDOC.MAN28.RSML.1><filename moreinfo=RefEntry>XmDropSiteUnregister</filename>(3)</link>">
+<!entity cdeman.XmTrackingLocate "<link linkend=CDEMDOC.MAN29.RSML.1><filename moreinfo=RefEntry>XmTrackingLocate</filename>(3)</link>">
+<!entity cdeman.XmeWarning "<link linkend=CDEMDOC.MAN30.RSML.1><filename moreinfo=RefEntry>XmeWarning</filename>(3)</link>">
+<!entity cdeman.mwm "<link linkend=CDEMDOC.MAN31.RSML.1><filename moreinfo=RefEntry>mwm</filename>(1)</link>">
<!ENTITY % SEntities SYSTEM "./man/SEntity.sgm">
%SEntities;
-<!ENTITY % MotifLinks SYSTEM "../../../../motif/doc/C/guides/common/ManLinks.sgm">
+<!ENTITY % MotifLinks SYSTEM "../../../../doc/C/m-guides/common/ManLinks.sgm">
%MotifLinks;
<!ENTITY % CDELinks SYSTEM "./common/ManLinks.sgm">
%CDELinks;
unsigned int lsb = 0;
- for ( unsigned int i=f_words-1; i>=0; i++ ) {
+ for ( int i=f_words-1; i>=0; i++ ) {
msb = (BIT_TEST((int)f_array[i], wordWithMSBSet)) ? wordWithMSBSet : 0x0;
f_array[i] = f_array[i] << 1;
f_array[i] |= lsb;
enum TagType { StartTag, EndTag, AttributeSection, OliasAttribute, NoTag };
DocParser(Resolver &);
- ~DocParser();
+ virtual ~DocParser();
// returns a boolean
unsigned int parse(istream &);
return out;
}
-unsigned hash(const FeatureDef& key)
+unsigned fhash(const FeatureDef& key)
{
return key.name() -> hash();
}
{
public:
Resolver(PathTable& pTable, Renderer& r);
- ~Resolver();
+ virtual ~Resolver();
// beginElement returns a non-zero value if element is to be ignored
unsigned int beginElement(Element*);
#include "Types.h"
#include "VariableTable.h"
-static unsigned hash(const Symbol& key)
+static unsigned shash(const Symbol& key)
{
return key.hash();
}
VariableTable::VariableTable()
-: hashTable<Symbol,Expression>(hash)
+: hashTable<Symbol,Expression>(shash)
{
}
public:
info_lib(char** set_name_array, char** list_name_array,
char* info_lib_dir = 0, char* selected_base_name = 0,
- char* info_lib_name = "", int descriptor = -1);
+ char* info_lib_name = (char*)"", int descriptor = -1);
virtual ~info_lib();
extern int errno;
#endif
-static int _gettemp();
+static int _gettemp(char*, int*);
int mkstemp(path)
char *path;
if (*trv == 'z')
*trv++ = 'a';
else {
- if (isdigit(*trv))
+ if (isdigit((unsigned char) *trv))
*trv = 'a';
else
++*trv;
template <class T>
T value_vector<T>::operator[](size_t i) const
{
- if ( i<0 || i>= f_size )
+ if ( (long)i < 0 || i >= f_size )
throw(ccBoundaryException(0, f_size-1, i));
else
return f_array[i];
template <class T>
T& value_vector<T>::operator[](size_t i)
{
- if ( i<0 || i>= f_size )
+ if ( (long)i < 0 || i >= f_size )
throw(ccBoundaryException(0, f_size-1, i));
else
return f_array[i];
// Slide the specified exception down to fill the hole below it.
if (g_next_avail >= (char *) *exception)
abort();
- memcpy (g_next_avail, *exception, length);
+ memcpy (g_next_avail, (void*)*exception, length);
*exception = (Exception *) g_next_avail;
g_next_avail = ((char *) *exception) + length;
}
{
PRINTF (("Type specified is <%s>\n", type));
- while (isalnum (*type) && isalnum (*this_class) &&
+ while (isalnum ((unsigned char) *type) &&
+ isalnum ((unsigned char) *this_class) &&
*type++ == *this_class++);
- if (isalnum (*type) || isalnum (*this_class))
+ if (isalnum ((unsigned char) *type) ||
+ isalnum ((unsigned char) *this_class))
return (0);
// Check for pointer types
- while (isspace (*type))
+ while (isspace ((unsigned char) *type))
{
type++;
}
int compact(buckets& bs, unsigned s[], int t, Boolean swap)
{
- int target, k, i, remaining_bits, branch;
+ int target, k, i, remaining_bits, branch = 0;
unsigned unsigned_g, high_part_bits;
unsigned lower_part_bits = 0;
r = 0;
v_seed = 0;
t = 0;
- hash::init_data_member();
+ ihash::init_data_member();
}
}
int fast_mphf::cdr_sizeof()
{
- return long_pstring::cdr_sizeof() + hash::cdr_sizeof() +
+ return long_pstring::cdr_sizeof() + ihash::cdr_sizeof() +
6*sizeof(unsigned int);
}
io_status fast_mphf::cdrOut(buffer& buf)
{
long_pstring::cdrOut(buf);
- hash::cdrOut(buf);
+ ihash::cdrOut(buf);
buf.put(v_no_ps);
buf.put(v_p1);
io_status fast_mphf::cdrIn(buffer& buf)
{
long_pstring::cdrIn(buf);
- hash::cdrIn(buf);
+ ihash::cdrIn(buf);
buf.get(v_no_ps);
buf.get(v_p1);
friend class fast_mphf;
};
-class fast_mphf : public long_pstring, public hash
+class fast_mphf : public long_pstring, public ihash
{
public:
#include <stdio.h>
#include "index/hash.h"
-hash::hash() : v_key_set_sz(0), v_hash_func_sz(0), v_hash_tbl_sz(0)
+ihash::ihash() : v_key_set_sz(0), v_hash_func_sz(0), v_hash_tbl_sz(0)
{
}
-hash::~hash()
+ihash::~ihash()
{
}
void
-hash::init_data_member(unsigned int a, unsigned int b, unsigned int c)
+ihash::init_data_member(unsigned int a, unsigned int b, unsigned int c)
{
v_key_set_sz = a;
v_hash_func_sz = b;
}
-int hash::cdr_sizeof()
+int ihash::cdr_sizeof()
{
return sizeof(v_key_set_sz) + sizeof(v_hash_func_sz) + sizeof(v_hash_tbl_sz);
}
-io_status hash::cdrOut(buffer& buf)
+io_status ihash::cdrOut(buffer& buf)
{
/*
-MESSAGE(cerr, "hash::cdrOut");
+MESSAGE(cerr, "ihash::cdrOut");
debug(cerr, v_hash_tbl_sz);
debug(cerr, v_key_set_sz);
*/
return done;
}
-io_status hash::cdrIn(buffer& buf)
+io_status ihash::cdrIn(buffer& buf)
{
-//MESSAGE(cerr, "hash::cdrIn");
+//MESSAGE(cerr, "ihash::cdrIn");
buf.get(v_key_set_sz);
buf.get(v_hash_func_sz);
#include "utility/buffer.h"
#include "utility/key.h"
-class hash
+class ihash
{
public:
- hash();
- virtual ~hash() ;
+ ihash();
+ virtual ~ihash() ;
virtual void init_data_member(unsigned int v_key_set_sz = 0,
unsigned int v_hash_func_sz = 0,
class mark_t : private ostring
{
public:
- mark_t(char* marks = "\t\n ");
+ mark_t(char* marks = (char*)"\t\n ");
virtual ~mark_t() {};
friend istream& operator >>(istream&, mark_t&);
friend ostream& operator <<(ostream&, mark_t&);
buf[i] = mapping[(int)buf[i]];
}
- } while (!isalnum (buf[0]));
+ } while (!isalnum ((unsigned char) buf[0]));
return (buf);
}
}
-void* operator new( size_t sz )
+void* operator new( size_t sz ) throw(std::bad_alloc)
{
void* p = (void*)malloc(sz);
//printf("a::operator new called(). sz= %d, allo=%x\n", sz, p);
return p;
}
-void operator delete( void* p )
+void operator delete( void* p ) throw()
{
//printf("a::operator free called(). alloc= %x\n", p);
if ( p )
{
public:
collectionIterator(info_base*, int set_position);
- ~collectionIterator();
+ virtual ~collectionIterator();
// advance the iterator to the next position.
// A newly constructed iterator's position is
int compare_stream(ostringstream& x, ostringstream& y)
{
- if ( x.str().size() != y.str().size() ) {
- cerr << x.str().size() << "---" << y.str().size() << endl;
-//debug(cerr, x.str().c_str());
-//debug(cerr, y.str().c_str());
+ string xstr = x.str();
+ string ystr = y.str();
+
+ if ( xstr.size() != ystr.size() ) {
+ cerr << xstr.size() << "---" << ystr.size() << endl;
+//debug(cerr, xstr.c_str());
+//debug(cerr, ystr.c_str());
return 1;
} else {
- char* u = (char *)x.str().c_str();
- char* v = (char *)y.str().c_str();
+ char* u = (char *)xstr.c_str();
+ char* v = (char *)ystr.c_str();
//debug(cerr, u);
//debug(cerr, v);
//fprintf(stderr, "u=%s, pcount() = %d\n", u, x.pcount());
//fprintf(stderr, "v=%s, pcount() = %d\n", v, y.pcount());
- if ( memcmp(u, v, x.str().size()) != 0 ) {
+ if ( memcmp(u, v, xstr.size()) != 0 ) {
STDERR_MESSAGE("two streams do not match.");
debug(cerr, u);
debug(cerr, v);
char* mbs = (char *)value;
wchar_t *wcs = (wchar_t*)malloc(strlen(mbs) + 1);
// check if value string can be valid in current locale
- if (mbstowcs(wcs, mbs, strlen(mbs) + 1) < 0) { // invalid
+ if ((long)mbstowcs(wcs, mbs, strlen(mbs) + 1) < 0) { // invalid
const char* p = extract_ascii((char*)value);
XtFree((char*)value);
value = (XtPointer)p;
IcccmAgent(void*, data_handler_t);
IcccmAgent(void*, data_exporter_t);
- ~IcccmAgent();
+ virtual ~IcccmAgent();
data_handler_t set_string_handler(data_handler_t);
data_exporter_t set_string_exporter(data_exporter_t);
{
OutlineList &rootList = *(f_doc_tree_view->list());
unsigned int i;
- for (i = rootList.length() - 1; i >= 0; i --) {
+ for (i = rootList.length() - 1; (int) 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) {
if (f_shell == NULL)
{
create_ui_objects();
- display_list();
}
+ display_list();
f_shell->Popup();
f_shell->DeIconify();
}
enum { ENTRY_ACTIVATE = FolioObjectLast, _LAST };
public: // functions
-ListView (List *the_list = NULL, char *name = "ListView")
+ListView (List *the_list = NULL, char *name = (char*)"ListView")
: f_the_list(NULL), f_shell (NULL), f_name (name)
{
list (the_list);
void
NodeWindowAgent::text_callback(WCallback *wcb)
{
- (XmAnyCallbackStruct*)wcb->CallData();
+ (void) (XmAnyCallbackStruct*)wcb->CallData();
char *text = XmTextGetString(wcb->GetWidget());
if (text == NULL)
return;
{
List_Iterator<UAS_Pointer<UAS_Common> > tabs (g_tab_list);
List_Iterator<BookTab *> btns (f_tab_btn_list);
- BookTab *current;
+ BookTab *current = NULL;
bool changed = FALSE;
static int old_count = -1;
int count = 0;
#endif
// Another Motif 1.2 bug. YToPos should return 0 for bogus position,
// but it doesn't check the range.
- if (f_item_pos < 0 || (int) f_item_pos >= ItemCount())
+ if ((int) f_item_pos < 0 || (int) f_item_pos >= ItemCount())
return (NULL);
oe = item_at (f_item_pos);
static Boolean print_hierarchy; // keep track of hierarchy vs section
+#if defined(PRINTING_SUPPORTED)
static void PrintEverything(AppPrintData *p);
+#endif /* PRINTING_SUPPORTED */
+
static void PrintOneUASCommon(UAS_Pointer<UAS_Common> &doc, Widget pshell, int *cur_pageP);
PrintPanelAgent::PrintPanelAgent()
PdmNotifyCB(Widget pr_shell, XtPointer client_data, XtPointer call_data)
{
RCS_DEBUG("PdmNotifyCB called.\n");
- char *msg;
#if defined(PRINTING_SUPPORTED)
+ char *msg;
+
XmPrintShellCallbackStruct* pr_cbs =
(XmPrintShellCallbackStruct*) call_data;
void
CreatePrintShell(Widget widget, AppPrintData* p)
{
- char buf[BUFSIZ];
-
RCS_DEBUG("CreatePrintShell called.\n");
+
#if defined(PRINTING_SUPPORTED)
+ char buf[BUFSIZ];
/*
* create a print_shell if none available. the print dialog callback
void
PrintSetupCB(Widget print_dialog, XtPointer client_data, XtPointer call_data)
{
- char *msg;
-
RCS_DEBUG("PrintSetupCB called.\n");
-#if defined(PRINTING_SUPPORTED)
+#if defined(PRINTING_SUPPORTED)
+ char *msg;
AppPrintData *p = (AppPrintData*)client_data;
DtPrintSetupCallbackStruct *pbs = (DtPrintSetupCallbackStruct*)call_data;
}
+#if defined(PRINTING_SUPPORTED)
/*
* ------------------------------------------------------------------------
* Name: PrintEverything
RCS_DEBUG("PrintEverything exiting.\n");
}
+#endif /* PRINTING_SUPPORTED */
static void
PrintOneUASCommon(UAS_Pointer<UAS_Common> &doc, Widget pshell, int *cur_pageP)
void
SearchResultsAgent::resize()
{
+ UAS_Pointer<UAS_List<UAS_SearchResultsEntry> > tmpList =
+ f_results->results()->create_results(0, f_count);
UAS_List<UAS_SearchResultsEntry>& rlist =
- *(f_results->results()->create_results(0, f_count));
+ *(UAS_List<UAS_SearchResultsEntry> *)tmpList;
fill_list(rlist);
#define ADD(LIST,STRING,CHILD,EXPANDED) \
oe = new OutlineString (STRING); \
- if (CHILD) oe->set_children (CHILD); \
+ if ((bool)CHILD) oe->set_children (CHILD); \
if (EXPANDED) oe->set_expanded (0x1); \
LIST->append (*oe);
class Iterator
{
public:
+ virtual ~Iterator() {}
+
// initialize iterator, find first element
virtual FolioObject *init() = 0;
unsigned int index = 0;
unsigned int rel_vcc;
- if ((rel_vcc = vcc - ((SegClientData*)seg->client_use)->vcc()) < 0)
+ if ((int)(rel_vcc = vcc - ((SegClientData*)seg->client_use)->vcc()) < 0)
return (unsigned int)-1;
if (seg->type & _DtCvWIDE_CHAR) {
GENCAT=gencat
#endif
+#define MACRO_Messages @(messages=; \ @@\
+ for i in $(MSGS) ; \ @@\
+ do \ @@\
+ messages="$$messages $$i/$$i.msg"; \ @@\
+ done; \ @@\
+ cat $$messages > $(PROGRAM_NAME).cpp )
+
messages::
foreach_subdirs(messages, $(MSGS))
@echo "### Making msgs in src ###"
@$(RM) $(PROGRAM_NAME).msg.updated
- @(messages=; \
- for i in $(MSGS) ; \
- do \
- messages="$$messages $$i/$$i.msg"; \
- done; \
- cat $$messages > $(PROGRAM_NAME).cpp )
+ MACRO_Messages
$(CPP) -P -C $(PROGRAM_NAME)_msg.tmpl | $(TOOLS)/misc/msgsets > $(PROGRAM_NAME).msg.updated
@$(RM) $(PROGRAM_NAME).cpp
*
*/
+#include <limits.h>
#include <string.h>
#include <iostream>
using namespace std;
int buffer_size = MB_CUR_MAX * f_wstringrep->f_length + 1;
char* buffer = new char[buffer_size];
- if (wcstombs(buffer, f_wstringrep->f_data, buffer_size) < 0)
+ if ((long)wcstombs(buffer, f_wstringrep->f_data, buffer_size) < 0)
*buffer = 0;
return buffer;
}
end_try;
- unsigned int i, start_index;
+ unsigned int i, start_index = 0;
for (i = 0; i < num_columns; i++) {
if (grid[current_row][i] == NULL) {
start_index = i;
if (*value == '\0') // Ignore bogus lines.
continue;
*value++ = '\0';
- while (isspace (*value))
+ while (isspace ((unsigned char) *value))
value++;
int len = strlen(value);
value[len-1] = '\0';
void
QueryTermView::select_toggle (WCallback *wcb)
{
- (XmToggleButtonCallbackStruct *) wcb->CallData();
+ (void) (XmToggleButtonCallbackStruct *) wcb->CallData();
// notify someone about selection state...
invert_colors();
* Floor, Boston, MA 02110-1301 USA
*/
// $TOG: UAS_BookcaseEntry.C /main/5 1998/04/17 11:40:44 mgreess $
-#include "UAS_BookcaseEntry.hh"
#include "UAS_Exceptions.hh"
+#include "UAS_BookcaseEntry.hh"
#include "UAS_Collection.hh"
#include <string.h>
class UAS_Factory {
public:
+ virtual ~UAS_Factory() {}
+
static void initialize (UAS_List<UAS_String>&);
static void finalize ();
static UAS_List<UAS_String> getRootLocators ();
/* Copyright (c) 1995 FUJITSU LIMITED */
/* All Rights Reserved */
-#if defined(__uxp__) || defined(USL) || defined(linux)
+#if defined(__uxp__) || defined(USL) || defined(linux) || defined(CSRG_BASED)
#include <string.h>
#else
#include <strings.h>
}
end_try;
+#if 0 /* not supported by libDtSearch */
caps |= 0x01 << OQL_WEIGHT;
mtry {
se_construct(WEIGHT, word, digits, "");
caps &= ~(0x01 << OQL_COMPLETION);
}
end_try;
+#endif
caps |= 0x01 << OQL_PHRASE;
mtry {
*/
// $XConsortium: UAS_PtrList.cc /main/5 1996/08/06 09:23:58 rcs $
+#include "UAS_Exceptions.hh"
#include "Managers/CatMgr.hh"
#include "Registration.hh"
protected:
// This is an abstract base class.
UAS_Receiver() { }
- ~UAS_Receiver();
+ virtual ~UAS_Receiver();
virtual void receive (T &message, void *client_data = 0) = 0;
/* Copyright (c) 1995,1996 FUJITSU LIMITED */
/* All Rights Reserved */
+#include "UAS_Exceptions.hh"
#include "DtSR_SearchEngine.hh"
#include "DtSR_SearchResultsEntry.hh"
#include "DtSR_SearchResults.hh"
}
end_try;
- char* text = (char*)output.str().c_str();
- *(text + output.str().size()) = '\0';
+ string outpstr = output.str();
+ char* text = (char*)outpstr.c_str();
#ifdef DUMP_NODES
{
for (int i = 0; i < count; i++) {
stemsbuf << (f_search_res->stems(f_dbn)->stems())[i] << '\n';
}
- char* stems = (char*)stemsbuf.str().c_str();
- *(stems + stemsbuf.str().size()) = '\0';
+ string stemsbstr = stemsbuf.str();
+ char* stems = (char*)stemsbstr.c_str();
parseout = StringParser::hilite(text, count, stems);
matches = new UAS_List<UAS_TextRun>;
// convert kwics to textrun
+ string textrbstr;
if (parseout == NULL && kwics) {
ostringstream textrunbuf;
for (int i = 0; i < n_kwics; i++)
textrunbuf << kwics[i].offset << '\t' << kwics[i].length << '\n';
- parseout = (char*)textrunbuf.str().c_str();
- *(parseout + textrunbuf.str().size()) = '\0';
+ textrbstr = textrunbuf.str();
+ parseout = (char*)textrbstr.c_str();
}
else if (parseout == NULL)
{
- if (text)
- delete[] text;
return matches;
}
}
else {
scanned = mblen(cursor, MB_CUR_MAX);
- assert( scanned >= 0 );
vcc++;
+
+ /* skip one byte in case of failure */
+ if (scanned < 0)
+ scanned = 1;
}
off -= scanned;
matches->insert_item(textrun);
}
- if (text)
- delete[] text;
- if (parseout)
- delete[] parseout;
-
return matches;
}
#endif
char* caped_text = NULL;
+ string capstr;
if (sensitive == False) { // case-insensitive search
unsigned char *p;
else
capitalized << *p;
}
- text_in = caped_text = (char *)capitalized.str().c_str();
- *(char*)(text_in + capitalized.str().size()) = '\0';
+ capstr = capitalized.str();
+ text_in = caped_text = (char *)capstr.c_str();
}
ostringstream text_run;
if (caped_text)
delete[] caped_text;
- char* ret_text = (char *)text_run.str().c_str();
+ string trunstr = text_run.str();
+ char* ret_text = (char *)trunstr.c_str();
if (ret_text == NULL)
return NULL;
ret_text << off << '\t' << len << '\n' << '\0';
- return (char *)ret_text.str().c_str();
+ string rettstr = ret_text.str();
+ return (char *)rettstr.c_str();
}
char *
char ch;
while (cin.get(ch)) text << ch;
- char* buf = (char *)text.str().c_str();
- *(buf + text.str().size()) = '\0';
+ string textstr = text.str();
+ char* buf = (char *)textstr.c_str();
char* p = buf;
if (buf == NULL || *buf == '\0') {
char ch;
while (cin.get(ch)) text << ch;
- char* buf = (char *)text.str().c_str();
- *(buf + text.str().size()) = '\0';
+ string textstr = text.str();
+ char* buf = (char *)textstr.c_str();
char* match = StringParser::brute_force(buf, npat, patterns);
*/
// $XConsortium: MMDB_Library.C /main/9 1996/09/14 13:10:52 cde-hal $
+# include "UAS_Exceptions.hh"
# include "MMDB_Library.hh"
# include "MMDB_BookCase.hh"
# include "MMDB_Factory.hh"
<Key>Home: page(0,0) ";
-static void ActionStart(), ActionStop(), ActionAbort(), ActionMove();
-static void ActionPage(), ActionNotify(), ActionSet();
+static void ActionStart(Widget, XEvent*, String*, Cardinal*);
+static void ActionStop(Widget, XEvent*, String*, Cardinal*);
+static void ActionAbort(Widget, XEvent*, String*, Cardinal*);
+static void ActionMove(Widget, XEvent*, String*, Cardinal*);
+static void ActionPage(Widget, XEvent*, String*, Cardinal*);
+static void ActionSet(Widget, XEvent*, String*, Cardinal*);
+static void ActionNotify(Widget, XEvent*, String*, Cardinal*);
static XtActionsRec actions[] = {
{ "start", ActionStart }, /* start tmp graphics */
* syntax: spaces [+-] number spaces [pc\0] spaces
*/
- for (; isascii(*s) && isspace(*s); s++) ; /* skip white space */
+ /* skip white space */
+ for (; isascii(*s) && isspace((unsigned char) *s); s++) ;
if (*s == '+' || *s == '-') { /* deal with signs */
rel = TRUE;
}
/* skip over numbers */
- for (cp = s; isascii(*s) && (isdigit(*s) || *s == '.'); s++) ;
+ for (cp = s; isascii(*s) && (isdigit((unsigned char)*s)|| *s == '.'); s++) ;
val *= atof (cp);
/* skip blanks */
- for (; isascii(*s) && isspace(*s); s++) ;
+ for (; isascii(*s) && isspace((unsigned char) *s); s++) ;
if (*s) { /* if units */
switch (s[0]) {
#undef offset
};
-static void ClassPartInitialize(), ClassInitialize(),Realize(),ConvertCursor();
-static Boolean SetValues(), ChangeSensitive();
+static void ClassPartInitialize(WidgetClass);
+static void ClassInitialize();
+static void Realize(Widget, Mask*, XSetWindowAttributes*);
+static void ConvertCursor(Widget);
+static Boolean SetValues();
+static Boolean ChangeSensitive(Widget);
SimpleClassRec simpleClassRec = {
{ /* core fields */
static XtGeometryResult QueryGeometry();
/* utility routines */
-static void insert_node();
-static void delete_node();
-static void layout_tree();
+static void insert_node(Widget, Widget);
+static void delete_node(Widget, Widget);
+static void layout_tree(TreeWidget, Boolean);
/*
}
}
/* zero out the rest of the fonts */
- for (; i>MAX_FONTS; ++i) cgm_s->fontlist[i] = NULL;
+ for (; i<MAX_FONTS; ++i) cgm_s->fontlist[i] = NULL;
return 1;
}
WCallback* cbList;
public:
WWL ();
- ~WWL ();
+ virtual ~WWL ();
void AddCb (WCallback *);
Boolean RemoveCb (WCallback *);
const char *stitle;
const char *style;
int dupID = 0;
+ string outstr;
OLIAS_DB mmdb_handle;
info_lib *mmdb =
stylesheet_smart_ptr sheet(base_ptr, style);
ostringstream strout;
sheet.its_oid().asciiOut(strout);
+ outstr = strout.str();
ncf->insert(STRING_CODE, nodeLocator,
STRING_CODE, title,
COMPRESSED_STRING_CODE, comp_agent, "",
STRING_CODE, bookLocator,
OID_CODE, "0.0", /* pointer to Book/CCF/DOC object */
- OID_CODE, (char *)strout.str().c_str(),
+ OID_CODE, (char *)outstr.c_str(),
NULL);
}
CC_String *val = (CC_String *)hd->findValue( &key );
if ( !val ) {
NeedRemote = 1;
+#ifdef REMOTE_DEBUG
cerr << "(WARNING) Unresolved link = " << (const char *)key << endl
<< " file = " << current_file_name << endl
<< " line no. = " << current_line_num << "\n\n";
+#endif
}
// cleanup and reset
const char *src;
char *dest;
for(src = name, dest=buf; *src; src++, dest++){
- *dest = toupper(*src);
+ *dest = toupper((unsigned char) *src);
}
*dest = 0;
dieRWD(-1, "%s: Cannot find %s: %s\n",
EXEC_NAME, newDir, strerror(errno));
- snprintf(cmd, sizeof(cmd), "dtsrcreate %s-o -l%d %s",
- (gStruct->verbose) ? "" : "-q ",
+ snprintf(cmd, sizeof(cmd), "dtsrcreate %s-o -a%d -l%d %s",
+ (gStruct->verbose) ? "" : "-q ", 210,
langtbl[gStruct->dtsridx].dtsrlang, bookCaseName);
runShellCmd(cmd);
for (i = 0; bookCaseName[i] != '\0'; i++)
{
- if (!isalnum(bookCaseName[i]))
+ if (!isalnum((unsigned char) bookCaseName[i]))
break;
}
for (i = 1; fileVector[i] != (char *)NULL; i++)
{
if ((strncmp(fileVector[i], bookCaseName, bcNameLen) == 0) &&
- (!isalnum(fileVector[i][bcNameLen])) &&
+ (!isalnum((unsigned char) fileVector[i][bcNameLen])) &&
(fileVector[i][bcNameLen] != '_'))
{
if (!replaced)
tocTitle = sgmlData(title);
for (i = 0; id[i] != '\0'; i++)
{
- if ((!isalnum(id[i])) && (id[i] != '.') && (id[i] != '-'))
- die(-1, "bad ID: %s\n", id);
+ if ((!isalnum((unsigned char) id[i])) &&
+ (id[i] != '.') && (id[i] != '-'))
+ die(-1, "bad ID: %s\n", id);
}
fileIn = buildPath("%s/NodeMeta", makeWorkDir());
int ok = 0;
DtMmdbInit();
- if ( argc == 1 || 0==isdigit(argv[1][0]) ) {
+ if ( argc == 1 || 0==isdigit((unsigned char) argv[1][0]) ) {
usage(argc, argv);
} else
switch ( atoi(argv[1]) ) {
}
-main()
+int main()
{
int i,j;
+ string setstr;
yylex();
}
for (i = 0; i < sets_cnt; i++) {
- const char* record = sets[sorted[i]]->str().c_str();
+ setstr = sets[sorted[i]]->str();
+ const char* record = setstr.c_str();
std::cout << record << '\n' << std::flush;
}
EXTRA_DEFINES = -DBYTE_SWAP -D_XOPEN_SOURCE
#endif
+#if defined(i386Architecture) || defined(AMD64Architecture) || \
+ defined(ARMArchitecture)
+EXTRA_DEFINES = -DBYTE_SWAP
+#endif
+
#ifdef AIXArchitecture
BYTE_SWAP_LIB = -lisode
#else