home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 500 / 471 / rccl149 < prev    next >
Text File  |  1987-03-02  |  1KB  |  32 lines

  1. /*
  2.  * RCCL Version 1.0           Author :  Vincent Hayward
  3.  *                                      School of Electrical Engineering
  4.  *                                      Purdue University
  5.  *      Dir     : h
  6.  *      File    : umac.h
  7.  *      Remarks : Set of macros only.
  8.  *      Usage   : made available to the user
  9.  */
  10.  
  11. #define SINCOS(s, c, a) {s = sin(a); c = cos(a);}
  12.  
  13. #define FABS(a)         (((a) < 0.) ? -(a) : (a))
  14.  
  15. #define ABS(a)          (((a) < 0) ? -(a) : (a))
  16.  
  17. #define ROUND(a)        ((a - (double)(int)a >= .5) ? (int)a + 1 : (int)a)
  18.  
  19. #define TERMIO(z)       do {errno = 0; z; pause();} while (errno == EINTR);
  20.  
  21. #define GETCHAR(c)      while ((c = getchar()) == ' '           \
  22.                  || c == '\t' || c == '\n') ;
  23.  
  24. #define QUERY(c)        printf(" (y/n) ");                      \
  25.             do {                                    \
  26.                 GETCHAR(c);                     \
  27.             } while (c != 'y' && c != 'n');         \
  28.             {int v;                                 \
  29.             if ((v = getchar()) != '\n')            \
  30.              (void) ungetc(v, stdin);}
  31.  
  32.