home *** CD-ROM | disk | FTP | other *** search
- #ifndef PMPLIB_H
- #define PMPLIB_H
-
- #define PMPSIG
-
- pmp();
- void pmpregister();
-
- #ifdef PMPSIG
- extern int pmpsig;
- void pmpsigstart();
- #endif
-
- struct pmpcount
- {
- long scount;
- #ifdef PMPSIG
- long tcount;
- #endif
- long line;
- char *file;
- struct pmpcount *prev;
- }
- ;
-
- #ifdef PMPSIG
- #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)
- #else
- #define PMPEXEC do { static struct pmpcount pmpc = {0,0,__LINE__,__FILE__,(struct pmpcount *)0}; if (!((pmpc.scount)++)) pmpregister(&pmpc); } while(0)
- #endif
- #define P PMPEXEC
-
- #endif
-