dthelp: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / dtmail / dtmail / Attachment.C
index a0d256733ee62363db78728c7cca3d2c2873188d..905bf43e081774b6b60213e123078a6994d6b9ef 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
  */
@@ -183,6 +183,24 @@ Attachment::Attachment(
        _label = XmStringCreateLocalized(strrchr(name, '/')+1);
 
     _key = theRoamApp.session()->session()->newObjectKey();
+    
+    myIcon = NULL;
+    _background = 0;
+    _foreground = 0;
+    _attachmentWidth = 0;
+    _attachmentHeight = 0;
+    _positionX = 0;
+    _positionY = 0;
+    _deleted = false;
+    _selected = false;
+    _row = 0;
+    _saveAsFilename = NULL;
+    _ce_name = NULL;
+    _ce_type = NULL;
+    _type = 0;
+    _binary = false;
+    _executable = false;
+    
 }
 
 Attachment::~Attachment(
@@ -439,7 +457,7 @@ Attachment::invokeAction(int index)
        int answer;
        char *buf = new char[2048];
 
-       sprintf(buf,
+       sprintf(buf, "%s",
                GETMSG(DT_catd, 3, 81, "This attachment may contain commands that can cause serious\ndamage.  It is recommended that you only execute it after you\nare certain it is safe to do so.\n\nPress OK if you are certain it is safe,\nCancel to cancel execution."));
 
        answer = parent()->handleQuestionDialog(
@@ -868,7 +886,7 @@ Attachment::action(
        /* NL_COMMENT
         * Post a dialog explaining that the action was invalid
         */
-       sprintf(buf, 
+       sprintf(buf, "%s",
                GETMSG(
                        DT_catd, 3, 91, "Cannot execute invalid action."));
 
@@ -883,7 +901,7 @@ Attachment::action(
        /* NL_COMMENT 
         * Post a dialog explaining that the action failed.
         */
-       sprintf(buf, 
+       sprintf(buf, "%s",
                GETMSG(DT_catd, 3, 92, "Executing action failed!"));
 
        answer = parent()->handleErrorDialog(GETMSG(DT_catd, 1, 86, "Mailer"),
@@ -1229,7 +1247,7 @@ Attachment::setContents()
            size = strlen(from_hdr) + int(_myContentsSize) + 3;
            buffer = new char[size];
 
-           // Look for the first occurance of a colon or a newline.
+           // Look for the first occurrence of a colon or a newline.
            char *sptr;
            for (sptr = (char*) _myContents;
                 *sptr && *sptr != '\n' && *sptr != ':';