| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
#define FORMAT tads3 |
| 16 |
#define HOME_PAGE "http://www.tads.org" |
| 17 |
#define FORMAT_EXT ".t3" |
| 18 |
|
| 19 |
|
| 20 |
#include "treaty_builder.h" |
| 21 |
#include "tads.h" |
| 22 |
|
| 23 |
#define T3_SIGNATURE "T3-image\015\012\032" |
| 24 |
|
| 25 |
#ifndef FALSE |
| 26 |
#define FALSE 0 |
| 27 |
#endif |
| 28 |
#ifndef TRUE |
| 29 |
#define TRUE 1 |
| 30 |
#endif |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
static int32 get_story_file_IFID(void *story_file, int32 extent, |
| 36 |
char *output, int32 output_extent) |
| 37 |
{ |
| 38 |
|
| 39 |
return tads_get_story_file_IFID(story_file, extent, |
| 40 |
output, output_extent); |
| 41 |
} |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
static int32 claim_story_file(void *story_file, int32 extent) |
| 47 |
{ |
| 48 |
|
| 49 |
if (tads_match_sig(story_file, extent, T3_SIGNATURE)) |
| 50 |
return VALID_STORY_FILE_RV; |
| 51 |
|
| 52 |
|
| 53 |
return INVALID_STORY_FILE_RV; |
| 54 |
} |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
static int32 get_story_file_metadata_extent(void *story_file, int32 extent) |
| 60 |
{ |
| 61 |
|
| 62 |
return tads_get_story_file_metadata_extent(story_file, extent); |
| 63 |
} |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
static int32 get_story_file_metadata(void *story_file, int32 extent, |
| 69 |
char *buf, int32 bufsize) |
| 70 |
{ |
| 71 |
|
| 72 |
return tads_get_story_file_metadata(story_file, extent, buf, bufsize); |
| 73 |
} |
| 74 |
|
| 75 |
static int32 get_story_file_cover_extent(void *story_file, int32 story_len) |
| 76 |
{ |
| 77 |
|
| 78 |
return tads_get_story_file_cover_extent(story_file, story_len); |
| 79 |
} |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
static int32 get_story_file_cover_format(void *story_file, int32 story_len) |
| 85 |
{ |
| 86 |
|
| 87 |
return tads_get_story_file_cover_format(story_file, story_len); |
| 88 |
} |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
static int32 get_story_file_cover(void *story_file, int32 story_len, |
| 94 |
void *outbuf, int32 output_extent) |
| 95 |
{ |
| 96 |
|
| 97 |
return tads_get_story_file_cover(story_file, story_len, |
| 98 |
outbuf, output_extent); |
| 99 |
} |
| 100 |
|