+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * 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
+ */
/*
*+SNOTICE
*
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
-#if defined(USL) || defined(__uxp__)
-#define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK)
-#endif
#include <stdio.h>
#include <Dt/Editor.h>
#include <Xm/ColorObjP.h>
_attach_area_selection_state = AA_SEL_NONE;
_cache_single_attachment = NULL;
+ _no_selected_label = NULL;
+ _selected_label = NULL;
+ rowOfAttachmentsStatus = NULL;
+ _attachments_status = NULL;
+ _attachments_summary = NULL;
+ _mailbox = NULL;
+ _attachAreaWidth = 0;
+ _attachAreaHeight = 0;
+ _rc = NULL;
+ _sw = NULL;
+ _vsb = NULL;
+ _message = NULL;
+ _clipWindow = NULL;
+ _open = NULL;
+ _saveas = NULL;
+ _selectall = NULL;
+ _unselectall = NULL;
+ _menuBar = NULL;
+ _background = 0;
+ _foreground = 0;
+ _appBackground = 0;
+ _appForeground = 0;
+ _fileCmdList = NULL;
+ _editCmdList = NULL;
+ _size_selected_label = NULL;
+ _format_button = NULL;
+ _descriptionDialog = NULL;
+ _no_attachments_label = NULL;
+ _attachments_label = NULL;
+ _size_attachments_label = NULL;
+
+
}
void
XtPointer //callData
)
{
- Dimension wid;
+ XtArgVal wid;
AttachArea *obj = (AttachArea *) clientData;
XtVaGetValues(
NULL
);
- obj->resize(wid);
+ obj->resize((Dimension)wid);
}
void AttachArea::resize(
(page_size - (s.st_size % page_size)));
char * map;
-#if defined(__osf__)
- // This version of mmap does NOT allow requested length to be
- // greater than the file size ... in contradiction to the
- // documentation (don't round up).
- map = (char *) mmap(0, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
-#else
map = (char *) mmap(0, map_size, PROT_READ, MAP_PRIVATE, fd, 0);
-#endif
if (map == (char *)-1) {
// We could not map it for some reason. Let's just read it into
buffer = new char[s.st_size + 1];
if (!buffer) {
- sprintf(buf,
+ sprintf(buf, "%s",
GETMSG(DT_catd, 3, 36, "Unable to allocate memory."));
helpId = DTMAILHELPNOALLOCMEM;
answer = this->handleErrorDialog(GETMSG(DT_catd, 1, 83, "Mailer"),
if (read(fd, buffer, (unsigned int) s.st_size) < 0) {
SafeClose(fd);
+ delete [] buf;
+ delete [] buffer;
+ delete [] errormsg;
return(NULL);
}
buffer[s.st_size] = 0;
void
AttachArea::manage()
{
- Dimension wid;
- Dimension ht;
- Dimension pht;
+ XtArgVal /* Dimension */ ht;
+ XtArgVal /* Dimension */ pht;
Widget sww;
// Update the display
- XtVaGetValues(this->baseWidget(), XmNwidth, &wid, NULL);
sww = getSWWindow();
this->manageList();
Attachment *tmpAttachment;
Attachment **list;
- time_t time_deleted = NULL, tmpTime = NULL;
+ time_t time_deleted = 0, tmpTime = 0;
int i;
if (_deleteCount == 0) {