home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / MAILBOX.ZIP / MPBUG.C < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-27  |  1.6 KB  |  44 lines

  1. /****************************************************************************/
  2. /* mpbug.c -- Mike Parker's HANDY "C" DEBUGGING UTILITIES (IMPLEMENTATION)  */
  3. /* Created:  10/1/87        Release:  0.7        Version:  12/03/87  */
  4. /****************************************************************************
  5. (c) Copyright 1987 by Michael Benjamin Parker           (USA SS# 557-49-4130)
  6.  
  7. All Rights Reserved unless specified in the following include files: */
  8. #include "mptsk.cpy" /*
  9.  
  10. DO NOT REMOVE OR ALTER THIS NOTICE AND ITS PROVISIONS.
  11. ****************************************************************************/
  12. #include "mpbug.h"
  13. /****************************************************************************/
  14. /****************************************************************************/
  15. int    mpbug_usrbrk()
  16. {
  17. #ifdef    __TURBOC__
  18.     return(0);
  19. #else
  20.     exit(-1);
  21. #endif
  22. }
  23. /****************************************************************************/
  24. void    mpbug_level(bytesperspace)
  25.     unsigned    bytesperspace;
  26. {
  27.     static unsigned     bps=        ~0;
  28.     static unsigned     *stktop;
  29.     unsigned int        n;
  30.     if (bytesperspace) {        /* IF bytesperspace NON-ZERO VALUE */
  31.         stktop=     &n;        /* INITIALIZE DEPTH MARKER */
  32.         bps=    bytesperspace; /* AND DEPTH MEASURE */
  33.     } else {
  34.         putc('\n',stderr);   /* ELSE INDENT ACCORDING TO CUR DEPTH */
  35.         if (bps != ~0) {
  36.             n=    (stktop - &n)/bps;
  37.             while (n--)    putc('#',stderr);
  38.         }
  39.     }
  40. }
  41. /****************************************************************************/
  42. /****************************************************************************/
  43. /****************************************************************************/
  44.