From 9e3610c75f8ceeebb8e59db2c641f21082979856 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 25 Apr 2000 01:57:51 +0000 Subject: 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 --- fluid/Fl_Function_Type.cxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'fluid/Fl_Function_Type.cxx') diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx index 290f7389b..c757d197b 100644 --- a/fluid/Fl_Function_Type.cxx +++ b/fluid/Fl_Function_Type.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Function_Type.cxx,v 1.15.2.12 2000/02/05 09:20:44 bill Exp $" +// "$Id: Fl_Function_Type.cxx,v 1.15.2.13 2000/04/25 01:57:48 mike Exp $" // // C function type code for the Fast Light Tool Kit (FLTK). // @@ -30,6 +30,13 @@ #include #include +extern int i18n_type; +extern const char* i18n_include; +extern const char* i18n_function; +extern const char* i18n_file; +extern const char* i18n_set; +extern char i18n_program[]; + //////////////////////////////////////////////////////////////// // quick check of any C code for legality, returns an error message @@ -262,6 +269,11 @@ void Fl_Function_Type::write_code1() { } if (havewidgets) write_c(" %s* w;\n",subclassname(child)); indentation += 2; + + if (i18n_type == 2 && !i18n_file[0]) + // Initialize _catalog as needed... + write_c(" if (_catalog == (nl_catd)-1) _catalog = catopen(\"%s\", 0);\n", + i18n_program); } void Fl_Function_Type::write_code2() { @@ -665,5 +677,5 @@ void Fl_Class_Type::write_code2() { } // -// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.12 2000/02/05 09:20:44 bill Exp $". +// End of "$Id: Fl_Function_Type.cxx,v 1.15.2.13 2000/04/25 01:57:48 mike Exp $". // -- cgit v1.2.3