projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b8ec5da
)
Changing Main.tix to <prog_name>.tix in the Hpc RTS
author
andy@galois.com
<unknown>
Wed, 25 Oct 2006 20:12:29 +0000
(20:12 +0000)
committer
andy@galois.com
<unknown>
Wed, 25 Oct 2006 20:12:29 +0000
(20:12 +0000)
rts/Hpc.c
patch
|
blob
|
history
diff --git
a/rts/Hpc.c
b/rts/Hpc.c
index
8e67ffc
..
b1b2608
100644
(file)
--- a/
rts/Hpc.c
+++ b/
rts/Hpc.c
@@
-10,6
+10,7
@@
#include <string.h>
#include <assert.h>
#include "HsFFI.h"
#include <string.h>
#include <assert.h>
#include "HsFFI.h"
+#include "Rts.h"
#include "Hpc.h"
/* This is the runtime support for the Haskell Program Coverage (hpc) toolkit,
#include "Hpc.h"
/* This is the runtime support for the Haskell Program Coverage (hpc) toolkit,
@@
-38,7
+39,7
@@
int totalTixes = 0; // total number of tix boxes.
-static char *tixFilename = "Main.tix";
+static char *tixFilename;
static void failure(char *msg) {
printf("Hpc failure: %s\n",msg);
static void failure(char *msg) {
printf("Hpc failure: %s\n",msg);
@@
-104,6
+105,10
@@
static void hpc_init(void) {
}
hpc_inited = 1;
}
hpc_inited = 1;
+
+ tixFilename = (char *) malloc(strlen(prog_name) + 6);
+ sprintf(tixFilename, "%s.tix", prog_name);
+
if (init_open(tixFilename)) {
totalTixes = 0;
if (init_open(tixFilename)) {
totalTixes = 0;