diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-09-05 15:11:09 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-09-05 15:11:09 +0200 |
| commit | 2e38007d1f1d6b13ad0ba5303bf58169ffb8da27 (patch) | |
| tree | 830ca1910666e2a14a5d04da8df19ab2428fb014 /fluid/code.cxx | |
| parent | 6bb5a81cee7e76e8a4e69f7f49869f39c1c382f0 (diff) | |
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
Diffstat (limited to 'fluid/code.cxx')
| -rw-r--r-- | fluid/code.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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 <locale.h>\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) { |
