summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beutil.c
diff options
context:
space:
mode:
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>2007-05-02 00:49:43 +0200
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>2007-05-02 00:49:43 +0200
commitd1de7107f847963fbce099597e6c42c2371b053c (patch)
tree592a726d5cc1fdf8518e4feb40551173a846ba52 /ir/be/beutil.c
parent232b108d326a2db9d6fb4c78e2fcf86d4c36a937 (diff)
removed useless includes
[r13572]
Diffstat (limited to 'ir/be/beutil.c')
-rw-r--r--ir/be/beutil.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ir/be/beutil.c b/ir/be/beutil.c
index ef9ce6d..ee4506c 100644
--- a/ir/be/beutil.c
+++ b/ir/be/beutil.c
@@ -269,3 +269,16 @@ ir_node *be_get_Proj_for_pn(const ir_node *irn, long pn) {
return NULL;
}
+
+FILE *be_ffopen(const char *base, const char *ext, const char *mode) {
+ FILE *out;
+ char buf[1024];
+
+ snprintf(buf, sizeof(buf), "%s.%s", base, ext);
+ buf[sizeof(buf) - 1] = '\0';
+ if (! (out = fopen(buf, mode))) {
+ fprintf(stderr, "Cannot open file %s in mode %s\n", buf, mode);
+ return NULL;
+ }
+ return out;
+}