/[inetutils]/inetutils/telnetd/slc.c
ViewVC logotype

Diff of /inetutils/telnetd/slc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by alainm, Wed Jul 19 04:08:39 2000 UTC revision 1.6 by gray, Fri Apr 5 00:04:12 2002 UTC
# Line 31  Line 31 
31  static char sccsid[] = "@(#)slc.c       8.2 (Berkeley) 5/30/95";  static char sccsid[] = "@(#)slc.c       8.2 (Berkeley) 5/30/95";
32  #endif /* not lint */  #endif /* not lint */
33    
 #ifdef HAVE_CONFIG_H  
 #include <config.h>  
 #endif  
   
34  #include "telnetd.h"  #include "telnetd.h"
35    
 #ifdef  LINEMODE  
36  /*  /*
37   * local varibles   * local variables
38   */   */
39  static unsigned char    *def_slcbuf = (unsigned char *)0;  static unsigned char    *def_slcbuf = (unsigned char *)0;
40  static int              def_slclen = 0;  static int              def_slclen = 0;
# Line 94  default_slc() Line 89  default_slc()
89          slcchange = 1;          slcchange = 1;
90    
91  }  /* end of default_slc */  }  /* end of default_slc */
 #endif  /* LINEMODE */  
92    
93  /*  /*
94   * get_slc_defaults   * get_slc_defaults
# Line 117  get_slc_defaults() Line 111  get_slc_defaults()
111    
112  }  /* end of get_slc_defaults */  }  /* end of get_slc_defaults */
113    
 #ifdef  LINEMODE  
114  /*  /*
115   * add_slc   * add_slc
116   *   *
# Line 196  end_slc(register unsigned char **bufp) Line 189  end_slc(register unsigned char **bufp)
189                          (void) sprintf((char *)slcptr, "%c%c", IAC, SE);                          (void) sprintf((char *)slcptr, "%c%c", IAC, SE);
190                          slcptr += 2;                          slcptr += 2;
191                          len = slcptr - slcbuf;                          len = slcptr - slcbuf;
192                          writenet(slcbuf, len);                          net_output_datalen(slcbuf, len);
193                          netflush();  /* force it out immediately */                          netflush();  /* force it out immediately */
194                          DIAG(TD_OPTIONS, printsub('>', slcbuf+2, len-2););                          DEBUG(debug_options, 1,
195                                  printsub('>', slcbuf+2, len-2));
196                  }                  }
197          }          }
198          return (0);          return (0);
# Line 370  change_slc(register char func, register Line 364  change_slc(register char func, register
364    
365  }  /* end of change_slc */  }  /* end of change_slc */
366    
 #if     defined(USE_TERMIO) && (VEOF == VMIN)  
 cc_t oldeofc = '\004';  
 #endif  
   
367  /*  /*
368   * check_slc   * check_slc
369   *   *
# Line 388  check_slc() Line 378  check_slc()
378          register int i;          register int i;
379    
380          for (i = 1; i <= NSLC; i++) {          for (i = 1; i <= NSLC; i++) {
381  #if     defined(USE_TERMIO) && (VEOF == VMIN)                  if (i == SLC_EOF && term_change_eof ())
382                  /*                    continue;
                  * In a perfect world this would be a neat little  
                  * function.  But in this world, we should not notify  
                  * client of changes to the VEOF char when  
                  * ICANON is off, because it is not representing  
                  * a special character.  
                  */  
                 if (i == SLC_EOF) {  
                         if (!tty_isediting())  
                                 continue;  
                         else if (slctab[i].sptr)  
                                 oldeofc = *(slctab[i].sptr);  
                 }  
 #endif  /* defined(USE_TERMIO) && defined(SYSV_TERMIO) */  
383                  if (slctab[i].sptr &&                  if (slctab[i].sptr &&
384                                  (*(slctab[i].sptr) != slctab[i].current.val)) {                                  (*(slctab[i].sptr) != slctab[i].current.val)) {
385                          slctab[i].current.val = *(slctab[i].sptr);                          slctab[i].current.val = *(slctab[i].sptr);
# Line 426  check_slc() Line 403  check_slc()
403   * ptr points to the beginning of the buffer, len is the length.   * ptr points to the beginning of the buffer, len is the length.
404   */   */
405  void  void
406  do_opt_slc(register unsigend char *ptr, register int len)  do_opt_slc(register unsigned char *ptr, register int len)
407  {  {
408          register unsigned char func, flag;          register unsigned char func, flag;
409          cc_t val;          cc_t val;
# Line 478  deferslc() Line 455  deferslc()
455    
456  }  /* end of deferslc */  }  /* end of deferslc */
457    
 #endif  /* LINEMODE */  

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

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26