1 // This file is part of Golly. 2 // See docs/License.html for the copyright notice. 3 4 #ifndef READPATTERN_H 5 #define READPATTERN_H 6 #include "bigint.h" 7 class lifealgo ; 8 9 /* 10 * Read pattern file into given life algorithm implementation. 11 */ 12 const char *readpattern(const char *filename, lifealgo &imp) ; 13 14 /* 15 * Get next line from current pattern file. 16 */ 17 char *getline(char *line, int maxlinelen) ; 18 19 /* 20 * Similar to readpattern but we return the pattern edges 21 * (not necessarily the minimal bounding box; eg. if an 22 * RLE pattern is empty or has empty borders). 23 */ 24 const char *readclipboard(const char *filename, lifealgo &imp, 25 bigint *t, bigint *l, bigint *b, bigint *r) ; 26 27 /* 28 * Extract comments from pattern file and store in given buffer. 29 * It is the caller's job to free commptr when done (if not NULL). 30 */ 31 const char *readcomments(const char *filename, char **commptr) ; 32 33 #endif 34