From 972845e2ecba5a46e33ad25934399d50bd63bdca Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Sun, 5 Apr 2026 21:40:09 -0400 Subject: feat: Function to write tags by themselves Added a function to write tags by themselves as a shorthand since writing tags only is useful. --- example/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example/main.c') diff --git a/example/main.c b/example/main.c index ef7e0dd..15ac62e 100644 --- a/example/main.c +++ b/example/main.c @@ -70,7 +70,7 @@ void write_int_array(FILE *fp) { array.type = miMATRIX; array.size = 80; - fwrite((void *)&array, 1, sizeof(array), fp); + write_tag(fp, array); write_data(fp, flags_data); write_data(fp, dim_data); write_small_data(fp, name); @@ -113,7 +113,7 @@ void write_double_array(FILE *fp) { array.type = miMATRIX; array.size = 96; - fwrite((void *)&array, 1, sizeof(array), fp); + write_tag(fp, array); write_data(fp, flags_data); write_data(fp, dim_data); write_data(fp, name); -- cgit v1.2.3