- return lprintf(CTDL_EMERG, format, ap);
-
-/*
- bytesInLine = vsnprintf(outputLine, MAX_LINE_LEN-1, format, ap);
- if (bytesInLine > -1 && bytesInLine < (MAX_LINE_LEN-1)) {
- // We're a happy camper -- start printing
- if (gbl_params.filename) {
- // append to our file -- hopefully it's been opened
- if (gbl_fd != -1) {
- if (blockingWrite(outputLine, bytesInLine, gbl_fd)) {
- return_value=-2;
- }
- }
- }
-
- // Write to our file pointer
- if (gbl_params.filep != NULL) {
- if (fwrite(outputLine, bytesInLine, 1, gbl_params.filep) != 1) {
- return_value=-3;
- }
- fflush(gbl_params.filep);
- }
-
- // Write to our fd
- if (gbl_params.fd != -1) {
- if (blockingWrite(outputLine, bytesInLine, gbl_params.fd)) {
- return_value=-4;
- }
- }
- } else {
- // We overran our string.
- return_value=-1;
- }
-*/
-} // outputPrintf
-
-/*!
- * Initialize our output (open files, etc)
- *
- * This file initializes all output streams, since we're about
- * to have output.
- *
- */
-static void outputInit( void )
-{
- if (gbl_params.filename) {
- /* First try append */
- gbl_fd = open(gbl_params.filename, O_WRONLY|O_APPEND);
- if (gbl_fd < 0) {
- gbl_fd = open(gbl_params.filename, O_RDWR|O_CREAT,
- S_IREAD|S_IWRITE|S_IRGRP|S_IROTH); // 0644
- if (gbl_fd < 0) {
- gbl_fd = -1;
- }
- }