home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / DTS.Lib / TUndoObj.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-17  |  2.2 KB  |  89 lines  |  [TEXT/MPS ]

  1. /*
  2. ** Apple Macintosh Developer Technical Support
  3. **
  4. ** Program:     DTS.Lib
  5. ** File:        TUndoObj.c
  6. ** Written by:  Eric Soldan
  7. **
  8. ** Copyright © 1992 Apple Computer, Inc.
  9. ** All rights reserved.
  10. */
  11.  
  12. /* You may incorporate this sample code into your applications without
  13. ** restriction, though the sample code has been provided "AS IS" and the
  14. ** responsibility for its operation is 100% yours.  However, what you are
  15. ** not permitted to do is to redistribute the source as "DSC Sample Code"
  16. ** after having made changes. If you're going to re-distribute the source,
  17. ** we require that you make it clear in the source that the code was
  18. ** descended from Apple Sample Code, but that you've made changes. */
  19.  
  20. #ifndef __OSEVENTS__
  21. #include <OSEvents.h>
  22. #endif
  23.  
  24. #ifndef __OSUTILS__
  25. #include <OSUtils.h>
  26. #endif
  27.  
  28. #ifndef __QUICKDRAW__
  29. #include <Quickdraw.h>
  30. #endif
  31.  
  32. //#ifndef __STRING__
  33. //#include <String.h>
  34. //#endif
  35.  
  36. #ifndef __TREEOBJ__
  37. #include "TreeObj.h"
  38. #endif
  39.  
  40. #ifndef __UTILITIES__
  41. #include "Utilities.h"
  42. #endif
  43.  
  44.  
  45.  
  46. #pragma segment TreeObj
  47. long    TUndoObj(TreeObjHndl hndl, short message, long data)
  48. {
  49.     char    *cptr;
  50.  
  51.     switch (message) {
  52.         case VHMESSAGE:
  53.             cptr = ((VHFormatDataPtr)data)->data;
  54.             ccatchr   (cptr, 13, 2);
  55.             ccat      (cptr, "$10: TUndoObj:");
  56.             ccatchr   (cptr, 13, 1);
  57.             ccat      (cptr, "  $00: root         = $");
  58.             ccatpadhex(cptr, '0', 8, 8, (long)mDerefUndo(hndl)->root);
  59.             ccatchr   (cptr, 13, 1);
  60.             ccat      (cptr, "  $04: frHndl       = $");
  61.             ccatpadhex(cptr, '0', 8, 8, (long)mDerefUndo(hndl)->frHndl);
  62.             ccatchr   (cptr, 13, 1);
  63.             ccat      (cptr, "  $08: disabled     = ");
  64.             ccatdec   (cptr, mDerefUndo(hndl)->disabled);
  65.             ccatchr   (cptr, 13, 1);
  66.             ccat      (cptr, "  $0A: lastEditType = ");
  67.             ccatdec   (cptr, mDerefUndo(hndl)->lastEditType);
  68.             ccatchr   (cptr, 13, 1);
  69.             ccat      (cptr, "  $0C: undoDepth    = ");
  70.             ccatdec   (cptr, mDerefUndo(hndl)->undoDepth);
  71.             ccatchr   (cptr, 13, 1);
  72.             ccat      (cptr, "  $0E: maxNumUndos  = ");
  73.             ccatdec   (cptr, mDerefUndo(hndl)->maxNumUndos);
  74.             ccatchr   (cptr, 13, 1);
  75.             ccat      (cptr, "  $10: numSaveUndos = ");
  76.             ccatdec   (cptr, mDerefUndo(hndl)->numSaveUndos);
  77.             return(true);
  78.             break;
  79.  
  80.         default:
  81.             break;
  82.     }
  83.  
  84.     return(noErr);
  85. }
  86.  
  87.  
  88.  
  89.