Syncing up before merging in cpasjuste changes in pxml
[pandora-libraries.git] / include / pnd_pndfiles.h
1
2 #ifndef h_pnd_pndfiles_h
3 #define h_pnd_pndfiles_h
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 // the filename of PND files must end with a well defined (case insensitive!) extension
10 #define PND_PACKAGE_FILEEXT ".pnd" /* case insensitive due to SD FAT fs */
11
12 // when seeking the PXML appended (or embedded within if they forgot to append it)
13 // to a PND file, this buffer size will be used in the seek. It'll actually under-seek
14 // a bit, so in the odd chance the "<PXML>" tag borders right on the window size, we'll
15 // still find it.
16 //   Being SD reads, it might be nice to pick a decent size .. SD is constant read regardless
17 // of read size for certain sizes, but of course strstr() within a giant buffer is no good
18 // either if the goods are near the end. How big is an average .png for an average icon
19 // size?
20 #define PND_PXML_WINDOW_SIZE 4096
21
22 // pnd_seek_pxml should vaguely work like fseek, trying to position at begin of the appended/found PXML
23 // On return of 0, assuming nothing.
24 // On 1, assume that the FILE pointer is positioned for next read to pull in the PXML line by line
25 unsigned char pnd_pnd_seek_pxml ( FILE *f );
26
27 #ifdef __cplusplus
28 } /* "C" */
29 #endif
30
31 #endif