Example #1
0
 /* => use this code in SDK only */
 void ConsoleVPrintf( cAppCharP format, va_list args )
 {
   #ifdef SYDEBUG
     char         msg[ maxmsglen ];
                  msg[ 0 ]= '\0';               /* start with an empty <msg> */
     vsnprintf  ( msg, maxmsglen,format,args ); /* assemble the message string */
     ConsolePuts( msg );                        /* write the string */
   #endif
 } /* ConsoleVPrintf */
Example #2
0
static void CallbackVPrintf( DB_Callback aCB, cAppCharP format, va_list args, uInt16 outputMode )
{
  #ifdef SYDEBUG
    #ifdef __GNUC__
      int isMax;
    #endif

    char               message[ maxmsglen ];
    char* ptr= (char*)&message;

    #ifdef __GNUC__
    // need a copy for vasprintf() call
    va_list copy;
    va_copy(copy, args);
    #endif

               message[ 0 ]= '\0';                /* start with an empty <msg> */
    vsnprintf( message, maxmsglen, format,args ); /* assemble the message string */

    #ifdef __GNUC__
          isMax= strlen(message)==maxmsglen-1;
      if (isMax && vasprintf( &ptr, format, copy ) != -1) {};
      va_end(copy);
    #endif

    switch (outputMode) {
      case OutputNorm        : CallbackPuts  ( aCB, ptr ); break;
   /* case OutputExoticBefore: */
   /* case OutputExoticAfter : */
      case OutputExotic      : CallbackExotic( aCB, ptr ); break;
      case OutputConsole     :
      case OutputExoticBefore:
      case OutputExoticAfter :
      case OutputBefore      :
      case OutputAfter       : NBlk   ( (void*)aCB );
                               ConsolePuts        ( ptr ); break;
    } /* switch */

    #ifdef __GNUC__
      if (isMax) free( ptr );
    #endif
  #endif
} /* CallbackVPrintf */
Example #3
0
void DebugConsolePuts(char * buff, int color){
	if (System.DebugConsole == ON){
		ConsolePuts(buff,color);
	}
}