📄 debug.h
字号:
/*COPYRIGHT, LICENSE AND WARRANTY INFORMATIONThis software module has been originally developed by Nokia Corporation. Provided that a person, entity or a company willing to use the Software (hereinafter Licensee) comply with all the terms and conditions of this Statement and subject to the limitations set forth in this Statement Nokia grants to such Licensee a non-exclusive, sub-licensable, worldwide, limited license under copyrights owned by Nokia to use the Software for the sole purpose of creating, manufacturing, selling, marketing, or distributing (including the right to make modifications to the Software) a fully compliant decoder implementation (hereinafter "Decoder") of ITU-T Recommendation H.264 / ISO/IEC International Standard 14496-10 and an encoder implementation producing output that is decodable with the Decoder.Nokia retains the ownership of copyrights to the Software. There is no patent nor other intellectual property right of Nokia licensed under this Statement (except the copyright license above). Licensee hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if patent licenses are required, it is their responsibility to acquire the license before utilizing the Software.The license by Nokia is subject to that the Licensee grants to Nokia the non-exclusive, worldwide, royalty-free, perpetual and irrevocable covenant that the Licensee(s) shall not bring a suit before any court or administrative agency or otherwise assert a claim for infringement under the Licensee intellectual property rights that, but for a license, would be infringed by the Software against (a) Nokia or Nokia's Affiliate; or (b) other recipient of a license and covenant not to sue with respect to the Software from Nokia; or (c) contractor, customer or distributor of a party listed above in a or b, which suit or claim is related to the Software or use thereof.The Licensee(s) further agrees to grant a reciprocal license to Nokia (as granted by Nokia to the Licensee(s) on the modifications made by Licensee(s) to the Software. THE SOFTWARE IS PROVIDED "AS IS" AND THE ORIGINAL DEVELOPER DISCLAIMS ANY AND ALL WARRANTIES WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. THOSE INTENDING TO USE THE SOFTWARE ARE EXPRESSLY ADVISED THAT ITS USE MAY INFRINGE EXISTING PATENTS AND BE SUBJECT TO ROYALTY PAYMENTS TO PATENT OWNERS. ANYONE USING THE SOFTWARE ON THE BASIS OF THIS LICENSE AGREES TO OBTAIN THE NECESSARY PERMISSIONS FROM ANY AND ALL APPLICABLE PATENT OWNERS FOR SUCH USE.IN NO EVENT SHALL THE ORIGINAL DEVELOPER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.This copyright, license and warranty information notice must be retained in all copies and derivative works of the Software or substantial portions thereof.*/#ifndef _DEBUG_H_#define _DEBUG_H_#if defined(DEB_FILE) || defined(DEB_STDOUT) || defined(DEB_DEBUGGER) /* Debug output wanted */ #include <stdio.h> #ifdef __cplusplus extern "C" { #endif /* * Function prototypes */ int debFree(void); int debLoad(const char *fileName); #ifdef DEB_PERF #define deb(dummy) 0 #define debp(dummy) 0 #define debPrintf(dummy) 0 #define deb0p(format) 0 #define deb1p(format, p1) 0 #define deb2p(format, p1, p2) 0 #define deb3p(format, p1, p2, p3) 0 #define deb4p(format, p1, p2, p3, p4) 0 #define deb5p(format, p1, p2, p3, p4, p5) 0 #define deb0f(stream, format) 0 #define deb1f(stream, format, p1) 0 #define deb2f(stream, format, p1, p2) 0 #define deb3f(stream, format, p1, p2, p3) 0 #define deb4f(stream, format, p1, p2, p3, p4) 0 #define deb5f(stream, format, p1, p2, p3, p4, p5) 0 #ifdef DEB_STDOUT #define debPerf printf #else int debPerf(const char *format, ...); #endif #else #ifdef DEB_STDOUT #define deb printf #else #ifdef DEBUG_OUTPUT int deb_core(const char *format, ...); #define deb deb_core("%08lu: ", bibNumberOfFlushedBits(buffer_global)), deb_core #else int deb(const char *format, ...); #endif #endif #define debp deb #ifdef DEB_FILELINE #define debPrintf deb("%s, line %d. ", __FILE__, __LINE__), deb #else #define debPrintf deb #endif #define deb0p debPrintf #define deb1p debPrintf #define deb2p debPrintf #define deb3p debPrintf #define deb4p debPrintf #define deb5p debPrintf /* Internal defines to enable DEB_FILELINE */ #ifdef DEB_STDOUT #define deb0ff(stream, format) fprintf(stream, format) #define deb1ff(stream, format, p1) fprintf(stream, format, p1) #define deb2ff(stream, format, p1, p2) fprintf(stream, format, p1, p2) #define deb3ff(stream, format, p1, p2, p3) fprintf(stream, format, p1, p2, p3) #define deb4ff(stream, format, p1, p2, p3, p4) fprintf(stream, format, p1, p2, p3, p4) #define deb5ff(stream, format, p1, p2, p3, p4, p5) fprintf(stream, format, p1, p2, p3, p4, p5) #else #define deb0ff(stream, format) deb(format) #define deb1ff(stream, format, p1) deb(format, p1) #define deb2ff(stream, format, p1, p2) deb(format, p1, p2) #define deb3ff(stream, format, p1, p2, p3) deb(format, p1, p2, p3) #define deb4ff(stream, format, p1, p2, p3, p4) deb(format, p1, p2, p3, p4) #define deb5ff(stream, format, p1, p2, p3, p4, p5) deb(format, p1, p2, p3, p4, p5) #endif #ifdef DEB_FILELINE #define deb0f(stream, format) \ deb2ff(stream, "%s, line %d. ", __FILE__, __LINE__), \ deb0ff(stream, format) #define deb1f(stream, format, p1) \ deb2ff(stream, "%s, line %d. ", __FILE__, __LINE__), \ deb1ff(stream, format, p1) #define deb2f(stream, format, p1, p2) \ deb2ff(stream, "%s, line %d. ", __FILE__, __LINE__), \ deb2ff(stream, format, p1, p2) #define deb3f(stream, format, p1, p2, p3) \ deb2ff(stream, "%s, line %d. ", __FILE__, __LINE__), \ deb3ff(stream, format, p1, p2, p3) #define deb4f(stream, format, p1, p2, p3, p4) \ deb2ff(stream, "%s, line %d. ", __FILE__, __LINE__), \ deb4ff(stream, format, p1, p2, p3, p4) #define deb5f(stream, format, p1, p2, p3, p4, p5) \ deb2ff(stream, "%s, line %d. ", __FILE__, __LINE__), \ deb4ff(stream, format, p1, p2, p3, p4, p5) #else #define deb0f(stream, format) deb0ff(stream, format) #define deb1f(stream, format, p1) deb1ff(stream, format, p1) #define deb2f(stream, format, p1, p2) deb2ff(stream, format, p1, p2) #define deb3f(stream, format, p1, p2, p3) deb3ff(stream, format, p1, p2, p3) #define deb4f(stream, format, p1, p2, p3, p4) deb4ff(stream, format, p1, p2, p3, p4) #define deb5f(stream, format, p1, p2, p3, p4, p5) deb5ff(stream, format, p1, p2, p3, p4, p5) #endif #define debPerf deb #endif #ifdef __cplusplus }; #endif#else /* no debug output wanted */ #define deb(dummy) 0 #define debp(dummy) 0 #define debPrintf(dummy) 0 #define deb0p(format) 0 #define deb1p(format, p1) 0 #define deb2p(format, p1, p2) 0 #define deb3p(format, p1, p2, p3) 0 #define deb4p(format, p1, p2, p3, p4) 0 #define deb5p(format, p1, p2, p3, p4, p5) 0 #define deb0f(stream, format) 0 #define deb1f(stream, format, p1) 0 #define deb2f(stream, format, p1, p2) 0 #define deb3f(stream, format, p1, p2, p3) 0 #define deb4f(stream, format, p1, p2, p3, p4) 0 #define deb5f(stream, format, p1, p2, p3, p4, p5) 0 #define debPerf(dummy) 0 #define debFree() 0 #define debLoad(dummy) 0#endif #define debLogOutput(a,b,c) 0#endif /* !defined(_DEBUG_H_) */// End of file
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -