|
The following macro will print "calling" followed by the name of the API being called, if the user sets the debug level to print
DEBUG_CALLS statements.
|
|
|
DEBUG_LEVEL(DEBUG_CALLS)
|
|
fprintf(debug_file_ptr, "calling api_make_cuboid\n");
|
|
|
The preprocessor expands this macro call to:
|
|
|
if (api_module_header.debug_level >= 10)
|
|
fprintf(debug_file_ptr, "calling api_make_cuboid\n");
|
|
|
The second call to the macro sets up debugging to print an additional "leaving" message, if the user sets the debug level to print
DEBUG_FLOW statements.
|
|
|
DEBUG_LEVEL(DEBUG_FLOW)
|
|
fprintf(debug_file_ptr, "leaving api_make_cuboid: %s\n",
|
|
|
|
find_err_ident(result.error_number()));
|
|
|
The preprocessor expands this macro call to:
|
|
|
if (api_module_header.debug_level >= 20)
|
|
fprintf(debug_file_ptr, "leaving api_make_cuboid: %s\n",
|
|
|
|
find_err_ident(result.error_number()));
|