1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

Fix dtinfo search engine

This commit is contained in:
Ulrich Wilkens 2014-04-01 04:45:33 +02:00 committed by Jon Trulson
parent 0254ebc0b4
commit 38dfc9e235
68 changed files with 252 additions and 135 deletions

View file

@ -426,7 +426,7 @@ TEMPLATE_OBJS=TemplateDB//**/*.o
#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

View file

@ -21,6 +21,7 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
#define HasBSD44Sockets YES
#define HasZlib YES
#ifndef CppCmd
#if OSMajorVersion >= 5
#define CppCmd /usr/bin/cpp -traditional
#define PreProcessCmd /usr/bin/cpp -traditional
@ -28,6 +29,8 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
#define CppCmd /usr/libexec/cpp -traditional
#define PreProcessCmd /usr/libexec/cpp -traditional
#endif
#endif
#undef InstallCmd
#define InstallCmd /usr/bin/install
#undef KornShell
@ -67,10 +70,12 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
#define MkdirHierCmd mkdir -p
#ifndef CcCmd
#define CcCmd gcc
#ifndef DefaultCCOptions
#define DefaultCCOptions -pipe
#endif
#endif
#define CplusplusLibC -lstdc++
@ -142,10 +147,12 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe
#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

View file

@ -108,7 +108,9 @@ XCOMM operating system: OSName
#ifdef i386Architecture
# define OptimizedCDebugFlags -O2
# ifndef OptimizedCDebugFlags
# define OptimizedCDebugFlags -O2 -fno-strict-aliasing
# endif
# if OSMajorVersion < 1
# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
# else
@ -118,7 +120,9 @@ XCOMM operating system: OSName
# define ServerExtraSysLibs -li386
# endif
#else
# define OptimizedCDebugFlags -O2
# ifndef OptimizedCDebugFlags
# define OptimizedCDebugFlags -O2 -fno-strict-aliasing
# endif
# if defined(SparcArchitecture)
# define ServerOSDefines -DDDXOSINIT
# else

View file

@ -483,6 +483,13 @@ install:: fonts.alias @@\
# 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
@ -553,7 +560,9 @@ install:: fonts.alias @@\
# 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
@ -1032,8 +1041,12 @@ CXXDEPENDINCLUDE != echo | `CcCmd -print-prog-name=cc1plus` -v 2>&1 | \
#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

View file

@ -192,6 +192,9 @@ TIRPCLIB =
#endif /* SparcArchitecture */
#ifdef ARMArchitecture
# ifndef OptimizedCDebugFlags
# define OptimizedCDebugFlags DefaultGcc2i386Opt
# endif
# define LinuxMachineDefines -D__arm__
# define LSBBitOrder YES
@ -202,7 +205,9 @@ TIRPCLIB =
#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
@ -214,7 +219,9 @@ TIRPCLIB =
#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
@ -226,17 +233,23 @@ TIRPCLIB =
#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 */

View file

@ -12,12 +12,13 @@ MakeDirectories(all,help-sdl cde.dti)
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 ..

View file

@ -0,0 +1,33 @@
<!-- $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>">

View file

@ -33,7 +33,7 @@
<!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;

View file

@ -164,7 +164,7 @@ BitVector& BitVector::shiftLeftOneBit()
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;

View file

@ -55,7 +55,7 @@ public:
enum TagType { StartTag, EndTag, AttributeSection, OliasAttribute, NoTag };
DocParser(Resolver &);
~DocParser();
virtual ~DocParser();
// returns a boolean
unsigned int parse(istream &);

View file

@ -183,7 +183,7 @@ ostream& TypeValues::print(ostream& out, int tabs) const
return out;
}
unsigned hash(const FeatureDef& key)
unsigned fhash(const FeatureDef& key)
{
return key.name() -> hash();
}

View file

@ -57,7 +57,7 @@ class Resolver : public Destructable
{
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*);

View file

@ -25,13 +25,13 @@
#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)
{
}

View file

