chiark / gitweb /
*** empty log message ***
[sympathy.git] / src / util.c
index e8b221acba01c78783b1e7a5bfcdf7546f99eede..91cb58b2ccfd850bb52b35e9c1761720f9c53e7b 100644 (file)
@@ -10,6 +10,12 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.7  2008/02/27 01:31:14  james
+ * *** empty log message ***
+ *
+ * Revision 1.6  2008/02/27 00:54:16  james
+ * *** empty log message ***
+ *
  * Revision 1.5  2008/02/24 00:42:53  james
  * *** empty log message ***
  *
@@ -139,3 +145,16 @@ client_termios (struct termios *termios)
   cfsetispeed (termios, B9600);
   cfsetospeed (termios, B9600);
 }
+
+int
+fput_cp (FILE * f, uint32_t ch)
+{
+  char buf[4];
+  int i;
+  i = utf8_encode (buf, ch);
+
+  if (!i)
+    return 0;
+
+  return fwrite (buf, i, 1, f);
+}