diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2000-04-25 01:57:51 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2000-04-25 01:57:51 +0000 |
| commit | 9e3610c75f8ceeebb8e59db2c641f21082979856 (patch) | |
| tree | 4f482a4bc220c777ce509774d4737f3534ed41bf /fluid/code.cxx | |
| parent | aa102a4595e162cd0568746809cd6e18fbe20cfc (diff) | |
Bug fixes where I was getting the value from the input field instead of
the global pointer (caused random crashes.)
Now default to no file variable for catgets() mode, and declare and
initialize (as needed) a static _catalog variable when a global file
variable is not provided. The catalog name is the basename of the
fluid file (no .fl)...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/code.cxx')
| -rw-r--r-- | fluid/code.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/fluid/code.cxx b/fluid/code.cxx index d1ffcde91..fbed3ab3a 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -1,5 +1,5 @@ // -// "$Id: code.cxx,v 1.9.2.4 2000/04/24 18:22:50 mike Exp $" +// "$Id: code.cxx,v 1.9.2.5 2000/04/25 01:57:51 mike Exp $" // // Code output routines for the Fast Light Tool Kit (FLTK). // @@ -285,14 +285,16 @@ int write_code(const char *s, const char *t) { } write_declare("#include <FL/Fl.H>"); - if (i18n_type && i18n_include_input->value()[0]) { - if (i18n_include_input->value()[0] != '<' && - i18n_include_input->value()[0] != '\"') - write_c("#include \"%s\"\n", i18n_include_input->value()); + if (i18n_type && i18n_include[0]) { + if (i18n_include[0] != '<' && + i18n_include[0] != '\"') + write_c("#include \"%s\"\n", i18n_include); else - write_c("#include %s\n", i18n_include_input->value()); - if (i18n_type == 2) - write_c("extern nl_catd %s;\n", i18n_file_input->value()); + write_c("#include %s\n", i18n_include); + if (i18n_type == 2) { + if (i18n_file[0]) write_c("extern nl_catd %s;\n", i18n_file); + else write_c("static nl_catd _catalog = (nl_catd)-1;\n"); + } } if (t && include_H_from_C) write_c("#include \"%s\"\n", filename_name(t)); @@ -367,7 +369,7 @@ int write_strings(const char *sfile) { msgnum = 1; fprintf(fp, "$ generated by Fast Light User Interface Designer (fluid) version %.4f\n", FL_VERSION); - fprintf(fp, "$set %s\n", i18n_set_input->value()); + fprintf(fp, "$set %s\n", i18n_set); fputs("$quote \"\n", fp); for (p = Fl_Type::first; p; p = p->next) { @@ -397,5 +399,5 @@ void Fl_Type::write_code1() { void Fl_Type::write_code2() {} // -// End of "$Id: code.cxx,v 1.9.2.4 2000/04/24 18:22:50 mike Exp $". +// End of "$Id: code.cxx,v 1.9.2.5 2000/04/25 01:57:51 mike Exp $". // |
