From 489f3d421c525123baabd021da9a546b4f100d80 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Fri, 29 May 2009 21:25:51 +0000 Subject: Changed .ktest header from BOUT\n to KTEST. Old .bout files can still be read. Increased KTEST version. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72592 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/KTest.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/Basic') diff --git a/lib/Basic/KTest.cpp b/lib/Basic/KTest.cpp index d17916f5..0e8c545c 100644 --- a/lib/Basic/KTest.cpp +++ b/lib/Basic/KTest.cpp @@ -13,9 +13,12 @@ #include #include -#define KTEST_MAGIC "BOUT\n" +#define KTEST_VERSION 3 #define KTEST_MAGIC_SIZE 5 -#define KTEST_VERSION 2 +#define KTEST_MAGIC "KTEST" + +// for compatibility reasons +#define BOUT_MAGIC "BOUT\n" /***/ @@ -70,7 +73,8 @@ static int kTest_checkHeader(FILE *f) { char header[KTEST_MAGIC_SIZE]; if (fread(header, KTEST_MAGIC_SIZE, 1, f)!=1) return 0; - if (memcmp(header, KTEST_MAGIC, KTEST_MAGIC_SIZE)) + if (memcmp(header, KTEST_MAGIC, KTEST_MAGIC_SIZE) && + memcmp(header, BOUT_MAGIC, KTEST_MAGIC_SIZE)) return 0; return 1; } -- cgit 1.4.1