Revised getpldh(.., ..) - no malloc's

This commit is contained in:
_
2018-04-06 14:42:52 -07:00
parent a188a19d77
commit 95ffa588b1
3 changed files with 33 additions and 5 deletions

View File

@@ -2,20 +2,27 @@
#define DEVIL1PLD_H
#include <stdint.h>
#include <stdbool.h>
#pragma pack(push, 1)
struct PldHeader {
int32_t numOffset;
// array of numOffset elements
uint32_t *offsets; // <format=hex>
};
#pragma pack(pop)
// input: contents of the .pld file.
// allocates heap memory
struct PldHeader *getpldh(const char*);
//struct PldHeader *getpldh(const char*);
bool getpldh(struct PldHeader*, const char*);
// frees heap memory
void destroypldh(struct PldHeader*);
// input: a pld header struct.
void showpldh(struct PldHeader*);
void printpldh(struct PldHeader*);
#endif