diff options
Diffstat (limited to 'fluid/code.cxx')
| -rw-r--r-- | fluid/code.cxx | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/fluid/code.cxx b/fluid/code.cxx index ba57ae8b8..52625b8e7 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -270,7 +270,7 @@ void write_cstring(const char *s, int length) { break; } // if the UTF-8 option is checked, write unicode characters verbatim - if (utf8_in_src && (c&0x80)) { + if (P.utf8_in_src && (c&0x80)) { if ((c&0x40)) { // This is the first character in a utf-8 sequence (0b11......). // A line break would be ok here. Do not put linebreak in front of @@ -584,47 +584,47 @@ int write_code(const char *s, const char *t) { fprintf(header_file, "#define %s\n", define_name); } - if (avoid_early_includes==0) { + if (P.avoid_early_includes==0) { write_declare("#include <FL/Fl.H>"); } - if (t && include_H_from_C) { - if (*header_file_name == '.' && strchr(header_file_name, '/') == NULL) { + if (t && P.include_H_from_C) { + if (P.header_file_name[0] == '.' && strchr(P.header_file_name, '/') == NULL) { write_c("#include \"%s\"\n", fl_filename_name(t)); } else { write_c("#include \"%s\"\n", t); } } - if (i18n_type && i18n_include[0]) { - int conditional = (i18n_conditional[0]!=0); + if (P.i18n_type && P.i18n_include[0]) { + int conditional = (P.i18n_conditional[0]!=0); if (conditional) { - write_c("#ifdef %s\n", i18n_conditional); + write_c("#ifdef %s\n", P.i18n_conditional.value()); indentation++; } - if (i18n_include[0] != '<' && - i18n_include[0] != '\"') - write_c("#%sinclude \"%s\"\n", indent(), i18n_include); + if (P.i18n_include[0] != '<' && + P.i18n_include[0] != '\"') + write_c("#%sinclude \"%s\"\n", indent(), P.i18n_include.value()); else - write_c("#%sinclude %s\n", indent(), i18n_include); - if (i18n_type == 2) { - if (i18n_file[0]) write_c("extern nl_catd %s;\n", i18n_file); - else { + write_c("#%sinclude %s\n", indent(), P.i18n_include.value()); + if (P.i18n_type == 2) { + if (P.i18n_file[0]) { + write_c("extern nl_catd %s;\n", P.i18n_file.value()); + } else { 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", - i18n_program); + write_c("static nl_catd _catalog = catopen(\"%s\", 0);\n", P.i18n_program); } } if (conditional) { write_c("#else\n"); - if (i18n_type == 1) { - if (i18n_function[0]) { - write_c("#%sifndef %s\n", indent(), i18n_function); - write_c("#%sdefine %s(text) text\n", indent_plus(1), i18n_function); + if (P.i18n_type == 1) { + if (P.i18n_function[0]) { + write_c("#%sifndef %s\n", indent(), P.i18n_function.value()); + write_c("#%sdefine %s(text) text\n", indent_plus(1), P.i18n_function.value()); write_c("#%sendif\n", indent()); } } - if (i18n_type == 2) { + if (P.i18n_type == 2) { write_c("#%sifndef catgets\n", indent()); write_c("#%sdefine catgets(catalog, set, msgid, text) text\n", indent_plus(1)); write_c("#%sendif\n", indent()); @@ -632,9 +632,9 @@ int write_code(const char *s, const char *t) { indentation--; write_c("#endif\n"); } - if (i18n_type == 1 && i18n_static_function[0]) { - write_c("#ifndef %s\n", i18n_static_function); - write_c("#%sdefine %s(text) text\n", indent_plus(1), i18n_static_function); + if (P.i18n_type == 1 && P.i18n_static_function[0]) { + write_c("#ifndef %s\n", P.i18n_static_function.value()); + write_c("#%sdefine %s(text) text\n", indent_plus(1), P.i18n_static_function.value()); write_c("#endif\n"); } } @@ -692,7 +692,7 @@ int write_strings(const char *sfile) { if (!fp) return 1; - switch (i18n_type) { + switch (P.i18n_type) { case 0 : /* None, just put static text out */ fprintf(fp, "# generated by Fast Light User Interface Designer (fluid) version %.4f\n", FL_VERSION); @@ -772,7 +772,7 @@ int write_strings(const char *sfile) { case 2 : /* POSIX catgets, put a .msg file out */ fprintf(fp, "$ generated by Fast Light User Interface Designer (fluid) version %.4f\n", FL_VERSION); - fprintf(fp, "$set %s\n", i18n_set); + fprintf(fp, "$set %s\n", P.i18n_set.value()); fputs("$quote \"\n", fp); for (i = 1, p = Fl_Type::first; p; p = p->next) { |
