]> code.delx.au - gnu-emacs/blobdiff - src/hftctl.c
*** empty log message ***
[gnu-emacs] / src / hftctl.c
index 5fe816abbb502e8ac0bd3f1ba2f14d5e0ab5d783..0609f840e2063d55697c13cbfc64067fe2c165a2 100644 (file)
 /*                                                             */
 /***************************************************************/
 
+#include <config.h>
 #include <sys/signal.h>
 #include <errno.h>
-
-#include <config.h>
-
 #include <stdio.h>
 #include <fcntl.h>
 #include <setjmp.h>
@@ -69,7 +67,7 @@ static char     SCCSid[] = "com/gnuemacs/src,3.1,9021-90/05/03-5/3/90";
 #define QLOC   ((HFQLOCCH<<8)|HFQLOCCL)
 #define QPS    ((HFQPRESCH<<8)|HFQPRESCL)
 
-#ifndef TCGETS 
+#ifndef TCGETS
 #define TCGETS TCGETA
 #endif
 #ifndef TCSETS
@@ -102,13 +100,13 @@ static struct hfctlack  ACK =
                                        /* read a buffer        */
 #define RD_BUF(f,p,l) \
         while ((l)) \
-          if ((j = read((f),(p),(l))) < 0) \
+          if ((j = emacs_read (f, p, l)) < 0) \
              if (errno != EINTR) return (-1); \
              else continue; \
           else { (l) -= j; (p) += j; }
 
 /*************** function prototypes ***************************/
-#ifdef __STDC__
+#ifdef PROTOTYPES
 static GT_ACK (int fd, int req, char *buf);
 static WR_REQ (int fd, int request, int cmdlen, char *cmd, int resplen);
 static void hft_alrm(int sig);
@@ -333,9 +331,12 @@ WR_REQ (fd, request, cmdlen, cmd, resplen)
     }
 
   /* write request to terminal   */
-  if (write(fd,p.c,size) == -1) return (-1);
+  if (emacs_write (fd, p.c, size) == -1) return (-1);
   if (p.req != &req)           /* free if allocated           */
     xfree (p.c);
   return (0);
 
 }
+
+/* arch-tag: cfd4f3bd-fd49-44e6-9f69-c8abdf367650
+   (do not change this comment) */