[BACK]Return to fep_main.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / fep

Diff for /OpenXM_contrib2/fep/fep_main.c between version 1.6 and 1.10

version 1.6, 2009/02/24 07:30:15 version 1.10, 2017/10/02 06:46:11
Line 6  static char rcsid[]=
Line 6  static char rcsid[]=
 #endif /* lint */  #endif /* lint */
   
 #include <stdio.h>  #include <stdio.h>
   #include <stdlib.h>
   #include <string.h>
 #include <signal.h>  #include <signal.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/stat.h>  #include <sys/stat.h>
Line 339  recover_signal ()
Line 341  recover_signal ()
 input_handler()  input_handler()
 {  {
     char   *inputline;      char   *inputline;
     char   *getline ();      char   *mygetline ();
   
     /*      /*
      * Get slave tty descriptor for auto-tty-fix       * Get slave tty descriptor for auto-tty-fix
Line 347  input_handler()
Line 349  input_handler()
     if ((slave = open (slave_tty, O_RDONLY)) < 0)      if ((slave = open (slave_tty, O_RDONLY)) < 0)
         perror ("open");          perror ("open");
   
     while (inputline = getline ()) {      while (inputline = mygetline ()) {
         /*          /*
          * XXX: nbyte should be greater than 0 only for ^@ input in emacs.           * XXX: nbyte should be greater than 0 only for ^@ input in emacs.
          * This solution is very ugly.. but it will takes a half day           * This solution is very ugly.. but it will takes a half day
Line 363  input_handler()
Line 365  input_handler()
   
         /*          /*
          * NOTE:           * NOTE:
          * Saving command line to output buffer is done in getline().           * Saving command line to output buffer is done in mygetline().
          * Because inputline here is converted by alias.           * Because inputline here is converted by alias.
          */           */
   
Line 545  int set_buffer (bp, size)
Line 547  int set_buffer (bp, size)
     BUFFER *bp;      BUFFER *bp;
     int size;      int size;
 {  {
     char *newbuf, *malloc(), *realloc();      char *newbuf;
   
     if (bp->b_buf)      if (bp->b_buf)
         newbuf = (char *) realloc (bp->b_buf, size);          newbuf = (char *) realloc (bp->b_buf, size);
Line 866  get_pty_master()
Line 868  get_pty_master()
         master = 1;          master = 1;
         return;          return;
     }      }
 #if defined(__CYGWIN32__) || defined(__linux__)  #if defined(__CYGWIN32__) || defined(__linux__) || defined(__APPLE__)
     sprintf (master_tty, "/dev/ptmx");      sprintf (master_tty, "/dev/ptmx");
     master = open (master_tty, O_RDWR);      master = open (master_tty, O_RDWR);
     if (master >= 0) {      if (master >= 0) {
Line 878  get_pty_master()
Line 880  get_pty_master()
             strcpy(slave_tty, name);              strcpy(slave_tty, name);
             goto FOUND;              goto FOUND;
         }          }
   #elif defined(__APPLE__)
           char *name;
           grantpt(master);
           unlockpt(master);
           if ( name = (char *)ptsname(master) ) {
               strcpy(slave_tty, name);
               goto FOUND;
           }
 #else  #else
         char *name;          char *name;
         name = (char *)ptsname(master);          name = (char *)ptsname(master);
Line 1073  usageAndExit()
Line 1083  usageAndExit()
  */   */
 void sigwinch(int dummy)  void sigwinch(int dummy)
 {  {
       char *itoa(int i);
 #ifdef TIOCGWINSZ                       /* 4.3BSD */  #ifdef TIOCGWINSZ                       /* 4.3BSD */
     struct winsize win;      struct winsize win;
   

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.10

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>