mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 08:06:35 +08:00
Fixes from Bill:
- Fluid fixes for menu item numbering and adding of #define stuff to include file to prevent multiple inclusion. - Fixed contrast function (again). - Fixed fractals demo (not using glutMainLoop()... git-svn-id: file:///fltk/svn/fltk/trunk@232 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+14
-3
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: code.cxx,v 1.8 1999/01/07 19:17:13 mike Exp $"
|
||||
// "$Id: code.cxx,v 1.9 1999/01/19 19:10:38 mike Exp $"
|
||||
//
|
||||
// Code output routines for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@@ -255,8 +255,18 @@ int write_code(const char *s, const char *t) {
|
||||
// generated by Fast Light User Interface Designer (fluid) version %.2f\n\n";
|
||||
fprintf(header_file, hdr, FL_VERSION);
|
||||
fprintf(code_file, hdr, FL_VERSION);
|
||||
Fl_Type *p;
|
||||
|
||||
{char define_name[102];
|
||||
const char* a = filename_name(t);
|
||||
char* b = define_name;
|
||||
if (!isalpha(*a)) {*b++ = '_';}
|
||||
while (*a) {*b++ = isalnum(*a) ? *a : '_'; a++;}
|
||||
*b = 0;
|
||||
fprintf(header_file, "#ifndef %s\n", define_name);
|
||||
fprintf(header_file, "#define %s\n", define_name);
|
||||
}
|
||||
|
||||
Fl_Type *p;
|
||||
for (p = Fl_Type::first; p; p = p->next) p->write_declare();
|
||||
delete included_root; included_root = 0;
|
||||
|
||||
@@ -274,6 +284,7 @@ int write_code(const char *s, const char *t) {
|
||||
if (!s) return 1;
|
||||
int x = fclose(code_file);
|
||||
code_file = 0;
|
||||
fprintf(header_file, "#endif\n");
|
||||
int y = fclose(header_file);
|
||||
header_file = 0;
|
||||
return x >= 0 && y >= 0;
|
||||
@@ -290,5 +301,5 @@ void Fl_Type::write_code1() {
|
||||
void Fl_Type::write_code2() {}
|
||||
|
||||
//
|
||||
// End of "$Id: code.cxx,v 1.8 1999/01/07 19:17:13 mike Exp $".
|
||||
// End of "$Id: code.cxx,v 1.9 1999/01/19 19:10:38 mike Exp $".
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user