emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/sysdep.c


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/src/sysdep.c
Date: Tue, 04 Feb 2003 09:03:44 -0500

Index: emacs/src/sysdep.c
diff -c emacs/src/sysdep.c:1.247 emacs/src/sysdep.c:1.248
*** emacs/src/sysdep.c:1.247    Sun Dec  8 01:00:10 2002
--- emacs/src/sysdep.c  Tue Feb  4 09:03:13 2003
***************
*** 391,397 ****
        emacs_ospeed = sg.c_cflag & CBAUD;
  #else /* neither VMS nor TERMIOS nor TERMIO */
        struct sgttyb sg;
!       
        sg.sg_ospeed = B9600;
        if (ioctl (input_fd, TIOCGETP, &sg) < 0)
        abort ();
--- 391,397 ----
        emacs_ospeed = sg.c_cflag & CBAUD;
  #else /* neither VMS nor TERMIOS nor TERMIO */
        struct sgttyb sg;
! 
        sg.sg_ospeed = B9600;
        if (ioctl (input_fd, TIOCGETP, &sg) < 0)
        abort ();
***************
*** 402,408 ****
  #endif /* not DOS_NT */
  #endif /* not INIT_BAUD_RATE */
      }
!    
    baud_rate = (emacs_ospeed < sizeof baud_convert / sizeof baud_convert[0]
               ? baud_convert[emacs_ospeed] : 9600);
    if (baud_rate == 0)
--- 402,408 ----
  #endif /* not DOS_NT */
  #endif /* not INIT_BAUD_RATE */
      }
! 
    baud_rate = (emacs_ospeed < sizeof baud_convert / sizeof baud_convert[0]
               ? baud_convert[emacs_ospeed] : 9600);
    if (baud_rate == 0)
***************
*** 543,549 ****
   *    flush any pending output
   *      (may flush input as well; it does not matter the way we use it)
   */
!  
  void
  flush_pending_output (channel)
       int channel;
--- 543,549 ----
   *    flush any pending output
   *      (may flush input as well; it does not matter the way we use it)
   */
! 
  void
  flush_pending_output (channel)
       int channel;
***************
*** 812,818 ****
    save_signal_handlers (saved_handlers);
    synch_process_alive = 1;
  #endif /* __DJGPP__ > 1 */
! #else  
    pid = vfork ();
    if (pid == -1)
      error ("Can't spawn subshell");
--- 812,818 ----
    save_signal_handlers (saved_handlers);
    synch_process_alive = 1;
  #endif /* __DJGPP__ > 1 */
! #else
    pid = vfork ();
    if (pid == -1)
      error ("Can't spawn subshell");
***************
*** 1002,1008 ****
  }
  
  #else /* not FASYNC, not STRIDE */
!  
  #ifdef _CX_UX
  
  #include <termios.h>
--- 1002,1008 ----
  }
  
  #else /* not FASYNC, not STRIDE */
! 
  #ifdef _CX_UX
  
  #include <termios.h>
***************
*** 1046,1052 ****
  
    croak ("request_sigio");
  }
!  
  void
  unrequest_sigio ()
  {
--- 1046,1052 ----
  
    croak ("request_sigio");
  }
! 
  void
  unrequest_sigio ()
  {
***************
*** 1258,1264 ****
        || ioctl (fd, TIOCLSET, &settings->lmode) < 0)
      return -1;
  #endif
!   
    /* We have survived the tempest.  */
    return 0;
  }
--- 1258,1264 ----
        || ioctl (fd, TIOCLSET, &settings->lmode) < 0)
      return -1;
  #endif
! 
    /* We have survived the tempest.  */
    return 0;
  }
***************
*** 1298,1310 ****
  char _sobuf[BUFSIZ];
  #endif
  #endif
!  
  #ifdef HAVE_LTCHARS
  static struct ltchars new_ltchars = {-1,-1,-1,-1,-1,-1};
  #endif
  #ifdef HAVE_TCHARS
  static struct tchars new_tchars = {-1,-1,-1,-1,-1,-1};
! #endif 
  
  void
  init_sys_modes ()
--- 1298,1310 ----
  char _sobuf[BUFSIZ];
  #endif
  #endif
! 
  #ifdef HAVE_LTCHARS
  static struct ltchars new_ltchars = {-1,-1,-1,-1,-1,-1};
  #endif
  #ifdef HAVE_TCHARS
  static struct tchars new_tchars = {-1,-1,-1,-1,-1,-1};
