diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-03-04 18:10:01 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1999-03-04 18:10:01 +0000 |
| commit | 2f0f075d4f9ac0178a0243647f5df84ed611ff84 (patch) | |
| tree | 210b0afb93ac01cae334dd622627f0c473ac3178 /fluid | |
| parent | 516ed80d974a63dcbd13799b6077875f64056359 (diff) | |
Fixed FLUID bug - can now override code and header file names from the
command-line properly.
git-svn-id: file:///fltk/svn/fltk/trunk@360 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/file.cxx | 13 | ||||
| -rw-r--r-- | fluid/fluid.cxx | 21 |
2 files changed, 24 insertions, 10 deletions
diff --git a/fluid/file.cxx b/fluid/file.cxx index ce8347b42..a1f90601b 100644 --- a/fluid/file.cxx +++ b/fluid/file.cxx @@ -1,5 +1,5 @@ // -// "$Id: file.cxx,v 1.6 1999/01/07 19:17:13 mike Exp $" +// "$Id: file.cxx,v 1.7 1999/03/04 18:10:00 mike Exp $" // // Fluid file routines for the Fast Light Tool Kit (FLTK). // @@ -311,6 +311,9 @@ static struct {const char* name; int* value;} inttable[] = { {"snap", &snap} }; + +extern int header_file_set; +extern int code_file_set; extern const char* header_file_name; extern const char* code_file_name; @@ -393,12 +396,14 @@ static void read_children(Fl_Type *p, int paste) { goto CONTINUE; } if (!strcmp(c,"header_name")) { - header_file_name = strdup(read_word()); + if (!header_file_set) header_file_name = strdup(read_word()); + else read_word(); goto CONTINUE; } if (!strcmp(c,"code_name")) { - code_file_name = strdup(read_word()); + if (!code_file_set) code_file_name = strdup(read_word()); + else read_word(); goto CONTINUE; } @@ -587,5 +592,5 @@ void read_fdesign() { } // -// End of "$Id: file.cxx,v 1.6 1999/01/07 19:17:13 mike Exp $". +// End of "$Id: file.cxx,v 1.7 1999/03/04 18:10:00 mike Exp $". // diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 3966d1722..6bdf95b92 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1,5 +1,5 @@ // -// "$Id: fluid.cxx,v 1.13 1999/01/26 21:40:28 mike Exp $" +// "$Id: fluid.cxx,v 1.14 1999/03/04 18:10:01 mike Exp $" // // FLUID main entry for the Fast Light Tool Kit (FLTK). // @@ -148,8 +148,9 @@ void new_cb(Fl_Widget *, void *v) { modflag = 0; } -static int compile_only; - +static int compile_only = 0; +int header_file_set = 0; +int code_file_set = 0; const char* header_file_name = ".h"; const char* code_file_name = ".cxx"; @@ -347,9 +348,17 @@ void set_filename(const char *c) { static int arg(int argc, char** argv, int& i) { if (argv[i][1] == 'c' && !argv[i][2]) {compile_only = 1; i++; return 1;} if (argv[i][1] == 'o' && !argv[i][2] && i+1 < argc) { - code_file_name = argv[i+1]; i += 2; return 2;} + code_file_name = argv[i+1]; + code_file_set = 1; + i += 2; + return 2; + } if (argv[i][1] == 'h' && !argv[i][2]) { - header_file_name = argv[i+1]; i += 2; return 2;} + header_file_name = argv[i+1]; + header_file_set = 1; + i += 2; + return 2; + } return 0; } @@ -407,5 +416,5 @@ int main(int argc,char **argv) { } // -// End of "$Id: fluid.cxx,v 1.13 1999/01/26 21:40:28 mike Exp $". +// End of "$Id: fluid.cxx,v 1.14 1999/03/04 18:10:01 mike Exp $". // |
