DEBUG.C
上传用户:tuheem
上传日期:2007-05-01
资源大小:21889k
文件大小:1k
- #include <stdarg.h>
- #include <stdio.h>
- #include "mp4_vars.h"
- #include "debug.h"
- /**
- *
- **/
- #ifndef _DECORE
- #ifdef _DEBUG
- static int siPrintPic_start = 0;
- static int siPrintPic_end = 0;
- static int siPrintMba_start = 0;
- static int siPrintMba_end = 0;
- /***/
- void _SetPrintCond(int picnum_start, int picnum_end,
- int mba_start, int mba_end)
- {
- siPrintPic_start = picnum_start;
- siPrintPic_end = picnum_end;
- siPrintMba_start = mba_start;
- siPrintMba_end = mba_end;
- }
- void _Print(const char * format, ...)
- {
- if ((mp4_state->hdr.picnum >= siPrintPic_start) &&
- (mp4_state->hdr.picnum <= siPrintPic_end))
- {
- if ((mp4_state->hdr.mba >= siPrintMba_start) &&
- (mp4_state->hdr.mba <= siPrintMba_end))
- {
- va_list arglist;
- va_start(arglist, format);
- vprintf(format, arglist);
- va_end(arglist);
- }
- }
- }
- void _Break(int picnum, int mba)
- {
- if ((mp4_state->hdr.picnum == picnum) && (mp4_state->hdr.mba == mba)) {
- int iBreak = 0;
-
- }
- }
- void _Error(const char * format, ...)
- {
- va_list arglist;
- va_start(arglist, format);
- vprintf(format, arglist);
- va_end(arglist);
- }
- #endif
- #endif