! #endif
  
  void
  init_sys_modes ()
***************
*** 1413,1419 ****
        }
        else
        tty.main.c_iflag &= ~IXON;      /* Disable start/stop output control */
!       tty.main.c_oflag &= ~ONLCR;     /* Disable map of NL to CR-NL 
                                           on output */
        tty.main.c_oflag &= ~TAB3;      /* Disable tab expansion */
  #ifdef CS8
--- 1413,1419 ----
        }
        else
        tty.main.c_iflag &= ~IXON;      /* Disable start/stop output control */
!       tty.main.c_oflag &= ~ONLCR;     /* Disable map of NL to CR-NL
                                           on output */
        tty.main.c_oflag &= ~TAB3;      /* Disable tab expansion */
  #ifdef CS8
***************
*** 1554,1560 ****
         anything, and leaving it in breaks the meta key.  Go figure.  */
        tty.lmode &= ~LLITOUT;
  #endif
!       
  #ifdef BSD4_1
        lmode = tty.lmode;
  #endif
--- 1554,1560 ----
         anything, and leaving it in breaks the meta key.  Go figure.  */
        tty.lmode &= ~LLITOUT;
  #endif
! 
  #ifdef BSD4_1
        lmode = tty.lmode;
  #endif
***************
*** 1679,1685 ****
  
  /* Return nonzero if safe to use tabs in output.
     At the time this is called, init_sys_modes has not been done yet.  */
