Author: fabien
Date: 2008-11-06 14:36:01 -0800 (Thu, 06 Nov 2008)
New Revision: 6501
Log:
Doxygenized fl_expand_text() comment, more minor code comment and debug printf 
cleanup.

Modified:
   branches/branch-1.3/src/fl_draw.cxx

Modified: branches/branch-1.3/src/fl_draw.cxx
===================================================================
--- branches/branch-1.3/src/fl_draw.cxx 2008-11-06 22:30:14 UTC (rev 6500)
+++ branches/branch-1.3/src/fl_draw.cxx 2008-11-06 22:36:01 UTC (rev 6501)
@@ -48,21 +48,14 @@
 
 static char* underline_at;
 
-// Copy p to buf, replacing unprintable characters with ^X and \nnn
-// Stop at a newline or if MAXBUF characters written to buffer.
-// Also word-wrap if width exceeds maxw.
-// Returns a pointer to the start of the next line of caharcters.
-// Sets n to the number of characters put into the buffer.
-// Sets width to the width of the string in the current font.
-
-#define C_IN(c,a,b) ((c)>=(a) && (c)<=(b)) 
-#define C_UTF8(c)   C_IN(c,0x80,0xBF)
-
 /** 
     utf8 multibyte char seq. detection an pass-thru routine.
     \retval false if no utf8 seq detected, no change made. true if utf8 and d 
copied with s seq.
     note that for n bytes copied dest incremented of n, but s of n-1 for 
compatible loop use see below.
 */
+#define C_IN(c,a,b) ((c)>=(a) && (c)<=(b)) 
+#define C_UTF8(c)   C_IN(c,0x80,0xBF)
+
 static bool handle_utf8_seq(const char * &s,char * &d) {
   register const unsigned char* p=(const unsigned char*)s;
   if (p[0] < 0xc2 || p[0] > 0xf4)
@@ -102,12 +95,20 @@
     d+=4; s+=3;
     // planes 16
   } else { // non utf8 compliant, maybe CP125x or broken utf8 string
-    fprintf(stderr, "Not UTF8 char \n");
+    // fprintf(stderr, "Not UTF8 char \n");
     return false; 
   }
   return true; //  we did handled and copied the utf8 multibyte char seq.
 }
 
+/**
+ Copy \a from  to \a buf, replacing unprintable characters with ^X and \nnn
+ Stop at a newline or if MAXBUF characters written to buffer.
+ Also word-wrap if width exceeds maxw.
+ Returns a pointer to the start of the next line of caharcters.
+ Sets n to the number of characters put into the buffer.
+ Sets width to the width of the string in the current font.
+*/
 const char*
 fl_expand_text(const char* from, char* buf, int maxbuf, double maxw, int& n, 
        double &width, int wrap, int draw_symbols) {

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to