home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 344_01 / mtx.h < prev    next >
Text File  |  1991-05-29  |  1KB  |  43 lines

  1. /*-------------------------------------------------------------------------
  2.    Main File : mtx.exe
  3.    File Name : mtx.h
  4.  
  5.    Purpose - Global defines, includes, types
  6. --------------------------------------------------------------------------*/
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9. #include <math.h>
  10. #include <conio.h>
  11. #include <limits.h>
  12. #include <string.h>
  13. #include <ctype.h>
  14.  
  15.  
  16.   /* Allocation macro */
  17. #define alloc(a,b)          calloc((a),(b))
  18.  
  19.   /* Indexing macro for main matrix */
  20. #define A(i,j)              *(Aptr+((i)*n)+(j))
  21.  
  22.   /* Indexing macro for 'b' */
  23. #define b(i)                *(bptr+(i))
  24.  
  25.   /* Numerical type of elements */
  26. typedef double Mtype;
  27.  
  28.   /* Corresponding conversion and abs functions */
  29. #define atoMtype(s)         atof((s))
  30. #define absMtype(x)         fabs((x))
  31.  
  32.   /* Error Output define */
  33. #define fs(s)               fprintf(stderr,"%s",s)
  34.  
  35.   /* Default precision define */
  36. #define default_precision   2
  37.  
  38.   /* Boolean definition */
  39. typedef enum {
  40.   FALSE,
  41.   TRUE
  42. } Boolean;
  43.