ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

sauce.h (1063B)


      1 /*
      2  * sauce.h
      3  * Ansilove 4.1.6
      4  * https://www.ansilove.org
      5  *
      6  * Copyright (c) 2011-2022 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  * SPDX-License-Identifier: BSD-2-Clause
     13  */
     14 
     15 #ifndef SAUCE_H
     16 #define SAUCE_H
     17 
     18 #include <stdint.h>
     19 #include <stdio.h>
     20 
     21 /* sauce records */
     22 #define RECORD_SIZE  128
     23 #define COMMENT_SIZE 64
     24 #define SAUCE_ID     "SAUCE"
     25 #define COMMENT_ID   "COMNT"
     26 
     27 struct sauce {
     28 	char ID[6];
     29 	char version[3];
     30 	char title[36];
     31 	char author[21];
     32 	char group[21];
     33 	char date[9];
     34 	int32_t fileSize;
     35 	unsigned char dataType;
     36 	unsigned char fileType;
     37 	unsigned short tinfo1;
     38 	unsigned short tinfo2;
     39 	unsigned short tinfo3;
     40 	unsigned short tinfo4;
     41 	unsigned char comments;
     42 	unsigned char flags;
     43 	char tinfos[23];
     44 	char **comment_lines;
     45 };
     46 
     47 struct sauce	*sauceReadFileName(char *);
     48 struct sauce	*sauceReadFile(FILE *);
     49 void		 readRecord(FILE *, struct sauce *);
     50 int		 readComments(FILE *, char **, int32_t);
     51 
     52 #endif /* SAUCE_H */