Author: matt
Date: 2010-11-12 07:55:09 -0800 (Fri, 12 Nov 2010)
New Revision: 7823
Log:
Applied Domingo's suggestion for formatted Fluid output

Modified:
   branches/branch-1.3/fluid/Fl_Function_Type.cxx
   branches/branch-1.3/test/preferences.fl

Modified: branches/branch-1.3/fluid/Fl_Function_Type.cxx
===================================================================
--- branches/branch-1.3/fluid/Fl_Function_Type.cxx      2010-11-12 11:55:10 UTC 
(rev 7822)
+++ branches/branch-1.3/fluid/Fl_Function_Type.cxx      2010-11-12 15:55:09 UTC 
(rev 7823)
@@ -471,7 +471,15 @@
 void Fl_Code_Type::write_code1() {
   const char* c = name();
   if (!c) return;
-  write_c("%s%s\n", indent(), c);
+  char *pch;
+  const char *ind = indent();
+  while( (pch=strchr(c,'\n')) )
+  {
+    int line_len = pch - c;
+    write_c("%s%.*s\n", ind, line_len, c);
+    c = pch+1;
+  }
+  write_c("%s%s\n", ind, c);
 }
 
 void Fl_Code_Type::write_code2() {}

Modified: branches/branch-1.3/test/preferences.fl
===================================================================
--- branches/branch-1.3/test/preferences.fl     2010-11-12 11:55:10 UTC (rev 
7822)
+++ branches/branch-1.3/test/preferences.fl     2010-11-12 15:55:09 UTC (rev 
7823)
@@ -31,7 +31,7 @@
 Function {saveAndCloseWindowCB( Fl_Widget*, void* )} {open private return_type 
void
 } {
   code {writePrefs();
-  Fl::delete_widget(myWindow);} {}
+Fl::delete_widget(myWindow);} {}
 } 
 
 Function {} {open return_type int
@@ -180,7 +180,7 @@
         xywh {175 185 70 20} type Horizontal align 8 minimum 2 maximum 6 value 
3.1
       }
       Fl_Input wPaper {
-        label {Newspaper:} selected
+        label {Newspaper:}
         xywh {165 225 105 20} align 5
       }
     }
@@ -321,7 +321,8 @@
     fl_message( "Assertion failed:\\nNot all group entries were found!" );
 
   /* sample code only: */
-    unsigned int hex = 0x2387efcd;
-    eat.set( "binFoo", (void*)&hex, sizeof( unsigned int ) );
-  eat.set( "binFoo2", (void*)&writePrefs, 256 );} {}
+  unsigned int hex = 0x2387efcd;
+  eat.set( "binFoo", (void*)&hex, sizeof( unsigned int ) );
+  eat.set( "binFoo2", (void*)&writePrefs, 256 );} {selected
+  }
 } 

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

Reply via email to