Collaboration diagram for Programming Idioms:
![]() |
The macros support writing and reading of methods and functions that return an w_rc_t (return code), which are defined in w_rc.h. Return codes are described in some detail ERRNUM. There you may also see how to create your own return codes for server modules.
w_rc_t method(args...) { W_DO(ss_m::create_file(...)); return RCOK; }
The W_DO macro returns whatever the called function returns if that return code was an error code, otherwise, it falls through to the code below the macro call. This is the most-often used idiom.
The RC_* macros let you construct a return code for a return value from a function. The normal, non-error return code is RCOK.
See the examples as well as Significant C Preprocessor Macros in w_rc.h.