Moved utf log functions from native.c.
authortwisti <none@none>
Thu, 10 Feb 2005 10:46:33 +0000 (10:46 +0000)
committertwisti <none@none>
Thu, 10 Feb 2005 10:46:33 +0000 (10:46 +0000)
src/toolbox/logging.c
src/toolbox/logging.h

index d4650b5c938a8779039835866d1f14185fbbdb3e..590af4d2cb73ff445a88a1a55f645c070ed2a7c7 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: logging.c 1848 2005-01-04 11:35:10Z twisti $
+   $Id: logging.c 1925 2005-02-10 10:46:33Z twisti $
 
 */
 
@@ -228,11 +228,11 @@ void log_message_method(const char *msg, methodinfo *m)
 }
 
 
-/************************** Function: error *******************************
+/* error ***********************************************************************
 
-Like dolog(), but terminates the program immediately.
+   Like dolog(), but terminates the program immediately.
 
-**************************************************************************/
+*******************************************************************************/
 
 void error(const char *txt, ...)
 {
@@ -253,11 +253,11 @@ void error(const char *txt, ...)
 }
 
 
-/************************ Function: panic (txt) ****************************
+/* panic ***********************************************************************
 
-  Like error(), takes the text to output as an argument
+   Like error(), takes the text to output as an argument.
 
-***************************************************************************/
+*******************************************************************************/
 
 void panic(const char *txt)
 {
@@ -265,6 +265,34 @@ void panic(const char *txt)
 }
 
 
+/* log_utf *********************************************************************
+
+   Log utf symbol.
+
+*******************************************************************************/
+
+void log_utf(utf *u)
+{
+       char buf[MAXLOGTEXT];
+       utf_sprint(buf, u);
+       dolog("%s", buf);
+}
+
+
+/* log_plain_utf ***************************************************************
+
+   Log utf symbol (without printing "LOG: " and newline).
+
+*******************************************************************************/
+
+void log_plain_utf(utf *u)
+{
+       char buf[MAXLOGTEXT];
+       utf_sprint(buf, u);
+       dolog_plain("%s", buf);
+}
+
+
 /*
  * These are local overrides for various environment variables in Emacs.
  * Please do not remove this and leave it at the end of the file, where
index 90270045a504f0434d7df59206766f6292dbd4eb..e9e616e7a388d1d206d350d476e50f6702cabc29 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: logging.h 1848 2005-01-04 11:35:10Z twisti $
+   $Id: logging.h 1925 2005-02-10 10:46:33Z twisti $
 
 */
 
@@ -74,6 +74,10 @@ void panic(const char *txt);
 
 FILE *get_logfile(void);                        /* return the current logfile */
 
+/* write utf symbol to logfile/stdout */
+void log_utf(utf *u);
+void log_plain_utf(utf *u);
+
 #endif /* _LOGGING_H */