Switch from GPLv2 to GPLv2+
[fw/altos] / ao-tools / lib / ao-hex.h
index 8528eb458689b2ebc615d18a3dd11d0534eca289..3cd0813b7fdacffd1a0262c3126192acb1a41a5c 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,6 +20,8 @@
 #define _AO_HEX_H_
 
 #include <stdint.h>
+#include <stdbool.h>
+#include <stdio.h>
 
 #define AO_HEX_RECORD_NORMAL                   0x00
 #define AO_HEX_RECORD_EOF                      0x01
@@ -47,6 +50,13 @@ struct ao_hex_image {
        uint8_t         data[0];
 };
 
+struct ao_sym {
+       unsigned        addr;
+       char            *name;
+       bool            required;
+       bool            found;
+};
+
 struct ao_hex_file *
 ao_hex_file_read(FILE *file, char *name);
 
@@ -60,9 +70,16 @@ void
 ao_hex_image_free(struct ao_hex_image *image);
 
 struct ao_hex_image *
-ao_hex_load(char *filename);
+ao_hex_load(char *filename, struct ao_sym **symbols, int *num_symbols);
+
+struct ao_hex_image *
+ao_hex_image_cat(struct ao_hex_image *a, struct ao_hex_image *b);
 
 int
 ao_hex_image_equal(struct ao_hex_image *a, struct ao_hex_image *b);
 
+bool
+ao_hex_save(FILE *file, struct ao_hex_image *image,
+           struct ao_sym *symbols, int num_symbols);
+
 #endif /* _AO_HEX_H_ */