]> code.delx.au - gnu-emacs/blobdiff - src/termcap.c
(Fset_window_dedicated_p): Simplify.
[gnu-emacs] / src / termcap.c
index b99ae473315d7133d210c38931c2b37bd70c9772..fa8d0ced0aa10b3817f5ee673b89ceb132d92e79 100644 (file)
@@ -53,7 +53,7 @@ char *realloc ();
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef _POSIX_VERSION
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
@@ -144,6 +144,9 @@ find_capability (bp, cap)
   return NULL;
 }
 
+/* These are already defined in the System framework in Mac OS X and
+   cause prebinding to fail.  */
+#ifndef MAC_OSX
 int
 tgetnum (cap)
      char *cap;
@@ -177,6 +180,7 @@ tgetstr (cap, area)
     return NULL;
   return tgetst1 (ptr, area);
 }
+#endif /* MAC_OSX */
 
 #ifdef IS_EBCDIC_HOST
 /* Table, indexed by a character in range 0200 to 0300 with 0200 subtracted,
@@ -289,12 +293,19 @@ tgetst1 (ptr, area)
 \f
 /* Outputting a string with padding.  */
 
+#ifndef emacs
+short ospeed;
 /* If OSPEED is 0, we use this as the actual baud rate.  */
 int tputs_baud_rate;
-char PC;
+#endif
 
-#if 0 /* Doesn't seem to be used anymore.  */
+/* Already defined in the System framework in Mac OS X and causes
+   prebinding to fail.  */
+#ifndef MAC_OSX
+char PC;
+#endif  /* MAC_OSX */
 
+#ifndef emacs
 /* Actual baud rate if positive;
    - baud rate / 100 if negative.  */
 
@@ -309,8 +320,11 @@ static int speeds[] =
 #endif /* not VMS */
   };
 
-#endif /*  */
+#endif /* not emacs */
 
+/* Already defined in the System framework in Mac OS X and causes
+   prebinding to fail.  */
+#ifndef MAC_OSX
 void
 tputs (str, nlines, outfun)
      register char *str;
@@ -320,12 +334,19 @@ tputs (str, nlines, outfun)
   register int padcount = 0;
   register int speed;
 
-  extern int baud_rate;
+#ifdef emacs
+  extern EMACS_INT baud_rate;
   speed = baud_rate;
   /* For quite high speeds, convert to the smaller
      units to avoid overflow.  */
   if (speed > 10000)
     speed = - speed / 100;
+#else
+  if (ospeed == 0)
+    speed = tputs_baud_rate;
+  else
+    speed = speeds[ospeed];
+#endif
 
   if (!str)
     return;
@@ -366,6 +387,7 @@ tputs (str, nlines, outfun)
   while (padcount-- > 0)
     (*outfun) (PC);
 }
+#endif /* MAC_OSX */
 \f
 /* Finding the termcap entry in the termcap data base.  */
 
@@ -436,6 +458,9 @@ valid_filename_p (fn)
    0 if the data base is accessible but the type NAME is not defined
    in it, and some other value otherwise.  */
 
+/* Already defined in the System framework in Mac OS X and causes
+   prebinding to fail.  */
+#ifndef MAC_OSX
 int
 tgetent (bp, name)
      char *bp, *name;
@@ -594,6 +619,7 @@ tgetent (bp, name)
   term_entry = bp;
   return 1;
 }
+#endif /* MAC_OSX */
 
 /* Given file open on FD and buffer BUFP,
    scan the file from the beginning until a line is found