Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Sources/DebugUtils.c
// DebugUtils.c |
// |
// Original version by Jon Lansdell and Nigel Humphreys. |
// 4.0 and 3.1 updates by Greg Sutton. |
// ©Apple Computer Inc 1996, all rights reserved. |
#include "DebugUtils.h" |
#include <Memory.h> |
#include <TextUtils.h> |
void DebugNum ( long err ) |
{ |
Str255 str; |
NumToString ( (long) err , (StringPtr) &str ); |
DebugStr(str); |
} |
void DebugStrNum ( Str255 str, long num ) |
{ |
Str255 debug_str, tmp_str; |
BlockMove ( &str[0], &debug_str[0], str[0] + 1 ); |
NumToString ( ( long ) num , &tmp_str[0] ); |
debug_str[ debug_str[0] + 1 ] = ' '; |
BlockMove ( &tmp_str[1], &debug_str[ debug_str[0] + 2 ], tmp_str[0] ); |
debug_str[0] = debug_str[0] + tmp_str[0] + 1; |
DebugStr ( debug_str ); |
} |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14