home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / sys / h / bkmac < prev    next >
Encoding:
Text File  |  1995-01-11  |  1.1 KB  |  46 lines

  1. /*
  2.  * $Header: /ax/networking:include/sys/bkmac.h:networking  1.1  $
  3.  * $Source: /ax/networking:include/sys/bkmac.h: $
  4.  *
  5.  * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
  6.  *
  7.  * $Log:    bkmac.h,v $
  8.  * Revision 1.1  95/01/11  10:18:55  kwelton
  9.  * Initial revision
  10.  * 
  11.  * Revision 1.3  88/06/17  20:18:16  beta
  12.  * Acorn Unix initial beta version
  13.  * 
  14.  */
  15. /* @(#)bkmac.h    1.2 87/05/15 3.2/4.3NFSSRC */
  16. /*
  17.  * Copyright (c) 1982, 1986 Regents of the University of California.
  18.  * All rights reserved.  The Berkeley software License Agreement
  19.  * specifies the terms and conditions for redistribution.
  20.  *
  21.  *    @(#)bkmac.h    7.1 (Berkeley) 6/4/86
  22.  */
  23.  
  24. /*
  25.  * Macro definition of bk.c/netinput().
  26.  * This is used to replace a call to
  27.  *        (*linesw[tp->t_line].l_rint)(c,tp);
  28.  * with
  29.  *
  30.  *        if (tp->t_line == NETLDISC)
  31.  *            BKINPUT(c, tp);
  32.  *        else
  33.  *            (*linesw[tp->t_line].l_rint)(c,tp);
  34.  */
  35. #define    BKINPUT(c, tp) { \
  36.     if ((tp)->t_rec == 0) { \
  37.         *(tp)->t_cp++ = c; \
  38.         if (++(tp)->t_inbuf == 1024 || (c) == '\n') { \
  39.             (tp)->t_rec = 1; \
  40.             wakeup((caddr_t)&(tp)->t_rawq); \
  41.         } \
  42.     } \
  43. }
  44.  
  45. /* EOF bkmac.h */
  46.