home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1816 / pmplib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-28  |  676 b   |  34 lines

  1. #ifndef PMPLIB_H
  2. #define PMPLIB_H
  3.  
  4. #define PMPSIG
  5.  
  6. pmp();
  7. void pmpregister();
  8.  
  9. #ifdef PMPSIG
  10. extern int pmpsig;
  11. void pmpsigstart();
  12. #endif
  13.  
  14. struct pmpcount
  15.  {
  16.   long scount;
  17. #ifdef PMPSIG
  18.   long tcount;
  19. #endif
  20.   long line;
  21.   char *file;
  22.   struct pmpcount *prev;
  23.  }
  24. ;
  25.  
  26. #ifdef PMPSIG
  27. #define PMPEXEC do { static struct pmpcount pmpc = {0,0,__LINE__,__FILE__,(struct pmpcount *)0}; if (!((pmpc.scount)++)) pmpregister(&pmpc); if (pmpsig) { pmpc.tcount += pmpsig; pmpsig = 0; } } while(0)
  28. #else
  29. #define PMPEXEC do { static struct pmpcount pmpc = {0,0,__LINE__,__FILE__,(struct pmpcount *)0}; if (!((pmpc.scount)++)) pmpregister(&pmpc); } while(0)
  30. #endif
  31. #define P PMPEXEC
  32.  
  33. #endif
  34.