home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2681 / emacs.pat-sco < prev   
Encoding:
Text File  |  1991-02-07  |  12.2 KB  |  547 lines

  1. *** config.h-d.P    Tue Jan  8 13:24:37 1991
  2. --- config.h-dist    Wed Feb  6 11:49:48 1991
  3. ***************
  4. *** 44,47 ****
  5. --- 44,53 ----
  6.   #endif /* SHORTNAMES */
  7.   
  8. + /* Define the return type of signal handlers if the s-xxx file
  9. +    did not already do so.  */
  10. + #ifndef SIGTYPE
  11. + #define SIGTYPE int
  12. + #endif
  13.   /* Define HAVE_X_WINDOWS if you want to use the X window system.  */
  14.   
  15.  
  16. *** s-aix3-1.h.P    Tue Jan  8 13:02:50 1991
  17. --- s-aix3-1.h    Wed Feb  6 12:01:58 1991
  18. ***************
  19. *** 78,81 ****
  20. --- 78,88 ----
  21.   
  22.   /*
  23. +  *    Define HAVE_TERMIOS if the system provides POSIX-style
  24. +  *    terminal control.  (HAVE_TERMIO is still required.)
  25. +  */
  26. + #define HAVE_TERMIOS
  27. + /*
  28.    *    Define HAVE_TIMEVAL if the system supports the BSD style clock values.
  29.    *    Look in <sys/time.h> for a timeval structure.
  30.  
  31. *** s-usg5-3.h.P    Fri Jan 11 18:23:02 1991
  32. --- s-usg5-3.h    Wed Feb  6 11:50:45 1991
  33. ***************
  34. *** 180,183 ****
  35. --- 180,187 ----
  36.   #define INTERRUPTABLE_IO
  37.   
  38. + /* On USG systems signal handlers return void */
  39. + #define SIGTYPE void
  40.   /* On USG systems these have different names */
  41.   
  42.  
  43. *** dispnew.c.P    Tue Jan  8 12:25:28 1991
  44. --- dispnew.c    Wed Feb  6 11:26:46 1991
  45. ***************
  46. *** 1186,1189 ****
  47. --- 1186,1190 ----
  48.   
  49.   #ifdef SIGWINCH
  50. + SIGTYPE
  51.   window_change_signal ()
  52.   {
  53.  
  54. *** emacs.c.P    Fri Jan 11 22:16:31 1991
  55. --- emacs.c    Wed Feb  6 11:27:04 1991
  56. ***************
  57. *** 105,108 ****
  58. --- 105,109 ----
  59.   
  60.   /* Handle bus errors, illegal instruction, etc. */
  61. + SIGTYPE
  62.   fatal_error_signal (sig)
  63.        int sig;
  64.  
  65. *** data.c.P    Fri Jan  4 19:15:14 1991
  66. --- data.c    Wed Feb  6 11:45:03 1991
  67. ***************
  68. *** 1550,1553 ****
  69. --- 1550,1554 ----
  70.   }
  71.   
  72. + SIGTYPE
  73.   arith_error (signo)
  74.        int signo;
  75.  
  76. *** keyboard.c.P    Tue Jan  8 20:40:31 1991
  77. --- keyboard.c    Wed Feb  6 11:30:44 1991
  78. ***************
  79. *** 793,796 ****
  80. --- 793,797 ----
  81.   
  82.   /* Alarm interrupt calls this and requests echoing at earliest safe time. */
  83. + SIGTYPE
  84.   request_echo ()
  85.   {
  86. ***************
  87. *** 900,904 ****
  88.     Lisp_Object tem;
  89.     jmp_buf save_jump;
  90. -   extern request_echo ();
  91.   
  92.     if (unread_command_char >= 0)
  93. --- 901,904 ----
  94. ***************
  95. *** 1073,1076 ****
  96. --- 1073,1077 ----
  97.         || ((c == (0200 | quit_char)) && !meta_key))
  98.       {
  99. +       extern SIGTYPE interrupt_signal ();
  100.         interrupt_signal ();
  101.         return;
  102. ***************
  103. *** 1945,1948 ****
  104. --- 1946,1950 ----
  105.    If  quit-flag  is already non-nil, it stops the job right away.  */
  106.   
  107. + SIGTYPE
  108.   interrupt_signal ()
  109.   {
  110.  
  111. *** process.c.P    Tue Jan 15 20:28:48 1991
  112. --- process.c    Wed Feb  6 11:46:28 1991
  113. ***************
  114. *** 977,980 ****
  115. --- 977,981 ----
  116.   }
  117.   
  118. + SIGTYPE
  119.   create_process_1 (signo)
  120.        int signo;
  121. ***************
  122. *** 1012,1016 ****
  123.     int sv[2];
  124.   #ifdef SIGCHLD
  125. !   int (*sigchld)();
  126.   #endif
  127.     char **env;
  128. --- 1013,1017 ----
  129.     int sv[2];
  130.   #ifdef SIGCHLD
  131. !   SIGTYPE (*sigchld)();
  132.   #endif
  133.     char **env;
  134. ***************
  135. *** 1109,1113 ****
  136.   #if 0
  137.     sigchld_deferred = 0;
  138. !   sigchld = (int (*)()) signal (SIGCHLD, create_process_sigchld);
  139.   #endif
  140.   #endif /* ordinary USG */
  141. --- 1110,1114 ----
  142.   #if 0
  143.     sigchld_deferred = 0;
  144. !   sigchld = signal (SIGCHLD, create_process_sigchld);
  145.   #endif
  146.   #endif /* ordinary USG */
  147. ***************
  148. *** 1877,1880 ****
  149. --- 1878,1882 ----
  150.   jmp_buf send_process_frame;
  151.   
  152. + SIGTYPE
  153.   send_process_trap ()
  154.   {
  155. ***************
  156. *** 2187,2190 ****
  157. --- 2189,2193 ----
  158.    the SIGCLD queue.   Fred Fish, UniSoft Systems Inc. */
  159.   
  160. + SIGTYPE
  161.   sigchld_handler (signo)
  162.        int signo;
  163.  
  164. *** sysdep.c.P    Tue Jan 15 21:43:59 1991
  165. --- sysdep.c    Wed Feb  6 11:34:32 1991
  166. ***************
  167. *** 118,148 ****
  168.   
  169.   #ifdef HAVE_TERMIO
  170. ! #ifdef IBMR2AIX
  171. ! #include <termio.h>
  172.   #include <termios.h>
  173. ! #ifdef TIOCGETP
  174. ! #undef TIOCGETP
  175. ! #endif
  176. ! #define TIOCGETP TCGETS
  177. ! #undef TIOCSETN
  178. ! #define TIOCSETN TCSETSW
  179. ! #undef TIOCSETP
  180. ! #define TIOCSETP TCSETSF
  181. ! #undef TCSETAW
  182. ! #define TCSETAW TCSETS
  183.   #else
  184.   #include <termio.h>
  185. - #undef TIOCGETP
  186. - #define TIOCGETP TCGETA
  187. - #undef TIOCSETN
  188. - #define TIOCSETN TCSETAW
  189. - #undef TIOCSETP
  190. - #define TIOCSETP TCSETAF
  191. - #endif
  192. - #ifndef IBMR2AIX
  193.   #define TERMINAL struct termio
  194. ! #else
  195. ! #define TERMINAL struct termios
  196.   #endif
  197.   
  198. --- 118,134 ----
  199.   
  200.   #ifdef HAVE_TERMIO
  201. ! #ifdef HAVE_TERMIOS
  202.   #include <termios.h>
  203. ! #define TERMINAL struct termios
  204. ! #define term_get(fd,t)   tcgetattr(fd,t)
  205. ! #define term_set(fd,t)   tcsetattr(fd,TCSANOW,t)
  206. ! #define term_setw(fd,t)  tcsetattr(fd,TCSADRAIN,t)
  207.   #else
  208.   #include <termio.h>
  209.   #define TERMINAL struct termio
  210. ! #define term_get(fd,t)   ioctl(fd,TCGETA,t)
  211. ! #define term_set(fd,t)   ioctl(fd,TCSETA,t)
  212. ! #define term_setw(fd,t)  ioctl(fd,TCSETAW,t)
  213.   #endif
  214.   
  215. ***************
  216. *** 164,172 ****
  217.   #include <sgtty.h>
  218.   #define TERMINAL struct sgttyb
  219.   #define OSPEED(str) str.sg_ospeed
  220.   #define SETOSPEED(str,new) (str.sg_ospeed = (new))
  221.   #define TABS_OK(str) ((str.sg_flags & XTABS) != XTABS)
  222. - #undef TCSETAW
  223. - #define TCSETAW TIOCSETN
  224.   #endif /* not VMS */
  225.   #endif /* not HAVE_TERMIO */
  226. --- 150,159 ----
  227.   #include <sgtty.h>
  228.   #define TERMINAL struct sgttyb
  229. + #define term_get(fd,t)   ioctl(fd,TIOCGETP,t)
  230. + #define term_set(fd,t)   ioctl(fd,TIOCSETP,t)
  231. + #define term_setw(fd,t)  ioctl(fd,TIOCSETN,t)
  232.   #define OSPEED(str) str.sg_ospeed
  233.   #define SETOSPEED(str,new) (str.sg_ospeed = (new))
  234.   #define TABS_OK(str) ((str.sg_flags & XTABS) != XTABS)
  235.   #endif /* not VMS */
  236.   #endif /* not HAVE_TERMIO */
  237. ***************
  238. *** 322,327 ****
  239.     queue_kbd_input ();
  240.   #else /* not VMS */
  241. !   ioctl (0, TIOCGETP, &buf);
  242. !   ioctl (0, TIOCSETP, &buf);
  243.   #endif /* not VMS */
  244.   }
  245. --- 309,314 ----
  246.     queue_kbd_input ();
  247.   #else /* not VMS */
  248. !   term_get (0, &buf);
  249. !   term_set (0, &buf);
  250.   #endif /* not VMS */
  251.   }
  252. ***************
  253. *** 355,359 ****
  254.   #else
  255.         SETOSPEED (sg, B9600);
  256. !       ioctl (0, TIOCGETP, &sg);
  257.   #endif /* not VMS */
  258.         ospeed = OSPEED (sg);
  259. --- 342,346 ----
  260.   #else
  261.         SETOSPEED (sg, B9600);
  262. !       term_get (0, &sg);
  263.   #endif /* not VMS */
  264.         ospeed = OSPEED (sg);
  265. ***************
  266. *** 470,473 ****
  267. --- 457,463 ----
  268.        int channel;
  269.   {
  270. + #ifdef HAVE_TERMIOS
  271. +   tcflush (channel, TCOFLUSH);
  272. + #else
  273.   #ifdef TCFLSH
  274.     ioctl (channel, TCFLSH, 1);
  275. ***************
  276. *** 481,484 ****
  277. --- 471,475 ----
  278.   #endif
  279.   #endif
  280. + #endif
  281.   }
  282.   
  283. ***************
  284. *** 493,497 ****
  285.     TERMINAL s;
  286.   
  287. !   ioctl (out, TIOCGETP, &s);
  288.   #ifdef HAVE_TERMIO
  289.     s.c_oflag |= OPOST;        /* Enable output postprocessing */
  290. --- 484,488 ----
  291.     TERMINAL s;
  292.   
  293. !   term_get (out, &s);
  294.   #ifdef HAVE_TERMIO
  295.     s.c_oflag |= OPOST;        /* Enable output postprocessing */
  296. ***************
  297. *** 510,513 ****
  298. --- 501,510 ----
  299.     s.c_cc[VERASE] = 0377;    /* disable erase processing */
  300.     s.c_cc[VKILL] = 0377;        /* disable kill processing */
  301. + #ifdef VSUSP
  302. +   s.c_cc[VSUSP] = 0377;        /* disable suspend processing */
  303. + #endif
  304. + #ifdef VDSUSP
  305. +   s.c_cc[VDSUSP] = 0377;    /* disable delayed suspend processing */
  306. + #endif
  307.   #ifdef HPUX
  308.     s.c_cflag = (s.c_cflag & ~CBAUD) | B9600; /* baud rate sanity */
  309. ***************
  310. *** 536,540 ****
  311.   #endif /* not HAVE_TERMIO */
  312.   
  313. !   ioctl (out, TIOCSETN, &s);
  314.   
  315.   #ifdef BSD4_1
  316. --- 533,537 ----
  317.   #endif /* not HAVE_TERMIO */
  318.   
  319. !   term_setw (out, &s);
  320.   
  321.   #ifdef BSD4_1
  322. ***************
  323. *** 556,560 ****
  324.        int pid;
  325.   {
  326. ! #ifdef IBMR2AIX
  327.     tcsetpgrp ( 0, pid);
  328.   #else
  329. --- 553,557 ----
  330.        int pid;
  331.   {
  332. ! #ifdef HAVE_TERMIOS
  333.     tcsetpgrp ( 0, pid);
  334.   #else
  335. ***************
  336. *** 571,575 ****
  337.   {
  338.     int code;
  339. !   int (*handler) ();
  340.   };
  341.   
  342. --- 568,572 ----
  343.   {
  344.     int code;
  345. !   SIGTYPE (*handler) ();
  346.   };
  347.   
  348. ***************
  349. *** 675,680 ****
  350.     while (saved_handlers->code)
  351.       {
  352. !       saved_handlers->handler
  353. !     = (int (*) ()) signal (saved_handlers->code, SIG_IGN);
  354.         saved_handlers++;
  355.       }
  356. --- 672,676 ----
  357.     while (saved_handlers->code)
  358.       {
  359. !       saved_handlers->handler = signal (saved_handlers->code, SIG_IGN);
  360.         saved_handlers++;
  361.       }
  362. ***************
  363. *** 844,848 ****
  364.   #endif
  365.   #else /* not VMS */
  366. !   ioctl (0, TIOCGETP, &old_gtty);
  367.   #endif /* not VMS */
  368.     if (!read_socket_hook)
  369. --- 840,844 ----
  370.   #endif
  371.   #else /* not VMS */
  372. !   term_get (0, &old_gtty);
  373.   #endif /* not VMS */
  374.     if (!read_socket_hook)
  375. ***************
  376. *** 884,897 ****
  377.         tty.c_cc[VSWTCH] = CDEL;    /* Turn off shell layering use of C-z */
  378.   #endif /* VSWTCH */
  379. ! #ifdef mips  /* The following code looks like the right thing in general,
  380. !         but it is said to cause a crash on USG V.4.
  381. !         Let's play safe by turning it on only for the MIPS.  */
  382.   #ifdef VSUSP
  383. !       tty.c_cc[VSUSP] = CDEL;    /* Turn off mips handling of C-z.  */
  384.   #endif /* VSUSP */
  385.   #ifdef V_DSUSP
  386.         tty.c_cc[V_DSUSP] = CDEL;    /* Turn off mips handling of C-y.  */
  387.   #endif /* V_DSUSP */
  388. - #endif /* mips */
  389.   
  390.   #ifdef AIX
  391. --- 880,900 ----
  392.         tty.c_cc[VSWTCH] = CDEL;    /* Turn off shell layering use of C-z */
  393.   #endif /* VSWTCH */
  394. !  /* The following code looks like the right thing in general,
  395. !     which it is; SysVr4 can go jump in a lake if it crashes. */
  396. ! #ifdef VSTRT
  397. !       tty.c_cc[VSTRT] = CDEL;    /* Turn off handling of C-s.  */
  398. ! #endif /* VSTRT */
  399. ! #ifdef VSTOP
  400. !       tty.c_cc[VSTOP] = CDEL;    /* Turn off handling of C-q.  */
  401. ! #endif /* VSTOP */
  402.   #ifdef VSUSP
  403. !       tty.c_cc[VSUSP] = CDEL;    /* Turn off handling of C-z.  */
  404.   #endif /* VSUSP */
  405. + #ifdef VDSUSP
  406. +       tty.c_cc[VDSUSP] = CDEL;    /* Turn off handling of C-y.  */
  407. + #endif /* VDSUSP */
  408.   #ifdef V_DSUSP
  409.         tty.c_cc[V_DSUSP] = CDEL;    /* Turn off mips handling of C-y.  */
  410.   #endif /* V_DSUSP */
  411.   
  412.   #ifdef AIX
  413. ***************
  414. *** 900,908 ****
  415.         tty.c_line = 0;
  416.         tty.c_iflag &= ~ASCEDIT;
  417. - #else
  418. -       tty.c_cc[VSTRT] = 255;
  419. -       tty.c_cc[VSTOP] = 255;
  420. -       tty.c_cc[VSUSP] = 255;
  421. -       tty.c_cc[VDSUSP] = 255;
  422.   #endif /* IBMR2AIX */
  423.         /* Also, PTY overloads NUL and BREAK.
  424. --- 903,906 ----
  425. ***************
  426. *** 933,937 ****
  427.           &tty.class, 12, 0, 0, 0, 0);
  428.   #else
  429. !       ioctl (0, TIOCSETN, &tty);
  430.   #endif /* not VMS */
  431.   
  432. --- 931,935 ----
  433.           &tty.class, 12, 0, 0, 0, 0);
  434.   #else
  435. !       term_setw (0, &tty);
  436.   #endif /* not VMS */
  437.   
  438. ***************
  439. *** 938,947 ****
  440.         /* This code added to insure that, if flow-control is not to be used,
  441.        we have an unlocked screen at the start. */
  442.   #ifdef TCXONC
  443.         if (!flow_control) ioctl (0, TCXONC, 1);
  444. ! #endif
  445.   #ifdef TIOCSTART
  446.         if (!flow_control) ioctl (0, TIOCSTART, 0);
  447.   #endif
  448.   
  449.   #ifdef AIX
  450. --- 936,950 ----
  451.         /* This code added to insure that, if flow-control is not to be used,
  452.        we have an unlocked screen at the start. */
  453. + #ifdef HAVE_TERMIOS
  454. +       if (!flow_control) tcflow (0, TCOON);
  455. + #else
  456.   #ifdef TCXONC
  457.         if (!flow_control) ioctl (0, TCXONC, 1);
  458. ! #else
  459.   #ifdef TIOCSTART
  460.         if (!flow_control) ioctl (0, TIOCSTART, 0);
  461.   #endif
  462. + #endif
  463. + #endif
  464.   
  465.   #ifdef AIX
  466. ***************
  467. *** 1056,1060 ****
  468.           &tty.class, 12, 0, 0, 0, 0);
  469.   #else
  470. !   ioctl (0, TIOCGETP, &tty);
  471.   #endif /* not VMS */
  472.     return (TABS_OK(tty));
  473. --- 1059,1063 ----
  474.           &tty.class, 12, 0, 0, 0, 0);
  475.   #else
  476. !   term_get (0, &tty);
  477.   #endif /* not VMS */
  478.     return (TABS_OK(tty));
  479. ***************
  480. *** 1165,1169 ****
  481.           &old_gtty.class, 12, 0, 0, 0, 0);
  482.   #else /* not VMS */
  483. !   while (ioctl (0, TCSETAW, &old_gtty) < 0 && errno == EINTR);
  484.   #endif /* not VMS */
  485.   
  486. --- 1168,1172 ----
  487.           &old_gtty.class, 12, 0, 0, 0, 0);
  488.   #else /* not VMS */
  489. !   while (term_setw (0, &old_gtty) < 0 && errno == EINTR);
  490.   #endif /* not VMS */
  491.   
  492. ***************
  493. *** 1616,1619 ****
  494. --- 1619,1623 ----
  495.   int read_alarm_should_throw;
  496.   
  497. + SIGTYPE
  498.   select_alarm ()
  499.   {
  500. ***************
  501. *** 1644,1648 ****
  502.     extern int process_tick, update_tick;
  503.   #endif
  504. !   int (*old_trap) ();
  505.     char buf;
  506.   
  507. --- 1648,1652 ----
  508.     extern int process_tick, update_tick;
  509.   #endif
  510. !   SIGTYPE (*old_trap) ();
  511.     char buf;
  512.   
  513. ***************
  514. *** 1714,1718 ****
  515.       break;
  516.         old_alarm = alarm (0);
  517. !       old_trap = (int (*)()) signal (SIGALRM, select_alarm);
  518.         select_alarmed = 0;
  519.         alarm (SELECT_PAUSE);
  520. --- 1718,1722 ----
  521.       break;
  522.         old_alarm = alarm (0);
  523. !       old_trap = signal (SIGALRM, select_alarm);
  524.         select_alarmed = 0;
  525.         alarm (SELECT_PAUSE);
  526. ***************
  527. *** 2282,2287 ****
  528. --- 2286,2296 ----
  529.   
  530.   rename (from, to)
  531. + #ifdef M_UNIX            /* SCO UNIX: must match system header */
  532. +      const char *from;
  533. +      const char *to;
  534. + #else
  535.        char *from;
  536.        char *to;
  537. + #endif
  538.   {
  539.     if (access (from, 0) == 0)
  540.