From 2e3037f89585be11dfa91a4e692ef71bc72ab885 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 12 Nov 2010 15:55:09 +0000 Subject: Applied Domingo's suggestion for formatted Fluid output git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7823 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/Fl_Function_Type.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'fluid') diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx index 75effe86e..3fe229f7f 100644 --- a/fluid/Fl_Function_Type.cxx +++ b/fluid/Fl_Function_Type.cxx @@ -471,7 +471,15 @@ Fl_Code_Type Fl_Code_type; 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() {} -- cgit v1.2.3