/*_____________________________ opPrintIO.c ______________________________*/ /* */ /* 1 2 3 4 5 6 7 */ /*3456789012345678901234567890123456789012345678901234567890123456789012345678*/ /**************************************|***************************************/ /* */ /* Copyright (c) 2007 Glen Petrie All rights reserved. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ /* "Software"), to deal in the Software without restriction, including */ /* without limitation the rights to use, copy, modify, merge, publish, */ /* distribute, and/or sell copies of the Software, and to permit persons */ /* to whom the Software is furnished to do so, subject to the following */ /* conditions: */ /* */ /* The rights to use, copy, modify, merge, publish, distribute, and/or */ /* sell copies of this Software or any material modification thereof */ /* shall not be further restricted by any means, including, but not */ /* limited to, the GNU General Public License. */ /* */ /* The above copyright notice and this permission notice shall be */ /* included in all copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* */ /* */ /**************************************|***************************************/ /* */ /* Open-Printing Embedded Print */ /* */ /* Print I/O Code (source) File */ /* */ /* API- 800010 void opConsolePrint(fmt, ...) */ /* API- 800020 void opErrorPrint (fmt, ...) */ /* */ /**************************************|***************************************/ /* */ /* Contributors: */ /* Glen W. Petrie / The World of Graphics */ /**************************************|***************************************/ /* */ /* Revision Log */ /* Date Who */ /* 2007.07.30 Glen W. Petrie */ /* # Original code */ /* */ /**************************************|***************************************/ /* */ /* Special Software and/or Usage Information */ /* */ /* # All exposed API's in this file utilize the OPEP global link-list error */ /* structure with the global variable name of op_error. */ /* */ /**************************************|***************************************/ /*-------------------------------- Includes -------------------------------*/ /**************************************|***************************************/ #include "opPrintIO.h" /*------------------------------- Definitions -----------------------------*/ /**************************************|***************************************/ /*--------------------------- Macro Definitions ----------------------------*/ /**************************************|***************************************/ /*--------------------------- Struct Definitions ---------------------------*/ /**************************************|***************************************/ /*---------------------- Application Global Variables ---------------------*/ /**************************************|***************************************/ /*------------------------- Local Global Variables ------------------------*/ /**************************************|***************************************/ /*---------------------------- Local Functions ----------------------------*/ /**************************************|***************************************/ /**************************************|***************************************/ /* API-800010 */ /* Module : opConsolePrint */ /* Description: A Platform neutral Console Printing Routine */ /* param >>: fmt - a standard print format string */ /* param >>: [variable argument depending on what wants to be printed.] */ /* << param : none. */ /* */ /**************************************|***************************************/ /* */ /* Revision Log */ /* Date Who */ /* 2007.07.30 Glen W. Petrie */ /* # Original code */ /* */ /**************************************|***************************************/ void opConsolePrint( char* fmt, /* Standard Print Format String */ ... /* Variable num of added arguments */ ) { /*** Declaration of Local Routine Variables */ va_list ap; /* Variable-List variable */ /*** API Identifier Information for this Routine */ OP_API_REG(800010, "opConsolePrint"); /*** Debug Flow Information for this Routine */ /*** Control removed for this very low level function */ /*** opDebugFlowIn(1,"opConsolePrint"); */ /*** Initialization of Local Routine Variables */ /*** Get variable argument list and execute a variable format print statement */ va_start(ap,fmt); vfprintf(stdout,fmt,ap); va_end(ap); fflush(stdout); /*** Return to Caller */ /*** Control removed for this very low level function */ /*** opDebugFlowOut(1,"opConsolePrint"); */ return; } /**************************************|***************************************/ /* API-800020 */ /* Module : opErrorPrint */ /* Description: A Platform neutral Error Printing Routine */ /* param >>: fmt - a standard print format string */ /* param >>: [variable argument depending on what wants to be printed.] */ /* << param : none. */ /* */ /**************************************|***************************************/ /* */ /* Revision Log */ /* Date Who */ /* 2007.07.30 Glen W. Petrie */ /* # Original code */ /* */ /**************************************|***************************************/ void opErrorPrint( char* fmt, /* Standard Print Format String */ ... /* Variable num of added arguments */ ) { /*** Declaration of Local Routine Variables */ va_list ap; /* Variable-List variable */ /*** API Identifier Information for this Routine */ OP_API_REG(800020, "opErrorPrint"); /*** Debug Flow Information for this Routine */ /*** Control removed for this very low level function */ /*** opDebugFlowIn(1,"opErrorPrint"); */ /*** Initialization of Local Routine Variables */ /*** Get variable argument list and execute a variable format print statement */ va_start(ap,fmt); vfprintf(stderr,fmt,ap); va_end(ap); fflush(stderr); /*** Return to Caller */ /*** Control removed for this very low level function */ /*** opDebugFlowOut(1,"opErrorPrint"); */ return; } /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ /*%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%*/ /*-------------------- Internal Processing ---------------------*/ /*%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%*/ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ /*_____________________________ opPrintIO.c ______________________________*/ /*3456789012345678901234567890123456789012345678901234567890123456789012345678*/ /* 1 2 3 4 5 6 7 */ /**************************************|***************************************/ /*** End of File ** End of File ** End of File ** End of File ** End of File */ /**************************************|***************************************/