dthelp: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / dtmail / dtmail / SendMsgDialog.C
index 310adfbf01c7e6463eddd70354f46884508d1f12..93961b2eb3818ff53aba6883110190776e67dae4 100644 (file)
@@ -16,7 +16,7 @@
  * 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
  */
@@ -158,6 +158,7 @@ SendMsgDialog::HeaderList::HeaderList(const HeaderList & other)
 {
     label = NULL;
     header = NULL;
+    value = NULL;
     show = other.show;
     form_widget = other.form_widget;
     label_widget = other.label_widget;
@@ -460,7 +461,7 @@ SendMsgDialog::updateMsgHnd()
 {
     DtMailEnv error;
     DtMail::Envelope * env;
-    int textLen;
+    int textLen = 0;
 
     env = _msgHandle->getEnvelope(error);
     storeHeaders();
@@ -471,9 +472,9 @@ SendMsgDialog::updateMsgHnd()
        XtFree(widget_text);
        widget_text = NULL;
     }
-    else
-       textLen = strlen(widget_text);
-    
+    else if(widget_text) {
+       textLen = strlen(widget_text);
+    }
     // Even if textlen is 0 because user has cleared all previous text,
     // need to setContents again to clear first BP.  Otherwise, deleted
     // text will show up. 
@@ -860,7 +861,7 @@ SendMsgDialog::loadHeaders(DtMail::Message * input,
 
        int slot = lookupHeader(name);
        if (slot < 0) {
-           // We dont have a place for this information. We may need
+           // We don't have a place for this information. We may need
            // to create a new header.
            //
            if (load_all) {
@@ -2371,18 +2372,6 @@ SendMsgDialog::construct_text_popup(void)
     _textPopupMenuList->add( _edit_cut );
     _textPopupMenuList->add( _edit_copy );
     _textPopupMenuList->add( _edit_paste );
-#ifdef __osf__
-    // Work in progress from Mike. This adds the Paste Special to the
-    // third mouse button in the compose area of a compose window.
-    // Begin Paste Special submenu
-    CmdList * subcmdList1 = new CmdList ( "Paste Special", GETMSG(DT_catd, 1, 135 , "Paste Special") );
-    subcmdList1->add(_edit_paste_special[0]);
-    subcmdList1->add(_edit_paste_special[1]);
-    // End Paste Special submenu
-    _textPopupMenuList->add( subcmdList1 ); // Add Paste Special submenu
-    // (Either way) _textPopupMenuList->add( separator );
-    _textPopupMenuList->add( _edit_clear );
-#endif
     _textPopupMenuList->add( _edit_delete );
     _textPopupMenuList->add( _edit_select_all );
 
@@ -3149,7 +3138,7 @@ SendMsgDialog::parseNplace(const char * path)
     
     if (SafeRead(fd, _dead_letter_buf, 
                 (unsigned int) buf.st_size) != buf.st_size) {
-       delete _dead_letter_buf;
+       delete [] _dead_letter_buf;
        close(fd);
        return;
     }
@@ -3916,7 +3905,7 @@ SendMsgDialog::resetHeaders(void)
     for (i=0, j=results.length(); i < j; i++) {
        PropStringPair * psp = results[i];
        int slot = lookupHeader(psp->label);
-       // dont allow removal of default headers.
+       // don't allow removal of default headers.
        HeaderList * hl = _header_list[slot];
        if (!reservedHeader(hl->label)) {
                if (slot != -1)