X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=babel%2Fzcode.c;fp=babel%2Fzcode.c;h=0000000000000000000000000000000000000000;hb=3c59ba5eef5cb4d39c06eb7f523b9c3b026bdc9b;hp=fb1d6bab642820b38afd70e94851196e6554fb73;hpb=ed91d840318ed6ebfe3a5a77fa17114ddbf56640;p=projects%2Fchimara%2Fchimara.git diff --git a/babel/zcode.c b/babel/zcode.c deleted file mode 100644 index fb1d6ba..0000000 --- a/babel/zcode.c +++ /dev/null @@ -1,97 +0,0 @@ -/* zcode.c Treaty of Babel module for Z-code files - * 2006 By L. Ross Raszewski - * - * This file depends on treaty_builder.h - * - * This file is public domain, but note that any changes to this file - * may render it noncompliant with the Treaty of Babel - */ - -#define FORMAT zcode -#define HOME_PAGE "http://www.inform-fiction.org" -#define FORMAT_EXT ".z3,.z4,.z5,.z6,.z7,.z8" -#define NO_METADATA -#define NO_COVER -#define CUSTOM_EXTENSION -#include "treaty_builder.h" -#include -#include - -static int32 get_story_file_IFID(void *story_file, int32 extent, char *output, int32 output_extent) -{ - int32 i,j; - char ser[7]; - char buffer[32]; - - - if (extent<0x1D) return INVALID_STORY_FILE_RV; - memcpy(ser, (char *) story_file+0x12, 6); - ser[6]=0; - /* Detect vintage story files */ - if (!(ser[0]=='8' || ser[0]=='9' || - (ser[0]=='0' && ser[1]>='0' && ser[1]<='5'))) - { - for(i=0;i 8 - ) return INVALID_STORY_FILE_RV; - for(i=4;i<=14;i+=2) - { - j=read_zint(sf+i); - if (j>extent || j < 0x40) return INVALID_STORY_FILE_RV; - } - - return VALID_STORY_FILE_RV; -} -static int32 get_story_file_extension(void *sf, int32 extent, char *out, int32 output_extent) -{ - int v; - if (!extent) return INVALID_STORY_FILE_RV; - v= ((char *) sf)[0]; - if (v>9) ASSERT_OUTPUT_SIZE(5); - else ASSERT_OUTPUT_SIZE(4); - sprintf(out,".z%d",v); - return 3+(v>9); - -}