* details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
#include <unistd.h>
#include <sys/param.h>
-#ifdef __uxp__
-#include <string.h>
-#endif
-
-#if !defined(USL) && !defined(__uxp__)
#include <strings.h>
-#endif
#include <errno.h>
#include <unistd.h>
#include <sys/utsname.h>
#include "SortCmd.hh"
-extern force( Widget );
+extern int force( Widget );
static const char * NormalIcon = "DtMail";
static const char * EmptyIcon = "DtMnone";
else
_inbox = FALSE;
- if (NULL != mail_file)
- free((void*)mail_file);
+ free((void*)mail_file);
_list = NULL;
_genDialog = NULL;
//
// Initialize private variables
//
- _mbox_image = NULL;
- _mbox_mask = NULL;
+ _mbox_image = 0;
+ _mbox_mask = 0;
_my_editor = NULL;
_message = NULL;
else
_last_sorted_by = (SortBy) atoi(value);
- if (NULL != value) free((void*) value);
- if (NULL != buffer) XtFree(buffer);
+ free((void*) value);
+ XtFree(buffer);
}
if (!this->baseWidget())
{
fprintf(
- stderr,
+ stderr, "%s",
GETMSG(DT_catd, 2, 3,
"Unable to initialize windows. Exiting.\n"));
exit(1);
if (_mbox_image == XmUNSPECIFIED_PIXMAP ||
_mbox_mask == XmUNSPECIFIED_PIXMAP)
- _mbox_image = _mbox_mask = NULL;
+ _mbox_image = _mbox_mask = 0;
}
// Add an event handler for structureNotify.
printHelpId("form1", form1);
/* add help callback */
// XtAddCallback(form1, XmNhelpCallback, HelpCB, helpId);
- XtAddCallback(form1, XmNhelpCallback, HelpCB, DTMAILWINDOWID);
+ XtAddCallback(form1, XmNhelpCallback, HelpCB, (void *)DTMAILWINDOWID);
panedW = XtCreateManagedWidget("panedW", xmPanedWindowWidgetClass,
form1, NULL, 0);
/* add help callback */
// XtAddCallback(_rowOfLabels, XmNhelpCallback, HelpCB, helpId);
XtAddCallback(
- _rowOfLabels, XmNhelpCallback, HelpCB, DTMAILWINDOWROWOFLABELSID);
+ _rowOfLabels, XmNhelpCallback, HelpCB, (void *)DTMAILWINDOWROWOFLABELSID);
XtVaSetValues(_rowOfLabels,
XmNrightAttachment,XmATTACH_FORM,
int header_lines = (int) strtol(value, NULL, 10);
_list->visibleItems(header_lines);
- if (NULL != value) free((void*) value);
+ free((void*) value);
XtAddCallback(
_list->get_scrolling_list(), XmNhelpCallback,
- HelpCB, DTMAILMSGLISTID);
+ HelpCB, (void *)DTMAILMSGLISTID);
XtVaSetValues(_list->get_scrolling_list(), XmNuserData, this, NULL);
_rowOfButtons =
else if ((DTMailError_t)error == DTME_BadRunGroup)
{
- sprintf(buf, GETMSG(DT_catd, 2, 4,
+ sprintf(buf, "%s", GETMSG(DT_catd, 2, 4,
"Mailer has not been properly installed,\n\
and cannot run because the execution group\n\
is incorrectly set."));
//
displayInCurrentWorkspace();
sprintf(
- buf,
+ buf, "%s",
GETMSG(DT_catd, 99, 99,"The INBOX path has changed.\nReopen?"));
_genDialog->setToQuestionDialog(
GETMSG(DT_catd, 3, 22, "Mailer"),
if (header_lines != _list->visibleItems())
_list->visibleItems(header_lines);
- if (NULL != value)
- free((void*) value);
+ free((void*) value);
_list->checkDisplayProp();
_my_editor->textEditor()->update_display_from_props();
}
else {
buf = new char[2];
- sprintf(buf, "");
+ sprintf(buf, "%s", "");
labelStr = XmStringCreateLocalized(buf);
_clear_message_p = FALSE;
}
{
RoamMenuWindow *obj = (RoamMenuWindow*) client_data;
obj->create_new_container(selection);
- if (NULL != selection) XtFree(selection);
+ XtFree(selection);
}
void
TRUE, this );
ci = new ButtonInterface (_rowOfButtons, _delete_button);
w = ci->baseWidget();
- XtAddCallback(w, XmNhelpCallback, HelpCB, DTMAILDELBTNID);
+ XtAddCallback(w, XmNhelpCallback, HelpCB, (void *)DTMAILDELBTNID);
XtVaSetValues(w,
XmNleftAttachment, XmATTACH_FORM,
XmNtopAttachment, XmATTACH_FORM,
TRUE, this );
ci = new ButtonInterface (_rowOfButtons, _next_button);
w = ci->baseWidget();
- XtAddCallback(w, XmNhelpCallback, HelpCB, DTMAILNEXTBTNID);
+ XtAddCallback(w, XmNhelpCallback, HelpCB, (void *)DTMAILNEXTBTNID);
XtVaSetValues(w,
XmNleftAttachment, XmATTACH_WIDGET,
XmNleftWidget, prev_widget,
TRUE, this );
ci = new ButtonInterface (_rowOfButtons, _previous_button);
w = ci->baseWidget();
- XtAddCallback(w, XmNhelpCallback, HelpCB, DTMAILPREVBTNID);
+ XtAddCallback(w, XmNhelpCallback, HelpCB, (void *)DTMAILPREVBTNID);
XtVaSetValues(w,
XmNleftAttachment, XmATTACH_WIDGET,
XmNleftWidget, prev_widget,
FALSE );
ci = new ButtonInterface (_rowOfButtons, _replySender_button);
w = ci->baseWidget();
- XtAddCallback(w, XmNhelpCallback, HelpCB, DTMAILREPLYBTNID);
+ XtAddCallback(w, XmNhelpCallback, HelpCB, (void *)DTMAILREPLYBTNID);
XtVaSetValues(w,
XmNleftAttachment, XmATTACH_WIDGET,
XmNleftWidget, prev_widget,
TRUE, TRUE, this);
ci = new ButtonInterface (_rowOfButtons, _print_button);
w = ci->baseWidget();
- XtAddCallback(w, XmNhelpCallback, HelpCB, DTMAILPRINTBTNID);
+ XtAddCallback(w, XmNhelpCallback, HelpCB, (void *)DTMAILPRINTBTNID);
XtVaSetValues(w,
XmNleftAttachment, XmATTACH_WIDGET,
XmNleftWidget, prev_widget,
void
RoamMenuWindow::createOpenContainerList(CmdList * open_container)
{
- int ncontainers;
+ int ncontainers, i;
char *container_name;
ContainerMenuCmd *container_cmd;
_open_container_containerlist =
new DtVirtArray<ContainerMenuCmd*>(ncontainers);
- for (int i=0; i<ncontainers; i++)
+ for (i=0; i<ncontainers; i++)
{
container_name = (*_user_containerlist)[i]->containerName();
if (NULL != container_name)
void
RoamMenuWindow::createCopyList(CmdList * copy_to)
{
- int ncontainers;
+ int ncontainers, i;
char *container_name;
ContainerMenuCmd *container_cmd;
_copyto_containerlist =
new DtVirtArray<ContainerMenuCmd *> (ncontainers);
- for (int i=0; i<ncontainers; i++)
+ for (i=0; i<ncontainers; i++)
{
container_name = (*_user_containerlist)[i]->containerName();
if (NULL != container_name)
void
RoamMenuWindow::construct_move_menu()
{
- int ncontainers;
+ int ncontainers, i;
char *container_name;
ContainerMenuCmd *container_cmd;
delete _move_containerlist;
_move_containerlist = new DtVirtArray<ContainerMenuCmd *> (ncontainers);
- for (int i=0; i<ncontainers; i++)
+ for (i=0; i<ncontainers; i++)
{
container_name = (*_user_containerlist)[i]->containerName();
if (NULL != container_name)
RoamMenuWindow * rmw = (RoamMenuWindow *)client_data;
bval = rmw->syncViewAndStore(op, path, args);
+
+ va_end(args);
return(bval);
}
for (int i=0; i < list->length(); i++)
{
cmd = (*list)[i];
- if (strcmp(filename, cmd->containerName()) == 0)
+ if (filename && strcmp(filename, cmd->containerName()) == 0)
return(i);
}
return(-1);
&mail_file);
is_inbox = (0 == strcmp(mail_file, filename));
- if (NULL != mail_file)
- free((void*) mail_file);
+ free((void*) mail_file);
if (is_inbox)
return;