A little simplification in the write interface.
[gedcom-parse.git] / gedcom / write.c
index 69d502e62f55009b63d53fa2c7dda4270c4f1c15..5bc9efa10fd33e841b25b6cae66e0b25a2440569 100644 (file)
@@ -26,7 +26,7 @@
 #include "encoding.h"
 #include "tag_data.h"
 #include "buffer.h"
-#include "utf8.h"
+#include "utf8tools.h"
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -380,12 +380,11 @@ int _gedcom_write_val(Gedcom_write_hndl hndl,
 }
 
 int gedcom_write_record_str(Gedcom_write_hndl hndl,
-                           Gedcom_rec rec, int tag,
-                           char* xrefstr, char* val)
+                           Gedcom_rec rec, char* xrefstr, char* val)
 {
   int result = 1;
   if (check_type(rec, (val ? GV_CHAR_PTR : GV_NULL)))
-    result = _gedcom_write_val(hndl, rec, tag, -1, xrefstr, convert_at(val));
+    result = _gedcom_write_val(hndl, rec, 0, -1, xrefstr, convert_at(val));
   return result;
 }
 
@@ -400,16 +399,6 @@ int gedcom_write_element_str(Gedcom_write_hndl hndl,
   return result;
 }
 
-int gedcom_write_record_xref(Gedcom_write_hndl hndl,
-                            Gedcom_rec rec, int tag,
-                            char* xrefstr, struct xref_value* val)
-{
-  int result = 1;
-  if (check_type(rec, (val ? GV_XREF_PTR : GV_NULL)))
-    result = _gedcom_write_val(hndl, rec, tag, -1, xrefstr, val->string);
-  return result;
-}
-
 int gedcom_write_element_xref(Gedcom_write_hndl hndl,
                              Gedcom_elt elt, int tag, int parent_rec_or_elt,
                              struct xref_value* val)