mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2025-05-31 14:11:42 +05:30
Revised getpldh(.., ..) - no malloc's
This commit is contained in:
12
test/main.c
12
test/main.c
@@ -74,7 +74,7 @@ char *loadfile(const char *fname, unsigned int *s) {
|
||||
return buf;
|
||||
}
|
||||
|
||||
bool unpackpld (const char *filedata,
|
||||
/* bool unpackpld (const char *filedata,
|
||||
unsigned int filesize,
|
||||
const char *filename) {
|
||||
bool status = false;
|
||||
@@ -86,6 +86,16 @@ bool unpackpld (const char *filedata,
|
||||
status = true;
|
||||
}
|
||||
return status;
|
||||
} */
|
||||
|
||||
bool unpackpld(const char *filedata,
|
||||
unsigned int filesize,
|
||||
const char *filename) {
|
||||
struct PldHeader h;
|
||||
if (filedata != NULL && filesize > 0) {
|
||||
getpldh(&h, filedata);
|
||||
printpldh(&h);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
|
||||
Reference in New Issue
Block a user