MCPcopy Create free account
hub / github.com/OpenPrinting/cups / print_xml_trailer

Function print_xml_trailer

tools/ipptool.c:4144–4165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4142 */
4143
4144static void
4145print_xml_trailer(
4146 ipptool_test_t *data, /* I - Test data */
4147 int success, /* I - 1 on success, 0 on failure */
4148 const char *message) /* I - Error message or NULL */
4149{
4150 if (data->xml_header)
4151 {
4152 cupsFilePuts(data->outfile, "</array>\n");
4153 cupsFilePuts(data->outfile, "<key>Successful</key>\n");
4154 cupsFilePuts(data->outfile, success ? "<true />\n" : "<false />\n");
4155 if (message)
4156 {
4157 cupsFilePuts(data->outfile, "<key>ErrorMessage</key>\n");
4158 print_xml_string(data->outfile, "string", message);
4159 }
4160 cupsFilePuts(data->outfile, "</dict>\n");
4161 cupsFilePuts(data->outfile, "</plist>\n");
4162
4163 data->xml_header = 0;
4164 }
4165}
4166
4167
4168#ifndef _WIN32

Callers 2

mainFunction · 0.85
print_fatal_errorFunction · 0.85

Calls 2

cupsFilePutsFunction · 0.85
print_xml_stringFunction · 0.85

Tested by

no test coverage detected