From 5a32aed258c6597e7ad24ade82c77df2e253f69c Mon Sep 17 00:00:00 2001 From: ponchio Date: Tue, 20 Jul 2004 14:06:02 +0000 Subject: [PATCH] Changed filename saving. --- apps/nexus/pchain.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/nexus/pchain.h b/apps/nexus/pchain.h index 16321873..46504cf0 100644 --- a/apps/nexus/pchain.h +++ b/apps/nexus/pchain.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.2 2004/06/25 16:47:13 ponchio +Various debug + Revision 1.1 2004/06/24 14:32:45 ponchio Moved from wrap/nexus @@ -67,7 +70,7 @@ template class PChain { return levels[level].Priority(level, p, key); } bool Save(const std::string &file) { - FILE *fp = fopen(file.c_str(), "wb+"); + FILE *fp = fopen((file + ".chn").c_str(), "wb+"); if(!fp) return false; int n = Levels(); fwrite(&n, sizeof(int), 1, fp); @@ -78,7 +81,7 @@ template class PChain { } bool Load(const std::string &file) { levels.clear(); - FILE *fp = fopen(file.c_str(), "rb"); + FILE *fp = fopen((file + ".chn").c_str(), "rb"); if(!fp) return false; int n; fread(&n, sizeof(int), 1, fp);