home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / musik / MIDIFP21 / SOURCES / INCLUDE / ACS_PLUS.PIF next >
Encoding:
Text File  |  1996-08-23  |  3.1 KB  |  82 lines

  1. /**************************************************************
  2. *
  3. *                ACS_PLUS.PIF
  4. *
  5. **************************************************************/
  6.  
  7.  
  8. /*******************************************************************
  9. */                                                            
  10.     void debug_mem (
  11.         void *defective        /* bad pointer */
  12.     ) ;
  13.     
  14. /* To substitute the ACS DEBUG_MEM procedure. See ACS manual.
  15. * In case of memory errors, "debug_mem" then simply outputs the         
  16. * value of the defective pointer and the 
  17. * content of "memory_symptom" in an alert box.
  18. * Modules using Awi_delete, Ast_delete, Ax_free, ..., 
  19. * should set "memory_symptom" to a respective string before a call
  20. * to these ACS procedures.
  21. *                                                               
  22. * INPUT:   
  23. */
  24.     extern char *memory_symptom ;
  25. /*                                                               
  26. * OUTPUT:  alert box on screen
  27. *                                                               
  28. *******************************************************************/
  29.  
  30.  
  31. /*******************************************************************
  32. */                                                            
  33.     void *My_shrink(
  34.         void *memory,     /* pointer to the existing memory block */
  35.         long size        /* desired size of the new memory block */
  36.     ) ;
  37.     
  38. /* A pseudo Mshrink() for use in accessories.     
  39. *  It copies the old memory block to another one with the        
  40. *  the desired size using routines My_alloc and My_free.                                                          
  41. *                                                               
  42. * RETURN:  - NULL if size was 0,                              
  43. *          - old memory pointer if new memory could not be 
  44. *            allocated,
  45. *          - pointer to new memory if new memory could be 
  46. *            allocated.
  47. *                                                               
  48. *******************************************************************/
  49.  
  50. /*******************************************************************
  51. */
  52.     void   *My_alloc(long size) ;
  53.     void    My_free(void *ptr) ;
  54.  
  55.     char   *Myst_create(const char *parent) ;
  56.     void    Myst_delete(char *ptr) ;
  57.  
  58.     OBJECT *Myob_create(const OBJECT *parent) ;
  59.     void    Myob_delete(OBJECT *ptr) ;
  60.  
  61.     Awindow *Mywi_create(const Awindow *parent) ;
  62.     void    Mywi_delete(Awindow *ptr) ;
  63. /*
  64. * substitute the corresponding ACS procedures. They make a protocol
  65. * of heap operations which can be printed afterwards using 
  66. */
  67.     void print_operations(void) ;
  68. /*
  69. ********************************************************************/
  70.  
  71.  
  72. /**************************************************************
  73. *
  74. *                timer management (for delayed redraw)
  75. *
  76. **************************************************************/
  77.  
  78. int set_timer(Awindow *wi) ;     /* set a 2s timer for the window */
  79. void stop_timer(Awindow *wi) ;   /* stop if a timer is running */
  80. void init_time(void) ;           /* inititialize timer management */
  81. void exit_time(void) ;           /* de-initialize */
  82.