STR 3210: be smarter about appending ';' in callbacks

This commit is contained in:
Matthias Melcher 2021-12-09 22:37:57 +01:00
parent c175d1276d
commit a4b6175dbe
2 changed files with 2 additions and 2 deletions

View File

@ -210,7 +210,7 @@ void Fl_Menu_Item_Type::write_static() {
if (use_v) write_c(" v");
write_c(") {\n");
write_c_indented(callback());
if (*(d-1) != ';') {
if (*(d-1) != ';' && *(d-1) != '}') {
const char *p = strrchr(callback(), '\n');
if (p) p ++;
else p = callback();

View File

@ -2055,7 +2055,7 @@ void Fl_Widget_Type::write_static() {
if (use_v) write_c(" v");
write_c(") {\n");
write_c_indented(callback());
if (*(d-1) != ';') {
if (*(d-1) != ';' && *(d-1) != '}') {
const char *p = strrchr(callback(), '\n');
if (p) p ++;
else p = callback();