From b4995f979d127cea667b4e2b71c91e9db4ab52ef Mon Sep 17 00:00:00 2001 From: maxim nikonov Date: Fri, 6 Feb 2026 18:12:40 +0500 Subject: wip --- src/Fl_Browser.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/Fl_Browser.cxx') diff --git a/src/Fl_Browser.cxx b/src/Fl_Browser.cxx index 9228529e2..b51397c08 100644 --- a/src/Fl_Browser.cxx +++ b/src/Fl_Browser.cxx @@ -58,7 +58,8 @@ struct FL_BLINE { // data is in a linked list of these Example of use: \code // Walk the browser from beginning to end - for ( void *i=item_first(); i; i=item_next(i) ) { + void *i; + for (i =item_first(); i; i=item_next(i) ) { printf("item label='%s'\n", item_text(i)); } \endcode @@ -88,7 +89,7 @@ void* Fl_Browser::item_prev(void* item) const {return ((FL_BLINE*)item)->prev;} Example of use: \code // Walk the browser in reverse, from end to start - for ( void *i=item_last(); i; i=item_prev(i) ) { + for (i =item_last(); i; i=item_prev(i) ) { printf("item label='%s'\n", item_text(i)); } \endcode @@ -372,7 +373,8 @@ int Fl_Browser::item_height(void *item) const { } else { const int* i = column_widths(); // do each column separately as they may all set different fonts: - for (char* str = l->txt; str && *str; str++) { + char *str; + for (str = l->txt; str && *str; str++) { Fl_Font font = textfont(); // default font int tsize = textsize(); // default size if ( format_char() ) { // can be NULL @@ -669,7 +671,8 @@ void Fl_Browser::textsize(Fl_Fontsize newSize) { new_list(); full_height_ = 0; if (lines == 0) return; - for (FL_BLINE* itm=(FL_BLINE *)item_first(); itm; itm=(FL_BLINE *)item_next(itm)) { + FL_BLINE *itm; + for (itm =(FL_BLINE *)item_first(); itm; itm=(FL_BLINE *)item_next(itm)) { full_height_ += item_height(itm) + linespacing(); } } @@ -679,7 +682,8 @@ void Fl_Browser::textsize(Fl_Fontsize newSize) { \see add(), insert(), remove(), swap(int,int), clear() */ void Fl_Browser::clear() { - for (FL_BLINE* l = first; l;) { + FL_BLINE *l; + for (l = first; l;) { FL_BLINE* n = l->next; free(l); l = n; -- cgit v1.2.3