13 | 12 | Output modules can be added by defining 3 functions and a structure instance: functions for each of opening, writing, and closing; and a structure to hold pointers to those functions. Access to these should be exposed in a header file, while actual code should be contained in their own source file. ''out_txt'' is a good example of an output module, which outputs point data to a .txt file simply translating points to human readable text using fprintf, it can be copied and used as a template for any future modules. Once you have a module, edit output.c and add a clause for your module in open_output_stream which translates config->output_format to your structure holding pointers to your functions, and stores the result in out->fmt. |