From: Rene S. <sa...@us...> - 2005-02-06 19:26:03
|
Update of /cvsroot/jake2/jake2/src/jake2/qcommon In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23403/src/jake2/qcommon Modified Files: Com.java Log Message: debug print distinguishes now between client and server messages. Index: Com.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/qcommon/Com.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Com.java 23 Jan 2005 20:04:02 -0000 1.10 --- Com.java 6 Feb 2005 19:25:55 -0000 1.11 *************** *** 44,47 **** --- 44,50 ---- { + static String debugContext = ""; + static String _debugContext = ""; + static int com_argc; static String[] com_argv= new String[Defines.MAX_NUM_ARGVS]; *************** *** 340,349 **** public static void DPrintf(String fmt) { DPrintf(fmt, null); } public static void Printf(String fmt) { ! Printf(fmt, null); } --- 343,359 ---- public static void DPrintf(String fmt) { + _debugContext = debugContext; DPrintf(fmt, null); + _debugContext = ""; + } + + public static void dprintln(String fmt) + { + DPrintf(_debugContext + fmt + "\n", null); } public static void Printf(String fmt) { ! Printf(_debugContext + fmt, null); } *************** *** 352,363 **** if (Globals.developer == null || Globals.developer.value == 0) return; // don't confuse non-developers with techie stuff... ! Printf(fmt, vargs); } public static void Printf(String fmt, Vargs vargs) { ! // TODO Com.Printf ist nur zum testen ! String msg= sprintf(fmt, vargs); if (rd_target != 0) --- 362,374 ---- if (Globals.developer == null || Globals.developer.value == 0) return; // don't confuse non-developers with techie stuff... ! _debugContext = debugContext; Printf(fmt, vargs); + _debugContext=""; } public static void Printf(String fmt, Vargs vargs) { ! // Com.Printf is for testing only. ! String msg= sprintf(_debugContext + fmt, vargs); if (rd_target != 0) *************** *** 425,429 **** public static void Println(String fmt) { ! Printf(fmt + "\n"); } --- 436,440 ---- public static void Println(String fmt) { ! Printf(_debugContext + fmt + "\n"); } |