home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / desklib / sources / DeskLib / !DLSources / OtherLibs / Debugs / c / heapgraph < prev    next >
Encoding:
Text File  |  1995-07-10  |  1.2 KB  |  54 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Debug1.c.heapgraph
  12.     Author:  Julian Smith
  13.     Version: 0.00 (04 Jun 1995)
  14.     Purpose: Provides a set of Debug_ function which uses the
  15.              functions in the HeapGraph library.
  16. */
  17.  
  18.  
  19. #include <stdarg.h>
  20. #include <stdio.h>
  21.  
  22. #include "DeskLib:Debug.h"
  23.  
  24. #define HEAPGRAPH_DEBUG
  25. #include "HeapGraph.Debug.h"
  26. #undef Debug_Printf
  27.  
  28. void    Debug_Initialise( void)
  29. {
  30. }
  31.  
  32.  
  33. int    Debug_Printf( const char *format, ...)
  34. /* A bit tacky 'cos HeapGraph doesn't have a HeapGraph_VSendf function    */
  35. {
  36. char    buffer[ 500];
  37. va_list    va;
  38. int    i;
  39.  
  40. va_start(va, format);
  41. i = vsprintf( buffer, format, va);
  42. va_end(va);
  43.  
  44. HeapGraph_Debug_Printf( buffer);
  45.  
  46. return i;
  47. }
  48.  
  49.  
  50. void    Debug_Print( const char *text)
  51. {
  52. HeapGraph_Debug_Printf( (char *) text);
  53. }
  54.