@ -67,7 +67,7 @@ class info_lib : public primitive
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();

View file

@ -71,7 +71,7 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
extern int errno;
#endif
static int _gettemp();
static int _gettemp(char*, int*);
int mkstemp(path)
char *path;
@ -142,7 +142,7 @@ _gettemp(path, doopen)
if (*trv == 'z')
*trv++ = 'a';
else {
if (isdigit(*trv))
if (isdigit((unsigned char) *trv))
*trv = 'a';
else
++*trv;

View file

@ -63,7 +63,7 @@ void value_vector<T>::_grow(size_t t)
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];
@ -72,7 +72,7 @@ T value_vector<T>::operator[](size_t i) const
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];

View file

@ -218,7 +218,7 @@ Exception::relocate (Exception **exception, int length)
// 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;
}
@ -233,13 +233,15 @@ Exception::is (const char *type, const char *this_class)
{
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++;
}

View file

@ -276,7 +276,7 @@ int write_spec(buckets& bs, params& pms, buffer& mphf_buffer)
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;

View file

@ -135,7 +135,7 @@ void fast_mphf::init_persistent_info(persistent_info* x)
r = 0;
v_seed = 0;
t = 0;
hash::init_data_member();
ihash::init_data_member();
}
}
@ -495,14 +495,14 @@ int fast_mphf::print_bits(unsigned x, ostream& out)
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);
@ -517,7 +517,7 @@ io_status fast_mphf::cdrOut(buffer& buf)
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);

View file

@ -102,7 +102,7 @@ public:
friend class fast_mphf;
};
class fast_mphf : public long_pstring, public hash
class fast_mphf : public long_pstring, public ihash
{
public:

View file

@ -51,16 +51,16 @@
#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;
@ -68,15 +68,15 @@ hash::init_data_member(unsigned int a, unsigned int b, unsigned int c)
}
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);
*/
@ -86,9 +86,9 @@ 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);

View file

@ -55,12 +55,12 @@
#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,

View file

@ -92,7 +92,7 @@ void delete_name_oid_rec_f(const void* name_oid_ptr);
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&);

View file

@ -198,7 +198,7 @@ unique_id (void)
buf[i] = mapping[(int)buf[i]];
}
} while (!isalnum (buf[0]));
} while (!isalnum ((unsigned char) buf[0]));
return (buf);
}

View file

@ -136,14 +136,14 @@ void DtMmdbQuit()
}
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 )

View file

@ -35,7 +35,7 @@ class collectionIterator
{
public:
collectionIterator(info_base*, int set_position);
~collectionIterator();
virtual ~collectionIterator();
// advance the iterator to the next position.
// A newly constructed iterator's position is

View file

@ -145,22 +145,25 @@ int gethostname(char* name, int namelen)
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);

View file

@ -133,7 +133,7 @@ IcccmAgent::value_handler(Widget w, XtPointer ia, Atom *selection,
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;

View file

@ -26,7 +26,7 @@ public:
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);

View file

@ -1756,7 +1756,7 @@ LibraryAgent::library_removed (UAS_Pointer<UAS_Common> lib)
{
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) {

View file

@ -121,9 +121,9 @@ ListView::display()
if (f_shell == NULL)
{
create_ui_objects();
display_list();
}
display_list();
f_shell->Popup();
f_shell->DeIconify();
}

View file

@ -40,7 +40,7 @@ public: // notification types
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);

View file

