home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 322_01 / tracdemo.c < prev    next >
C/C++ Source or Header  |  1990-08-06  |  998b  |  52 lines

  1. /*  tracdemo.c - Demonstrate "trace.h" macros. */
  2.  
  3. const static char RCsid[] = 
  4.     "$Id: tracdemo.c 1.5 89/11/24 14:21:07 Bill_Rogers Exp $";
  5.  
  6. #include    "trace.h"
  7.  
  8. extern void func1(void);
  9.  
  10.  
  11. void func1()
  12. {
  13.     T_FUNC(func1)
  14.     int             i   = 23456;
  15. /* begin */
  16.     T_BEGIN()
  17.     T_INT(i)
  18.     T_END()
  19. } /* func1 */
  20.     
  21.  
  22. void main()
  23. {
  24.     T_FUNC(main)
  25.     int             b   = 1;
  26.     char            c   = 'c';
  27.     double          d   = 12.3456789012345;
  28.     unsigned int    h   = 0xabcd;
  29.     int             i   = 12345;
  30.     float           f   = 12.34567;
  31.     unsigned long   lh  = 0x89abcdef;
  32.     long            l   = 123456789;
  33.     char *          p   = &c;
  34.     static char     s[] = "here is a string";
  35. /* begin */
  36.     T_BEGIN()
  37.  
  38.     T_BOOL  (b)
  39.     T_CHAR  (c)
  40.     T_DBL   (d)
  41.     T_HEX   (h)
  42.     T_INT   (i)
  43.     T_FLOAT (f)
  44.     T_LHEX  (lh)
  45.     T_LONG  (l)
  46.     T_PTR   (p)
  47.     T_STR   (s)
  48.  
  49.     func1();
  50.  
  51.     T_END()
  52. } /* main */