home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / finger / part01 / waitstate.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-03  |  1.1 KB  |  49 lines

  1. /*
  2.  * waitstate.h -- wait state enumeration (once was ttystate.h)
  3.  *
  4.  * Copyright (C) 1987, 1990  Philip L. Budne
  5.  *
  6.  * This file is part of "Phil's Finger Program".
  7.  *
  8.  * This program is free software; you can redistribute it and/or modify
  9.  * it under the terms of the GNU General Public License as published by
  10.  * the Free Software Foundation; either version 1, or (at your option)
  11.  * any later version.
  12.  *
  13.  */
  14.  
  15. # define FOO_RCSID "$Id: waitstate.h,v 3.0 90/07/06 13:12:16 budd Rel $"
  16.  
  17. # define _STATES \
  18.     _STATE(00)             /* NULL */    \
  19.     _STATE(TI)             /* tty input */ \
  20.     _STATE(TO)             /* tty output */ \
  21.     _STATE(TW)             /* tty wait */    \
  22.     _STATE(SE)             /* select(2) */    \
  23.     _STATE(RU)             /* runable */    \
  24.     _STATE(PA)             /* pause(2) */    \
  25.     _STATE(WA)            /* wait(2) */    \
  26.     _STATE(SL)            /* other */
  27.  
  28. typedef enum { 
  29. # define _STATE(s) CONC(WS_,s),
  30.     _STATES
  31.     WS_XX                /* use up extra comma */
  32. # undef _STATE
  33. } waitstate_t;
  34.  
  35. # ifdef WAITSTATENAME
  36. char *WAITSTATENAME[] = {
  37. # define _STATE(s) STR(s),
  38.     _STATES
  39.     "XX"
  40.     };
  41. # undef _STATE
  42. # endif /* WAITSTATENAME defined */
  43.  
  44. /*
  45.  * Local variables:
  46.  * comment-column: 40
  47.  * End:
  48.  */
  49.