summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>1999-03-09 06:59:05 +0000
committerBill Spitzak <spitzak@gmail.com>1999-03-09 06:59:05 +0000
commit95e27d43f117a9cdc8a6dace63c689d0017321e6 (patch)
tree2525da2f845914051896d8289ed5ba2fc49f59d2 /fluid
parenta28b4831777315246d24c008b013fc5911b8234a (diff)
Fix from Phil Nelson so that write-code menu item writes to the
directory the .fl file is in. git-svn-id: file:///fltk/svn/fltk/trunk@378 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
-rw-r--r--fluid/fluid.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index 6bdf95b92..02b9b0185 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fluid.cxx,v 1.14 1999/03/04 18:10:01 mike Exp $"
+// "$Id: fluid.cxx,v 1.15 1999/03/09 06:59:05 bill Exp $"
//
// FLUID main entry for the Fast Light Tool Kit (FLTK).
//
@@ -173,7 +173,9 @@ void write_cb(Fl_Widget *, void *) {
} else {
strcpy(hname, header_file_name);
}
+ if (!compile_only) goto_source_dir();
int x = write_code(cname,hname);
+ if (!compile_only) leave_source_dir();
strcat(cname, "/"); strcat(cname,header_file_name);
if (compile_only) {
if (!x) {fprintf(stderr,"%s : %s\n",cname,strerror(errno)); exit(1);}
@@ -416,5 +418,5 @@ int main(int argc,char **argv) {
}
//
-// End of "$Id: fluid.cxx,v 1.14 1999/03/04 18:10:01 mike Exp $".
+// End of "$Id: fluid.cxx,v 1.15 1999/03/09 06:59:05 bill Exp $".
//