summaryrefslogtreecommitdiff
path: root/fluid/Fl_Function_Type.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-11-25 13:18:47 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-11-25 13:18:47 +0000
commitdf0ec236033550fc0cc5f33212f5ce518bad2498 (patch)
tree0a16569f860c6e57f3ef9c8e11de643b818e6875 /fluid/Fl_Function_Type.cxx
parent90a6a06b7f47aa8ed1cca8f756892fd37faf8f3e (diff)
Added class/return value fixes from Bill.
git-svn-id: file:///fltk/svn/fltk/trunk@101 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/Fl_Function_Type.cxx')
-rw-r--r--fluid/Fl_Function_Type.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx
index 1967995b9..9edd4a9dd 100644
--- a/fluid/Fl_Function_Type.cxx
+++ b/fluid/Fl_Function_Type.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Function_Type.cxx,v 1.5 1998/10/21 16:28:52 mike Exp $"
+// "$Id: Fl_Function_Type.cxx,v 1.6 1998/11/25 13:18:46 mike Exp $"
//
// C function type code for the Fast Light Tool Kit (FLTK).
//
@@ -183,11 +183,9 @@ void Fl_Function_Type::write_code1() {
constructor=0;
havewidgets = 0;
Fl_Type *child;
- const char* widget_type = 0;
for (child = next; child && child->level > level; child = child->next)
if (child->is_widget()) {
havewidgets = 1;
- widget_type = subclassname(child);
break;
}
write_c("\n");
@@ -195,9 +193,8 @@ void Fl_Function_Type::write_code1() {
write_c("int main(int argc, char **argv) {\n");
else {
const char* t = return_type;
- const char* star = "";
if (!t) {
- if (havewidgets) {t = widget_type; star = "*";}
+ if (havewidgets) t = "Fl_Window*";
else t = "void";
}
const char* k = class_name();
@@ -210,16 +207,16 @@ void Fl_Function_Type::write_code1() {
if (n == strlen(k) && !strncmp(name(), k, n)) constructor = 1;
}
write_h(" ");
- if (!constructor) {write_h("%s%s ", t, star); write_c("%s%s ", t,star);}
+ if (!constructor) {write_h("%s ", t); write_c("%s ", t);}
write_h("%s;\n", name());
write_c("%s::%s {\n", k, name());
} else {
- if (public_) write_h("%s%s %s;\n", t, star, name());
+ if (public_) write_h("%s %s;\n", t, name());
else write_c("static ");
- write_c("%s%s %s {\n", t, star, name());
+ write_c("%s %s {\n", t, name());
}
}
- if (havewidgets) write_c(" %s* w;\n", widget_type);
+ if (havewidgets) write_c(" Fl_Window* w;\n");
indentation += 2;
}
@@ -688,5 +685,5 @@ void Fl_Class_Type::write_code2() {
}
//
-// End of "$Id: Fl_Function_Type.cxx,v 1.5 1998/10/21 16:28:52 mike Exp $".
+// End of "$Id: Fl_Function_Type.cxx,v 1.6 1998/11/25 13:18:46 mike Exp $".
//