Generate the correct cast error message.
[gedcom-parse.git] / include / gedcom.h.in
index 89160f1872af67a6e2b9f1886748c09ff8b30f3e..0a3d68fcdfca29d146b471b39abda58ca9281885 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
 
 #define GEDCOM_PARSE_VERSION_MAJOR @VERSION_MAJOR@
 #define GEDCOM_PARSE_VERSION_MINOR @VERSION_MINOR@
-#define GEDCOM_PARSE_VERSION_PATCH 0
+#define GEDCOM_PARSE_VERSION_PATCH @VERSION_PATCH@
 #define GEDCOM_PARSE_VERSION \
   (GEDCOM_PARSE_VERSION_MAJOR * 1000 + GEDCOM_PARSE_VERSION_MINOR)
 
@@ -385,6 +385,14 @@ typedef enum _ENC_LINE_END {
   END_LF_CR = 3
 } Enc_line_end;
 
+typedef enum _ENC_FROM {
+  ENC_FROM_FILE = 0,
+  ENC_FROM_SYS  = 1,
+  ENC_MANUAL    = 2
+} Enc_from;
+
+struct encoding_state;
+
 typedef enum _DATE_INPUT {
   DI_FROM_STRINGS,
   DI_FROM_NUMBERS,
@@ -396,7 +404,8 @@ typedef enum _DATE_INPUT {
 /***  Use the GEDCOM_STRING/GEDCOM_DATE interface instead of relying    ***/
 /***  on this !!                                                        ***/
 /**************************************************************************/
-                                                                          
+
+/* Update strings in interface.c if this changes */
 typedef enum _GEDCOM_VAL_TYPE {
   GV_NULL       = 0x01,
   GV_CHAR_PTR   = 0x02,
@@ -540,20 +549,17 @@ int                gedcom_delete_xref(const char* xrefstr);
 /* Writing support */
 Gedcom_write_hndl  gedcom_write_open(const char* filename);
 int  gedcom_write_close(Gedcom_write_hndl hndl, int *total_conv_fails);
-int  gedcom_write_set_encoding(const char* charset, Encoding width,
+int  gedcom_write_set_encoding(Enc_from from,
+                              const char* charset, Encoding width,
                                Enc_bom bom);
-int  gedcom_write_set_line_terminator(Enc_line_end end);
+int  gedcom_write_set_line_terminator(Enc_from from, Enc_line_end end);
 
 int  gedcom_write_record_str(Gedcom_write_hndl hndl,
-                            Gedcom_rec rec, int parsed_tag,
-                            char* xrefstr, char* val);
-int  gedcom_write_element_str(Gedcom_write_hndl hndl, Gedcom_elt elt,
-                             int parsed_tag, int parent_rec_or_elt,
-                             char* val);
-
-int gedcom_write_record_xref(Gedcom_write_hndl hndl,
-                            Gedcom_rec rec, int parsed_tag,
-                            char* xrefstr, struct xref_value* val);
+                            Gedcom_rec rec, char* xrefstr, char* val);
+  
+int gedcom_write_element_str(Gedcom_write_hndl hndl, Gedcom_elt elt,
+                            int parsed_tag, int parent_rec_or_elt,
+                            char* val);
 int gedcom_write_element_xref(Gedcom_write_hndl hndl, Gedcom_elt elt,
                               int parsed_tag, int parent_rec_or_elt,
                              struct xref_value* val);