jcs
/subtext
/amendments
/316
bile: Make bile_write_map public
jcs made amendment 316 about 1 year ago
--- bile.c Thu Feb 16 14:28:29 2023
+++ bile.c Thu Feb 23 14:47:37 2023
@@ -30,7 +30,6 @@ struct bile_object * bile_object_in_map(struct bile *b
const OSType type, const unsigned long id);
short bile_read_map(struct bile *bile,
struct bile_object *map_ptr);
-short bile_write_map(struct bile *bile);
size_t bile_xwriteat(struct bile *bile, const size_t pos,
const void *data, const size_t len);
void bile_check_sanity(struct bile *bile);
@@ -233,7 +232,7 @@ bile_flush(struct bile *bile, bool and_vol)
short ret;
bile_check_sanity(bile);
-
+
memset(&pb, 0, sizeof(pb));
pb.ioRefNum = bile->frefnum;
/* if we're not flushing the volume, write async */
--- bile.h Thu Feb 16 14:26:36 2023
+++ bile.h Thu Feb 23 14:47:52 2023
@@ -93,6 +93,7 @@ struct bile {
size_t file_size;
struct bile_object *map; /* array of bile_objects */
size_t nobjects;
+ bool dirty_map;
char magic[5];
};
@@ -109,6 +110,7 @@ struct bile * bile_create(const Str255 filename, sho
struct bile * bile_open(const Str255 filename, short vrefnum);
struct bile * bile_open_recover_map(const Str255 filename,
short vrefnum);
+short bile_write_map(struct bile *bile);
short bile_flush(struct bile *bile, bool and_vol);
void bile_close(struct bile *bile);