1 /* 2 * sauce.h 3 * Ansilove 4.1.5 4 * https://www.ansilove.org 5 * 6 * Copyright (c) 2011-2021 Stefan Vogt, Brian Cassidy, and Frederic Cambus 7 * All rights reserved. 8 * 9 * Ansilove is licensed under the BSD 2-Clause License. 10 * See LICENSE file for details. 11 */ 12 13 #ifndef SAUCE_H 14 #define SAUCE_H 15 16 #include <stdint.h> 17 #include <stdio.h> 18 19 /* sauce records */ 20 #define RECORD_SIZE 128 21 #define COMMENT_SIZE 64 22 #define SAUCE_ID "SAUCE" 23 #define COMMENT_ID "COMNT" 24 25 struct sauce { 26 char ID[6]; 27 char version[3]; 28 char title[36]; 29 char author[21]; 30 char group[21]; 31 char date[9]; 32 int32_t fileSize; 33 unsigned char dataType; 34 unsigned char fileType; 35 unsigned short tinfo1; 36 unsigned short tinfo2; 37 unsigned short tinfo3; 38 unsigned short tinfo4; 39 unsigned char comments; 40 unsigned char flags; 41 char tinfos[23]; 42 char **comment_lines; 43 }; 44 45 struct sauce *sauceReadFileName(char *); 46 struct sauce *sauceReadFile(FILE *); 47 void readRecord(FILE *, struct sauce *); 48 int readComments(FILE *, char **, int32_t); 49 50 #endif /* SAUCE_H */ 51