diff --git a/README.md b/README.md index c6ef7ec..de853d9 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ The output of this example program when running it with an uncompressed tar arch ## Functions ### minitar_open -`struct minitar* minitar_open(const char* filename)` +`struct minitar* minitar_open(const char* pathname)` Opens a tar archive for reading, and returns a heap-allocated `struct minitar` which must be freed with `minitar_close()` after using it. If opening the file or allocating the struct fails, returns NULL. diff --git a/src/tar.c b/src/tar.c index 8e71332..aa41f44 100644 --- a/src/tar.c +++ b/src/tar.c @@ -4,15 +4,15 @@ #include #include -int minitar_read_header(struct minitar* mp, struct tar_header* hdr); -int minitar_validate_header(struct tar_header* hdr); -void minitar_parse_tar_header(struct tar_header* hdr, struct minitar_entry_metadata* metadata); -struct minitar_entry* minitar_dup_entry(struct minitar_entry* original); -char* minitar_read_file(struct minitar_entry_metadata* metadata, struct minitar* mp); +int minitar_read_header(struct minitar*, struct tar_header*); +int minitar_validate_header(struct tar_header*); +void minitar_parse_tar_header(struct tar_header*, struct minitar_entry_metadata*); +struct minitar_entry* minitar_dup_entry(struct minitar_entry*); +char* minitar_read_file(struct minitar_entry_metadata*, struct minitar*); -struct minitar* minitar_open(const char* path) +struct minitar* minitar_open(const char* pathname) { - FILE* fp = fopen(path, "rb"); // On some systems, this might be necessary to read the file properly. + FILE* fp = fopen(pathname, "rb"); // On some systems, this might be necessary to read the file properly. if (!fp) return NULL; struct minitar* mp = malloc(sizeof(struct minitar)); if (!mp)