Rename 'add' functions to 'new'.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 12 Jan 2003 16:33:48 +0000 (16:33 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 12 Jan 2003 16:33:48 +0000 (16:33 +0000)
gom/address.c
gom/change_date.c
gom/func_template.h
gom/place.c
include/gom.h

index b0d49a06f42cc556ae4326c92098c7c4fc37db56..553fa12cb835d01773f36556efba2fa81c345776 100644 (file)
@@ -82,7 +82,7 @@ Gedcom_ctxt sub_addr_cont_start(_ELT_PARAMS_)
 }
 
 DEFINE_SUB_MAKEFUNC(address)
-DEFINE_SUB_ADDFUNC(address)
+DEFINE_SUB_SETFUNC(address)
 DEFINE_SUB_DELETEFUNC(address)
 
 DEFINE_STRING_END_CB(address, sub_addr_end, full_label)
index 14db8743abab7cd7180cfedea2f03664f9d94814..417dbf0523400e13e2f535832f7ee7150be3d0eb 100644 (file)
@@ -74,7 +74,7 @@ Gedcom_ctxt sub_chan_start(_ELT_PARAMS_)
 }
 
 DEFINE_SUB_MAKEFUNC(change_date)
-DEFINE_SUB_ADDFUNC(change_date)
+DEFINE_SUB_SETFUNC(change_date)
 DEFINE_SUB_DELETEFUNC(change_date)
 
 DEFINE_DATE_CB(change_date, sub_chan_date_start, date)
