-void repository_add_address(Gom_ctxt ctxt, struct address* address)
-{
- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo)
- repo->address = address;
-}
-
-void repository_add_phone(Gom_ctxt ctxt, const char *phone)
-{
- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo) {
- int i = 0;
- while (i<2 && repo->phone[i]) i++;
- if (! repo->phone[i]) {
- repo->phone[i] = strdup(phone);
- if (! repo->phone[i]) MEMORY_ERROR;
- }
- }
-}
-
-void repository_add_note(Gom_ctxt ctxt, struct note_sub* note)
-{
- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo)
- LINK_CHAIN_ELT(note_sub, repo->note, note);
-}
-
-void repository_add_user_ref(Gom_ctxt ctxt, struct user_ref_number* ref)
-{
- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo)
- LINK_CHAIN_ELT(user_ref_number, repo->ref, ref);
-}
-
-void repository_set_record_id(Gom_ctxt ctxt, const char *rin)
-{
- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo) {
- repo->record_id = strdup(rin);
- if (! repo->record_id) MEMORY_ERROR;
- }
-}
-
-void repository_set_change_date(Gom_ctxt ctxt, struct change_date* chan)
-{
- struct repository *repo = SAFE_CTXT_CAST(repository, ctxt);
- if (repo)
- repo->change_date = chan;
-}
-
-void repository_add_user_data(Gom_ctxt ctxt, struct user_data* data)
-{
- struct repository *obj = SAFE_CTXT_CAST(repository, ctxt);
- if (obj)
- LINK_CHAIN_ELT(user_data, obj->extra, data);
-}
-
-void repository_cleanup(struct repository* repo)