dthelp: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / dtstyle / Keyboard.c
index 58421cf675d8c578970aea0ad152c985b384b139..e6a90da8eb231f6da90eefdc74a594dc02b9799a 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
  */
@@ -42,6 +42,7 @@
 /* include files                         */
 /*+++++++++++++++++++++++++++++++++++++++*/
 
+#include <errno.h>
 #include <X11/Xlib.h>
 #include <Xm/MwmUtil.h>
 
@@ -167,9 +168,9 @@ build_keyboardDlg(
     XmString         string;
 
     /* Set up DialogBoxDialog button labels */
-    button_string[0] = CMPSTR(_DtOkString);
-    button_string[1] = CMPSTR(_DtCancelString);
-    button_string[2] = CMPSTR(_DtHelpString);
+    button_string[0] = CMPSTR((String) _DtOkString);
+    button_string[1] = CMPSTR((String) _DtCancelString);
+    button_string[2] = CMPSTR((String) _DtHelpString);
 
     /* Create toplevel DialogBox */
 
@@ -569,7 +570,7 @@ restoreKeybd(
     XrmValue value;
 
     xrm_name [0] = XrmStringToQuark ("keyboardDlg");
-    xrm_name [2] = NULL;
+    xrm_name [2] = 0;
 
     /* get x position */
     xrm_name [1] = XrmStringToQuark ("x");
@@ -634,7 +635,9 @@ saveKeybd(
         sprintf(bufr, "%s*keyboardDlg.x: %d\n", bufr, x);
         sprintf(bufr, "%s*keyboardDlg.y: %d\n", bufr, y);
 
-        write (fd, bufr, strlen(bufr));
+        if(-1 == write (fd, bufr, strlen(bufr))) {
+           perror(strerror(errno));
+       }
     }
 }