Home | History | Annotate | Download | only in parser
      1 /*
      2  INTEL CONFIDENTIAL
      3  Copyright 2009 Intel Corporation All Rights Reserved.
      4  The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and licensors. The Material contains trade secrets and proprietary and confidential information of Intel or its suppliers and licensors. The Material is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way without Intels prior express written permission.
      5 
      6  No license under any patent, copyright, trade secret or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel or otherwise. Any license under such intellectual property rights must be express and approved by Intel in writing.
      7  */
      8 
      9 
     10 #ifndef VBP_TRACE_H_
     11 #define VBP_TRACE_H_
     12 
     13 
     14 
     15 //#define VBP_TRACE
     16 
     17 
     18 #ifdef VBP_TRACE /* if VBP_TRACE is defined*/
     19 
     20 #include <stdio.h>
     21 #include <stdarg.h>
     22 
     23 extern void vbp_trace_util(const char* cat, const char* fun, int line, const char* format, ...);
     24 
     25 #define VBP_TRACE_UTIL(cat, format, ...) \
     26 vbp_trace_util(cat, __FUNCTION__, __LINE__, format,  ##__VA_ARGS__)
     27 
     28 
     29 #define ETRACE(format, ...) VBP_TRACE_UTIL("ERROR:   ",  format, ##__VA_ARGS__)
     30 #define WTRACE(format, ...) VBP_TRACE_UTIL("WARNING: ",  format, ##__VA_ARGS__)
     31 #define ITRACE(format, ...) VBP_TRACE_UTIL("INFO:    ",  format, ##__VA_ARGS__)
     32 #define VTRACE(format, ...) VBP_TRACE_UTIL("VERBOSE: ",  format, ##__VA_ARGS__)
     33 
     34 #else /* if VBP_TRACE is not defined */
     35 
     36 #define ETRACE(format, ...)
     37 #define WTRACE(format, ...)
     38 #define ITRACE(format, ...)
     39 #define VTRACE(format, ...)
     40 
     41 
     42 #endif /* VBP_TRACE*/
     43 
     44 
     45 #endif /*VBP_TRACE_H_*/
     46 
     47 
     48