@@ -145,7 +145,7 @@ int gom_update_timestamp(struct change_date** chan, time_t t)
 {
   int result = 1;
   if (chan) {
-    if (! *chan) gom_add_change_date(chan);
+    if (! *chan) gom_set_new_change_date(chan);
     if (*chan) {
       struct tm *tm_ptr = localtime(&t);
       result = 0;
index 872f0ada855fa2b43135b2706cb94ce38cce530a..c25fb11f52a37a10bcba235ca264da7184c4fede 100644 (file)
@@ -29,8 +29,8 @@
 #define DESTROYFUNC(STRUCTTYPE)  destroy_ ## STRUCTTYPE ## _record
 #define GETXREFFUNC(STRUCTTYPE)  gom_get_ ## STRUCTTYPE ## _by_xref
 #define CLEANFUNC(STRUCTTYPE)    STRUCTTYPE ## _cleanup
-#define ADDFUNC(STRUCTTYPE)      gom_add_ ## STRUCTTYPE
-#define SUB_ADDFUNC(STRUCTTYPE)  gom_add_ ## STRUCTTYPE
+#define ADDFUNC(STRUCTTYPE)      gom_new_ ## STRUCTTYPE
+#define SUB_SETFUNC(STRUCTTYPE)  gom_set_new_ ## STRUCTTYPE
 #define UNREFALLFUNC(STRUCTTYPE) STRUCTTYPE ## _unref_all
 #define DELETEFUNC(STRUCTTYPE)   gom_delete_ ## STRUCTTYPE
 #define SUB_DELETEFUNC(STRUCTTYPE) gom_delete_ ## STRUCTTYPE
     return obj;                                                               \
   }
 
-#define DEFINE_SUB_ADDFUNC(STRUCTTYPE)                                        \
-  struct STRUCTTYPE *SUB_ADDFUNC(STRUCTTYPE)(struct STRUCTTYPE** addto)       \
+#define DEFINE_SUB_SETFUNC(STRUCTTYPE)                                        \
+  struct STRUCTTYPE *SUB_SETFUNC(STRUCTTYPE)(struct STRUCTTYPE** addto)       \
   {                                                                           \
     struct STRUCTTYPE *obj = NULL;                                            \
     if (addto && ! *addto) {                                                  \
index 371e2e311dc84055c647ddc1b14bb5192e021cc3..38ff377481d2330b1caef10a37bceac70addb1b4 100644 (file)
@@ -72,7 +72,7 @@ Gedcom_ctxt sub_place_start(_ELT_PARAMS_)
 }
 
 DEFINE_SUB_MAKEFUNC(place)
-DEFINE_SUB_ADDFUNC(place)
+DEFINE_SUB_SETFUNC(place)
 DEFINE_SUB_DELETEFUNC(place)
      
 DEFINE_STRING_CB(place, sub_place_form_start, place_hierarchy)
index cef3357758d638da8248c74fa709dfd2f32a7037..12352734604c2e07dee5b4e1bc8d50b44704ac78 100644 (file)
@@ -426,47 +426,47 @@ struct header*     gom_get_header();
 int                gom_header_update_timestamp(time_t t);
   
 struct submission* gom_get_submission();
-struct submission* gom_add_submission(const char* xrefstr);
+struct submission* gom_new_submission(const char* xrefstr);
 int                gom_delete_submission();
 
 struct family*     gom_get_first_family();
 struct family*     gom_get_family_by_xref(const char *xref);
-struct family*     gom_add_family(const char* xrefstr);
+struct family*     gom_new_family(const char* xrefstr);
 int                gom_delete_family(struct family* obj);
 
 struct individual* gom_get_first_individual();
 struct individual* gom_get_individual_by_xref(const char *xref);
-struct individual* gom_add_individual(const char* xrefstr);
+struct individual* gom_new_individual(const char* xrefstr);
 int                gom_delete_individual(struct individual* obj);
 
 struct multimedia* gom_get_first_multimedia();
 struct multimedia* gom_get_multimedia_by_xref(const char *xref);
-struct multimedia* gom_add_multimedia(const char* xrefstr);
+struct multimedia* gom_new_multimedia(const char* xrefstr);
 int                gom_delete_multimedia(struct multimedia* obj);
 
 struct note*       gom_get_first_note();
 struct note*       gom_get_note_by_xref(const char *xref);
-struct note*       gom_add_note(const char* xrefstr);
+struct note*       gom_new_note(const char* xrefstr);
 int                gom_delete_note(struct note* obj);
 
 struct repository* gom_get_first_repository();
 struct repository* gom_get_repository_by_xref(const char *xref);
-struct repository* gom_add_repository(const char* xrefstr);
+struct repository* gom_new_repository(const char* xrefstr);
 int                gom_delete_repository(struct repository* obj);
 
 struct source*     gom_get_first_source();
 struct source*     gom_get_source_by_xref(const char *xref);
-struct source*     gom_add_source(const char* xrefstr);
+struct source*     gom_new_source(const char* xrefstr);
 int                gom_delete_source(struct source* obj);
 
 struct submitter*  gom_get_first_submitter();
 struct submitter*  gom_get_submitter_by_xref(const char *xref);
-struct submitter*  gom_add_submitter(const char* xrefstr);
+struct submitter*  gom_new_submitter(const char* xrefstr);
 int                gom_delete_submitter(struct submitter* obj);
 
 struct user_rec*   gom_get_first_user_rec();
 struct user_rec*   gom_get_user_rec_by_xref(const char *xref);
-struct user_rec*   gom_add_user_rec(const char* xrefstr, const char* tag);
+struct user_rec*   gom_new_user_rec(const char* xrefstr, const char* tag);
 int                gom_delete_user_rec(struct user_rec* obj);
 
 char* gom_get_string(char* data);
@@ -480,13 +480,13 @@ struct xref_value* gom_set_xref(struct xref_value** data, const char* xref);
 struct xref_list*  gom_add_xref(struct xref_list** data, const char* xref);
 int                gom_remove_xref(struct xref_list** data, const char* xref);
 
-struct address*    gom_add_address(struct address** obj);
+struct address*    gom_set_new_address(struct address** obj);
 int                gom_delete_address(struct address** obj);
 
-struct place*      gom_add_place(struct place** obj);
+struct place*      gom_set_new_place(struct place** obj);
 int                gom_delete_place(struct place** obj);
 
-struct change_date* gom_add_change_date(struct change_date** obj);
+struct change_date* gom_set_new_change_date(struct change_date** obj);
 int                 gom_delete_change_date(struct change_date** obj);
 int                 gom_update_timestamp(struct change_date** obj, time_t t);