!    
  int
  tabs_safe_p ()
  {
--- 1679,1685 ----
  
  /* Return nonzero if safe to use tabs in output.
     At the time this is called, init_sys_modes has not been done yet.  */
! 
  int
  tabs_safe_p ()
  {
***************
*** 1715,1721 ****
  #ifdef TIOCGSIZE
  
    /* SunOS - style.  */
!   struct ttysize size;  
  
    if (ioctl (input_fd, TIOCGSIZE, &size) == -1)
      *widthp = *heightp = 0;
--- 1715,1721 ----
  #ifdef TIOCGSIZE
  
    /* SunOS - style.  */
!   struct ttysize size;
  
    if (ioctl (input_fd, TIOCGSIZE, &size) == -1)
      *widthp = *heightp = 0;
***************
*** 1729,1735 ****
  #ifdef VMS
  
    struct sensemode tty;
!   
    SYS$QIOW (0, input_fd, IO$_SENSEMODE, &tty, 0, 0,
            &tty.class, 12, 0, 0, 0, 0);
    *widthp = tty.scr_wid;
--- 1729,1735 ----
  #ifdef VMS
  
    struct sensemode tty;
! 
    SYS$QIOW (0, input_fd, IO$_SENSEMODE, &tty, 0, 0,
            &tty.class, 12, 0, 0, 0, 0);
    *widthp = tty.scr_wid;
***************
*** 1772,1778 ****
  #ifdef TIOCSSIZE
  
    /* SunOS - style.  */
!   struct ttysize size;  
    size.ts_lines = height;
    size.ts_cols = width;
  
--- 1772,1778 ----
  #ifdef TIOCSSIZE
  
    /* SunOS - style.  */
!   struct ttysize size;
    size.ts_lines = height;
    size.ts_cols = width;
  
***************
*** 1793,1799 ****
  reset_sys_modes ()
  {
    struct frame *sf;
!   
    if (noninteractive)
      {
        fflush (stdout);
--- 1793,1799 ----
  reset_sys_modes ()
  {
    struct frame *sf;
! 
    if (noninteractive)
      {
        fflush (stdout);
***************
*** 1820,1826 ****
    cursor_to (FRAME_HEIGHT (sf) - 1, 0);
  #if defined (IBMR2AIX) && defined (AIXHFT)
    {
!     /* HFT devices normally use ^J as a LF/CR.  We forced it to 
         do the LF only.  Now, we need to reset it. */
      struct termio tty;
  
--- 1820,1826 ----
    cursor_to (FRAME_HEIGHT (sf) - 1, 0);
  #if defined (IBMR2AIX) && defined (AIXHFT)
    {
!     /* HFT devices normally use ^J as a LF/CR.  We forced it to
         do the LF only.  Now, we need to reset it. */
      struct termio tty;
  
***************
*** 1903,1915 ****
       does this.  Also it is known that telnet mode will hang
       in such a way that Emacs must be stopped (perhaps this
       is the same problem).
!      
       If TIOCREMOTE is turned off, then there is a bug in
       hp-ux which sometimes loses data.  Apparently the
       code which blocks the master process when the internal
       buffer fills up does not work.  Other than this,
       though, everything else seems to work fine.
!      
       Since the latter lossage is more benign, we may as well
       lose that way.  -- cph */
  #ifdef FIONBIO
--- 1903,1915 ----
       does this.  Also it is known that telnet mode will hang
       in such a way that Emacs must be stopped (perhaps this
       is the same problem).
! 
       If TIOCREMOTE is turned off, then there is a bug in
       hp-ux which sometimes loses data.  Apparently the
       code which blocks the master process when the internal
       buffer fills up does not work.  Other than this,
       though, everything else seems to work fine.
! 
       Since the latter lossage is more benign, we may as well
       lose that way.  -- cph */
  #ifdef FIONBIO
***************
*** 1941,1947 ****
  init_vms_input ()
  {
    int status;
!   
    if (input_fd == 0)
      {
        status = SYS$ASSIGN (&input_dsc, &input_fd, 0, 0);
--- 1941,1947 ----
  init_vms_input ()
  {
    int status;
! 
    if (input_fd == 0)
      {
        status = SYS$ASSIGN (&input_dsc, &input_fd, 0, 0);
***************
*** 2142,2148 ****
    int time [2];
    static int zero = 0;
    static int large = -10000000;
!   
    LIB$EMUL (&timeval, &large, &zero, time);     /* Convert to VMS format */
  
    SYS$CANTIM (1, 0);
--- 2142,2148 ----
    int time [2];
    static int zero = 0;
    static int large = -10000000;
! 
    LIB$EMUL (&timeval, &large, &zero, time);     /* Convert to VMS format */
  
    SYS$CANTIM (1, 0);
***************
*** 2242,2248 ****
   *    will be patched by unexec to the correct value.
   *
   */
!  
  #ifndef start_of_data
  char *
  start_of_data ()
--- 2242,2248 ----
   *    will be patched by unexec to the correct value.
   *
   */
! 
  #ifndef start_of_data
  char *
  start_of_data ()
***************
*** 2542,2548 ****
    /* Once a second, till the timer expires, check all the flagged read
     * descriptors to see if any input is available.  If there is some then
     * set the corresponding bit in the return copy of rfds.
!    */ 
    while (1)
      {
        register int to_check, fd;
--- 2542,2548 ----
    /* Once a second, till the timer expires, check all the flagged read
     * descriptors to see if any input is available.  If there is some then
     * set the corresponding bit in the return copy of rfds.
!    */
    while (1)
      {
        register int to_check, fd;
***************
*** 2589,2595 ****
        signal (SIGALRM, select_alarm);
        select_alarmed = 0;
        alarm (SELECT_PAUSE);
!       
        /* Wait for a SIGALRM (or maybe a SIGTINT) */
        while (select_alarmed == 0 && *local_timeout != 0
             && process_tick == update_tick)
--- 2589,2595 ----
        signal (SIGALRM, select_alarm);
        select_alarmed = 0;
        alarm (SELECT_PAUSE);
! 
        /* Wait for a SIGALRM (or maybe a SIGTINT) */
        while (select_alarmed == 0 && *local_timeout != 0
             && process_tick == update_tick)
***************
*** 2607,2616 ****
            pause ();
        }
        (*local_timeout) -= SELECT_PAUSE;
!       
        /* Reset the old alarm if there was one.  */
        turn_on_atimers (1);
!       
        if (*local_timeout == 0)  /* Stop on timer being cleared */
        break;
      }
--- 2607,2616 ----
            pause ();
        }
        (*local_timeout) -= SELECT_PAUSE;
! 
        /* Reset the old alarm if there was one.  */
        turn_on_atimers (1);
! 
        if (*local_timeout == 0)  /* Stop on timer being cleared */
        break;
      }
***************
*** 3239,3248 ****
    register int rtnval;
  
  #ifdef BSD4_1
!   if (oflag & O_CREAT) 
      return creat (path, mode);
  #endif
!   
    while ((rtnval = open (path, oflag, mode)) == -1
         && (errno == EINTR));
    return (rtnval);
--- 3239,3248 ----
    register int rtnval;
  
  #ifdef BSD4_1
!   if (oflag & O_CREAT)
      return creat (path, mode);
  #endif
! 
    while ((rtnval = open (path, oflag, mode)) == -1
         && (errno == EINTR));
    return (rtnval);
***************
*** 3275,3281 ****
       unsigned int nbyte;
  {
    register int rtnval;
!   
    while ((rtnval = read (fildes, buf, nbyte)) == -1
         && (errno == EINTR));
    return (rtnval);
--- 3275,3281 ----
       unsigned int nbyte;
  {
    register int rtnval;
! 
    while ((rtnval = read (fildes, buf, nbyte)) == -1
         && (errno == EINTR));
    return (rtnval);
***************
*** 3415,3421 ****
       int newd;
  {
    register int fd, ret;
!   
    emacs_close (newd);
  
  #ifdef F_DUPFD
--- 3415,3421 ----
       int newd;
  {
    register int fd, ret;
! 
    emacs_close (newd);
  
  #ifdef F_DUPFD
***************
*** 3444,3450 ****
  #ifndef VMS
  #ifndef HAVE_GETTIMEOFDAY
  #ifdef HAVE_TIMEVAL
!  
  /* ARGSUSED */
  int
  gettimeofday (tp, tzp)
--- 3444,3450 ----
  #ifndef VMS
  #ifndef HAVE_GETTIMEOFDAY
  #ifdef HAVE_TIMEVAL
! 
  /* ARGSUSED */
  int
  gettimeofday (tp, tzp)
***************
*** 3453,3470 ****
  {
    extern long time ();
  
!   tp->tv_sec = time ((long *)0);    
    tp->tv_usec = 0;
    if (tzp != 0)
      tzp->tz_minuteswest = -1;
    return 0;
  }
!  
  #endif
  #endif
  #endif
  #endif /* subprocess && !HAVE_GETTIMEOFDAY && HAVE_TIMEVAL && !VMS */
!   
  /*
   *    This function will go away as soon as all the stubs fixed. (fnf)
   */
--- 3453,3470 ----
  {
    extern long time ();
  
!   tp->tv_sec = time ((long *)0);
    tp->tv_usec = 0;
    if (tzp != 0)
      tzp->tz_minuteswest = -1;
    return 0;
  }
! 
  #endif
  #endif
  #endif
  #endif /* subprocess && !HAVE_GETTIMEOFDAY && HAVE_TIMEVAL && !VMS */
! 
  /*
   *    This function will go away as soon as all the stubs fixed. (fnf)
   */
***************
*** 3831,3837 ****
  
  #ifdef access
  #undef access
!   
  /* The following is necessary because 'access' emulation by VMS C (2.0) does
   * not work correctly.  (It also doesn't work well in version 2.3.)
   */
--- 3831,3837 ----
  
  #ifdef access
  #undef access
! 
  /* The following is necessary because 'access' emulation by VMS C (2.0) does
   * not work correctly.  (It also doesn't work well in version 2.3.)
   */
***************
*** 3872,3878 ****
     * access can treat the directory like a file.  */
    if (directory_file_name (path, dir_fn))
      path = dir_fn;
!   
    if (mode == F_OK)
      return access (path, mode);
    if (user == NULL && (user = (char *) getenv ("USER")) == NULL)
--- 3872,3878 ----
     * access can treat the directory like a file.  */
    if (directory_file_name (path, dir_fn))
      path = dir_fn;
! 
    if (mode == F_OK)
      return access (path, mode);
    if (user == NULL && (user = (char *) getenv ("USER")) == NULL)
***************
*** 3886,3892 ****
      static int constant = ACL$C_FILE;
      DESCRIPTOR (path_desc, path);
      DESCRIPTOR (user_desc, user);
!  
      flags = 0;
      acces = 0;
      if ((mode & X_OK) && ((stat = access (path, mode)) < 0 || mode == X_OK))
--- 3886,3892 ----
      static int constant = ACL$C_FILE;
      DESCRIPTOR (path_desc, path);
      DESCRIPTOR (user_desc, user);
! 
      flags = 0;
      acces = 0;
      if ((mode & X_OK) && ((stat = access (path, mode)) < 0 || mode == X_OK))
***************
*** 3951,3957 ****
      return access (filename, type);
  
    /* Check write protection. */
!     
  #define CHECKPRIV(bit)    (prvmask.bit)
  #define WRITABLE(field)  (! ((xab.xab$w_pro >> field) & XAB$M_NOWRITE))
  
--- 3951,3957 ----
      return access (filename, type);
  
    /* Check write protection. */
! 
  #define CHECKPRIV(bit)    (prvmask.bit)
  #define WRITABLE(field)  (! ((xab.xab$w_pro >> field) & XAB$M_NOWRITE))
  
***************
*** 4013,4019 ****
  }
  #endif /* not VMS4_4 */
  #endif /* access */
!   
  static char vtbuf[NAM$C_MAXRSS+1];
  
  /* translate a vms file spec to a unix path */
--- 4013,4019 ----
  }
  #endif /* not VMS4_4 */
  #endif /* access */
! 
  static char vtbuf[NAM$C_MAXRSS+1];
  
  /* translate a vms file spec to a unix path */
***************
*** 4054,4060 ****
            *targ++ = '.';
            *targ++ = '.';
            break;
!           
          default:
            *targ++ = *vfile;
            break;
--- 4054,4060 ----
            *targ++ = '.';
            *targ++ = '.';
            break;
! 
          default:
            *targ++ = *vfile;
            break;
***************
*** 4147,4153 ****
        ufile++;
      }
    *targ = '\0';
!   
    return utbuf;
  }
  
--- 4147,4153 ----
        ufile++;
      }
    *targ = '\0';
! 
    return utbuf;
  }
  
***************
*** 4169,4175 ****
      }
    strcpy (pathname, ptr);
    xfree (ptr);
!   
   return pathname;
  }
  
--- 4169,4175 ----
      }
    strcpy (pathname, ptr);
    xfree (ptr);
! 
   return pathname;
  }
  
***************
*** 4506,4512 ****
   * when this is not the desired behavior, for instance, when writing an
   * auto save file (you only want one version), or when you don't have
   * write permission in the directory containing the file (but the file
!  * itself is writable).  Hence this routine, which is equivalent to 
   * "close (creat (fn, 0));" on Unix if fn already exists.
   */
  int
--- 4506,4512 ----
   * when this is not the desired behavior, for instance, when writing an
   * auto save file (you only want one version), or when you don't have
   * write permission in the directory containing the file (but the file
!  * itself is writable).  Hence this routine, which is equivalent to
   * "close (creat (fn, 0));" on Unix if fn already exists.
   */
  int
***************
*** 4563,4569 ****
    register status;
    struct FAB uaf_fab;
    struct RAB uaf_rab;
!   
    uaf_fab = cc$rms_fab;
    uaf_rab = cc$rms_rab;
    /* initialize fab fields */
--- 4563,4569 ----
    register status;
    struct FAB uaf_fab;
    struct RAB uaf_rab;
! 
    uaf_fab = cc$rms_fab;
    uaf_rab = cc$rms_rab;
    /* initialize fab fields */
***************
*** 4627,4633 ****
    register status;
    struct FAB uaf_fab;
    struct RAB uaf_rab;
!   
    uaf_fab = cc$rms_fab;
    uaf_rab = cc$rms_rab;
    /* initialize fab fields */
--- 4627,4633 ----
    register status;
    struct FAB uaf_fab;
    struct RAB uaf_rab;
! 
    uaf_fab = cc$rms_fab;
    uaf_rab = cc$rms_rab;
    /* initialize fab fields */
***************
*** 4920,4926 ****
     bits).  To maintain portability, the VMS implementation of `chmod' wires
     the W and D bits together.  */
  
!  
  static struct fibdef fib;     /* We need this initialized to zero */
  char vms_file_written[NAM$C_MAXRSS];
  
--- 4920,4926 ----
     bits).  To maintain portability, the VMS implementation of `chmod' wires
     the W and D bits together.  */
  
! 
  static struct fibdef fib;     /* We need this initialized to zero */
  char vms_file_written[NAM$C_MAXRSS];
  
***************
*** 5088,5094 ****
  
    /* If we're not on an HFT we shouldn't do any of this.  We determine
       if we are on an HFT by trying to get an HFT error code.  If this
!      call fails, we're not on an HFT. */ 
  #ifdef IBMR2AIX
    if (ioctl (0, HFQERROR, &junk) < 0)
      return;
--- 5088,5094 ----
  
    /* If we're not on an HFT we shouldn't do any of this.  We determine
       if we are on an HFT by trying to get an HFT error code.  If this
!      call fails, we're not on an HFT. */
  #ifdef IBMR2AIX
    if (ioctl (0, HFQERROR, &junk) < 0)
      return;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]