@ -2229,7 +2229,7 @@ NodeWindowAgent::search_on_selectionCB(Widget, XtPointer client_data,
void
NodeWindowAgent::text_callback(WCallback *wcb)
{
(XmAnyCallbackStruct*)wcb->CallData();
(void) (XmAnyCallbackStruct*)wcb->CallData();
char *text = XmTextGetString(wcb->GetWidget());
if (text == NULL)
return;
@ -2846,7 +2846,7 @@ NodeWindowAgent::initialize_tabs()
{
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;

View file

@ -533,7 +533,7 @@ OutlineListView::y_to_outline_element (Position y)
#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);

View file

@ -149,7 +149,10 @@ static WXmToggleButton f_print_hierarchy;
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()
@ -431,9 +434,10 @@ void
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;
@ -463,10 +467,10 @@ PdmNotifyCB(Widget pr_shell, XtPointer client_data, XtPointer 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
@ -523,11 +527,10 @@ CreatePrintShell(Widget widget, AppPrintData* p)
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;
@ -925,6 +928,7 @@ DoPrint(Widget widget, AppPrintData * p)
}
#if defined(PRINTING_SUPPORTED)
/*
* ------------------------------------------------------------------------
* Name: PrintEverything
@ -958,6 +962,7 @@ PrintEverything(AppPrintData *p)
RCS_DEBUG("PrintEverything exiting.\n");
}
#endif /* PRINTING_SUPPORTED */
static void
PrintOneUASCommon(UAS_Pointer<UAS_Common> &doc, Widget pshell, int *cur_pageP)

View file

@ -267,8 +267,10 @@ SearchResultsAgent::compose_header()
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);

View file

@ -1252,7 +1252,7 @@ SearchScopeAgent::set_components (u_int mask)
#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);

View file

@ -24,6 +24,8 @@ class FolioObject;
class Iterator
{
public:
virtual ~Iterator() {}
// initialize iterator, find first element
virtual FolioObject *init() = 0;

View file

@ -250,7 +250,7 @@ DtCvStrVccToIndex(_DtCvSegment* seg, unsigned int vcc)
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) {

View file

@ -439,16 +439,18 @@ GENCAT=gencat -m
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

View file

@ -41,6 +41,7 @@
*
*/
#include <limits.h>
#include <string.h>
#include <iostream>
using namespace std;

View file

@ -133,7 +133,7 @@ WString::get_mbstr()
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;

View file

@ -2406,7 +2406,7 @@ TGDefn::build()
}
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;

View file

@ -241,7 +241,7 @@ PreferenceRecord::read_prefs()
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';

View file

@ -327,7 +327,7 @@ QueryTermView::create_ui()
void
QueryTermView::select_toggle (WCallback *wcb)
{
(XmToggleButtonCallbackStruct *) wcb->CallData();
(void) (XmToggleButtonCallbackStruct *) wcb->CallData();
// notify someone about selection state...
invert_colors();

View file

@ -21,8 +21,8 @@
* 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>

View file

@ -12,6 +12,8 @@ class UAS_EmbeddedObject;
class UAS_Factory {
public:
virtual ~UAS_Factory() {}
static void initialize (UAS_List<UAS_String>&);
static void finalize ();
static UAS_List<UAS_String> getRootLocators ();

View file

@ -24,7 +24,7 @@
/* 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>
@ -646,6 +646,7 @@ UAS_OQLParser::determine_caps()
}
end_try;
#if 0 /* not supported by libDtSearch */
caps |= 0x01 << OQL_WEIGHT;
mtry {
se_construct(WEIGHT, word, digits, "");
@ -663,6 +664,7 @@ UAS_OQLParser::determine_caps()
caps &= ~(0x01 << OQL_COMPLETION);
}
end_try;
#endif
caps |= 0x01 << OQL_PHRASE;
mtry {

View file

@ -22,6 +22,7 @@
*/
// $XConsortium: UAS_PtrList.cc /main/5 1996/08/06 09:23:58 rcs $
#include "UAS_Exceptions.hh"
#include "Managers/CatMgr.hh"
#include "Registration.hh"

View file

@ -24,7 +24,7 @@ friend class UAS_Sender<T>;
protected:
// This is an abstract base class.
UAS_Receiver() { }
~UAS_Receiver();
virtual ~UAS_Receiver();
virtual void receive (T &message, void *client_data = 0) = 0;

View file

@ -24,6 +24,7 @@
/* 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"

View file

@ -306,8 +306,8 @@ DtSR_SearchResultsEntry::create_matches()
}
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
{
@ -350,8 +350,8 @@ DtSR_SearchResultsEntry::create_matches()
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);
@ -383,17 +383,16 @@ DtSR_SearchResultsEntry::create_matches()
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;
}
@ -438,8 +437,11 @@ DtSR_SearchResultsEntry::create_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;
@ -477,11 +479,6 @@ DtSR_SearchResultsEntry::create_matches()
matches->insert_item(textrun);
}
if (text)
delete[] text;
if (parseout)
delete[] parseout;
return matches;
}

View file

@ -153,6 +153,7 @@ StringParser::brute_force(const char* text_in, int n_of_pats,
#endif
char* caped_text = NULL;
string capstr;
if (sensitive == False) { // case-insensitive search
unsigned char *p;
@ -169,8 +170,8 @@ StringParser::brute_force(const char* text_in, int n_of_pats,
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;
@ -237,7 +238,8 @@ StringParser::brute_force(const char* text_in, int n_of_pats,
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;
@ -323,7 +325,8 @@ StringParser::project_textrun(const char* org_textrun)
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 *

View file

@ -55,8 +55,8 @@ main(int argc, char** argv)
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') {

View file

@ -63,8 +63,8 @@ main(int argc, char** argv)
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);

View file

@ -22,6 +22,7 @@
*/
// $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"

View file

@ -102,8 +102,13 @@ static char defaultTranslations[] =
<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 */
@ -467,7 +472,8 @@ static int parse_page_string (s, pagesize, canvassize, relative)
* 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;
@ -480,11 +486,11 @@ static int parse_page_string (s, pagesize, canvassize, relative)
}
/* 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]) {

View file

@ -90,8 +90,12 @@ static XtResource resources[] = {
#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 */

View file

@ -98,9 +98,9 @@ static void Redisplay();
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);
/*

View file

@ -778,7 +778,7 @@ static int fontlist(dat_ptr, cmd_ptr, cgm_s)
}
}
/* 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;
}

View file

@ -50,7 +50,7 @@ protected:
WCallback* cbList;
public:
WWL ();
~WWL ();
virtual ~WWL ();
void AddCb (WCallback *);
Boolean RemoveCb (WCallback *);

View file

@ -129,6 +129,7 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
const char *stitle;
const char *style;
int dupID = 0;
string outstr;
OLIAS_DB mmdb_handle;
info_lib *mmdb =
@ -199,6 +200,7 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
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,
@ -206,7 +208,7 @@ buildNCF(BookCaseDB& db, const char *base_name, int compressed)
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);
}

View file

@ -2378,9 +2378,11 @@ case 10:
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

View file

@ -88,7 +88,7 @@ SGMLName::intern(const char *name, int upcase)
const char *src;
char *dest;
for(src = name, dest=buf; *src; src++, dest++){
*dest = toupper(*src);
*dest = toupper((unsigned char) *src);
}
*dest = 0;

View file

@ -1596,8 +1596,8 @@ buildBookcase(char *cmdSrc, char *dirName)
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);
@ -1717,7 +1717,7 @@ validateBookCaseName(char *bookCaseName)
for (i = 0; bookCaseName[i] != '\0'; i++)
{
if (!isalnum(bookCaseName[i]))
if (!isalnum((unsigned char) bookCaseName[i]))
break;
}
@ -1823,7 +1823,7 @@ editMapFile(char *bookCaseName, char *bookCaseMap)
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)
@ -1996,8 +1996,9 @@ makeTOC(char *id, char *title)
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());

View file

@ -73,7 +73,7 @@ int main( int argc, char** argv )
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]) ) {

View file

@ -1127,9 +1127,10 @@ FILE *file;
}
main()
int main()
{
int i,j;
string setstr;
yylex();
@ -1152,7 +1153,8 @@ main()
}
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;
}

View file

@ -20,6 +20,11 @@ EXTRA_DEFINES = -DBYTE_SWAP -D_XOPEN_SOURCE -D_OSF_SOURCE
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