summaryrefslogtreecommitdiff
path: root/src/status.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-02-05 19:22:46 +0100
committerBardur Arantsson <bardur@scientician.net>2016-02-05 19:22:46 +0100
commitb1a9e6028d66a47a5205225401db312c929b089c (patch)
tree902c8c548f9c366423d4baf50fb1266b1ae67ba8 /src/status.cc
parent5fd7124695ff1a3f8a6e019dc301ed48e5e067d4 (diff)
Remove path_temp in favor of boost::fs::unique_path()
This gets rid of one #ifdef WINDOWS hack at least.
Diffstat (limited to 'src/status.cc')
-rw-r--r--src/status.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/status.cc b/src/status.cc
index 0a3977c7..67c23468 100644
--- a/src/status.cc
+++ b/src/status.cc
@@ -27,6 +27,9 @@
#include "variable.hpp"
#include "xtra1.hpp"
+#include <boost/filesystem.hpp>
+#include <string>
+
static void row_trival(const char*, s16b, u32b, s16b, u32b, int, u32b[INVEN_TOTAL - INVEN_WIELD + 2][7]);
static void row_bival(const char*, s16b, u32b, int, u32b[INVEN_TOTAL - INVEN_WIELD + 2][7]);
static void row_npval(const char*, s16b, u32b, int, u32b[INVEN_TOTAL - INVEN_WIELD + 2][7]);
@@ -722,17 +725,14 @@ static void status_companion(void)
{
int i;
- FILE *fff;
-
- char file_name[1024];
-
Term_clear();
/* Temporary file */
- if (path_temp(file_name, 1024)) return;
+ auto const file_name_p = boost::filesystem::unique_path();
+ auto const file_name = file_name_p.c_str();
/* Open a new file */
- fff = my_fopen(file_name, "w");
+ FILE *fff = my_fopen(file_name, "w");
/* Calculate companions */
/* Process the monsters (backwards) */