summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-02-01 17:30:28 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-02-01 17:30:28 +0000
commit7eae5f4f873fc3911bf8ee3556391e89b1ec597e (patch)
tree7ccf70334322e4982768a77a1e08daa2ec30b36c
parent4fb627c3d81a7574490d2e9fa1f1af60979deafa (diff)
Use GetTempPath() under WIN32 for the clipboard file location.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1365 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES3
-rw-r--r--fluid/fluid.cxx14
2 files changed, 14 insertions, 3 deletions
diff --git a/CHANGES b/CHANGES
index fd10de1d5..a95744460 100644
--- a/CHANGES
+++ b/CHANGES
@@ -25,6 +25,9 @@ CHANGES SINCE FLTK 1.0.10
- Fl::flush() now calls GdiFlush() under WIN32 to
ensure that all graphics are drawn.
+ - FLUID now uses GetTempPath() under WIN32 to determine
+ where to store the clipboard.
+
CHANGES SINCE FLTK 1.0.9
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index 7fa063de7..70ade32d7 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fluid.cxx,v 1.15.2.11 2001/01/28 06:57:33 spitzak Exp $"
+// "$Id: fluid.cxx,v 1.15.2.12 2001/02/01 17:30:28 easysw Exp $"
//
// FLUID main entry for the Fast Light Tool Kit (FLTK).
//
@@ -251,7 +251,15 @@ static int ipasteoffset;
static char* cutfname() {
#ifdef WIN32
- return "\\.fluid_cut_buffer";
+ static char name[MAX_PATH+16] = "";
+
+ if (!name[0]) {
+ if (!GetTempPath(sizeof(name), name)) strcpy(name,"\\"); // failure
+
+ strcat(name, ".fluidcutbuffer");
+ }
+
+ return name;
#else
static char name[256] = "~/.fluid_cut_buffer";
static char beenhere;
@@ -465,5 +473,5 @@ int main(int argc,char **argv) {
}
//
-// End of "$Id: fluid.cxx,v 1.15.2.11 2001/01/28 06:57:33 spitzak Exp $".
+// End of "$Id: fluid.cxx,v 1.15.2.12 2001/02/01 17:30:28 easysw Exp $".
//