dtmail: remove DEAD_WOOD code

This commit is contained in:
Chase
2025-11-27 13:48:24 -05:00
committed by Jon Trulson
parent e945fc8b08
commit f38cd20c5c
70 changed files with 3 additions and 2130 deletions

View File

@@ -171,24 +171,6 @@ void Cmd::revert()
deactivate();
}
#ifdef DEAD_WOOD
void Cmd::addToActivationList ( Cmd *cmd )
{
if ( !_activationList )
_activationList = new CmdList();
_activationList->add ( cmd );
}
void Cmd::addToDeactivationList ( Cmd *cmd )
{
if ( !_deactivationList )
_deactivationList = new CmdList();
_deactivationList->add ( cmd );
}
#endif /* DEAD_WOOD */
void Cmd::execute()
{
int i;

View File

@@ -165,65 +165,6 @@ DisplayVersion (
}
#ifdef DEAD_WOOD
// The callback for the Help Menu in the combo window.
void
HelpMenuCB (
Widget widget,
XtPointer clientdata,
XtPointer)
{
Widget selWidget = NULL;
int status = DtHELP_SELECT_ERROR;
// Determine which help button was activated and display the
// appropriate help information.
switch ((long) clientdata) {
case HELP_ON_ITEM:
while (!XtIsSubclass(widget, applicationShellWidgetClass))
widget = XtParent(widget);
status = DtHelpReturnSelectedWidgetId(widget, NULL, &selWidget);
switch ((int) status) {
case DtHELP_SELECT_ERROR:
printf(CATGETS(catd, 2, 1, "Selection Error, cannot continue\n"));
break;
case DtHELP_SELECT_VALID:
while (selWidget != NULL) {
if ((XtHasCallbacks(selWidget, XmNhelpCallback)
== XtCallbackHasSome)) {
XtCallCallbacks((Widget)selWidget,
XmNhelpCallback, NULL);
break;
} else {
selWidget = XtParent(selWidget);
}
}
break;
case DtHELP_SELECT_ABORT:
printf(CATGETS(catd, 2, 2, "Selection aborted by user.\n"));
break;
case DtHELP_SELECT_INVALID:
printf(CATGETS(catd, 1, 6,
"You must select a component withing your app.\n"));
break;
}
break;
case HELP_ON_TOPIC:
DisplayMain(widget, NULL, APP_MENU_ID);
break;
case HELP_ON_VERSION:
DisplayVersion(widget, NULL, VER_MENU_ID);
break;
default:
break;
}
}
#endif /* DEAD_WOOD */
// Callback to process JUMP-NEW and APP-LINK hypertext requests in a
// given Help Dialog Window.
//

View File

@@ -786,23 +786,6 @@ MenuBar::rotateLabels(
XmStringFree(endlabel);
}
#ifdef DEAD_WOOD
Boolean
MenuBar::isValidMenuPane(Widget w)
{
Boolean retval = FALSE;
Widget parent = w;
while(parent && parent != _w)
parent = XtParent(parent);
if(parent == _w)
retval = TRUE;
return retval;
}
#endif /* DEAD_WOOD */
void
MenuBar::removeCommand(
Widget pulldown,

View File

@@ -66,13 +66,6 @@
#include <Xm/Xm.h>
#include <Xm/MessageB.h>
#ifdef DEAD_WOOD
// Define an instance to be available throughout the framework.
QuestionDialogManager *theQuestionDialogManager =
new QuestionDialogManager ( "QuestionDialog", "QuestionDialog" );
#endif /* DEAD_WOOD */
QuestionDialogManager::QuestionDialogManager ( char *name ) :
DialogManager ( name )
{

View File

@@ -215,41 +215,6 @@ UIComponent::getResources( const XtResourceList resources,
0 );
}
#ifdef DEAD_WOOD
void
UIComponent::setDefaultResources( const Widget w,
const String *resourceSpec )
{
int i;
Display *dpy = XtDisplay ( w ); // Retrieve the display pointer
XrmDatabase rdb = NULL; // A resource data base
// Create an empty resource database
rdb = XrmGetStringDatabase ( "" );
// Add the Component resources, prepending the name of the component
i = 0;
while ( resourceSpec[i] != NULL )
{
char *buf = new char[1000];
sprintf(buf, "*%s%s", _name, resourceSpec[i++]);
XrmPutLineResource( &rdb, buf );
delete [] buf;
}
// Merge them into the Xt database, with lowest precendence
if ( rdb )
{
XrmDatabase db = XtDatabase(dpy);
XrmCombineDatabase(rdb, &db, FALSE);
}
}
#endif /* DEAD_WOOD */
#ifndef CAN_INLINE_VIRTUALS
const char *const
UIComponent::className(void)

View File

@@ -338,97 +338,6 @@ void AttachArea::addToList( Attachment *attachment )
// setAttachmentsLabel();
}
#ifdef DEAD_WOOD
void AttachArea::setAttachmentsLabel( )
{
char *c = new char[256];
XmString xmstr;
String str;
unsigned int last_displayCount, last_selectedCount;
unsigned int displayCount = _iconCount - _deleteCount;
unsigned int attachmentsSize;
if((displayCount) == 0) {
XtUnmanageChild(_no_attachments_label);
XtUnmanageChild(_attachments_label);
XtUnmanageChild(_size_attachments_label);
XtUnmanageChild(_no_selected_label);
XtUnmanageChild(_selected_label);
XtUnmanageChild(_size_selected_label);
} else {
CalcAttachmentsSize();
attachmentsSize = getAttachmentsSize();
// Number of Attachments
XtVaGetValues(_no_attachments_label,
XmNlabelString, &xmstr,
NULL);
str = NULL;
str = (char *) _XmStringUngenerate(
xmstr, NULL,
XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
if (NULL == str) return; // internal error
last_displayCount = (unsigned int)strtol(str, NULL, 10);
XtFree(str);
// Number of Attachments Selected
XtVaGetValues(_no_selected_label,
XmNlabelString, &xmstr,
NULL);
str = NULL;
str = (char *) _XmStringUngenerate(
xmstr, NULL,
XmMULTIBYTE_TEXT, XmMULTIBYTE_TEXT);
if (NULL == str) return; // internal error
last_selectedCount = (unsigned int)strtol(str, NULL, 10);
XtFree(str);
if((last_displayCount == 0 && displayCount == 1) ||
(last_displayCount == 2 && displayCount == 1)) {
sprintf(c, CATGETS(DT_catd, 12, 1, "Attachment"));
XtVaSetValues(_attachments_label,
XtVaTypedArg, XmNlabelString, XtRString, c, strlen(c)+1,
NULL);
} else if(last_displayCount == 1 && displayCount == 2) {
sprintf(c, CATGETS(DT_catd, 12, 2, "Attachments"));
XtVaSetValues(_attachments_label,
XtVaTypedArg, XmNlabelString, XtRString, c, strlen(c)+1,
NULL);
}
if(last_displayCount != displayCount) {
sprintf(c, CATGETS(DT_catd, 12, 3, "displayCount"));
XtVaSetValues(_no_attachments_label,
XtVaTypedArg, XmNlabelString, XtRString, c, strlen(c)+1,
NULL);
}
sprintf(c, "(%s),", calcKbytes(attachmentsSize));
XtVaSetValues(_size_attachments_label,
XtVaTypedArg, XmNlabelString, XtRString, c, strlen(c)+1,
NULL);
if(last_selectedCount != _iconSelectedCount) {
sprintf(c, "%d", _iconSelectedCount);
XtVaSetValues(_no_selected_label,
XtVaTypedArg, XmNlabelString, XtRString, c, strlen(c)+1,
NULL);
sprintf(c, "(%s)", calcKbytes(getSelectedAttachmentsSize()));
XtVaSetValues(_size_selected_label,
XtVaTypedArg, XmNlabelString, XtRString, c, strlen(c)+1,
NULL);
}
if(!XtIsManaged(_no_attachments_label)) {
XtManageChild(_no_attachments_label);
XtManageChild(_attachments_label);
XtManageChild(_size_attachments_label);
XtManageChild(_no_selected_label);
XtManageChild(_selected_label);
XtManageChild(_size_selected_label);
}
}
delete [] c;
}
#endif /* DEAD_WOOD */
int AttachArea::getSelectedIconCount()
{
Attachment **list = getList();
@@ -441,23 +350,6 @@ int AttachArea::getSelectedIconCount()
return (num_selected);
}
#ifdef DEAD_WOOD
void AttachArea::CalcAttachmentsSize( )
{
Attachment **list = getList();
unsigned int total = 0;
int i;
int num_icons = getIconCount();
for(i=0;i<num_icons;i++)
if(!list[i]->isDeleted())
total += (unsigned int)list[i]->getContentsSize();
setAttachmentsSize(total);
}
#endif /* DEAD_WOOD */
Attachment *
AttachArea::getSelectedAttachment()
@@ -807,63 +699,6 @@ AttachArea::addAttachment(
return(attachment);
}
#ifdef DEAD_WOOD
void
AttachArea::add_attachment(
Attachment *attachment
)
{
attachment->setAttachArea(this);
attachment->initialize();
addToList( attachment );
}
//
// This function truly deletes all the attachments in the AttachArea
// The widgets are unmanaged and the attachment classes are deleted.
//
void AttachArea::deleteAttachments( )
{
int i;
WidgetList deleteList;
int count;
Attachment **list = getList();
// First, unmanaged all the attachment at once so there is no
// flickering when we delete them
deleteList = (WidgetList)XtMalloc(sizeof(Widget) * getIconCount());
for(i=0;i<getIconCount();i++)
deleteList[i] = list[i]->baseWidget();
XtUnmanageChildren(deleteList, i);
delete deleteList;
XtFree((char *)deleteList);
// Delete each attachment in the list
count = getIconCount();
for(i=count-1;i>=0;i--) {
delete list[i];
decIconCount();
}
_iconCount = 0;
_iconSelectedCount = 0;
_deleteCount = 0;
CalcLastRow();
AdjustCurrentRow();
SetScrollBarSize(getLastRow()+1);
activateDeactivate();
_attachmentList=NULL;
_attachmentsSize = 0;
_selectedAttachmentsSize = 0;
}
#endif /* DEAD_WOOD */
void AttachArea::manageList( )
{
int i;
@@ -879,29 +714,6 @@ void AttachArea::manageList( )
DisplayAttachmentsInRow(_currentRow);
}
#ifdef DEAD_WOOD
//
// Find the x and y position for a newly created attachment
//
void AttachArea::CalcAttachmentPosition(Attachment *item)
{
int i, j;
Boolean found_managed = FALSE;
Attachment **list = getList();
for(i=0, j=0;i<getIconCount();i++)
if(!list[i]->isDeleted()) {
j = i;
found_managed = TRUE;
}
calculate_attachment_position(
found_managed ? list[j] : (Attachment *)NULL, item
);
}
#endif /* DEAD_WOOD */
//
// Display the attachments in row X
//
@@ -1428,21 +1240,6 @@ AttachArea::clearAttachArea()
_cache_single_attachment = NULL;
}
#ifdef DEAD_WOOD
void
AttachArea::saveAttachmentToFile(
DtMailEnv &mail_error,
char *save_path
)
{
Attachment *attachment = this->getSelectedAttachment();
if(attachment != NULL)
attachment->saveToFile(mail_error, save_path);
}
#endif /* DEAD_WOOD */
void
AttachArea::deleteSelectedAttachments(
@@ -1479,15 +1276,6 @@ AttachArea::deleteSelectedAttachments(
}
#ifdef DEAD_WOOD
void
AttachArea::undeleteAllDeletedAttachments(
DtMailEnv & //mail_error
)
{
}
#endif /* DEAD_WOOD */
void
AttachArea::undeleteLastDeletedAttachment(
DtMailEnv &mail_error

View File

@@ -198,9 +198,6 @@ class AttachArea : public UIComponent {
void addToList( Attachment * );
void addToDeletedList( Attachment *);
#ifdef DEAD_WOOD
void undeleteAllDeletedAttachments(DtMailEnv &);
#endif /* DEAD_WOOD */
void undeleteLastDeletedAttachment(DtMailEnv &);
void removeLastDeletedAttachment();
@@ -255,14 +252,8 @@ class AttachArea : public UIComponent {
Attachment* getSelectedAttachment();
void unselectOtherSelectedAttachments(Attachment *);
#ifdef DEAD_WOOD
void deleteAttachments();
#endif /* DEAD_WOOD */
void manageList();
void CalcSizeOfAttachPane( );
#ifdef DEAD_WOOD
void CalcAttachmentPosition(Attachment *);
#endif /* DEAD_WOOD */
void CalcAllAttachmentPositions();
void DisplayAttachmentsInRow(unsigned int);
void calculate_attachment_position(
@@ -276,14 +267,7 @@ class AttachArea : public UIComponent {
void initialize(Widget);
void initialize_send(Widget);
void initialize_view(Widget);
#ifdef DEAD_WOOD
void setAttachmentsLabel( );
#endif /* DEAD_WOOD */
int getSelectedIconCount();
#ifdef DEAD_WOOD
void CalcAttachmentsSize( );
void add_attachment( Attachment * );
#endif /* DEAD_WOOD */
// Methods for parsing the attachments in a DtMail::Message
@@ -300,9 +284,6 @@ class AttachArea : public UIComponent {
void unmanage();
void removeCurrentAttachments();
void clearAttachArea();
#ifdef DEAD_WOOD
void saveAttachmentToFile(DtMailEnv &, char *);
#endif /* DEAD_WOOD */
void deleteSelectedAttachments(DtMailEnv &);
Widget ownerShellWidget();
void setOwnerShell(RoamMenuWindow *);

View File

@@ -58,9 +58,6 @@
#include "Icon.h"
#include "AttachCmds.h"
#include "InfoDialogManager.h"
#ifdef DEAD_WOOD
#include "QuestionDialogManager.h"
#endif /* DEAD_WOOD */
#include "RoamMenuWindow.h"
#include <DtMail/DtMailError.hh>
#include <DtMail/DtMail.hh>

View File

@@ -130,13 +130,8 @@ unsigned char invalidbits[] = {
String typeName;
#ifdef DEAD_WOOD
void runit_callback( int *data );
void norunit_callback( int *data );
#endif /* DEAD_WOOD */
static void okcb(XtPointer);
/*
* CDExc17304
*
@@ -291,20 +286,6 @@ Attachment::initialize()
installDestroyHandler();
}
#ifdef DEAD_WOOD
Boolean
Attachment::check_if_binary(String contents, unsigned long size)
{
int i;
for(i=0;i<size;i++) {
if((!isprint(contents[i])) && (!isspace(contents[i])))
return True;
}
return False;
}
#endif /* DEAD_WOOD */
//
// Map the name (which we got from the classing engine) to a
// type and subtype
@@ -498,20 +479,6 @@ static void okcb( XtPointer )
// automatically pops down. It is for information only.
}
#ifdef DEAD_WOOD
void
runit_callback(int *data)
{
*data=1;
}
void
norunit_callback(int *data)
{
*data=2;
}
#endif /* DEAD_WOOD */
int
Attachment::operator==
(
@@ -722,17 +689,6 @@ Attachment::setY(
if (was_managed) manageIconWidget();
}
#ifdef DEAD_WOOD
void
Attachment::setRow(
int row
)
{
_row = row;
}
#endif /* DEAD_WOOD */
void
Attachment::actionCallback(
DtActionInvocationID id,

View File

@@ -133,13 +133,8 @@ class Attachment : public UIComponent {
void setLabel( XmString str );
void setX(Position);
#ifdef DEAD_WOOD
void setY(Position);
void setRow(int);
#else /* ! DEAD_WOOD */
void setY(Position);
void setRow(int row) { _row = row; }
#endif /* ! DEAD_WOOD */
void deleteIt();
void undeleteIt();
@@ -153,9 +148,6 @@ class Attachment : public UIComponent {
void name_to_type();
void setAttachArea(AttachArea *);
#ifdef DEAD_WOOD
Boolean check_if_binary(String, unsigned long);
#endif /* DEAD_WOOD */
// SR -- Added methods below

View File

@@ -49,12 +49,7 @@
CheckBoxUiItem::CheckBoxUiItem(Widget w, int source, char *search_key):PropUiItem(w, source, search_key)
{
#ifdef DEAD_WOOD
data_source = source;
#endif /* DEAD_WOOD */
options_checkbox_init(w, &(this->dirty_bit));
}
// CheckBoxUiItem::writeFromUiToSource()

View File

@@ -85,41 +85,6 @@ CustomListUiItem::CustomListUiItem(Widget w,
}
#ifdef DEAD_WOOD
//-----------------======================-----------------
void handleDoubleSelection(Widget w, XtPointer clientdata, XtPointer calldata)
{
CustomListUiItem *item;
XmListCallbackStruct *list_info = (XmListCallbackStruct *)calldata;
char *selection_string = NULL;
DtVirtArray<PropStringPair *> *list_items;
XtVaGetValues(w,
XmNuserData, &item,
NULL);
list_items = item->getItemList();
if(list_items != NULL)
{ // motif index is 1 based
//virtarry is 0 based
PropStringPair *pair = (*list_items)[list_info->item_position - 1];
if(pair != NULL)
{
XtVaSetValues(item->getKeyWidget(),
XmNvalue,pair->label,
NULL);
XtVaSetValues(item->getValueWidget(),
XmNvalue,pair->value,
NULL);
}
}
}
#endif /* DEAD_WOOD */
//-----------------======================-----------------
void handleCustSelection(Widget w, XtPointer, XtPointer calldata)
{

View File

@@ -778,20 +778,6 @@ DtMailGenDialog::setToErrorDialog(
setDialog(title, text, XmDIALOG_ERROR);
}
#ifdef DEAD_WOOD
void
DtMailGenDialog::setToInfoDialog(
char *title,
char *text
)
{
if (NULL != _textField && XtIsManaged(_textField))
XtUnmanageChild(_textField);
setDialog(title, text, XmDIALOG_INFORMATION);
}
#endif /* DEAD_WOOD */
extern "C" Pixmap _DtGetMask(Screen * screen, char * image_name);
void

View File

@@ -88,9 +88,6 @@ class DtMailGenDialog : public UIComponent {
void setToTextFieldDialog(char *, char *, int shroud = FALSE);
void setToQuestionDialog(char *, char *);
#ifdef DEAD_WOOD
void setToInfoDialog(char *, char *);
#endif /* DEAD_WOOD */
void setToErrorDialog(char *, char *);
void setToWarningDialog(char *, char *);
void setToAboutDialog(void);

View File

@@ -148,9 +148,6 @@
char *getHelpId(Widget);
void printHelpId(char *, Widget);
#ifdef DEAD_WOOD
void HelpMenuCB(Widget, XtPointer, XtPointer);
#endif /* DEAD_WOOD */
void HelpCB(Widget, XtPointer, XtPointer);
extern void DisplayMain(Widget, char *, char *);
extern void DisplayVersion(Widget, char *, char *);

View File

@@ -1,93 +0,0 @@
/*
* 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
*
* $XConsortium: Image.C /main/4 1996/04/21 19:42:11 drk $
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*+ENOTICE
*/
#ifdef DEAD_WOOD
#include "Image.h"
#include "stdlib.h"
Image::Image( Widget w, char *filename )
{
GC gc;
Pixmap bitmap,pixmap;
int xhot,yhot;
XGCValues values;
Display *display=XtDisplay( w );
_filename=strdup(filename);
XReadBitmapFile( display,
RootWindowOfScreen(XtScreen(w)),
_filename,
&_width,
&_height,
&bitmap,
&xhot,
&yhot );
pixmap = XCreatePixmap( display,
RootWindowOfScreen( XtScreen(w) ),
_width,
_height,
DefaultDepthOfScreen( XtScreen(w) ));
// XtVaGetValues( w,
// XtNfontColor, &values.foreground,
// XtNbackground, &values.background,
// NULL );
gc = XtGetGC( w, GCForeground | GCBackground, &values );
XCopyPlane( display, bitmap, pixmap, gc, 0, 0, _width, _height, 0 ,0 ,1 );
_image = XGetImage( display, pixmap,
0, 0,
_width, _height,
AllPlanes, ZPixmap );
}
Image::~Image(){
free ( _filename );
}
#endif /* DEAD_WOOD */

View File

@@ -1,61 +0,0 @@
/*
* 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
*
* $XConsortium: Image.h /main/4 1996/04/21 19:42:14 drk $
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*+ENOTICE
*/
#ifndef IMAGE_H
#define IMAGE_H
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
class Image {
private:
XImage *_image;
unsigned int _width,_height;
char *_filename;
public:
Image( Widget, char * );
~Image();
XImage *image() { return _image; }
};
#endif

View File

@@ -52,10 +52,6 @@ ListUiItem::ListUiItem(Widget w,
DtVirtArray<char *> *alias_list
):PropUiItem(w, source, search_key)
{
#ifdef DEAD_WOOD
data_source = source;
#endif /* DEAD_WOOD */
if(alias_list != NULL)
options_list_init(w, alias_list);

View File

@@ -24,14 +24,14 @@ dtmail_SOURCES = AliasListUiItem.C AlternatesListUiItem.C \
Editor.C EncryptedTextFieldUiItem.C \
FindDialog.C Fonts.C \
Icon.C IgnoreListUiItem.C \
Image.C InboxTextFieldUiItem.C \
InboxTextFieldUiItem.C \
IndexedOptionMenu.C IndexedOptionMenuUiItem.C \
ListUiItem.C MailRcSource.C \
MailRetrievalOptions.C MailSession.C \
MoveMenuListUiItem.C MsgHndArray.C \
MsgScrollingList.C NoOpCmd.C \
OptCmd.C PasswordDialogManager.C \
PropUi.C QueryDialogManager.C \
PropUi.C \
RoamApp.C RoamCmds.C \
RoamInterruptibleCmd.C RoamMenuWindow.C \
ScaleUiItem.C SendMsgDialog.C \

View File

@@ -55,9 +55,6 @@
#include "MemUtils.hh"
#include "MsgHndArray.hh"
#include "MsgScrollingList.hh"
#ifdef DEAD_WOOD
#include "QueryDialogManager.hh"
#endif /* DEAD_WOOD */
#include "RoamApp.h"
#include "RoamMenuWindow.h"
#include "Sort.hh"
@@ -196,25 +193,6 @@ MsgScrollingList::items(
NULL );
}
#ifdef DEAD_WOOD
void
MsgScrollingList::addChooseCommand(
ChooseCmd *cmd
)
{
_choose=cmd;
}
void
MsgScrollingList::addDeleteCommand(
DeleteCmd *cmd
)
{
_delete=cmd;
}
#endif /* DEAD_WOOD */
void
MsgScrollingList::select_next_item()
{
@@ -336,39 +314,6 @@ MsgScrollingList::position(
return (_msgs->indexof(msgno))+1;
}
#ifdef DEAD_WOOD
int
MsgScrollingList::position(
MsgStruct *a_msg_struct
)
{
return (_msgs->indexof(a_msg_struct))+1;
}
void
MsgScrollingList::appendMsg(
DtMailMessageHandle msg_hndl
)
{
MsgStruct *newMS;
// A new message has come in.
// Increase the session_message_number which keeps track of the
// number of messages in this session for this folder (scrolling list).
//
newMS = new MsgStruct();
newMS->message_handle = msg_hndl;
newMS->indexNumber = session_message_number-num_deleted_messages;
newMS->sessionNumber = session_message_number;
newMS->is_deleted = FALSE;
_msgs->append(newMS);
session_message_number++;
}
#endif /* DEAD_WOOD */
void
MsgScrollingList::insertMsg(
DtMailMessageHandle msg_hndl
@@ -2796,19 +2741,6 @@ MsgScrollingList::shutdown()
}
}
#ifdef DEAD_WOOD
DtMailMessageHandle
MsgScrollingList::lastMsg()
{
if (_msgs->length() > 0) {
return((_msgs->at(_msgs->length() - 1))->message_handle);
}
else { // Currently an empty folder
return(NULL);
}
}
#endif /* DEAD_WOOD */
void
MsgScrollingList::clearMsgs()
{

View File

@@ -43,9 +43,6 @@
#ifndef MSGSCROLLINGLIST_H
#define MSGSCROLLINGLIST_H
#ifdef DEAD_WOOD
#include "Image.h"
#endif /* DEAD_WOOD */
#include "MsgHndArray.hh"
#include "RoamCmds.h"
#include "ScrollingList.h"
@@ -92,10 +89,6 @@ class MsgScrollingList : public ScrollingList {
int selected_item_position() { return _selected_item_position; }
RoamMenuWindow *parent() { return _parent; }
#ifdef DEAD_WOOD
void addChooseCommand( ChooseCmd * );
void addDeleteCommand( DeleteCmd * );
#endif /* DEAD_WOOD */
void select_next_item();
void select_prev_item();
@@ -104,9 +97,6 @@ class MsgScrollingList : public ScrollingList {
DtMailMessageHandle current_msg_handle();
int position(DtMailMessageHandle msgno);
#ifdef DEAD_WOOD
int position(MsgStruct* a_msg_struct);
#endif /* DEAD_WOOD */
virtual const char *const className() {return ("MsgScrollingList");}
virtual void insertMsg(DtMailMessageHandle);
@@ -116,14 +106,6 @@ class MsgScrollingList : public ScrollingList {
int copySelected(DtMailEnv &, char *, int delete_after_copy, int silent);
void items( XmString [], int );
#ifdef DEAD_WOOD
void appendMsg(DtMailMessageHandle msg_hndl, int sess_num);
void appendMsg(DtMailMessageHandle msgno);
DtMailMessageHandle lastMsg();
#endif /* DEAD_WOOD */
void clearMsgs();
void updateListItems(int current,
@@ -192,9 +174,6 @@ class MsgScrollingList : public ScrollingList {
void undelete_messages(MsgHndArray *);
void undelete_last_deleted();
void display_message_summary();
#ifdef DEAD_WOOD
void display_message_selected();
#endif /* DEAD_WOOD */
void display_message(DtMailEnv &, int a_position);
int load_headers(DtMailEnv &);
@@ -218,10 +197,6 @@ class MsgScrollingList : public ScrollingList {
MenuBar *_menuPopupMsgs;
private:
#ifdef DEAD_WOOD
Image *_attach_image;
Image *_letter_image;
#endif /* DEAD_WOOD */
RoamMenuWindow *_parent;
ChooseCmd *_choose;
DeleteCmd *_delete;

View File

@@ -112,19 +112,6 @@ Widget PasswordDialogManager::createDialog ( Widget parent )
return dialog;
}
#ifdef DEAD_WOOD
char *
PasswordDialogManager::userName(){
return ( XmTextFieldGetString( _user ) );
}
char *
PasswordDialogManager::password(){
// return ( XmTextFieldGetString( _password ) );
return _pwd;
}
#endif /* DEAD_WOOD */
void
PasswordDialogManager::modifyVerifyCallback( Widget w,
XtPointer clientData,
@@ -147,10 +134,3 @@ PasswordDialogManager::modifyVerify( Widget ,
}
}
#ifdef DEAD_WOOD
void
PasswordDialogManager::resetPassword()
{
_pwd[0] = 0;
}
#endif /* DEAD_WOOD */

View File

@@ -63,12 +63,6 @@ public:
PasswordDialogManager ( char * );
void modifyVerify( Widget,XmTextVerifyCallbackStruct * );
#ifdef DEAD_WOOD
char *userName();
char *password();
void resetPassword();
#endif /* DEAD_WOOD */
};
extern PasswordDialogManager *thePasswordDialogManager;

View File

@@ -1,73 +0,0 @@
/*
* 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
*
* $XConsortium: QueryDialogManager.C /main/4 1996/04/21 19:43:02 drk $
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*+ENOTICE
*/
#ifdef DEAD_WOOD
#include "QueryDialogManager.hh"
#include "RoamApp.h"
#include <Xm/Xm.h>
#include <Xm/MessageB.h>
QueryDialogManager *theQueryDialogManager =
new QueryDialogManager ( "QueryDialog" );
QueryDialogManager::QueryDialogManager ( char *name )
:DialogManager ( name )
{
// Empty
}
Widget QueryDialogManager::createDialog ( Widget parent )
{
Widget dialog = XmCreateQuestionDialog ( parent, _name, NULL, 0);
XtVaSetValues ( dialog,
XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL,
NULL );
return dialog;
}
#endif /* DEAD_WOOD */

View File

@@ -1,68 +0,0 @@
/*
* 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
*
* $XConsortium: QueryDialogManager.hh /main/4 1996/04/21 19:43:05 drk $
*
* RESTRICTED CONFIDENTIAL INFORMATION:
*
* The information in this document is subject to special
* restrictions in a confidential disclosure agreement between
* HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
* document outside HP, IBM, Sun, USL, SCO, or Univel without
* Sun's specific written approval. This document and all copies
* and derivative works thereof must be returned or destroyed at
* Sun's request.
*
* Copyright 1993 Sun Microsystems, Inc. All rights reserved.
*
*+ENOTICE
*/
///////////////////////////////////////////////////////////
// QueryDialogManager.hh
//////////////////////////////////////////////////////////
#ifdef DEAD_WOOD
#ifndef QUERYDIALOGMANAGER_HH
#define QUERYDIALOGMANAGER_HH
#include "DialogManager.h"
class QueryDialogManager : public DialogManager {
protected:
Widget createDialog ( Widget );
public:
QueryDialogManager ( char * );
};
extern QueryDialogManager *theQueryDialogManager;
#endif
#endif /* DEAD_WOOD */

View File

@@ -901,18 +901,6 @@ reload_notify_cb(XtPointer)
}
#endif /* DTMAIL_TOOLTALK */
#ifdef DEAD_WOOD
static void
SigChldHandler(int)
{
int status;
int pid = (int) wait(&status);
ChildExitNotify(pid, status);
}
#endif /* DEAD_WOOD */
void pspace_signal( int )
{
Widget parent=theApplication->baseWidget();

View File

@@ -153,86 +153,6 @@ RoamCmd::RoamCmd
_menuwindow = window;
}
#ifdef DEAD_WOOD
SearchCmd::SearchCmd(
char *name,
char *label,
int active,
RoamMenuWindow *window
) : InterruptibleCmd (name, label, active)
{
_menuwindow = window;
_criteria = NULL;
}
void
SearchCmd::execute (
TaskDoneCallback callback,
void *clientData
)
{
InterruptibleCmd::execute( callback, clientData );
}
void
SearchCmd::execute()
{
_menuwindow->list()->clearMsgs();
_menuwindow->busyCursor();
if ( !_criteria ) {
_criteria=( char * )realloc(_criteria, strlen( this->name()) + 1);
strcpy(_criteria, this->name());
}
InterruptibleCmd::execute();
}
void
SearchCmd::doit()
{
int count;
DtMailEnv mail_error;
// Initialize the mail_error.
mail_error.clear();
MsgScrollingList *list=_menuwindow->list();
// load_headers will retrieve all of the message headers and
// add the handles to the list.
//
count = list->load_headers(mail_error);
_menuwindow->normalCursor();
if (count == 0) {
_menuwindow->message(CATGETS(DT_catd, 3, 46, "Empty container"));
_done = TRUE;
return;
}
list->scroll_to_bottom();
_done=TRUE;
}
void
SearchCmd::undoit()
{
// Just print a message that allows us to trace the execution
DebugPrintf(1, "%s: undoit\n", name());
}
void
SearchCmd::updateMessage (char *msg)
{
InterruptibleCmd::updateMessage(msg);
}
#endif /* DEAD_WOOD */
CheckForNewMailCmd::CheckForNewMailCmd(
char *name,
char *label,
@@ -1466,26 +1386,6 @@ UndeleteCmd::doit()
}
#ifdef DEAD_WOOD
SaveCmd::SaveCmd ( char *name,
char *label,
int active,
RoamMenuWindow *window
) : RoamCmd ( name, label, active, window )
{
}
void
SaveCmd::doit()
{
assert(_menuwindow->mailbox() != NULL);
}
#endif /* DEAD_WOOD */
MoveCopyCmd::MoveCopyCmd( char *name,
char *label,
int active,
@@ -1756,32 +1656,6 @@ PrevCmd::doit()
_menuwindow->list()->select_prev_item();
}
#ifdef DEAD_WOOD
MessagesCmd::MessagesCmd(
char *name,
char *label,
int active,
RoamMenuWindow *window
) : RoamCmd ( name, label, active, window )
{
}
void
MessagesCmd::doit()
{
Boolean old=_menuwindow->fullHeader();
MsgScrollingList *list=_menuwindow->list();
( !strcmp( this->name(), "Full Header" ) ? _menuwindow->fullHeader( True ) : _menuwindow->fullHeader( False ) );
if ( old!=_menuwindow->fullHeader() && _menuwindow->msgView() ) {
// list->chooseCurrent();
}
}
#endif /* DEAD_WOOD */
PrintCmd::PrintCmd (
char *name,
char *label,
@@ -1935,27 +1809,6 @@ PrintCmd::_unregister_tmp_file(
return;
}
#ifdef DEAD_WOOD
PopupCmd::PopupCmd (
char *name,
char *label,
int active,
PopupWindow * (RoamMenuWindow::* member) (void),
RoamMenuWindow *myparent
) : NoUndoCmd ( name, label, active )
{
parent=myparent;
pmpopup=member;
}
void
PopupCmd::doit()
{
PopupWindow *popup=(parent->*pmpopup)();
// popup->manage();
}
#endif /* DEAD_WOOD */
// OnItemCmd brings up the Help On Item help.
OnItemCmd::OnItemCmd ( char * name,
char *label,
@@ -2094,101 +1947,6 @@ RelNoteCmd::~RelNoteCmd()
delete _genDialog;
}
#ifdef DEAD_WOOD
ClearCmd::ClearCmd (
char * name,
char *label,
int active,
RoamMenuWindow *window
) : NoUndoCmd (name, label, active )
{
parent=window;
}
void
ClearCmd::doit()
{
// ((FindPopup *) parent->find_popup())->clear_text_values();
}
StartCmd::StartCmd( char *name,
char *label,
int active ) : Cmd ( name, label, active )
{
}
void
StartCmd::doit()
{
char *forward= ".forward";
struct passwd pwd;
GetPasswordEntry(pwd);
char *forward_filename=new char[strlen(pwd.pw_dir)+1+strlen(forward)+1];
sprintf( forward_filename, "%s/%s", pwd.pw_dir, forward );
}
void
StartCmd::undoit()
{
}
ChangeCmd::ChangeCmd(
char *name,
char *label,
int active
) : Cmd (name, label, active )
{
}
void
ChangeCmd::doit()
{
struct passwd pwd;
GetPasswordEntry(pwd);
char *user_name=new char[strlen(pwd.pw_name)+1];
strcpy(user_name,pwd.pw_name);
}
void
ChangeCmd::undoit()
{
}
StopCmd::StopCmd(
char *name,
char *label,
int active,
RoamMenuWindow *window
) : Cmd (name, label, active )
{
parent=window;
}
void
StopCmd::doit()
{
unlink( parent->forwardFilename() );
parent->title( NULL );
}
void
StopCmd::undoit()
{
}
#endif /* DEAD_WOOD */
SendCmd::SendCmd(
char *name,
char *label,

View File

@@ -92,15 +92,6 @@ public:
virtual const char *const className() { return "OpenMsgCmd"; }
};
#ifdef DEAD_WOOD
class SaveCmd : public RoamCmd {
public:
virtual void doit();
SaveCmd( char *, char *, int, RoamMenuWindow * );
virtual const char *const className () { return "SaveCmd"; }
};
#endif /* DEAD_WOOD */
class UnifiedSelectFileCmd : public SelectFileCmd {
private:
@@ -252,17 +243,6 @@ class PrevCmd : public RoamCmd {
};
#ifdef DEAD_WOOD
class MessagesCmd : public RoamCmd {
public:
virtual void doit();
MessagesCmd( char *, char *, int, RoamMenuWindow * );
virtual const char *const className () { return "MessagesCmd"; }
};
#endif /* DEAD_WOOD */
class ChooseCmd : public NoUndoCmd {
protected:
@@ -278,40 +258,6 @@ class ChooseCmd : public NoUndoCmd {
void msgno( DtMailMessageHandle msgno) { _msgno=msgno; }
};
#ifdef DEAD_WOOD
class ClearCmd : public NoUndoCmd {
protected:
class RoamMenuWindow *parent;
public:
virtual void doit();
ClearCmd( char *, char *, int, RoamMenuWindow * );
virtual const char *const className () { return "ClearCmd"; }
};
class SearchCmd : public InterruptibleCmd {
protected:
RoamMenuWindow *_menuwindow;
char *_criteria;
long _msgs_fetched;
int h_index;
virtual void doit();
virtual void undoit();
public:
SearchCmd ( char *, char *, int, RoamMenuWindow * );
virtual void execute();
virtual void execute ( TaskDoneCallback, void * );
void set_criteria( char *criteria ) { _criteria=criteria; };
virtual void updateMessage ( char * );
virtual const char *const className () { return "SearchCmd"; }
};
#endif /* DEAD_WOOD */
class CheckForNewMailCmd : public NoUndoCmd {
protected:
@@ -548,18 +494,6 @@ class PrintCmd : public ChooseCmd {
static void printjobcb(Widget,XtPointer,XtPointer);
};
#ifdef DEAD_WOOD
class PopupCmd : public NoUndoCmd {
private:
RoamMenuWindow *parent;
PopupWindow *(RoamMenuWindow::* pmpopup) ( void );
public:
virtual void doit();
PopupCmd( char *, char *, int, PopupWindow * (RoamMenuWindow::*) (void), RoamMenuWindow * );
virtual const char *const className () { return "PopupCmd"; }
};
#endif /* DEAD_WOOD */
class OnItemCmd : public NoUndoCmd {
private:
UIComponent *_parent;
@@ -624,39 +558,6 @@ class FindCmd : public RoamCmd {
virtual const char *const className () { return "FindCmd"; }
};
#ifdef DEAD_WOOD
class StartCmd : public Cmd {
private:
// VacationPopup *parent;
int parent;
public:
virtual void doit();
virtual void undoit();
// StartCmd( char *, char *, int, VacationPopup * );
StartCmd( char *, char *, int );
virtual const char *const className () { return "StartCmd"; }
};
class ChangeCmd : public Cmd {
public:
virtual void doit();
virtual void undoit();
ChangeCmd( char *, char *, int );
virtual const char *const className () { return "ChangeCmd"; }
};
class StopCmd : public Cmd {
private:
RoamMenuWindow *parent;
public:
virtual void doit();
virtual void undoit();
StopCmd( char *, char *, int, RoamMenuWindow * );
virtual const char *const className () { return "StopCmd"; }
};
#endif /* DEAD_WOOD */
class SendCmd : public NoUndoCmd {
private:
SendMsgDialog *_parent;

View File

@@ -101,9 +101,6 @@
#include "RoamApp.h"
#include "ButtonInterface.h"
#include "WorkingDialogManager.h"
#ifdef DEAD_WOOD
#include "QuestionDialogManager.h"
#endif /* DEAD_WOOD */
#include "MemUtils.hh"
#include "Help.hh"
#include "DtMailHelp.hh"

View File

@@ -49,12 +49,7 @@
ScaleUiItem::ScaleUiItem(Widget w, int source, char *search_key):PropUiItem(w, source, search_key)
{
#ifdef DEAD_WOOD
data_source = source;
#endif /* DEAD_WOOD */
options_field_init(w, &(this->dirty_bit));
}
// ScaleUiItem::writeFromUiToSource()

View File

@@ -416,14 +416,6 @@ header_form_traverse(Widget w, XtPointer, XtPointer)
(void) XmProcessTraversal(w, XmTRAVERSE_NEXT_TAB_GROUP);
}
#ifdef DEAD_WOOD
void
send_pushb_callback(Widget, XtPointer, XtPointer)
{
}
#endif /* DEAD_WOOD */
// Create Message Handle with empty first body part.
DtMail::Message *
SendMsgDialog::makeMessage(void)
@@ -1706,20 +1698,6 @@ bogus_cb(void *)
// Should theInfoDialogManager be destroyed here ???
}
#ifdef DEAD_WOOD
void
SendMsgDialog::open_att_cb( void *clientData, char *selection )
{
SendMsgDialog *obj = (SendMsgDialog *)clientData;
obj->open_att(selection);
}
void
SendMsgDialog::open_att( char *) // arg is char *selection
{
}
#endif /* DEAD_WOOD */
void
SendMsgDialog::include_file_cb( void *client_data, char *selection )

View File

@@ -49,12 +49,7 @@
SpinBoxUiItem::SpinBoxUiItem(Widget w, int source, char *search_key):PropUiItem(w, source, search_key)
{
#ifdef DEAD_WOOD
data_source = source;
#endif /* DEAD_WOOD */
options_spinbox_init(w, &(this->dirty_bit));
}
// SpinBoxUiItem::writeFromUiToSource()

View File

@@ -46,9 +46,6 @@
#include "Undelete.hh"
#include "MsgScrollingList.hh"
#include "RoamMenuWindow.h"
#ifdef DEAD_WOOD
#include "QueryDialogManager.hh"
#endif /* DEAD_WOOD */
#include "DialogShell.h"
#include "Application.h"
#include "ButtonInterface.h"

View File

@@ -412,22 +412,6 @@ XmTextEditor::set_to_bottom()
XmTextSetInsertionPosition( _w, XmTextGetLastPosition(_w) );
}
#ifdef DEAD_WOOD
void
XmTextEditor::focus_callback(
Widget,
void *clientData,
void *
)
{
XmTextEditor *obj=(XmTextEditor *) clientData;
obj->obtained_focus();
}
#endif /* DEAD_WOOD */
void
XmTextEditor::obtained_focus()
{

View File

@@ -135,14 +135,6 @@ class XmTextEditor : public Editor
void *,
void *
);
#ifdef DEAD_WOOD
static void focus_callback(
Widget,
void *,
void *
);
#endif /* DEAD_WOOD */
private:
struct PSClientData {
XmTextEditor *obj;

View File

@@ -762,114 +762,6 @@ dtb_get_command()
}
#ifdef DEAD_WOOD
/*
** Generic callback function to be attached as XmNhelpCallback and
** provide support for on-object and Help-key help. The help text to
** be displayed is provided via a specialized data structure passed in
** as client data.
*/
void
dtb_help_dispatch(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
DtbObjectHelpData help_data = (DtbObjectHelpData)clientData;
int i;
Arg wargs[10];
char *buffer = new char[100];
Widget back_button;
static Widget Quick_help_dialog = (Widget)NULL;
static Widget MoreButton;
/*
** In order to save the more-help info (help volume & location ID) as part
** of the quick help dialog's backtrack mechanism, we have to splice the
** volume & ID strings together and save them as the help volume field.
** If there isn't supplemental help information, we save a null string.
**
** Checking the status of the more-help info also lets us decide whether
** the "More..." button should be enabled on the dialog.
*/
if( help_data->help_volume ==0 || *(help_data->help_volume) == NULL ||
help_data->help_locationID ==0 || *(help_data->help_locationID)== NULL){
buffer[0] = '\0';
}
else {
sprintf(buffer,"%s/%s",help_data->help_volume,help_data->help_locationID);
}
/*
** If this is our first time to post help, create the proper dialog and
** set its attributes to suit the current object. If not, then just
** update the attributes.
**
** (You have to be careful about gratuitous SetValues on the dialog because
** its internal stack mechanism takes repeated settings as separate items
** and updates the stack for each.)
*/
if(Quick_help_dialog == (Widget)NULL) {
/* Create shared help dialog */
i = 0;
XtSetArg(wargs[i],XmNtitle, "Application Help"); i++;
XtSetArg(wargs[i],DtNhelpType, DtHELP_TYPE_DYNAMIC_STRING); i++;
XtSetArg(wargs[i],DtNstringData,help_data->help_text); i++;
XtSetArg(wargs[i],DtNhelpVolume,buffer); i++;
Quick_help_dialog = DtCreateHelpQuickDialog(dtb_get_toplevel_widget(),
"Help",wargs,i);
/*
** Fetch out the Dialog's More button child and hook the 'more help'
** handler to its activateCallback. Set it's current status to
** indicate whether this object has supplemental help data.
*/
MoreButton = DtHelpQuickDialogGetChild(Quick_help_dialog,
DtHELP_QUICK_MORE_BUTTON);
XtManageChild(MoreButton);
XtAddCallback(MoreButton,XmNactivateCallback,dtb_more_help_dispatch,
(XtPointer)Quick_help_dialog);
if(buffer[0] == '\0') XtSetSensitive(MoreButton,False);
/*
** Fetch out the Dialog's Backtrack button child & hook a callback
** that will control button sensitivity based on the presence of more
** help data.
*/
back_button = DtHelpQuickDialogGetChild(Quick_help_dialog,
DtHELP_QUICK_BACK_BUTTON);
XtAddCallback(back_button,XmNactivateCallback,dtb_help_back_hdlr,
(XtPointer)Quick_help_dialog);
}
/* Otherwise the dialog already exists so we just set the attributes. */
else {
/*
** If we have supplemental help info, enable the more button.
** Also save this info for later use in the backtrack handler.
*/
if(buffer[0] == '\0') {
XtSetSensitive(MoreButton,False);
}
else {
XtSetSensitive(MoreButton,True);
}
XtVaSetValues(Quick_help_dialog,
DtNhelpType, DtHELP_TYPE_DYNAMIC_STRING,
DtNhelpVolume,buffer,
DtNstringData,help_data->help_text,
NULL);
}
/* Now display the help dialog */
XtManageChild(Quick_help_dialog);
delete [] buffer;
}
#endif /* DEAD_WOOD */
/*
** This callback is invoked when the user presses "More..." on the
** QuickHelpDialog. It figures out whether a help volume entry is associated
@@ -976,40 +868,6 @@ dtb_help_back_hdlr(
}
#ifdef DEAD_WOOD
/*
** Utility function used to provide support for on-item help.
** It is typically invoked via a callback on the "On Item" item in the
** main menubar's "Help" menu.
*/
void
dtb_do_onitem_help()
{
Widget target;
/* Call the DtHelp routine that supports interactive on-item help. */
if(DtHelpReturnSelectedWidgetId(dtb_get_toplevel_widget(),
(Cursor)NULL,&target) != DtHELP_SELECT_VALID) return;
/*
** Starting at the target widget, wander up the widget tree looking
** for one that has an XmNhelpCallback, and call the first one we
** find.
*/
while(target != (Widget)NULL) {
if( XtHasCallbacks(target,XmNhelpCallback) == XtCallbackHasSome) {
XtCallCallbacks(target,XmNhelpCallback,(XtPointer)NULL);
return;
}
else {
target = XtParent(target);
}
}
return;
}
#endif /* DEAD_WOOD */
/*
** Utility function called to display help volume information.
** It needs the name of the help volume and the location ID (both as
@@ -1050,28 +908,6 @@ dtb_show_help_volume_info(
return(0);
}
#ifdef DEAD_WOOD
/*
** dtb_call_help_callback()
** Utility routine to call the help callbacks on a target widget. This
** is predominantly used to display help data on a dialog by having this
** function as the activate callback on the dialog's help button.
*/
void
dtb_call_help_callback(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
Widget target = (Widget)clientData;
XtCallCallbacks(target,XmNhelpCallback,(XtPointer)NULL);
}
#endif /* DEAD_WOOD */
/*
* dtb_session_save()
* Callback that is called when the application (top level
@@ -1246,78 +1082,6 @@ dtb_get_client_session_saveCB()
}
#ifdef DEAD_WOOD
/*
* This function will center all the passed form's children.
* The type of centering depends on what 'type' is.
*/
void
dtb_children_center(
Widget form,
DTB_CENTERING_TYPES type
)
{
WidgetList children_list;
int i,
num_children;
if (!form || (type == DTB_CENTER_NONE))
return;
/*
* Get children list
*/
XtVaGetValues(form,
XmNnumChildren, &num_children,
XmNchildren, &children_list,
NULL);
/*
* Center all children
*/
for (i=0; i < num_children; ++i)
{
dtb_center(children_list[i], type);
}
}
/*
* This function 'uncenters' the children of the passed
* form widget.
*/
void
dtb_children_uncenter(
Widget form,
DTB_CENTERING_TYPES type
)
{
WidgetList children_list;
int i;
int num_children;
if (!form || (type == DTB_CENTER_NONE))
return;
/*
* Get children list
*/
XtVaGetValues(form,
XmNnumChildren, &num_children,
XmNchildren, &children_list,
NULL);
/*
* Center all children
*/
for (i=0; i < num_children; ++i)
{
dtb_uncenter(children_list[i], type);
}
}
#endif /* DEAD_WOOD */
/*
* This function centers the passed widget.
* This is done by setting the proper offsets.

View File

@@ -183,13 +183,6 @@ void dtb_save_command(
);
char * dtb_get_command();
String dtb_get_exe_dir(void);
#ifdef DEAD_WOOD
void dtb_help_dispatch(
Widget widget,
XtPointer clientData,
XtPointer callData
);
#endif /* DEAD_WOOD */
void dtb_more_help_dispatch(
Widget widget,
XtPointer clientData,
@@ -200,28 +193,10 @@ void dtb_help_back_hdlr(
XtPointer clientData,
XtPointer callData
);
#ifdef DEAD_WOOD
void dtb_do_onitem_help();
#endif /* DEAD_WOOD */
int dtb_show_help_volume_info(
char *volume_name,
char *location_id
);
#ifdef DEAD_WOOD
void dtb_call_help_callback(
Widget widget,
XtPointer clientData,
XtPointer callData
);
void dtb_children_center(
Widget form,
DTB_CENTERING_TYPES type
);
void dtb_children_uncenter(
Widget form,
DTB_CENTERING_TYPES type
);
#endif /* DEAD_WOOD */
void dtb_center(
Widget form_child,
DTB_CENTERING_TYPES type

View File

@@ -45,10 +45,6 @@
#ifndef _ALIASLISTUIITEM_HH
#define _ALIASLISTUIITEM_HH
#ifdef DEAD_WOOD
extern void handleDoubleSelection(Widget w, XtPointer clientdata, XtPointer calldata);
#endif /* DEAD_WOOD */
// CLASS AliasListUiItem
// derived class for prop sheet glue items for textfield
///////////////////////////////////////////////////////////

View File

@@ -54,19 +54,8 @@ class AntiCheckBoxUiItem : public CheckBoxUiItem {
public:
AntiCheckBoxUiItem(Widget w, int source, char *search_key);
virtual ~AntiCheckBoxUiItem(){;}; // we don't alloc any memory
#ifdef DEAD_WOOD
virtual int getType(){ return _ANTICHECKBOX_ITEM; };
virtual int getSource(){ return data_source; };
#endif /* DEAD_WOOD */
virtual void writeFromUiToSource();
virtual void writeFromSourceToUi();
private:
#ifdef DEAD_WOOD
int data_source;
#endif /* DEAD_WOOD */
};
#endif

View File

@@ -55,17 +55,8 @@ class CheckBoxUiItem : public PropUiItem {
public:
CheckBoxUiItem(Widget w, int source, char *search_key);
virtual ~CheckBoxUiItem(){;}; // we don't alloc any memory
#ifdef DEAD_WOOD
virtual int getType(){ return _CHECKBOX_ITEM; };
virtual int getSource(){ return data_source; };
#endif /* DEAD_WOOD */
virtual void writeFromUiToSource();
virtual void writeFromSourceToUi();
private:
#ifdef DEAD_WOOD
int data_source;
#endif /* DEAD_WOOD */
};
#endif

View File

@@ -45,9 +45,6 @@
#ifndef _CUSTOMLISTUIITEM_HH
#define _CUSTOMLISTUIITEM_HH
#ifdef DEAD_WOOD
void handleDoubleSelection(Widget w, XtPointer clientdata, XtPointer calldata);
#endif /* DEAD_WOOD */
// CLASS CustomListUiItem
// derived class for prop sheet glue items for textfield
///////////////////////////////////////////////////////////

View File

@@ -40,9 +40,6 @@
*
*+ENOTICE
*/
#ifndef I_HAVE_NO_IDENT
#endif
#ifndef _DTMAIL_HH
#define _DTMAIL_HH
@@ -227,9 +224,6 @@ class DtMail {
BusyApplicationCallback,
void * client_data);
#ifdef DEAD_WOOD
void unregisterBusyCallback(DtMailEnv &);
#endif /* DEAD_WOOD */
void setBusyState(DtMailEnv &, DtMailBusyState busy_state);
@@ -530,11 +524,6 @@ class DtMail {
virtual BodyPart * newBodyPart(DtMailEnv &,
BodyPart * after) = 0;
#ifdef DEAD_WOOD
virtual void newBodyPartOrder(DtMailEnv &,
BodyPart * new_order,
const int bodypart_count) = 0;
#endif /* DEAD_WOOD */
virtual void setFlag(DtMailEnv &,
const DtMailMessageState) = 0;
@@ -699,9 +688,6 @@ class DtMail {
virtual char *csFromContentType(DtMailValueSeq & value) = 0;
// End of For CHARSET
#ifdef DEAD_WOOD
virtual DtMailChecksumState checksum(DtMailEnv &) = 0;
#endif /* DEAD_WOOD */
protected:
BodyPart(DtMailEnv &, Message * parent);
@@ -793,9 +779,6 @@ class DtMail {
virtual void unlock() = 0;
virtual void save() = 0;
#ifdef DEAD_WOOD
virtual int messageCount(DtMailEnv & error) = 0;
#endif /* DEAD_WOOD */
virtual DtMailMessageHandle getFirstMessageSummary(
DtMailEnv & error,

View File

@@ -193,15 +193,6 @@ public:
//
void logError(DtMailBoolean criticalError,
const char *format, ...) const;
#ifdef DEAD_WOOD
//
// This one is the same as logError() plus it sets _fatal.
//
void logFatalError(DtMailBoolean criticalError,
const char *format, ...);
#endif /* DEAD_WOOD */
//
// Set the error code. Tt_message is optional.
//
@@ -303,10 +294,6 @@ protected:
void setCPP(CPPclearF, CPPmessageF, CPPerrorF);
void implClear();
#ifdef DEAD_WOOD
const char * implGetMessage();
int implGetError();
#endif /* DEAD_WOOD */
private:
DTMailError_t _error; // The corrected error number.
@@ -422,13 +409,5 @@ DtMailEnv::implClear()
}
}
#ifdef DEAD_WOOD
inline Tt_message
DtMailError_getTTmsg(DtMailEnv & error)
{
return((const Tt_message)error); // The prefered way.
}
#endif /* DEAD_WOOD */
#endif // _DTCM_HH
#endif // _DTMAILERROR_HH

View File

@@ -97,14 +97,8 @@ class DtMailValue : public DtCPlusPlusAllocator {
virtual const char * operator= (const char *);
virtual DtMailValueDate toDate(void);
#ifdef DEAD_WOOD
virtual void fromDate(const DtMailValueDate &);
#endif /* DEAD_WOOD */
virtual DtMailAddressSeq * toAddress(void);
#ifdef DEAD_WOOD
virtual void fromAddress(const DtMailAddressSeq & list);
#endif /* DEAD_WOOD */
// This method gives the raw format used to store the value.
//

View File

@@ -60,10 +60,6 @@ class FileShare : public DtCPlusPlusAllocator {
DtMailBoolean readOnly(DtMailEnv & error);
DtMailBoolean readWriteOverride(DtMailEnv & error);
#ifdef DEAD_WOOD
DtMailBoolean locked(void);
#endif /* DEAD_WOOD */
private:
struct TTHandle : public DtCPlusPlusAllocator {
DtMail::Session *session;

View File

@@ -84,19 +84,12 @@ class IndexedOptionMenuUiItem : public PropUiItem {
public:
IndexedOptionMenuUiItem(IndexedOptionMenu *iom, int source, char *search_key);
virtual ~IndexedOptionMenuUiItem(){;}; // we don't alloc any memory
#ifdef DEAD_WOOD
virtual int getType(){ return _INDEXED_OPTIONMENU_ITEM; };
virtual int getSource(){ return data_source; };
#endif /* DEAD_WOOD */
virtual void writeFromUiToSource();
virtual void writeFromSourceToUi();
private:
static void valueChangedCB(Widget, XtPointer, XtPointer);
#ifdef DEAD_WOOD
int data_source;
#endif /* DEAD_WOOD */
IndexedOptionMenu *_iom;
};

View File

@@ -53,10 +53,6 @@ class ListUiItem : public PropUiItem {
public:
ListUiItem(Widget w, int source, char *search_key, DtVirtArray<char *> *alias_list);
virtual ~ListUiItem(){;}; // we don't alloc any memory
#ifdef DEAD_WOOD
virtual int getType(){ return _LIST_ITEM; };
virtual int getSource(){ return data_source; };
#endif /* DEAD_WOOD */
virtual void writeFromUiToSource();
virtual void writeFromSourceToUi();
virtual void AddDefaults();
@@ -64,11 +60,6 @@ public:
virtual void handleAddButtonPress(){;};
virtual void handleChangeButtonPress(){;};
virtual void handleDeleteButtonPress(){;};
private:
#ifdef DEAD_WOOD
int data_source;
#endif /* DEAD_WOOD */
};
#endif

View File

@@ -53,17 +53,9 @@ class ScaleUiItem : public PropUiItem {
public:
ScaleUiItem(Widget w, int source, char *search_key);
virtual ~ScaleUiItem(){;}; // we don't alloc any memory
#ifdef DEAD_WOOD
virtual int getType(){ return _SCALE_ITEM; };
virtual int getSource(){ return data_source; };
#endif /* DEAD_WOOD */
virtual void writeFromUiToSource();
virtual void writeFromSourceToUi();
private:
#ifdef DEAD_WOOD
int data_source;
#endif /* DEAD_WOOD */
};
#endif

View File

@@ -53,17 +53,8 @@ class SpinBoxUiItem : public PropUiItem {
public:
SpinBoxUiItem(Widget w, int source, char *search_key);
virtual ~SpinBoxUiItem(){;}; // we don't alloc any memory
#ifdef DEAD_WOOD
virtual int getType(){ return _SPINBOX_ITEM; };
virtual int getSource(){ return data_source; };
#endif /* DEAD_WOOD */
virtual void writeFromUiToSource();
virtual void writeFromSourceToUi();
private:
#ifdef DEAD_WOOD
int data_source;
#endif /* DEAD_WOOD */
};
#endif

View File

@@ -45,9 +45,6 @@
#ifndef _TEMPLATESLISTUIITEM_HH
#define _TEMPLATESLISTUIITEM_HH
#ifdef DEAD_WOOD
extern void handleDoubleSelection(Widget w, XtPointer clientdata, XtPointer calldata);
#endif /* DEAD_WOOD */
// CLASS TemplateListUiItem
// derived class for prop sheet glue items for textfield
///////////////////////////////////////////////////////////

View File

@@ -148,13 +148,6 @@ class Condition : public DtCPlusPlusAllocator {
void wait(void);
void waitTrue(void);
#ifdef DEAD_WOOD
void waitFalse(void);
void waitFor(int);
void waitGT(int); // wait >
void waitLT(int); // wait <
void waitProcStatus(void);
#endif /* DEAD_WOOD */
private:
void * _mutex;

View File

@@ -116,12 +116,6 @@ class Cmd {
void deactivate(); // Deactivate this object
char *getLabel() { return _label; }
#ifdef DEAD_WOOD
// Functions to register dependent commands
void addToActivationList ( Cmd * );
void addToDeactivationList ( Cmd * );
#endif /* DEAD_WOOD */
// Register an UIComponent used to execute this command

View File

@@ -114,9 +114,6 @@
char *getHelpId(Widget);
void printHelpId(char *, Widget);
#ifdef DEAD_WOOD
void HelpMenuCB(Widget, XtPointer, XtPointer);
#endif /* DEAD_WOOD */
void HelpCB(Widget, XtPointer, XtPointer);
void HelpTexteditCB( Widget, XtPointer, XtPointer ) ;
extern void DisplayMain(Widget, char *, char *);

View File

@@ -90,9 +90,6 @@ class CmdList;
class MenuBar : public UIComponent {
protected:
#ifdef DEAD_WOOD
virtual Boolean isValidMenuPane(Widget);
#endif /* DEAD_WOOD */
virtual Widget createPulldown ( Widget, CmdList *,
Boolean, unsigned char);

View File

@@ -86,9 +86,4 @@ class QuestionDialogManager : public DialogManager {
QuestionDialogManager ( char * );
};
#ifdef DEAD_WOOD
extern QuestionDialogManager *theQuestionDialogManager;
#endif /* DEAD_WOOD */
#endif

View File

@@ -99,11 +99,6 @@ class UIComponent : public BasicComponent {
// Called by widgetDestroyedCallback() if base widget is destroyed
virtual void widgetDestroyed();
#ifdef DEAD_WOOD
// Loads component's default resources into database
void setDefaultResources ( const Widget , const String *);
#endif /* DEAD_WOOD */
// Retrieve resources for this clsss from the resource manager
void getResources ( const XtResourceList, const int );

View File

@@ -548,26 +548,6 @@ DtMailEnv::vSetError(const DTMailError_t minor_code,
delete [] messageBuffer;
}
#ifdef DEAD_WOOD
const char *
DtMailEnv::implGetMessage()
{
if (_client != NULL && _implMessageFunc != NULL) {
return((*_implMessageFunc)(_client));
}
return(NULL);
}
int
DtMailEnv::implGetError()
{
if (_client != NULL && _implErrorFunc != NULL) {
return((*_implErrorFunc)(_client));
}
return(0);
}
#endif /* DEAD_WOOD */
void
DtMailEnv::logError(DtMailBoolean criticalError, const char *format, ...) const
{
@@ -598,17 +578,3 @@ DtMailEnv::logError(DtMailBoolean criticalError, const char *format, ...) const
NULL, messageBuffer);
delete [] messageBuffer;
}
#ifdef DEAD_WOOD
void
DtMailEnv::logFatalError(DtMailBoolean criticalError, const char *format, ...)
{
_fatal = DTM_TRUE;
va_list var_args;
va_start(var_args, format);
logError(criticalError, format, var_args);
va_end(var_args);
}
#endif /* DEAD_WOOD */

View File

@@ -111,41 +111,12 @@ DtMailValue::toDate(void)
return(date);
}
#ifdef DEAD_WOOD
void
DtMailValue::fromDate(const DtMailValueDate & date)
{
if (_value) {
free(_value);
}
_value = (char *)malloc(64);
tm result;
SafeLocaltime(&date.dtm_date, result);
/* NL_COMMENT
* The %C is the time and date format, please refer to strftime man page for
* explanation of each format.
*/
SafeStrftime(_value, 64, DtMailError::getMessageText(2, 1, "%C"), &result);
}
#endif /* DEAD_WOOD */
DtMailAddressSeq *
DtMailValue::toAddress(void)
{
return(NULL);
}
#ifdef DEAD_WOOD
void
DtMailValue::fromAddress(const DtMailAddressSeq &)
{
}
#endif /* DEAD_WOOD */
const char *
DtMailValue::raw(void)
{

View File

@@ -457,14 +457,6 @@ FileShare::readWriteOverride(DtMailEnv & error)
return(answer);
}
#ifdef DEAD_WOOD
DtMailBoolean
FileShare::locked(void)
{
return(_have_write_access);
}
#endif /* DEAD_WOOD */
Tt_message
FileShare::fileCB(Tt_message msg,
Tttk_op op,

View File

@@ -61,57 +61,6 @@ ObjectKey::~ObjectKey(void)
delete _type;
}
#ifdef DEAD_WOOD
int
ObjectKey::operator==(ObjectKey &)
{
assert(!"Pure virtual ObjectKey::operator== called");
return(0);
}
int
ObjectKey::operator!=(ObjectKey &)
{
assert(!"Pure virtual ObjectKey::operator!= called\n");
return(0);
}
int
ObjectKey::operator<(ObjectKey &)
{
assert(!"Pure virtual ObjectKey::operator< called\n");
return(0);
}
int
ObjectKey::operator<=(ObjectKey &)
{
assert(!"Pure virtual ObjectKey::operator<= called\n");
return(0);
}
int
ObjectKey::operator>(ObjectKey &)
{
assert(!"Pure virtual ObjectKey::operator> called\n");
return(0);
}
int
ObjectKey::operator>=(ObjectKey &)
{
assert(!"Pure virtual ObjectKey::operator>= called\n");
return(0);
}
HashVal
ObjectKey::hashValue(void)
{
assert(!"Pure virtual ObjectKey::hashValue called\n");
return(0);
}
#endif /* DEAD_WOOD */
HashVal
ObjectKey::genericHashValue(void * buf, int len)
{

View File

@@ -851,15 +851,6 @@ DtMail::Session::registerDisableGroupPrivilegesCallback(
_disableGroupPrivileges_cb_data = cb_data;
}
#ifdef DEAD_WOOD
void
DtMail::Session::unregisterDisableGroupPrivilegesCallback(void)
{
_disableGroupPrivileges_cb = NULL;
_disableGroupPrivileges_cb_data = NULL;
}
#endif /* DEAD_WOOD */
void
DtMail::Session::disableGroupPrivileges(void)
{
@@ -877,15 +868,6 @@ DtMail::Session::registerEnableGroupPrivilegesCallback(
_enableGroupPrivileges_cb_data = cb_data;
}
#ifdef DEAD_WOOD
void
DtMail::Session::unregisterEnableGroupPrivilegesCallback(void)
{
_enableGroupPrivileges_cb = NULL;
_enableGroupPrivileges_cb_data = NULL;
}
#endif /* DEAD_WOOD */
void
DtMail::Session::enableGroupPrivileges(void)
{
@@ -903,15 +885,6 @@ DtMail::Session::registerBusyCallback(DtMailEnv&,
_busy_cb_data = cb_data;
}
#ifdef DEAD_WOOD
void
DtMail::Session::unregisterBusyCallback(DtMailEnv & error)
{
_busy_cb = NULL;
_busy_cb_data = NULL;
}
#endif /* DEAD_WOOD */
void
DtMail::Session::setBusyState(DtMailEnv &error, DtMailBusyState busy_state)
{

View File

@@ -368,91 +368,6 @@ Condition::waitTrue(void)
return;
}
#ifdef DEAD_WOOD
void
Condition::waitFalse(void)
{
// Wait for the condition to become true.
//
#if defined(POSIX_THREADS)
MutexLock lock_scope(_mutex);
while(_state) {
cond_wait((cond_t *)_condition, (mutex_t *)_mutex);
}
#else
_state = 0;
#endif
return;
}
void
Condition::waitFor(int new_state)
{
// Wait for the condition to become true.
//
#if defined(POSIX_THREADS)
MutexLock lock_scope(_mutex);
while(_state != new_state) {
cond_wait((cond_t *)_condition, (mutex_t *)_mutex);
}
#endif
return;
}
void
Condition::waitGT(int new_state)
{
// Wait for the condition to become true.
//
#if defined(POSIX_THREADS)
MutexLock lock_scope(_mutex);
while(_state > new_state) {
cond_wait((cond_t *)_condition, (mutex_t *)_mutex);
}
#endif
return;
}
void
Condition::waitLT(int new_state)
{
// Wait for the condition to become true.
//
#if defined(POSIX_THREADS)
MutexLock lock_scope(_mutex);
while(_state < new_state) {
cond_wait((cond_t *)_condition, (mutex_t *)_mutex);
}
#endif
return;
}
void
Condition::waitProcStatus(void)
{
// Wait for the condition to become true.
//
#if defined(POSIX_THREADS)
MutexLock lock_scope(_mutex);
while(_state < 0) {
cond_wait((cond_t *)_condition, (mutex_t *)_mutex);
}
#else
_state = 0;
#endif
return;
}
#endif /* DEAD_WOOD */
Thread
ThreadCreate(

View File

@@ -187,70 +187,6 @@ MIMEBodyPart::~MIMEBodyPart(void)
{
}
#ifdef DEAD_WOOD
DtMailChecksumState
MIMEBodyPart::checksum(DtMailEnv & error)
{
error.clear();
// Look for the Content-MD5 header. If it is not present, then
// the state is unknown and we can punt.
//
DtMailEnv my_error;
DtMailValueSeq value;
_body_env->getHeader(my_error, "Content-MD5", DTM_FALSE, value);
if (my_error.isSet()) {
return(DtMailCheckUnknown);
}
if (_body_type == NULL) {
getDtType(error);
if (error.isSet()) {
return(DtMailCheckUnknown);
}
}
char stored_digest[32];
int stored_size = 0;
RFCMIME::readBase64(stored_digest, stored_size,
*(value[0]), strlen(*(value[0])));
if (stored_size != 16) {
// The MD5 sum must be 16 bytes, or we have a bad checksum.
//
return(DtMailCheckBad);
}
// See if we call this text. We need to handle md5 checksums
// different for text. They must be computed with CRLF line
// termination.
//
char * text_type = DtDtsDataTypeToAttributeValue(_body_type,
DtDTS_DA_IS_TEXT,
NULL);
unsigned char digest[16];
if (text_type && strcasecmp(text_type, "true") == 0) {
RFCMIME::md5PlainText(_body, _body_decoded_len, digest);
}
else {
MD5_CTX context;
MD5Init(&context);
MD5Update(&context, (unsigned char *)_body, _body_decoded_len);
MD5Final(digest, &context);
}
free(text_type);
if (memcmp(digest, stored_digest, sizeof(digest)) == 0) {
return(DtMailCheckGood);
}
else {
return(DtMailCheckBad);
}
}
#endif /* DEAD_WOOD */
static int
countTypes(char ** types)
{

View File

@@ -127,12 +127,6 @@ class RFCMessage : public DtMail::Message {
virtual DtMail::BodyPart * newBodyPart(DtMailEnv &,
DtMail::BodyPart *);
#ifdef DEAD_WOOD
virtual void newBodyPartOrder(DtMailEnv &,
DtMail::BodyPart *,
const int) { };
#endif /* DEAD_WOOD */
virtual void setFlag(DtMailEnv &,
const DtMailMessageState);
@@ -460,10 +454,6 @@ class RFCBodyPart : public DtMail::BodyPart {
virtual char *csFromContentType(DtMailValueSeq & value) = 0;
// End of For CHARSET
#ifdef DEAD_WOOD
virtual DtMailChecksumState checksum(DtMailEnv &) = 0;
#endif /* DEAD_WOOD */
// Methods below this point are specific to RFCBodyPart.
//
virtual char *writeBodyParts(char * buf) = 0;
@@ -529,10 +519,6 @@ class MIMEBodyPart : public RFCBodyPart {
const char ** end,
const char * boundary);
#ifdef DEAD_WOOD
virtual DtMailChecksumState checksum(DtMailEnv &);
#endif /* DEAD_WOOD */
char *writeBodyParts(char * buf);
int rfcSize(const char * boundary, DtMailBoolean &);
@@ -573,10 +559,6 @@ class V3BodyPart : public RFCBodyPart {
const char * start,
const char ** end);
#ifdef DEAD_WOOD
virtual DtMailChecksumState checksum(DtMailEnv &);
#endif /* DEAD_WOOD */
char *writeBodyParts(char * buf);
int rfcSize(const char * boundary, DtMailBoolean &);
@@ -657,9 +639,6 @@ class RFCMailBox : public DtMail::MailBox
const DtMailHeaderRequest &,
DtMailHeaderLine &);
virtual const char *impl(DtMailEnv & error);
#ifdef DEAD_WOOD
virtual int messageCount(DtMailEnv &);
#endif /* DEAD_WOOD */
virtual DtMail::Message *newMessage(DtMailEnv &);
virtual DtMailCallbackOp retrieveNewMail(DtMailEnv&);
virtual void updateMailRetrievalPassword(char *passwd=NULL);
@@ -897,14 +876,8 @@ class RFCValue : public DtMailValue {
virtual const char * operator= (const char *);
virtual DtMailValueDate toDate(void);
#ifdef DEAD_WOOD
virtual void fromDate(const DtMailValueDate &) { }
#endif /* DEAD_WOOD */
virtual DtMailAddressSeq * toAddress(void);
#ifdef DEAD_WOOD
virtual void fromAddress(const DtMailAddressSeq &) { }
#endif /* DEAD_WOOD */
virtual const char * raw(void);
protected:

View File

@@ -243,10 +243,6 @@ RFCMIME::getEncodingType(const char * body,
}
if (curChar == '\n') {
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
if ((cur - last_nl) > 76) {
encode = DTM_TRUE;
qprint_growth += 2;
@@ -352,10 +348,6 @@ RFCMIME::getEncodingType(const char * body,
}
if (*cur == '\n') {
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
if (strict_mime && ((cur - last_nl) > 76)) {
qprint_growth += 2;
}
@@ -786,9 +778,6 @@ RFCMIME::writeBase64(Buffer & buf, const char * bp, const unsigned long len)
if (lf == 72) {
buf.appendData(line, lf);
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
crlf(buf);
lf = 0;
}
@@ -1042,9 +1031,6 @@ RFCMIME::writeQPrint(Buffer & buf, const char * bp, const unsigned long bp_len)
if (off > 72) {
line_buf[off++] = '=';
buf.appendData(line_buf, off);
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
crlf(buf);
off = 0;
last_nl = 0;
@@ -1058,9 +1044,6 @@ RFCMIME::writeQPrint(Buffer & buf, const char * bp, const unsigned long bp_len)
if (off) {
line_buf[off++] = '=';
buf.appendData(line_buf, off);
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
crlf(buf);
last_nl = 0;
off = 0;
@@ -1109,9 +1092,6 @@ RFCMIME::writeQPrint(Buffer & buf, const char * bp, const unsigned long bp_len)
}
buf.appendData(line_buf, off);
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
last_nl = 0;
off = 0;
@@ -1175,9 +1155,6 @@ RFCMIME::writePlainText(Buffer & buf, const char * bp, const unsigned long len)
}
buf.appendData(line_start, real_end - line_start);
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
line_start = cur + 1;
crlf(buf);
}
@@ -1212,9 +1189,6 @@ RFCMIME::md5PlainText(const char * bp, const unsigned long len, unsigned char *
const char * cur;
for (cur = bp; cur < (bp + len); cur++) {
if (*cur == '\n') {
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
if (cur == bp || *(cur - 1) == '\r') {
MD5Update(&context, (unsigned char *)last,
cur - last + 1);
@@ -1354,9 +1328,6 @@ RFCMIME::formatBodies(DtMailEnv & error,
(unsigned char *)bp_contents,
(unsigned int) bp_len);
MD5Final(digest, &context);
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
}
}
@@ -1484,9 +1455,6 @@ RFCMIME::formatBodies(DtMailEnv & error,
(unsigned char *)bp_contents,
(unsigned int) bp_len);
MD5Final(digest, &context);
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
}
}
@@ -1638,10 +1606,6 @@ RFCMIME::getHdrEncodingType(const char * body,
}
if (curChar == '\n') {
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
if ((cur - last_nl) > 76) {
encode = DTM_TRUE;
qprint_growth += 2;

View File

@@ -924,23 +924,6 @@ RFCMailBox::save()
CheckPointEvent();
}
#ifdef DEAD_WOOD
int
RFCMailBox::messageCount(DtMailEnv & error)
{
error.clear();
_at_eof.waitTrue();
if (_object_valid->state() <= 0) {
error.setError(DTME_ObjectInvalid);
return(0);
}
return(_msg_list.length());
}
#endif /* DEAD_WOOD */
DtMailMessageHandle
RFCMailBox::getFirstMessageSummary(DtMailEnv & error,
const DtMailHeaderRequest & request,

View File

@@ -103,10 +103,6 @@ writeToFileDesc(const char * buf, int len, va_list args)
if (status < 0 && errno != 0) // Did an error occur??
saveErrno = (unsigned long)errno; // Yes: remember "last" errno
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif /* DEAD_WOOD */
}
return(saveErrno); // return last error recorded

View File

@@ -1025,9 +1025,6 @@ SunV3::uuencode(Buffer & buf,
for (cur = ubp; cur < (ubp + whole_lines - 2); cur += 45) {
buf.appendData("M", 1);
encode_uue_line(buf, cur, 45);
#ifdef DEAD_WOOD
DtMailProcessClientEvents();
#endif
}
// Write the partial line.

View File

@@ -315,16 +315,6 @@ V3BodyPart::~V3BodyPart(void)
{
}
#ifdef DEAD_WOOD
DtMailChecksumState
V3BodyPart::checksum(DtMailEnv & error)
{
error.clear();
return(DtMailCheckUnknown);
}
#endif /* DEAD_WOOD */
static int
countTypes(char ** types)
{

View File

@@ -142,22 +142,6 @@ DtApp::DtApp(char *progname, int *argc, char **argv) :
}
}
delete procs;
#ifdef DEAD_WOOD
// This is a workaround to avoid a bug in dtsession or dtaction.
// We should be fixing the problem there.
//
// Fork so that the dtaction grandparent exits. If we don't the
// session manager starts the dtaction process and our dtprintinfo
// process, then dtaction process starts the dtprintinfo process and
// we have two dtprintinfo processes running when the user logs in.
// On Novell, we notice that the child is dying when the parent
// exits. Ignore the SIGHUP signal before fork() and life is good.
signal(SIGHUP, SIG_IGN);
if (fork() != 0)
exit(0);
#endif
}
else
{