-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Description
In #582, we decided to refactor ninjaCom for API functionality. Please reference this comment for the description of the new ninjaCom design.
Examples of different ways a user could specify their FILE* stream via the API:
// Multiple specified streams
FILE* progressStream;
FILE* errorStream:
char** options;
int NinjaErr = NinjaSetProgressStream(FILE* progressStream, options); // if FILE* = NULL, assume stdout
int NinjaErr = NinjaSetErrorStream(FILE* errorStream, options); // if FILE* = NULL, assume stderr// 1 unified stream
FILE* stream;
char** options;
int NinjaErr = NinjaSetStream(FILE* stream, options);// 1 stream with custom messages
bool msgType1, msgType2, ...;
FILE* stream;
char** options
int NinjaErr = NinjaSetCustomStream(FILE* stream, msgType1, msgType2, ..., options);Once set, it is on the user to use the messages provided by the stream, like outputting them in their application or error logging.