From 2e38007d1f1d6b13ad0ba5303bf58169ffb8da27 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 5 Sep 2023 15:11:09 +0200 Subject: FLUID: increases readability - removed some direct filename manipulation - central place to generate file names and paths - fixes command line filename override if no actual batch command is given --- fluid/code.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fluid/code.cxx') diff --git a/fluid/code.cxx b/fluid/code.cxx index 7a3725ee0..561d6fca7 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -44,14 +44,14 @@ int is_id(char c) { } /** - Write a file that contains all label and tooltip strings for internationalization. + Write a file that contains all label and tooltip strings for internationalisation. */ -int write_strings(const char *sfile) { - FILE *fp = fl_fopen(sfile, "w"); +int write_strings(const Fl_String &filename) { Fl_Type *p; Fl_Widget_Type *w; int i; + FILE *fp = fl_fopen(filename.c_str(), "w"); if (!fp) return 1; switch (g_project.i18n_type) { @@ -799,7 +799,7 @@ int Fd_Code_Writer::write_code(const char *s, const char *t, bool to_sourceview) write_c("// Initialize I18N stuff now for menus...\n"); write_c("#%sinclude \n", indent()); write_c("static char *_locale = setlocale(LC_MESSAGES, \"\");\n"); - write_c("static nl_catd _catalog = catopen(\"%s\", 0);\n", g_project.basename.c_str()); + write_c("static nl_catd _catalog = catopen(\"%s\", 0);\n", g_project.basename().c_str()); } } if (conditional) { -- cgit v1.2.3