diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-11-25 16:59:05 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-11-25 16:59:05 +0000 |
| commit | db1205b420680cd6ee13372628cb4bbbb06f1e06 (patch) | |
| tree | 37e46db0f41115681a89211910cf20186a6e60ac /fluid | |
| parent | a7d3bafa5a7dc68595650ad70389a8baeac982bf (diff) | |
Added check for arrays in initialization - if so, use {(Fl_xyz *)0}...
git-svn-id: file:///fltk/svn/fltk/trunk@104 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index 8a8634b58..969da22da 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Widget_Type.cxx,v 1.8 1998/11/25 13:18:47 mike Exp $" +// "$Id: Fl_Widget_Type.cxx,v 1.9 1998/11/25 16:59:05 mike Exp $" // // Widget type code for the Fast Light Tool Kit (FLTK). // @@ -1210,7 +1210,8 @@ void Fl_Widget_Type::write_static() { write_c("\n"); if (!public_) write_c("static "); else write_h("extern %s *%s;\n", t, c); - write_c("%s *%s=(%s *)0;\n", t, c, t); + if (strchr(c, '[') == NULL) write_c("%s *%s=(%s *)0;\n", t, c, t); + else write_c("%s *%s={(%s *)0};\n", t, c, t); } if (callback() && !is_name(callback())) { // see if 'o' or 'v' used, to prevent unused argument warnings: @@ -1700,5 +1701,5 @@ int Fl_Widget_Type::read_fdesign(const char* name, const char* value) { } // -// End of "$Id: Fl_Widget_Type.cxx,v 1.8 1998/11/25 13:18:47 mike Exp $". +// End of "$Id: Fl_Widget_Type.cxx,v 1.9 1998/11/25 16:59:05 mike Exp $". // |
