#include <Xm/MessageB.h>
#include <assert.h>
-#if !defined(linux)
+#if !defined(linux) && !defined(CSRG_BASED)
extern forceUpdate( Widget );
#endif
/* install callback */
// XtAddCallback(_main, XmNhelpCallback, HelpCB, helpId);
XtAddCallback(_main, XmNhelpCallback,
- HelpCB, "_HOMETOPIC");
+ HelpCB, (void *)"_HOMETOPIC");
// Called derived class to create the work area
helpId = XtName(*cascade);
if (helpId == "Mailbox") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILCONTAINERMENUID);
+ HelpCB, (void *)DTMAILCONTAINERMENUID);
} else if (helpId == "Edit") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILEDITMENUID);
+ HelpCB, (void *)DTMAILEDITMENUID);
} else if (helpId == "Message") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILMESSAGEMENUID);
+ HelpCB, (void *)DTMAILMESSAGEMENUID);
} else if (helpId == "Attachments") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILATTACHMENUID);
+ HelpCB, (void *)DTMAILATTACHMENUID);
} else if (helpId == "View") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILVIEWMENUID);
+ HelpCB, (void *)DTMAILVIEWMENUID);
} else if (helpId == "Compose") {
XtAddCallback(*cascade, XmNhelpCallback,
- HelpCB, DTMAILCOMPOSEMENUID);
+ HelpCB, (void *)DTMAILCOMPOSEMENUID);
}
}
} else
helpId = XtName(cascade);
if (helpId == "Mailbox") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILCONTAINERMENUID);
+ HelpCB, (void *)DTMAILCONTAINERMENUID);
} else if (helpId == "Edit") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILEDITMENUID);
+ HelpCB, (void *)DTMAILEDITMENUID);
} else if (helpId == "Message") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILMESSAGEMENUID);
+ HelpCB, (void *)DTMAILMESSAGEMENUID);
} else if (helpId == "Attachments") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILATTACHMENUID);
+ HelpCB, (void *)DTMAILATTACHMENUID);
} else if (helpId == "View") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILVIEWMENUID);
+ HelpCB, (void *)DTMAILVIEWMENUID);
} else if (helpId == "Compose") {
XtAddCallback(cascade, XmNhelpCallback,
- HelpCB, DTMAILCOMPOSEMENUID);
+ HelpCB, (void *)DTMAILCOMPOSEMENUID);
}
} else
pulldown = _w;
}
-extern forceUpdate( Widget );
+extern int forceUpdate( Widget );
SelectFileCmd::SelectFileCmd (const char * name,
const char * label,
widgets->dtprint_setup,
XmNhelpCallback,
HelpCB,
- DTMAILPRINTSETUPDIALOG);
+ (void *)DTMAILPRINTSETUPDIALOG);
XtAddCallback(
widgets->dtprint_setup,
return(found);
}
+#if !defined(CSRG_BASED)
//
// See if string 'toFind' is anyware in string 'str'.
// A case-insensitive version of strstr().
}
return(result);
}
+#endif
Boolean
FindDialog::compareHeader(DtMailEnv & error,
#include <X11/IntrinsicP.h> // Include for moving X location of titles
-extern force( Widget );
+extern int force( Widget );
MsgScrollingList::MsgScrollingList(
RoamMenuWindow *menuwindow,
#include <unistd.h>
#include <wchar.h>
-#if defined(USL) || defined(__uxp__) || defined(linux)
+#if defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED)
#define wcswcs wcsstr
#include <wctype.h> // iswspace is defined in this header on USL */
#endif
int m_size;
if (data == NULL)
- data = "";
+ data = (void *)"";
// figure out whitespace for formatting
// assume 13 for normal sized alias name
#include <sys/file.h>
-extern forceUpdate( Widget );
+extern int forceUpdate( Widget );
RoamCmd::RoamCmd
(char *name, char *label, int active, RoamMenuWindow *window)
_copy_button,
XmNhelpCallback,
HelpCB,
- "dtmailViewmainWindowWork-AreapanedWform2RowColumnMoveCopy");
+ (void *)"dtmailViewmainWindowWork-AreapanedWform2RowColumnMoveCopy");
XtAddCallback(
_copy_button,
XmNactivateCallback,
#include <Xm/Xm.h>
#include <Xm/MessageB.h>
#include <assert.h>
-extern forceUpdate( Widget );
+extern int forceUpdate( Widget );
RoamInterruptibleCmd::RoamInterruptibleCmd ( char *name,
printHelpId("form", _main_form);
/* add help callback */
- XtAddCallback(_main_form, XmNhelpCallback, HelpCB, DTMAILCOMPOSEWINDOW);
+ XtAddCallback(_main_form, XmNhelpCallback, HelpCB, (void *)DTMAILCOMPOSEWINDOW);
XtVaSetValues(_main_form, XmNallowResize, True, NULL);
#define Record(i) (base + (width * (i)))
#define Link(i) (*((int *) (Record(i) + offset)))
+int
Sort::_msort (char * base,
int nel,
int width,
virtual int getSize(void); // get total size of the buffer
private:
-#if !defined(linux)
+#if !defined(linux) && !defined(CSRG_BASED)
class Chunk;
#endif
extern const char ** DtMailTransportEnumerate(DtMailSession,
DtMailEnv *);
- extern DtMailTransportSubmit(DtMailTransport,
+ extern int DtMailTransportSubmit(DtMailTransport,
DtMailEnv *,
DtMailMessage);
int state(void);
int operator=(int);
- operator += (int);
+ int operator += (int);
operator int(void);
void wait(void);
#define SYSTEM_MAILRC "/usr/share/lib/mailx.rc"
#elif defined(__uxp__)
#define SYSTEM_MAILRC "/etc/mail/mailx.rc"
+#elif defined(CSRG_BASED)
+#define SYSTEM_MAILRC "/etc/mail.rc"
#endif
// constructor
* include the newline at the end.
*/
+int
DtMail::MailRc::readline(FILE *ibuf, char *linebuf)
{
register char *cp;
HashTableImpl::lookup(ObjectKey & key)
{
short hash_key = key.hashValue();
+ HashEntry *chain;
int slot = hash_key % _table_size;
// Search the slot looking for the value. Return NULL if there
// are no objects matching this key.
//
- for (HashEntry * chain = &_hash_table[slot]; chain; chain = chain->next) {
+ for (chain = &_hash_table[slot]; chain; chain = chain->next) {
if (chain->key && key == *(chain->key)) {
break;
}
{
short hash_key = key.hashValue();
int slot = hash_key % _table_size;
+ HashEntry *chain;
// See if we have already filled the slot.
//
// We either have a collision or a duplicate. In the case of duplicates
// we simply replace the value.
//
- for (HashEntry * chain = &_hash_table[slot]; chain->next; chain = chain->next) {
+ for (chain = &_hash_table[slot]; chain->next; chain = chain->next) {
// If this item is already stored then update the value.
//
if (key == *(chain->key)) {
short hash_val = key.hashValue();
int slot = hash_val % _table_size;
void * removed_val = NULL;
+ HashEntry *chain;
// See if we even have this object.
//
// Try to find it in the chain.
//
HashEntry * last = NULL;
- for (HashEntry * chain = &_hash_table[slot]; chain; chain = chain->next) {
+ for (chain = &_hash_table[slot]; chain; chain = chain->next) {
if (key == *(chain->key)) {
break;
}
memcpy(&passwordEntry, tresult, sizeof(struct passwd));
passwordEntry.pw_name = strdup(passwordEntry.pw_name);
passwordEntry.pw_passwd = strdup(passwordEntry.pw_passwd);
-#if !defined(_AIX) && !defined(linux)
+#if !defined(_AIX) && !defined(linux) && !defined(CSRG_BASED)
#ifndef __osf__
passwordEntry.pw_age = strdup(passwordEntry.pw_age);
#endif
extern "C" void * V3MetaFactory(const char * op);
static const SymTable symbol_table[] = {
-{ "RFCMetaFactory", RFCMetaFactory },
-{ "V3MetaFactory", V3MetaFactory },
+{ "RFCMetaFactory", (void *)RFCMetaFactory },
+{ "V3MetaFactory", (void *)V3MetaFactory },
{ NULL, NULL }
};
hnd && !error.isSet();
value.clear(), hnd = env->getNextHeader(error, hnd, &name, value)) {
- for (const char ** hdr = suppress_headers; *hdr; hdr++) {
+ const char **hdr;
+ for (hdr = suppress_headers; *hdr; hdr++) {
if (strcasecmp(name, *hdr) == 0)
break;
}
for (int val = 0; val < value.length(); val++) {
//
// If the value is null or empty do not emit this field
- for (const char *valPtr = *(value[val]);
+ const char *valPtr;
+ for (valPtr = *(value[val]);
*valPtr && (isspace((unsigned char)*valPtr));
valPtr++)
{}
#include <sys/stat.h>
#include <sys/param.h>
#include <sys/uio.h>
-#if !defined(__aix) && !defined(__hpux) && !defined(linux)
+#if !defined(__aix) && !defined(__hpux) && !defined(linux) && !defined(CSRG_BASED)
#include <sys/systeminfo.h>
#endif
#include <sys/wait.h>
#define LCL_SIG_HANDLER_SIGNATURE
#elif defined(__hpux)
#define LCL_SIG_HANDLER_SIGNATURE __harg
-#elif defined(__aix) || defined(__alpha) || defined(linux)
+#elif defined(__aix) || defined(__alpha) || defined(linux) || defined(CSRG_BASED)
#define LCL_SIG_HANDLER_SIGNATURE int
#elif defined(__uxp__)
#define LCL_SIG_HANDLER_SIGNATURE
path, errno, error.errnoMessage(errno));
break;
-#if defined(__osf__)
+#if defined(__osf__) || defined(CSRG_BASED)
case ENOTDIR:
#else
case ENOLINK:
error.setError(DTME_CannotCreateTemporaryMailboxFile_NoSuchFile);
break;
-#if defined(__osf__)
+#if defined(__osf__) || defined(CSRG_BASED)
case ENOTDIR:
#else
case ENOLINK:
DTME_CannotWriteToTemporaryMailboxFile_ProcessLimitsExceeded);
break;
-#if defined(__osf__)
+#if defined(__osf__) || defined(CSRG_BASED)
case ENOTDIR:
#else
case ENOLINK:
char theId[128];
char hwserialbuf[64];
-#if !defined(__aix) && !defined(__hpux) && !defined(__osf__) && !defined(linux)
+#if !defined(__aix) && !defined(__hpux) && !defined(__osf__) && !defined(linux) && !defined(CSRG_BASED)
if (sysinfo(SI_HW_SERIAL, (char *)hwserialbuf, sizeof(hwserialbuf)-1) == -1)
#endif
strcpy(hwserialbuf, "dtmail");
error.setError(DTME_CannotCreateMailboxLockFile_NoSuchFile);
break;
-#if defined(__osf__)
+#if defined(__osf__) || defined(CSRG_BASED)
case ENOTDIR:
#else
case ENOLINK:
case ENOENT:
error.setError(DTME_CannotCreateMailboxLockFile_NoSuchFile);
break;
-#if defined(__osf__)
+#if defined(__osf__) || defined(CSRG_BASED)
case ENOTDIR:
#else
case ENOLINK:
RFCMetaFactory(const char * op)
{
if (strcmp(op, QueryImplEntryOp) == 0) {
- return(RFCQueryImpl);
+ return((void *)RFCQueryImpl);
}
if (strcmp(op, QueryOpenEntryOp) == 0) {
- return(RFCQueryOpen);
+ return((void *)RFCQueryOpen);
}
if (strcmp(op, MailBoxConstructEntryOp) == 0) {
- return(RFCMailBoxConstruct);
+ return((void *)RFCMailBoxConstruct);
}
if (strcmp(op, QueryMessageEntryOp) == 0) {
- return(RFCMessageQuery);
+ return((void *)RFCMessageQuery);
}
if (strcmp(op, MessageConstructEntryOp) == 0) {
- return(RFCMessageConstruct);
+ return((void *)RFCMessageConstruct);
}
if (strcmp(op, TransportConstructEntryOp) == 0) {
- return(RFCMIMETransportConstruct);
+ return((void *)RFCMIMETransportConstruct);
}
return(NULL);
V3MetaFactory(const char * op)
{
if (strcmp(op, QueryImplEntryOp) == 0) {
- return(RFCQueryImpl);
+ return((void *)RFCQueryImpl);
}
if (strcmp(op, QueryOpenEntryOp) == 0) {
- return(RFCQueryOpen);
+ return((void *)RFCQueryOpen);
}
if (strcmp(op, MailBoxConstructEntryOp) == 0) {
- return(V3MailBoxConstruct);
+ return((void *)V3MailBoxConstruct);
}
if (strcmp(op, QueryMessageEntryOp) == 0) {
- return(RFCMessageQuery);
+ return((void *)RFCMessageQuery);
}
if (strcmp(op, MessageConstructEntryOp) == 0) {
- return(RFCMessageConstruct);
+ return((void *)RFCMessageConstruct);
}
if (strcmp(op, TransportConstructEntryOp) == 0) {
- return(RFCV3TransportConstruct);
+ return((void *)RFCV3TransportConstruct);
}
return(NULL);
#include <strings.h>
#endif
#include <ctype.h>
+#include <stdint.h>
#include <DtMail/IO.hh>
#include "RFCImpl.hh"
new_time.tm_isdst = -1;
date.dtm_date = SafeMktime(&new_time);
- date.dtm_tz_offset_secs = (int) timezone;
+#ifdef SVR4
+ date.dtm_tz_offset_secs = timezone;
+#endif
}
else {
// In this format, we should have a day of the month.
time_t offset = parseTZ(token_begin[this_token], token_end[this_token]);
- time_t orig_zone = (time_t) timezone;
+#ifdef SVR4
+ time_t orig_zone = timezone;
timezone = offset;
+#endif
// Tell "mktime" to figure "dst" on or not.
new_time.tm_isdst = -1;
date.dtm_date = SafeMktime(&new_time);
date.dtm_tz_offset_secs = offset;
+#ifdef SVR4
timezone = orig_zone;
+#endif
}
return(date);
initialized = 1;
#if defined(hpux) || defined(_aix) || defined(__osf__) || defined(linux) || \
- (defined(sun) && OSMAJORVERSION>=5 && OSMINORVERSION>4)
+ (defined(sun) && OSMAJORVERSION>=5 && OSMINORVERSION>4) || defined(CSRG_BASED)
// SunOS 5.5 and above defined prototype for signal handler
act.sa_handler = (void (*)(int))&RFCTransport::childHandler;
#else