#ifndef DBG_H #define DBG_H // Debug writes extra messages to a stream of the user's choice // To enable debug, the user needs to include this header // Then they can use the ff_set_debug_stream function to set the stream // And then use ff_dprintf to print debug messages // By default, debug is disabled #define FF_DEBUG_ENABLED 1 #include #include #include "result.h" #include "common.h" static FILE *intff_debug_stream = NULL; // This flag is the same name as FF_DEBUG_ENABLED but is local to this file // Thats why it has the int prefix static ff_flag intff_debug_enabled = 0; ff_result ff_set_debug_stream(FILE *stream); ff_result ff_dprintf(const char *format, ...); #endif