Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / lang / LangPrimSource / HID_Utilities_10_4 / HID_Error_Handler.c
blob4841f40448c9a8e863ff6eb55f2b25d8e4acb140
1 /*
2 File: Error Handler.c
4 Contains: Implementation of the HID utility error handlers for the HID Utilities
6 DRI: George Warner
8 Copyright: Copyright © 2002 Apple Computer, Inc., All Rights Reserved
10 Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
11 ("Apple") in consideration of your agreement to the following terms, and your
12 use, installation, modification or redistribution of this Apple software
13 constitutes acceptance of these terms. If you do not agree with these terms,
14 please do not use, install, modify or redistribute this Apple software.
16 In consideration of your agreement to abide by the following terms, and subject
17 to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs
18 copyrights in this original Apple software (the "Apple Software"), to use,
19 reproduce, modify and redistribute the Apple Software, with or without
20 modifications, in source and/or binary forms; provided that if you redistribute
21 the Apple Software in its entirety and without modifications, you must retain
22 this notice and the following text and disclaimers in all such redistributions of
23 the Apple Software. Neither the name, trademarks, service marks or logos of
24 Apple Computer, Inc. may be used to endorse or promote products derived from the
25 Apple Software without specific prior written permission from Apple. Except as
26 expressly stated in this notice, no other rights or licenses, express or implied,
27 are granted by Apple herein, including but not limited to any patent rights that
28 may be infringed by your derivative works or by other works in which the Apple
29 Software may be incorporated.
31 The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
32 WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
33 WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
34 PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
35 COMBINATION WITH YOUR PRODUCTS.
37 IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
38 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
39 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
40 ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
41 OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
42 (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
43 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45 #ifdef SC_DARWIN
46 #if !defined (kBuildingLibrary)
47 #define kVerboseErrors
49 // system includes ----------------------------------------------------------
51 #ifdef kVerboseErrors
52 #include <Carbon/Carbon.h>
53 #endif
54 #endif // not kBuildingLibrary
56 #include <stdio.h>
58 // project includes ---------------------------------------------------------
60 #include "HID_Utilities_Internal.h"
62 // globals (internal/private) -----------------------------------------------
64 // prototypes (internal/private) --------------------------------------------
66 // functions (internal/private) ---------------------------------------------
68 #pragma mark -
69 // -------------------------------------
71 // central error reporting
73 void HIDReportErrorNum (char * strError, long numError)
76 // out as debug string
77 #ifdef kVerboseErrors
79 scprintf ("%s #%ld (0x%lx)", strError, numError, numError);
81 #endif // kVerboseErrors
84 // -------------------------------------
86 void HIDReportError (char * strError)
88 // out as debug string
89 #ifdef kVerboseErrors
91 scprintf ("%s", strError);
93 #endif // kVerboseErrors
95 #endif //SC_DARWIN