diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/build-tools/auto-conf-lib/exec-suffix-test tla-1.3.1-fix-1/src/build-tools/auto-conf-lib/exec-suffix-test
--- tla-1.3.1-fix-1.old/src/build-tools/auto-conf-lib/exec-suffix-test	2005-03-17 17:46:33.000000000 +0100
+++ tla-1.3.1-fix-1/src/build-tools/auto-conf-lib/exec-suffix-test	2005-04-20 10:46:20.000000000 +0200
@@ -29,7 +29,7 @@
 
 ${CC} -o ,test-prog ../,test-prog.c 2> /dev/null > /dev/null 
 
-suffix="`ls | sed s/^,test-prog//`"
+suffix=`ls | sed 's/^,test-prog//'`
 
 printf "string %s=%s\n" "exec-suffix" "$suffix"
 
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/ancestry.c tla-1.3.1-fix-1/src/tla/libarch/ancestry.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/ancestry.c	2005-03-17 17:46:48.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/ancestry.c	2005-04-20 19:15:53.000000000 +0200
@@ -44,7 +44,7 @@
 
       if (!this_arch)
         {
-          rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (fq_rev), rel_make_field_str ("???")), 0);
+          rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (fq_rev), rel_make_field_str ("???")), ENDRECORD);
           done = 1;
         }
       else
@@ -52,7 +52,7 @@
           t_uchar * ancestor = 0;
 
           if (!merges)
-            rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (fq_rev), rel_make_field_str (fq_rev)), 0);
+            rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (fq_rev), rel_make_field_str (fq_rev)), ENDRECORD);
           else
             {
               enum arch_revision_type type;
@@ -61,7 +61,7 @@
 
               if (type == arch_continuation_revision)
                 {
-                  rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (fq_rev), rel_make_field_str (fq_rev)), 0);
+                  rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (fq_rev), rel_make_field_str (fq_rev)), ENDRECORD);
                 }
               else
                 {
@@ -71,7 +71,7 @@
                   merges = arch_archive_merge_points (this_arch, revision, 0, 0, 0);
                   for (x = 0; x < rel_n_records (merges); ++x)
                     {
-                      rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (fq_rev), rel_get_field (merges, x, 1)), 0);
+                      rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (fq_rev), rel_get_field (merges, x, 1)), ENDRECORD);
                     }
                   rel_free_table (merges);
                 }
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/apply-changeset.c tla-1.3.1-fix-1/src/tla/libarch/apply-changeset.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/apply-changeset.c	2005-03-17 17:47:10.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/apply-changeset.c	2005-04-20 19:19:04.000000000 +0200
@@ -490,7 +490,7 @@
             rel_add_records (&r->removed_dirs,
                              rel_make_record_2_taking (target_loc_field,
                                                        id_field),
-                             0);
+                             ENDRECORD);
           }
         tmp_name = set_aside_shuffled_dirs (&file_set_aside_with_dir_id, &dir_set_aside_with_dir_id, target_loc, id, seq, tmp_shuffled_dirs_root, &running, target, &inventory);
         ++seq;
@@ -571,7 +571,7 @@
                        rel_make_record_3_taking (rel_get_field (changeset.added_dirs, x, 0),
                                                  rel_make_field_str (""),
                                                  rel_get_field (changeset.added_dirs, x, 1)),
-                       0);
+                       ENDRECORD);
     }
   rel_sort_table_by_field_fn (0, install_dirs_plan, 0, dir_depth_cmp);
 
@@ -641,12 +641,12 @@
               if (!deferred_conflict (&deferred_conflicts, removed_patch_conflict_files_path, target, install_loc, 0))
                 {
                   invoke_apply_changeset_callback (r, "A/  %s\n", no_dot (escaped_tmp));
-                  rel_add_records (&r->new_dirs, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), 0);
+                  rel_add_records (&r->new_dirs, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), ENDRECORD);
                 }
               else
                 {
                   invoke_apply_changeset_callback (r, "CA/ %s\n", no_dot (escaped_tmp));
-                  rel_add_records (&r->conflict_dirs, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), 0);
+                  rel_add_records (&r->conflict_dirs, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), ENDRECORD);
                 }
 
               safe_mkdir (install_name, perms);
@@ -676,12 +676,12 @@
                                rel_make_record_3_taking (rel_field_ref (oldtgtloc_field),
                                                          rel_make_field_str (install_loc),
                                                          id_field),
-                               0);
+                               ENDRECORD);
             }
           else
             {
               invoke_apply_changeset_callback (r, "C/> %s\t%s\n", escaped_tmp0, no_dot (escaped_tmp1));
-              rel_add_records (&r->conflict_dirs, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), 0);
+              rel_add_records (&r->conflict_dirs, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), ENDRECORD);
             }
 
           rel_field_unref (oldtgtloc_field);
@@ -763,12 +763,12 @@
                            rel_make_record_3_taking (rel_field_ref (old_target_loc_field),
                                                      rel_make_field_str (install_loc),
                                                      rel_field_ref (id_field)),
-                           0);
+                           ENDRECORD);
         }
       else
         {
           invoke_apply_changeset_callback (r, "C=> %s\t%s\n", escaped_tmp0, no_dot (escaped_tmp1));
-          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), ENDRECORD);
         }
 
       safe_rename (take_from, install_name);
@@ -831,12 +831,12 @@
       if (!deferred_conflict (&deferred_conflicts, removed_patch_conflict_files_path, target, install_loc, take_from))
         {
           invoke_apply_changeset_callback (r, "A   %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->new_files, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->new_files, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), ENDRECORD);
         }
       else
         {
           invoke_apply_changeset_callback (r, "CA  %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_make_field_str (install_loc), rel_field_ref (id_field)), ENDRECORD);
         }
 
       copy_file_or_symlink (take_from, install_name);
@@ -887,7 +887,7 @@
         {
           escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, mod_loc);
           invoke_apply_changeset_callback (r, "?M  %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->missing_file_for_patch, rel_make_record_2_taking (rel_field_ref (mod_loc_field), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->missing_file_for_patch, rel_make_record_2_taking (rel_field_ref (mod_loc_field), rel_field_ref (id_field)), ENDRECORD);
           save_patch_for_missing_file (missing_patch_dir, patch_path, mod_loc);
           lim_free (0, escaped_tmp);
           continue;
@@ -912,7 +912,7 @@
 
           escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
           invoke_apply_changeset_callback (r, "C-> %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
           lim_free (0, escaped_tmp);
         }
       else if (arch_id_indicates_changelog (id))
@@ -921,7 +921,7 @@
                            rel_make_record_3_taking (rel_field_ref (target_loc_field),
                                                      rel_field_ref (id_field),
                                                      rel_make_field_str (target_path)),
-                           0);
+                           ENDRECORD);
         }
       else
         {
@@ -985,7 +985,7 @@
                   escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
                   invoke_apply_changeset_callback (r, "M   %s\n",
                                                    no_dot (escaped_tmp));
-                  rel_add_records (&r->modified_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+                  rel_add_records (&r->modified_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
                   lim_free (0, escaped_tmp);
                 }
               else if (patch_stat == 1)
@@ -999,7 +999,7 @@
                   escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
                   invoke_apply_changeset_callback (r, "C   %s\n",
                                                    no_dot (escaped_tmp));
-                  rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+                  rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
 
                   lim_free (0, escaped_tmp);
                   lim_free (0, orig_name);
@@ -1086,7 +1086,7 @@
         {
           escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, mod_loc);
           invoke_apply_changeset_callback (r, "?M  %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->missing_file_for_patch, rel_make_record_2_taking (rel_field_ref (mod_loc_field), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->missing_file_for_patch, rel_make_record_2_taking (rel_field_ref (mod_loc_field), rel_field_ref (id_field)), ENDRECORD);
           save_patch_for_missing_file (missing_patch_dir, orig_patch_path, mod_loc);
           save_patch_for_missing_file (missing_patch_dir, mod_patch_path, mod_loc);
           lim_free (0, escaped_tmp);
@@ -1126,7 +1126,7 @@
 
           escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
           invoke_apply_changeset_callback (r, "C-> %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
 
           lim_free (0, escaped_tmp);
           lim_free (0, orig_name);
@@ -1188,7 +1188,7 @@
               escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
               invoke_apply_changeset_callback (r, "M-> %s\n",
                                                no_dot (escaped_tmp));
-              rel_add_records (&r->modified_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+              rel_add_records (&r->modified_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
               lim_free (0, escaped_tmp);
             }
           else
@@ -1253,7 +1253,7 @@
         {
           escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, mod_loc);
           invoke_apply_changeset_callback (r, "?M  %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->missing_file_for_patch, rel_make_record_2_taking (rel_field_ref (mod_loc_field), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->missing_file_for_patch, rel_make_record_2_taking (rel_field_ref (mod_loc_field), rel_field_ref (id_field)), ENDRECORD);
           save_patch_for_missing_file (missing_patch_dir, orig_patch_path, mod_loc);
           save_patch_for_missing_file (missing_patch_dir, mod_patch_path, mod_loc);
           lim_free (0, escaped_tmp);
@@ -1281,7 +1281,7 @@
 
           escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
           invoke_apply_changeset_callback (r, "Cb  %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
 
           lim_free (0, escaped_tmp);
           lim_free (0, orig_name);
@@ -1325,7 +1325,7 @@
               escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
               invoke_apply_changeset_callback (r, "Mb  %s\n",
                                                no_dot (escaped_tmp));
-              rel_add_records (&r->modified_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+              rel_add_records (&r->modified_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
               lim_free (0, escaped_tmp);
             }
           else
@@ -1385,7 +1385,7 @@
         {
           escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, mod_loc);
           invoke_apply_changeset_callback (r, "?M  %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->missing_file_for_patch, rel_make_record_2_taking (rel_field_ref (mod_loc_field), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->missing_file_for_patch, rel_make_record_2_taking (rel_field_ref (mod_loc_field), rel_field_ref (id_field)), ENDRECORD);
           save_patch_for_missing_file (missing_patch_dir, orig_patch_path, mod_loc);
           save_patch_for_missing_file (missing_patch_dir, mod_patch_path, mod_loc);
           lim_free (0, escaped_tmp);
@@ -1413,7 +1413,7 @@
 
           escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
           invoke_apply_changeset_callback (r, "Cch %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
 
           lim_free (0, escaped_tmp);
           lim_free (0, orig_name);
@@ -1462,7 +1462,7 @@
               escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
               invoke_apply_changeset_callback (r, "ch  %s\n",
                                                no_dot (escaped_tmp));
-              rel_add_records (&r->modified_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+              rel_add_records (&r->modified_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
               lim_free (0, escaped_tmp);
             }
           else
@@ -1525,7 +1525,7 @@
         {
           escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, mod_loc);
           invoke_apply_changeset_callback (r, "?M  %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->missing_file_for_patch, rel_make_record_2_taking (rel_field_ref (mod_loc_field), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->missing_file_for_patch, rel_make_record_2_taking (rel_field_ref (mod_loc_field), rel_field_ref (id_field)), ENDRECORD);
           save_patch_for_missing_file (missing_patch_dir, orig_patch_path, mod_loc);
           save_patch_for_missing_file (missing_patch_dir, mod_patch_path, mod_loc);
           lim_free (0, escaped_tmp);
@@ -1560,7 +1560,7 @@
 
           escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
           invoke_apply_changeset_callback (r, "Cch %s\n", no_dot (escaped_tmp));
-          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+          rel_add_records (&r->conflict_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
 
           lim_free (0, escaped_tmp);
           lim_free (0, orig_name);
@@ -1607,7 +1607,7 @@
               escaped_tmp = pika_save_escape_iso8859_1 (0, 0, escape_classes, target_loc);
               invoke_apply_changeset_callback (r, "ch  %s\n",
                                                no_dot (escaped_tmp));
-              rel_add_records (&r->modified_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), 0);
+              rel_add_records (&r->modified_files, rel_make_record_2_taking (rel_field_ref (target_loc_field), rel_field_ref (id_field)), ENDRECORD);
               lim_free (0, escaped_tmp);
             }
           else
@@ -1674,7 +1674,7 @@
           invoke_apply_changeset_callback (r, "?-- %s\n", no_dot (escaped_tmp));
           rel_field_ref (mod_loc_field);
           rel_field_ref (id_field);
-          rel_add_records (&r->missing_file_for_meta_patch, rel_make_record_2_taking (mod_loc_field, id_field), 0);
+          rel_add_records (&r->missing_file_for_meta_patch, rel_make_record_2_taking (mod_loc_field, id_field), ENDRECORD);
           save_patch_for_missing_file (missing_patch_dir, orig_patch_path, mod_loc);
           save_patch_for_missing_file (missing_patch_dir, mod_patch_path, mod_loc);
           lim_free (0, escaped_tmp);
@@ -1708,7 +1708,7 @@
           invoke_apply_changeset_callback (r, "C-- %s\n", no_dot (escaped_tmp));
           rel_field_ref (target_loc_field);
           rel_field_ref (id_field);
-          rel_add_records (&r->metadata_conflict_files, rel_make_record_2_taking (target_loc_field, id_field), 0);
+          rel_add_records (&r->metadata_conflict_files, rel_make_record_2_taking (target_loc_field, id_field), ENDRECORD);
 
           lim_free (0, escaped_tmp);
           lim_free (0, rej_name);
@@ -1740,7 +1740,7 @@
           invoke_apply_changeset_callback (r, "--  %s\n", no_dot (escaped_tmp));
           rel_field_ref (target_loc_field);
           rel_field_ref (id_field);
-          rel_add_records (&r->meta_modified_files, rel_make_record_2_taking (target_loc_field, id_field), 0);
+          rel_add_records (&r->meta_modified_files, rel_make_record_2_taking (target_loc_field, id_field), ENDRECORD);
           lim_free (0, escaped_tmp);
         }
 
@@ -1806,7 +1806,7 @@
           invoke_apply_changeset_callback (r, "?-/ %s\n", no_dot (escaped_tmp));
           rel_field_ref (mod_loc_field);
           rel_field_ref (id_field);
-          rel_add_records (&r->missing_dir_for_meta_patch, rel_make_record_2_taking (mod_loc_field, id_field), 0);
+          rel_add_records (&r->missing_dir_for_meta_patch, rel_make_record_2_taking (mod_loc_field, id_field), ENDRECORD);
           save_patch_for_missing_file (missing_patch_dir, orig_patch_path, mod_loc);
           save_patch_for_missing_file (missing_patch_dir, mod_patch_path, mod_loc);
           lim_free (0, escaped_tmp);
@@ -1837,7 +1837,7 @@
         invoke_apply_changeset_callback (r, "--/ %s\n", no_dot (escaped_tmp));
         rel_field_ref (target_loc_field);
         rel_field_ref (id_field);
-        rel_add_records (&r->meta_modified_dirs, rel_make_record_2_taking (target_loc_field, id_field), 0);
+        rel_add_records (&r->meta_modified_dirs, rel_make_record_2_taking (target_loc_field, id_field), ENDRECORD);
         lim_free (0, escaped_tmp);
       }
 
@@ -1905,7 +1905,7 @@
       invoke_apply_changeset_callback (r, "cl  %s\n", no_dot (escaped_tmp));
       rel_field_ref (target_loc_field);
       rel_field_ref (id_field);
-      rel_add_records (&r->modified_files, rel_make_record_2_taking (target_loc_field, id_field), 0);
+      rel_add_records (&r->modified_files, rel_make_record_2_taking (target_loc_field, id_field), ENDRECORD);
 
       rel_field_unref (target_loc_field);
       rel_field_unref (id_field);
@@ -2103,7 +2103,7 @@
                                rel_make_record_3_taking (rel_make_field_str (id),
                                                          rel_make_field_str (rel_peek_str (inv->files, y, 0) + target_loc_as_dir_len),
                                                          rel_get_field (inv->files, y, 1)),
-                               0);
+                               ENDRECORD);
             }
         }
     }
@@ -2120,7 +2120,7 @@
                                rel_make_record_3_taking (rel_make_field_str (id),
                                                          rel_make_field_str (rel_peek_str (inv->dirs, y, 0) + target_loc_as_dir_len),
                                                          rel_get_field (inv->dirs, y, 1)),
-                               0);
+                               ENDRECORD);
             }
         }
     }
@@ -2213,7 +2213,7 @@
         {
         conflict:
           preserve_old_patch_spew (spew_root, target, loc);
-          rel_add_records (deferred_conflicts, rel_singleton_record_taking (rel_make_field_str (loc)), 0);
+          rel_add_records (deferred_conflicts, rel_singleton_record_taking (rel_make_field_str (loc)), ENDRECORD);
 
           safe_rename (path, orig_path);
           conflict_detected = 1;
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/archive-setup.c tla-1.3.1-fix-1/src/tla/libarch/archive-setup.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/archive-setup.c	2005-03-17 17:46:48.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/archive-setup.c	2005-04-20 19:19:17.000000000 +0200
@@ -34,7 +34,7 @@
 {
   rel_table wants  = rel_table_nil;
 
-  rel_add_records (&wants, rel_make_record_2_taking (rel_make_field_str (archive_spec), rel_make_field_str (revision_spec)), 0);
+  rel_add_records (&wants, rel_make_record_2_taking (rel_make_field_str (archive_spec), rel_make_field_str (revision_spec)), ENDRECORD);
   arch_setup_archive (chatter_fd, wants, arch_archive_setup_no_tags, 0);
 
   rel_free_table (wants);
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/archives.c tla-1.3.1-fix-1/src/tla/libarch/archives.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/archives.c	2005-03-17 17:46:55.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/archives.c	2005-04-20 19:19:26.000000000 +0200
@@ -182,7 +182,7 @@
           t_uchar * location = 0;
 
           location = arch_archive_location (f, 0);
-          rel_add_records (&answer, rel_make_record_2_taking (rel_get_field (files, x, 0), rel_make_field_str (location)), 0);
+          rel_add_records (&answer, rel_make_record_2_taking (rel_get_field (files, x, 0), rel_make_field_str (location)), ENDRECORD);
 
           lim_free (0, location);
         }
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/changeset-report.c tla-1.3.1-fix-1/src/tla/libarch/changeset-report.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/changeset-report.c	2005-03-17 17:47:10.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/changeset-report.c	2005-04-20 19:20:01.000000000 +0200
@@ -295,7 +295,7 @@
                              rel_make_record_3_taking (rel_make_field_str (patch_file_loc),
                                                        rel_field_ref (id_field),
                                                        rel_make_field_str (patch_file_path)),
-                             0);
+                             ENDRECORD);
           }
 
         rel_field_unref (id_field);
@@ -875,7 +875,7 @@
                            rel_make_record_3_taking (rel_get_field (index, x, 0),
                                                      rel_get_field (index, x, 1),
                                                      rel_make_field_str (archive_path)),
-                           0);
+                           ENDRECORD);
         }
       else
         {
@@ -883,7 +883,7 @@
                            rel_make_record_3_taking (rel_get_field (index, x, 0),
                                                      rel_get_field (index, x, 1),
                                                      rel_make_field_str (archive_path)),
-                           0);
+                           ENDRECORD);
         }
 
       lim_free (0, archive_path);
@@ -954,7 +954,7 @@
           rel_add_records (out, rel_make_record_3_taking (orig_loc_field,
                                                           mod_loc_field,
                                                           id_field),
-                           0);
+                           ENDRECORD);
         }
 
 
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/changeset-utils.c tla-1.3.1-fix-1/src/tla/libarch/changeset-utils.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/changeset-utils.c	2005-03-17 17:46:48.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/changeset-utils.c	2005-04-20 19:20:19.000000000 +0200
@@ -165,7 +165,7 @@
           exit (2);
         }
 
-      rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (loc), rel_make_field_str (id)), 0);
+      rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (loc), rel_make_field_str (id)), ENDRECORD);
       lim_free (0, loc);
       lim_free (0, id);
     }
@@ -266,7 +266,7 @@
           exit (2);
         }
 
-      rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (loc), rel_make_field_str (perms)), 0);
+      rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (loc), rel_make_field_str (perms)), ENDRECORD);
 
       lim_free (0, perms);
       lim_free (0, loc);
@@ -355,9 +355,9 @@
 
 
   if (S_ISDIR (stat_buf->st_mode))
-    rel_add_records (&index->dirs, rel_make_record_2_taking (rel_make_field_str (path), rel_make_field_str (id)), 0);
+    rel_add_records (&index->dirs, rel_make_record_2_taking (rel_make_field_str (path), rel_make_field_str (id)), ENDRECORD);
   else
-    rel_add_records (&index->files, rel_make_record_2_taking (rel_make_field_str (path), rel_make_field_str (id)), 0);
+    rel_add_records (&index->files, rel_make_record_2_taking (rel_make_field_str (path), rel_make_field_str (id)), ENDRECORD);
 }
 
 
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/cmd-abrowse.c tla-1.3.1-fix-1/src/tla/libarch/cmd-abrowse.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/cmd-abrowse.c	2005-03-17 17:46:55.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/cmd-abrowse.c	2005-04-20 19:20:42.000000000 +0200
@@ -410,7 +410,7 @@
               {
                 level = arch_parse_package_name (arch_ret_patch_level, 0, rev);
                 assoc_set_taking (&since_limits, rel_make_field_str (version), rel_make_field_str (level));
-                rel_add_records (&old_since_limits, rel_make_record_2_taking (rel_make_field_str (version), rel_make_field_str (level)), 0);
+                rel_add_records (&old_since_limits, rel_make_record_2_taking (rel_make_field_str (version), rel_make_field_str (level)), ENDRECORD);
               }
 
             if (since_limits_opt)
@@ -550,7 +550,7 @@
                                     rel_add_records (&new_since_limits,
                                                      rel_make_record_2_taking (rel_get_field (versions, v, 0),
                                                                                rel_get_field (revisions, 0, 0)),
-                                                     0);
+                                                     ENDRECORD);
                                 }
                               else
                                 {
@@ -558,7 +558,7 @@
                                     rel_add_records (&new_since_limits,
                                                      rel_make_record_2_taking (rel_get_field (versions, v, 0),
                                                                                rel_get_field (revisions, rel_n_records (revisions) - 1, 0)),
-                                                     0);
+                                                     ENDRECORD);
                                 }
 
                               for (r = 0; r < rel_n_records (revisions); ++r)
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/cmd-archive-setup.c tla-1.3.1-fix-1/src/tla/libarch/cmd-archive-setup.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/cmd-archive-setup.c	2005-03-17 17:46:49.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/cmd-archive-setup.c	2005-04-20 19:21:02.000000000 +0200
@@ -196,7 +196,7 @@
             exit (1);
           }
         for (x = 1; x < argc; ++x)
-          rel_add_records (&wants, rel_singleton_record_taking (rel_make_field_str (argv[x])), 0);
+          rel_add_records (&wants, rel_singleton_record_taking (rel_make_field_str (argv[x])), ENDRECORD);
       }
 
     for (x = 0; x < rel_n_records (wants); ++x)
@@ -221,7 +221,7 @@
           }
 
         if (tag_op == arch_archive_setup_no_tags)
-          rel_add_records (&wants_decomposed, rel_make_record_2_taking (rel_make_field_str (archive), rel_make_field_str (non_archive)), 0);
+          rel_add_records (&wants_decomposed, rel_make_record_2_taking (rel_make_field_str (archive), rel_make_field_str (non_archive)), ENDRECORD);
         else
           {
             t_uchar * from_archive = 0;
@@ -242,7 +242,7 @@
                                                        rel_make_field_str (non_archive),
                                                        rel_make_field_str (from_archive),
                                                        rel_make_field_str (from_rev_spec)),
-                             0);
+                             ENDRECORD);
 
             lim_free (0, from_archive);
             lim_free (0, from_rev_spec);
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/cmd-changes.c tla-1.3.1-fix-1/src/tla/libarch/cmd-changes.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/cmd-changes.c	2005-03-17 17:46:49.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/cmd-changes.c	2005-04-20 19:21:15.000000000 +0200
@@ -287,7 +287,7 @@
 
         while (argc > argn)
           {
-            rel_add_records (&limits, rel_singleton_record_taking (rel_make_field_str (argv[argn])), 0);
+            rel_add_records (&limits, rel_singleton_record_taking (rel_make_field_str (argv[argn])), ENDRECORD);
             ++argn;
           }
       }
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/cmd-changeset.c tla-1.3.1-fix-1/src/tla/libarch/cmd-changeset.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/cmd-changeset.c	2005-03-17 17:46:49.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/cmd-changeset.c	2005-04-20 19:21:20.000000000 +0200
@@ -144,7 +144,7 @@
               x++;
 
             while (x < argc)
-              rel_add_records (&file_list, rel_singleton_record_taking (rel_make_field_str (argv[x++])), 0);
+              rel_add_records (&file_list, rel_singleton_record_taking (rel_make_field_str (argv[x++])), ENDRECORD);
           }
 
         if (file_list_file)
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/cmd-commit.c tla-1.3.1-fix-1/src/tla/libarch/cmd-commit.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/cmd-commit.c	2005-03-17 17:46:49.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/cmd-commit.c	2005-04-20 19:21:30.000000000 +0200
@@ -296,7 +296,7 @@
           goto usage_error;
 
         while (argx < argc)
-          rel_add_records (&file_list, rel_singleton_record_taking (rel_make_field_str (argv[argx++])), 0);
+          rel_add_records (&file_list, rel_singleton_record_taking (rel_make_field_str (argv[argx++])), ENDRECORD);
       }
 
     if (!arch_valid_package_name (vsnspec, arch_maybe_archive, arch_req_version, 0))
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/cmd-rbrowse.c tla-1.3.1-fix-1/src/tla/libarch/cmd-rbrowse.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/cmd-rbrowse.c	2005-03-17 17:46:49.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/cmd-rbrowse.c	2005-04-20 19:21:46.000000000 +0200
@@ -279,7 +279,7 @@
 
   if (! all_archives)
     {
-      rel_add_records (&archive_list, rel_singleton_record_taking (rel_make_field_str (default_archive)), 0);
+      rel_add_records (&archive_list, rel_singleton_record_taking (rel_make_field_str (default_archive)), ENDRECORD);
     }
   else
     {
@@ -525,7 +525,7 @@
           
           if (regexec (&patch_regex_needle, summary, 0, 0, 0) == 0)
             {
-              rel_add_records (&patch_output, rel_singleton_record_taking (rel_make_field_str (log)), 0);
+              rel_add_records (&patch_output, rel_singleton_record_taking (rel_make_field_str (log)), ENDRECORD);
             }
 
           lim_free(0, summary);
@@ -592,7 +592,7 @@
   t_uchar *latest_revision;
   
   latest_revision = arch_archive_latest_revision (arch, version, 1);
-  rel_add_records (since_output, rel_singleton_record_taking (rel_make_field_str (latest_revision)),0);
+  rel_add_records (since_output, rel_singleton_record_taking (rel_make_field_str (latest_revision)),ENDRECORD);
   lim_free(0, latest_revision);
 
 }
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/commit.c tla-1.3.1-fix-1/src/tla/libarch/commit.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/commit.c	2005-03-17 17:46:55.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/commit.c	2005-04-20 19:22:12.000000000 +0200
@@ -576,7 +576,7 @@
       id = rel_peek_str (table, x, 1);
 
       if (str_cmp_prefix ("A_", id))
-        rel_add_records (&answer, rel_copy_record (rel_peek_record (table, x)), 0);
+        rel_add_records (&answer, rel_copy_record (rel_peek_record (table, x)), ENDRECORD);
     }
 
   return answer;
@@ -655,7 +655,7 @@
                                                    rel_make_record_3_taking (rel_make_field_str (fqrev),
                                                                              rel_get_field (table, x, 1),
                                                                              rel_get_field (table, x, 2)),
-                                                   0);
+                                                   ENDRECORD);
                                 }
                             }
                         }
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/configs.c tla-1.3.1-fix-1/src/tla/libarch/configs.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/configs.c	2005-03-17 17:46:56.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/configs.c	2005-04-20 19:22:25.000000000 +0200
@@ -122,7 +122,7 @@
               exit (2);
             }
 
-          rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (loc), rel_make_field_str (rev)), 0);
+          rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (loc), rel_make_field_str (rev)), ENDRECORD);
 
           lim_free (0, loc);
           lim_free (0, rev);
@@ -188,7 +188,7 @@
       else
         fqr = arch_fully_qualify (archive, version);
 
-      rel_add_records (&answer, rel_make_record_2_taking (rel_get_field (config_in, x, 0), rel_make_field_str (fqr)), 0);
+      rel_add_records (&answer, rel_make_record_2_taking (rel_get_field (config_in, x, 0), rel_make_field_str (fqr)), ENDRECORD);
 
       lim_free (0, subtree_path_spec);
       lim_free (0, subtree_path);
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/inode-sig.c tla-1.3.1-fix-1/src/tla/libarch/inode-sig.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/inode-sig.c	2005-03-17 17:47:10.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/inode-sig.c	2005-04-20 19:22:44.000000000 +0200
@@ -343,7 +343,7 @@
   t_uchar * signature = arch_statb_inode_sig (stat_buf);
 
   if (!S_ISDIR (stat_buf->st_mode) && !S_ISLNK (stat_buf->st_mode))
-    rel_add_records (answer, rel_make_record_2_taking (rel_make_field_str (id), rel_make_field_str (signature)), 0);
+    rel_add_records (answer, rel_make_record_2_taking (rel_make_field_str (id), rel_make_field_str (signature)), ENDRECORD);
   lim_free(0, signature);
 }
 
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/invent.c tla-1.3.1-fix-1/src/tla/libarch/invent.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/invent.c	2005-03-17 17:46:50.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/invent.c	2005-04-20 19:22:55.000000000 +0200
@@ -170,7 +170,7 @@
 {
   rel_table * answer = (rel_table *)closure;
 
-  rel_add_records (answer, rel_make_record_2_taking (rel_make_field_str (path), rel_make_field_str (id)), 0);
+  rel_add_records (answer, rel_make_record_2_taking (rel_make_field_str (path), rel_make_field_str (id)), ENDRECORD);
 }
 
 
@@ -186,7 +186,7 @@
   rel_table * answer = (rel_table *)closure;
 
   if (!S_ISDIR (statb->st_mode))
-    rel_add_records (answer, rel_make_record_2_taking (rel_make_field_str (path), rel_make_field_str (id)), 0);
+    rel_add_records (answer, rel_make_record_2_taking (rel_make_field_str (path), rel_make_field_str (id)), ENDRECORD);
 }
 
 
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/libraries.c tla-1.3.1-fix-1/src/tla/libarch/libraries.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/libraries.c	2005-03-17 17:46:50.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/libraries.c	2005-04-20 19:24:16.000000000 +0200
@@ -60,7 +60,7 @@
 
       if (!safe_access (maybe_archive_dir, F_OK))
         {
-          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (maybe_archive_dir)), 0);
+          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (maybe_archive_dir)), ENDRECORD);
         }
 
       lim_free (0, maybe_archive_dir);
@@ -73,7 +73,7 @@
 
       priority_lib_dir = rel_peek_str (lib_path, 0, 0);
       archive_dir = file_name_in_vicinity (0, priority_lib_dir, archive);
-      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (archive_dir)), 0);
+      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (archive_dir)), ENDRECORD);
 
       lim_free (0, archive_dir);
     }
@@ -109,7 +109,7 @@
 
       if (!safe_access (maybe_category_dir, F_OK))
         {
-          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (maybe_category_dir)), 0);
+          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (maybe_category_dir)), ENDRECORD);
         }
 
       lim_free (0, maybe_category_dir);
@@ -122,7 +122,7 @@
 
       priority_archive_dir = rel_peek_str (archive_dirs, 0, 0);
       category_dir = file_name_in_vicinity (0, priority_archive_dir, category);
-      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (category_dir)));
+      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (category_dir)), ENDRECORD);
 
       lim_free (0, category_dir);
     }
@@ -162,7 +162,7 @@
 
       if (!safe_access (maybe_branch_dir, F_OK))
         {
-          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (maybe_branch_dir)), 0);
+          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (maybe_branch_dir)), ENDRECORD);
         }
 
       lim_free (0, maybe_branch_dir);
@@ -175,7 +175,7 @@
 
       priority_category_dir = rel_peek_str (category_dirs, 0, 0);
       branch_dir = file_name_in_vicinity (0, priority_category_dir, branch);
-      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (branch_dir)), 0);
+      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (branch_dir)), ENDRECORD);
 
       lim_free (0, branch_dir);
     }
@@ -216,7 +216,7 @@
 
       if (!safe_access (maybe_version_dir, F_OK))
         {
-          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (maybe_version_dir)), 0);
+          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (maybe_version_dir)), ENDRECORD);
         }
 
       lim_free (0, maybe_version_dir);
@@ -229,7 +229,7 @@
 
       priority_branch_dir = rel_peek_str (branch_dirs, 0, 0);
       version_dir = file_name_in_vicinity (0, priority_branch_dir, version);
-      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (version_dir)), 0);
+      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (version_dir)), ENDRECORD);
 
       lim_free (0, version_dir);
     }
@@ -270,7 +270,7 @@
 
       if (!safe_access (maybe_revision_dir, F_OK))
         {
-          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (maybe_revision_dir)), 0);
+          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (maybe_revision_dir)), ENDRECORD);
         }
 
       lim_free (0, maybe_revision_dir);
@@ -283,7 +283,7 @@
 
       priority_version_dir = rel_peek_str (version_dirs, 0, 0);
       revision_dir = file_name_in_vicinity (0, priority_version_dir, revision);
-      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (revision_dir)), 0);
+      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (revision_dir)), ENDRECORD);
 
       lim_free (0, revision_dir);
     }
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/library-txn.c tla-1.3.1-fix-1/src/tla/libarch/library-txn.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/library-txn.c	2005-03-17 17:46:56.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/library-txn.c	2005-04-20 19:24:39.000000000 +0200
@@ -137,7 +137,7 @@
           exit (2);
         }
 
-      rel_add_records (&search_path, rel_singleton_record_taking (rel_get_field (full_user_path, x, 0)), 0);
+      rel_add_records (&search_path, rel_singleton_record_taking (rel_get_field (full_user_path, x, 0)), ENDRECORD);
     }
 
   else
@@ -245,7 +245,7 @@
 
       if (require_greedy && !arch_library_is_greedy(rel_peek_str (full_user_path, x, 0)))
 	continue;
-      rel_add_records (&search_path, rel_singleton_record_taking (rel_get_field (full_user_path, x, 0)), 0);
+      rel_add_records (&search_path, rel_singleton_record_taking (rel_get_field (full_user_path, x, 0)), ENDRECORD);
     }
 
   return search_path;
@@ -446,7 +446,7 @@
 
       /* this is the first patch missing
        */
-      rel_add_records (&revisions,  rel_singleton_record_taking (rel_make_field_str (revision)), 0);
+      rel_add_records (&revisions,  rel_singleton_record_taking (rel_make_field_str (revision)), ENDRECORD);
 
       arch_chatter (chatter_fd, "* searching ancestor revision in library in archive %s\n", ancestor_archive);
 
@@ -460,7 +460,7 @@
           /* add revision to list
            */
 
-          rel_add_records (&revisions,  rel_singleton_record_taking (rel_make_field_str (anc_rev)), 0);
+          rel_add_records (&revisions,  rel_singleton_record_taking (rel_make_field_str (anc_rev)), ENDRECORD);
 
           /* look in the library for the immediate ancestor
            */
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/make-changeset.c tla-1.3.1-fix-1/src/tla/libarch/make-changeset.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/make-changeset.c	2005-03-17 17:47:10.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/make-changeset.c	2005-04-20 19:28:00.000000000 +0200
@@ -270,7 +270,7 @@
 
           spec_loc = str_alloc_cat_many (0, ".", spec_dir_abs + mod_root_length, "/", spec_tail, str_end);
 
-          rel_add_records (&lim_spec_locs, rel_singleton_record_taking (rel_make_field_str (spec_loc)), 0);
+          rel_add_records (&lim_spec_locs, rel_singleton_record_taking (rel_make_field_str (spec_loc)), ENDRECORD);
 
           lim_free (0, spec_dir);
           lim_free (0, spec_tail);
@@ -296,7 +296,7 @@
                 }
             }
           if (!dont_want)
-            rel_add_records (&limits, rel_singleton_record_taking (rel_get_field (lim_spec_locs, l, 0)), 0);
+            rel_add_records (&limits, rel_singleton_record_taking (rel_get_field (lim_spec_locs, l, 0)), ENDRECORD);
         }
 
       rel_sort_table_by_field (0, limits, 0);
@@ -329,7 +329,7 @@
   rel_add_records (&orig_full_index,
                    rel_make_record_2_taking (rel_make_field_str ("."),
                                              rel_make_field_str ("?_.")),
-                   0);
+                   ENDRECORD);
   rel_sort_table_by_field (0, orig_full_index, 1);
 
   mod_full_index = rel_copy_table (report->mod_index.dirs);
@@ -337,7 +337,7 @@
   rel_add_records (&mod_full_index,
                    rel_make_record_2_taking (rel_make_field_str ("."),
                                              rel_make_field_str ("?_.")),
-                   0);
+                   ENDRECORD);
   rel_sort_table_by_field (0, mod_full_index, 1);
 
   mod_full_index_by_name = rel_copy_table (mod_full_index);
@@ -731,7 +731,7 @@
         lim = rel_n_records (renamed_dirs);
         for (x = 0; x < lim; ++x)
           {
-            rel_add_records (&report->renamed_dirs, rel_copy_record (rel_peek_record (renamed_dirs, x)), 0);
+            rel_add_records (&report->renamed_dirs, rel_copy_record (rel_peek_record (renamed_dirs, x)), ENDRECORD);
             if (report->callback)
               {
                 t_uchar * escape_tmp0;
@@ -748,7 +748,7 @@
         lim = rel_n_records (renamed_files);
         for (x = 0; x < lim; ++x)
           {
-            rel_add_records (&report->renamed_files, rel_copy_record (rel_peek_record (renamed_files, x)), 0);
+            rel_add_records (&report->renamed_files, rel_copy_record (rel_peek_record (renamed_files, x)), ENDRECORD);
             if (report->callback)
               {
                 t_uchar * escape_tmp0;
@@ -962,7 +962,7 @@
    */
   rel_add_records (&report->mod_files_index,
                    rel_make_record_2_taking (rel_make_field_str (mod_loc), rel_make_field_str (id)),
-                   0);
+                   ENDRECORD);
   rel_sort_table_by_field (0, report->mod_files_index, 0);
   rel_uniq_by_field (&report->mod_files_index, 0);
 
@@ -970,7 +970,7 @@
                    rel_make_record_3_taking (rel_make_field_str (mod_loc),
                                              rel_make_field_str (id),
                                              rel_make_field_str (new_file_path)),
-                   0);
+                   ENDRECORD);
   rel_sort_table_by_field (0, report->added_files, 0);
   rel_uniq_by_field (&report->added_files, 0);
 
@@ -982,11 +982,11 @@
   rel_add_records (&make_report->mod_index.files,
                    rel_make_record_2_taking (rel_make_field_str (mod_loc),
                                              rel_make_field_str (id)),
-                   0);
+                   ENDRECORD);
   rel_sort_table_by_field (0, make_report->mod_index.files, 1);
   rel_uniq_by_field (&make_report->mod_index.files, 1);
 
-  rel_add_records (&make_report->added_files, rel_singleton_record_taking (rel_make_field_str (mod_loc)), 0);
+  rel_add_records (&make_report->added_files, rel_singleton_record_taking (rel_make_field_str (mod_loc)), ENDRECORD);
   rel_sort_table_by_field (0, make_report->added_files, 0);
   rel_uniq_by_field (&make_report->added_files, 0);
 
@@ -1040,13 +1040,13 @@
     {
       rel_add_records (&report->mod_files_index,
                        rel_make_record_2_taking (rel_make_field_str (mod_loc), rel_make_field_str (id)),
-                       0);
+                       ENDRECORD);
       rel_sort_table_by_field (0, report->mod_files_index, 0);
       rel_uniq_by_field (&report->mod_files_index, 0);
 
       rel_add_records (&report->orig_files_index,
                        rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (id)),
-                       0);
+                       ENDRECORD);
       rel_sort_table_by_field (0, report->orig_files_index, 0);
       rel_uniq_by_field (&report->orig_files_index, 0);
 
@@ -1054,7 +1054,7 @@
                        rel_make_record_3_taking (rel_make_field_str (mod_loc),
                                                  rel_make_field_str (id),
                                                  rel_make_field_str (patch_path)),
-                       0);
+                       ENDRECORD);
       rel_sort_table_by_field (0, report->patched_regular_files, 0);
       rel_uniq_by_field (&report->patched_regular_files, 0);
     }
@@ -1070,21 +1070,21 @@
   rel_add_records (&make_report->mod_index.files,
                    rel_make_record_2_taking (rel_make_field_str (mod_loc),
                                              rel_make_field_str (id)),
-                   0);
+                   ENDRECORD);
   rel_sort_table_by_field (0, make_report->mod_index.files, 1);
   rel_uniq_by_field (&make_report->mod_index.files, 1);
 
   rel_add_records (&make_report->orig_index.files,
                    rel_make_record_2_taking (rel_make_field_str (orig_loc),
                                              rel_make_field_str (id)),
-                   0);
+                   ENDRECORD);
   rel_sort_table_by_field (0, make_report->orig_index.files, 1);
   rel_uniq_by_field (&make_report->orig_index.files, 1);
 
   rel_add_records (&make_report->modified_files,
                    rel_make_record_2_taking (rel_make_field_str (orig_loc),
                                              rel_make_field_str (mod_loc)),
-                   0);
+                   ENDRECORD);
   rel_sort_table_by_field (0, make_report->modified_files, 0);
   rel_uniq_by_field (&make_report->modified_files, 0);
 
@@ -1188,7 +1188,7 @@
         {
           rel_add_records (out,
                            rel_make_record_2_taking (rel_field_ref (orig_field), rel_get_field (X_index, x, 0)),
-                           0);
+                           ENDRECORD);
         }
 
       rel_field_unref (id_field);
@@ -1308,12 +1308,12 @@
       int orig_patch_fd;
       int mod_patch_fd;
 
-      rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), 0);
-      rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), 0);
+      rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), ENDRECORD);
+      rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), ENDRECORD);
 
       if (report)
         {
-          rel_add_records (&report->perms_changed_dirs, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), 0);
+          rel_add_records (&report->perms_changed_dirs, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), ENDRECORD);
           if (report->callback)
             {
               t_uchar * escape_tmp;
@@ -1397,12 +1397,12 @@
           int orig_out_fd;
           int mod_out_fd;
 
-          rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), 0);
-          rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), 0);
+          rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), ENDRECORD);
+          rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), ENDRECORD);
 
           if (report)
             {
-              rel_add_records (&report->modified_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), 0);
+              rel_add_records (&report->modified_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), ENDRECORD);
               if (report->callback)
                 {
                   t_uchar * escape_tmp;
@@ -1444,12 +1444,12 @@
       t_uchar * patch_dir;
       int orig_out_fd;
 
-      rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), 0);
-      rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), 0);
+      rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), ENDRECORD);
+      rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), ENDRECORD);
 
       if (report)
         {
-          rel_add_records (&report->modified_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), 0);
+          rel_add_records (&report->modified_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), ENDRECORD);
           if (report->callback)
             {
               t_uchar * escape_tmp;
@@ -1491,12 +1491,12 @@
       t_uchar * patch_dir;
       int mod_out_fd;
 
-      rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), 0);
-      rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), 0);
+      rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), ENDRECORD);
+      rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), ENDRECORD);
 
       if (report)
         {
-          rel_add_records (&report->modified_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), 0);
+          rel_add_records (&report->modified_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), ENDRECORD);
           if (report->callback)
             {
               t_uchar * escape_tmp;
@@ -1564,12 +1564,12 @@
           int orig_meta_fd;
           int mod_meta_fd;
 
-          rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), 0);
-          rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), 0);
+          rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), ENDRECORD);
+          rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), ENDRECORD);
 
           if (report)
             {
-              rel_add_records (&report->perms_changed_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), 0);
+              rel_add_records (&report->perms_changed_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), ENDRECORD);
               if (report->callback)
                 {
                   t_uchar * escape_tmp;
@@ -1646,12 +1646,12 @@
         case 1:
           {
 
-            rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), 0);
-            rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), 0);
+            rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), ENDRECORD);
+            rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), ENDRECORD);
 
             if (report)
               {
-                rel_add_records (&report->modified_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), 0);
+                rel_add_records (&report->modified_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), ENDRECORD);
                 if (report->callback)
                   {
                     t_uchar * escape_tmp;
@@ -1673,12 +1673,12 @@
             t_uchar * orig_copy;
             t_uchar * mod_copy;
 
-            rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), 0);
-            rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), 0);
+            rel_add_records (orig_index_names_output, rel_singleton_record_taking (rel_make_field_str (orig_loc)), ENDRECORD);
+            rel_add_records (mod_index_names_output, rel_singleton_record_taking (rel_make_field_str (mod_loc)), ENDRECORD);
 
             if (report)
               {
-                rel_add_records (&report->modified_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), 0);
+                rel_add_records (&report->modified_files, rel_make_record_2_taking (rel_make_field_str (orig_loc), rel_make_field_str (mod_loc)), ENDRECORD);
                 if (report->callback)
                   {
                     t_uchar * escape_tmp;
@@ -1895,12 +1895,12 @@
 
           if (!added_orig && !assoc_get_str_taking (*orig_has_dir_id, rel_field_ref (container_id_field)) && assoc_get_str_taking (orig_dir_loc_of, rel_field_ref (container_id_field)))
             {
-              rel_add_records (added_orig_container_ids, rel_singleton_record_taking (rel_field_ref (container_id_field)), 0);
+              rel_add_records (added_orig_container_ids, rel_singleton_record_taking (rel_field_ref (container_id_field)), ENDRECORD);
               added_orig = 1;
             }
           if (!added_mod && !assoc_get_str_taking (*mod_has_dir_id, rel_field_ref (container_id_field)) && assoc_get_str_taking (mod_dir_loc_of, rel_field_ref (container_id_field)))
             {
-              rel_add_records (added_mod_container_ids, rel_singleton_record_taking (rel_field_ref (container_id_field)), 0);
+              rel_add_records (added_mod_container_ids, rel_singleton_record_taking (rel_field_ref (container_id_field)), ENDRECORD);
               added_mod = 1;
             }
 
@@ -1935,7 +1935,7 @@
           rel_field deep_loc_field;
 
           deep_loc_field = assoc_get_taking (dir_loc_of, rel_make_field_str (deep_id));
-          rel_add_records (locs_out, rel_singleton_record_taking (rel_field_ref (deep_loc_field)), 0);
+          rel_add_records (locs_out, rel_singleton_record_taking (rel_field_ref (deep_loc_field)), ENDRECORD);
           assoc_set_taking (has_ids, rel_make_field_str (deep_id), rel_field_ref (deep_loc_field));
 
           rel_field_unref (deep_loc_field);
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/merge-points.c tla-1.3.1-fix-1/src/tla/libarch/merge-points.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/merge-points.c	2005-03-17 17:46:56.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/merge-points.c	2005-04-20 19:28:23.000000000 +0200
@@ -48,7 +48,7 @@
       path = arch_log_file (tree_root, into_archive, into_spec);
       level = arch_parse_package_name (arch_ret_patch_level, 0, into_spec);
 
-      rel_add_records (&source_logs, rel_make_record_2_taking (rel_make_field_str (into_spec), rel_make_field_str (path)), 0);
+      rel_add_records (&source_logs, rel_make_record_2_taking (rel_make_field_str (into_spec), rel_make_field_str (path)), ENDRECORD);
 
       lim_free (0, path);
       lim_free (0, level);
@@ -96,7 +96,7 @@
   if (arch_valid_package_name (into_spec, arch_no_archive, arch_req_patch_level, 0))
     {
       if (!upto)
-        rel_add_records (&source_revisions, rel_singleton_record_taking (rel_make_field_str (into_spec)), 0);
+        rel_add_records (&source_revisions, rel_singleton_record_taking (rel_make_field_str (into_spec)), ENDRECORD);
       else
         {
           t_uchar * into_version = 0;
@@ -106,7 +106,7 @@
           all_source_revisions = arch_archive_revisions (into_arch, into_version, 2);
           for (x = 0; x < rel_n_records (all_source_revisions); ++x)
             {
-              rel_add_records (&source_revisions, rel_copy_record (rel_peek_record (all_source_revisions, x)), 0);
+              rel_add_records (&source_revisions, rel_copy_record (rel_peek_record (all_source_revisions, x)), ENDRECORD);
               if (!str_cmp (rel_peek_str (all_source_revisions, x, 0), into_spec))
                 break;
             }
@@ -201,7 +201,7 @@
   for (x = 0; x < rel_n_records (new_patches); ++x)
     {
       if (!str_cmp_prefix (prefix, rel_peek_str (new_patches, x, 0)))
-        rel_add_records (out, rel_make_record_2_taking (rel_make_field_str (level), rel_get_field (new_patches, x, 0)), 0);
+        rel_add_records (out, rel_make_record_2_taking (rel_make_field_str (level), rel_get_field (new_patches, x, 0)), ENDRECORD);
     }
 
   free_assoc_table (headers);
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/missing.c tla-1.3.1-fix-1/src/tla/libarch/missing.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/missing.c	2005-03-17 17:46:50.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/missing.c	2005-04-20 19:28:33.000000000 +0200
@@ -124,7 +124,7 @@
         log = arch_archive_log (arch, revision);
 
         if (is_a_patch_present(has, log))
-            rel_add_records (&to_skip, rel_copy_record (rel_peek_record (unfiltered, x)), 0);
+            rel_add_records (&to_skip, rel_copy_record (rel_peek_record (unfiltered, x)), ENDRECORD);
         lim_free (0, revision);
       }
     rel_free_table (has);
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/my.c tla-1.3.1-fix-1/src/tla/libarch/my.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/my.c	2005-03-17 17:46:56.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/my.c	2005-04-20 19:29:02.000000000 +0200
@@ -481,7 +481,7 @@
    */
   if (dir_spec && (op == arch_library_first))
     {
-      rel_add_records (&new_path, rel_singleton_record_taking (rel_make_field_str (dir_spec)), 0);
+      rel_add_records (&new_path, rel_singleton_record_taking (rel_make_field_str (dir_spec)), ENDRECORD);
     }
 
   /* copy the old path, removing dir_spec (if any)
@@ -494,7 +494,7 @@
         {
           if (str_cmp (rel_peek_str (old_path, x, 0), dir_spec))
             {
-              rel_add_records (&new_path, rel_singleton_record_taking (rel_get_field (old_path, x, 0)), 0);
+              rel_add_records (&new_path, rel_singleton_record_taking (rel_get_field (old_path, x, 0)), ENDRECORD);
             }
         }
     }
@@ -503,7 +503,7 @@
    */
   if (dir_spec && (op == arch_library_last))
     {
-      rel_add_records (&new_path, rel_singleton_record_taking (rel_make_field_str (dir_spec)), 0);
+      rel_add_records (&new_path, rel_singleton_record_taking (rel_make_field_str (dir_spec)), ENDRECORD);
     }
 
 
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/namespace.c tla-1.3.1-fix-1/src/tla/libarch/namespace.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/namespace.c	2005-03-17 17:46:50.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/namespace.c	2005-04-20 19:29:32.000000000 +0200
@@ -849,7 +849,7 @@
   for (x = 0; x < rel_n_records (in); ++x)
     {
       if (arch_valid_archive_name (rel_peek_str (in, x, field)))
-        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), 0);
+        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), ENDRECORD);
     }
 
   return answer;
@@ -865,7 +865,7 @@
   for (x = 0; x < rel_n_records (in); ++x)
     {
       if (arch_valid_package_name (rel_peek_str (in, x, field), arch_no_archive, arch_req_category, 0))
-        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), 0);
+        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), ENDRECORD);
     }
 
   return answer;
@@ -880,7 +880,7 @@
   for (x = 0; x < rel_n_records (in); ++x)
     {
       if (arch_valid_package_name (rel_peek_str (in, x, field), arch_no_archive, arch_req_package, 0))
-        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), 0);
+        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), ENDRECORD);
     }
 
   return answer;
@@ -895,7 +895,7 @@
   for (x = 0; x < rel_n_records (in); ++x)
     {
       if (arch_valid_package_name (rel_peek_str (in, x, field), arch_no_archive, arch_req_version, 0))
-        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), 0);
+        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), ENDRECORD);
     }
 
   return answer;
@@ -910,7 +910,7 @@
   for (x = 0; x < rel_n_records (in); ++x)
     {
       if (arch_valid_package_name (rel_peek_str (in, x, field), arch_no_archive, arch_req_patch_level, 0))
-        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), 0);
+        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), ENDRECORD);
     }
 
   return answer;
@@ -925,7 +925,7 @@
   for (x = 0; x < rel_n_records (in); ++x)
     {
       if (arch_valid_patch_level_name (rel_peek_str (in, x, field)))
-        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), 0);
+        rel_add_records (&answer, rel_copy_record (rel_peek_record (in, x)), ENDRECORD);
     }
 
   return answer;
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/patch-logs.c tla-1.3.1-fix-1/src/tla/libarch/patch-logs.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/patch-logs.c	2005-03-17 17:46:56.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/patch-logs.c	2005-04-20 19:30:11.000000000 +0200
@@ -380,7 +380,7 @@
         continue;
 
       if (arch_valid_package_name (rel_peek_str (dir_listing, x, 0), arch_no_archive, arch_req_category, 0))
-        rel_add_records (&categories, rel_copy_record (rel_peek_record (dir_listing, x)), 0);
+        rel_add_records (&categories, rel_copy_record (rel_peek_record (dir_listing, x)), ENDRECORD);
     }
   rel_free_table (dir_listing);
 
@@ -422,7 +422,7 @@
 
               branch_path = file_name_in_vicinity (0, cat_dir, maybe_branch);
               rel_field_ref (maybe_branch_field);
-              rel_add_records (&branches, rel_make_record_2_taking (maybe_branch_field, rel_make_field_str (branch_path)), 0);
+              rel_add_records (&branches, rel_make_record_2_taking (maybe_branch_field, rel_make_field_str (branch_path)), ENDRECORD);
               lim_free (0, branch_path);
             }
 
@@ -475,7 +475,7 @@
 
               version_path = file_name_in_vicinity (0, branch_dir, maybe_version);
               rel_field_ref (maybe_version_field);
-              rel_add_records (&versions, rel_make_record_2_taking (maybe_version_field, rel_make_field_str (version_path)), 0);
+              rel_add_records (&versions, rel_make_record_2_taking (maybe_version_field, rel_make_field_str (version_path)), ENDRECORD);
               lim_free (0, version_path);
             }
 
@@ -528,7 +528,7 @@
               t_uchar * fqversion;
 
               fqversion = arch_fully_qualify (maybe_archive, version);
-              rel_add_records (&log_versions, rel_make_record_2_taking (rel_make_field_str (fqversion), rel_make_field_str (patch_log_path)), 0);
+              rel_add_records (&log_versions, rel_make_record_2_taking (rel_make_field_str (fqversion), rel_make_field_str (patch_log_path)), ENDRECORD);
               lim_free (0, fqversion);
             }
 
@@ -623,14 +623,14 @@
 
           if (!full)
             {
-              rel_add_records (&answer, rel_make_record_2_taking (rel_get_field (dir_listing, x, 0), rel_make_field_str (path)), 0);
+              rel_add_records (&answer, rel_make_record_2_taking (rel_get_field (dir_listing, x, 0), rel_make_field_str (path)), ENDRECORD);
             }
           else
             {
               t_uchar * full_name = 0;
 
               full_name = str_alloc_cat_many (0, archive, "/", version, "--", rel_peek_str (dir_listing, x, 0), str_end);
-              rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (full_name), rel_make_field_str (path)), 0);
+              rel_add_records (&answer, rel_make_record_2_taking (rel_make_field_str (full_name), rel_make_field_str (path)), ENDRECORD);
               lim_free (0, full_name);
             }
 
@@ -774,7 +774,7 @@
       if (headers)
         assoc_set_taking (headers, rel_make_field_str (field_name), rel_make_field_str (field_value));
       if (headers_list)
-        rel_add_records (headers_list, rel_make_record_2_taking (rel_make_field_str (field_name), rel_make_field_str (field_value)), 0);
+        rel_add_records (headers_list, rel_make_record_2_taking (rel_make_field_str (field_name), rel_make_field_str (field_value)), ENDRECORD);
 
       lim_free (0, field_name);
       lim_free (0, field_value);
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/pfs-sftp.c tla-1.3.1-fix-1/src/tla/libarch/pfs-sftp.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/pfs-sftp.c	2005-03-17 19:33:26.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/pfs-sftp.c	2005-04-20 19:30:25.000000000 +0200
@@ -915,7 +915,7 @@
           if (!dots)
             {
               file = str_save_n (0, pkt+i, len);
-              rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (file)), 0);
+              rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (file)), ENDRECORD);
             }
 
           i += len;
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/pristines.c tla-1.3.1-fix-1/src/tla/libarch/pristines.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/pristines.c	2005-03-23 03:06:26.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/pristines.c	2005-04-20 19:31:05.000000000 +0200
@@ -280,7 +280,7 @@
 
             if (category)
               {
-                rel_add_records (&maybe_categories, rel_singleton_record_taking (rel_make_field_str (category)), 0);
+                rel_add_records (&maybe_categories, rel_singleton_record_taking (rel_make_field_str (category)), ENDRECORD);
               }
             else
               {
@@ -301,7 +301,7 @@
 
                     if (branch)
                       {
-                        rel_add_records (&maybe_branches, rel_singleton_record_taking (rel_make_field_str (branch)), 0);
+                        rel_add_records (&maybe_branches, rel_singleton_record_taking (rel_make_field_str (branch)), ENDRECORD);
                       }
                     else
                       {
@@ -321,7 +321,7 @@
 
                             if (version)
                               {
-                                rel_add_records (&maybe_versions, rel_singleton_record_taking (rel_make_field_str (version)), 0);
+                                rel_add_records (&maybe_versions, rel_singleton_record_taking (rel_make_field_str (version)), ENDRECORD);
                               }
                             else
                               {
@@ -340,7 +340,7 @@
 
                                     if (archive_limit)
                                       {
-                                        rel_add_records (&maybe_archives, rel_singleton_record_taking (rel_make_field_str (archive_limit)), 0);
+                                        rel_add_records (&maybe_archives, rel_singleton_record_taking (rel_make_field_str (archive_limit)), ENDRECORD);
                                       }
                                     else
                                       {
@@ -358,7 +358,7 @@
 
                                             if (revision)
                                               {
-                                                rel_add_records (&maybe_revisions, rel_singleton_record_taking (rel_make_field_str (revision)), 0);
+                                                rel_add_records (&maybe_revisions, rel_singleton_record_taking (rel_make_field_str (revision)), ENDRECORD);
                                               }
                                             else
                                               {
@@ -373,7 +373,7 @@
                                                     t_uchar * fqr = 0;
 
                                                     fqr = arch_fully_qualify (rel_peek_str (maybe_archives, a, 0), rel_peek_str (maybe_revisions, r, 0));
-                                                    rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (fqr)), 0);
+                                                    rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (fqr)), ENDRECORD);
                                                     lim_free (0, fqr);
                                                   }
                                               }
@@ -488,7 +488,7 @@
 
                   if (!vu_lstat (&ign, path, &stat_buf) && S_ISDIR (stat_buf.st_mode))
                     {
-                      rel_add_records (&sibling_paths, rel_singleton_record_taking (rel_make_field_str (path)), 0);
+                      rel_add_records (&sibling_paths, rel_singleton_record_taking (rel_make_field_str (path)), ENDRECORD);
                     }
                   lim_free (0, path);
                 }
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/proj-tree-lint.c tla-1.3.1-fix-1/src/tla/libarch/proj-tree-lint.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/proj-tree-lint.c	2005-03-17 17:46:56.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/proj-tree-lint.c	2005-04-20 19:32:12.000000000 +0200
@@ -267,7 +267,7 @@
   for (i = 0; i < n_records; ++i)
     {
       if (hashtree_find (id_map, hash_key (rel_peek_str (explicit_ids, i, 0)), (void *)rel_peek_str (explicit_ids, i, 0), tree_lint_hashtree_rules) == 0)
-	rel_add_records (ids_sans_files, rel_singleton_record_taking (rel_get_field (explicit_ids, i, 1)), 0);
+	rel_add_records (ids_sans_files, rel_singleton_record_taking (rel_get_field (explicit_ids, i, 1)), ENDRECORD);
     }
 }
 
@@ -308,14 +308,14 @@
    */
   if (category == arch_inventory_unrecognized)
     {
-      rel_add_records (&thunk->answer->unrecognized_files, rel_singleton_record_taking (rel_make_field_str (path)), 0);
+      rel_add_records (&thunk->answer->unrecognized_files, rel_singleton_record_taking (rel_make_field_str (path)), ENDRECORD);
     }
 
   /* files classified as non-source because they lack an inventory id
    */
   if ((category != arch_inventory_source) && has_source_name)
     {
-      rel_add_records (&thunk->answer->warning_files, rel_singleton_record_taking (rel_make_field_str (path)), 0);
+      rel_add_records (&thunk->answer->warning_files, rel_singleton_record_taking (rel_make_field_str (path)), ENDRECORD);
     }
 
 
@@ -325,7 +325,7 @@
     {
       if (safe_access (path, F_OK))
         {
-          rel_add_records (&thunk->answer->symlinks_sans_targets, rel_singleton_record_taking (rel_make_field_str (path)), 0);
+          rel_add_records (&thunk->answer->symlinks_sans_targets, rel_singleton_record_taking (rel_make_field_str (path)), ENDRECORD);
         }
     }
 
@@ -336,7 +336,7 @@
       && (category == arch_inventory_source)
       && (!id || (id[0] == '?')))
     {
-      rel_add_records (&thunk->answer->untagged_files, rel_singleton_record_taking (rel_make_field_str (path)), 0);
+      rel_add_records (&thunk->answer->untagged_files, rel_singleton_record_taking (rel_make_field_str (path)), ENDRECORD);
     }
   else if ((thunk->options->method == arch_explicit_id_tagging) && (category == arch_inventory_source) && !id)
     {
@@ -344,7 +344,7 @@
 
       dir = file_name_directory_file (0, path);
       if (!arch_is_dont_care_explicit_dflt_dir (dir))
-        rel_add_records (&thunk->answer->untagged_files, rel_singleton_record_taking (rel_make_field_str (path)), 0);
+        rel_add_records (&thunk->answer->untagged_files, rel_singleton_record_taking (rel_make_field_str (path)), ENDRECORD);
       lim_free (0, dir);
     }
 
@@ -380,7 +380,7 @@
 		      safe_printfmt (2, "i/o error during inventory traversal (%s) for %s\n", errno_to_string (errn), file);
 		      exit (2);
 		    }
-		  rel_add_records (&thunk->explicit_ids, rel_make_record_2_taking (rel_make_field_str (id), rel_make_field_str (path)), 0);
+		  rel_add_records (&thunk->explicit_ids, rel_make_record_2_taking (rel_make_field_str (id), rel_make_field_str (path)), ENDRECORD);
 		  lim_free (0, id);
 		}
 	      lim_free (0, path_dir);
@@ -419,10 +419,10 @@
             {
               *(rel_table *)ar_push ((void **)&thunk->answer->duplicate_id_groups, 0, sizeof (rel_table)) = rel_table_nil;
               binding->index = ar_size ((void *)thunk->answer->duplicate_id_groups, 0, sizeof (rel_table)) - 1;
-              rel_add_records (&thunk->answer->duplicate_id_groups[binding->index], rel_make_record_2_taking (rel_make_field_str (binding->first_occurence), rel_make_field_str (id)), 0);
+              rel_add_records (&thunk->answer->duplicate_id_groups[binding->index], rel_make_record_2_taking (rel_make_field_str (binding->first_occurence), rel_make_field_str (id)), ENDRECORD);
             }
 
-          rel_add_records (&thunk->answer->duplicate_id_groups[binding->index], rel_singleton_record_taking (rel_make_field_str (path)), 0);
+          rel_add_records (&thunk->answer->duplicate_id_groups[binding->index], rel_singleton_record_taking (rel_make_field_str (path)), ENDRECORD);
         }
 
 
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/tag.c tla-1.3.1-fix-1/src/tla/libarch/tag.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/tag.c	2005-03-17 17:46:50.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/tag.c	2005-04-20 19:32:20.000000000 +0200
@@ -187,7 +187,7 @@
 
   merge_points = arch_archive_merge_points (from_arch, from_revision, 0, 0, 1);
   fqrevision = arch_fully_qualify (arch->name, revision);
-  rel_add_records (&merge_points, rel_make_record_2_taking (rel_make_field_str ("!!!!!nothing-should-depend-on-this"), rel_make_field_str (fqrevision)), 0);
+  rel_add_records (&merge_points, rel_make_record_2_taking (rel_make_field_str ("!!!!!nothing-should-depend-on-this"), rel_make_field_str (fqrevision)), ENDRECORD);
   rel_sort_table_by_field (0, merge_points, 1);
   rel_uniq_by_field (&merge_points, 1);
   arch_sort_table_by_name_field (0, merge_points, 1);
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libarch/whats-new.c tla-1.3.1-fix-1/src/tla/libarch/whats-new.c
--- tla-1.3.1-fix-1.old/src/tla/libarch/whats-new.c	2005-03-17 17:46:56.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libarch/whats-new.c	2005-04-20 19:32:28.000000000 +0200
@@ -41,7 +41,7 @@
 
   while (x < rel_n_records (available))
     {
-      rel_add_records (&answer, rel_singleton_record_taking (rel_get_field (available, x, 0)), 0);
+      rel_add_records (&answer, rel_singleton_record_taking (rel_get_field (available, x, 0)), ENDRECORD);
       ++x;
     }
 
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libawk/relational.c tla-1.3.1-fix-1/src/tla/libawk/relational.c
--- tla-1.3.1-fix-1.old/src/tla/libawk/relational.c	2005-03-17 19:33:26.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libawk/relational.c	2005-04-20 19:32:57.000000000 +0200
@@ -329,6 +329,7 @@
   return answer;
 }
 
+rel_record ENDRECORD = { NULL };
 
 void
 rel_add_records (rel_table * table, ...)
@@ -467,7 +468,7 @@
       while (*end && !char_is_space (*end))
         ++end;
 
-      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str_n (start, end - start)), 0);
+      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str_n (start, end - start)), ENDRECORD);
 
       start = end;
     }
@@ -495,7 +496,7 @@
       while (*end && (*end != '\n'))
         ++end;
 
-      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str_n (start, end - start)), 0);
+      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str_n (start, end - start)), ENDRECORD);
 
       if (*end)
         start = end + 1;
@@ -837,7 +838,7 @@
   lim = ar_size ((void *)t._r, 0, sizeof (rel_record));
   for (x = 0; x < lim; ++x)
     {
-      rel_add_records (&answer, rel_cut_record (fields, t._r[x]), 0);
+      rel_add_records (&answer, rel_cut_record (fields, t._r[x]), ENDRECORD);
     }
 
   return answer;
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libawk/relational.h tla-1.3.1-fix-1/src/tla/libawk/relational.h
--- tla-1.3.1-fix-1.old/src/tla/libawk/relational.h	2005-03-17 17:46:56.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libawk/relational.h	2005-04-20 19:14:54.000000000 +0200
@@ -106,6 +106,9 @@
                                             rel_field f5,
                                             rel_field f6,
                                             rel_field f7);
+
+extern rel_record ENDRECORD;
+
 extern void rel_add_records (rel_table * table, ...);
 extern void rel_add_field_taking (rel_record * r, rel_field field);
 extern void rel_add_field_to_row_taking (rel_table table, ssize_t row, rel_field field);
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libfsutils/dir-listing.c tla-1.3.1-fix-1/src/tla/libfsutils/dir-listing.c
--- tla-1.3.1-fix-1.old/src/tla/libfsutils/dir-listing.c	2005-03-17 17:46:50.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libfsutils/dir-listing.c	2005-04-20 19:33:07.000000000 +0200
@@ -26,7 +26,7 @@
 
   while (!safe_readdir (&file, dir))
     {
-      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (file)), 0);
+      rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (file)), ENDRECORD);
       lim_free (0, file);
     }
 
@@ -50,7 +50,7 @@
     {
       while (!safe_readdir (&file, dir))
         {
-          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (file)), 0);
+          rel_add_records (&answer, rel_singleton_record_taking (rel_make_field_str (file)), ENDRECORD);
           lim_free (0, file);
         }
 
diff -urN --exclude '*~' --exclude tags tla-1.3.1-fix-1.old/src/tla/libfsutils/find-utils.c tla-1.3.1-fix-1/src/tla/libfsutils/find-utils.c
--- tla-1.3.1-fix-1.old/src/tla/libfsutils/find-utils.c	2005-03-17 17:46:50.000000000 +0100
+++ tla-1.3.1-fix-1/src/tla/libfsutils/find-utils.c	2005-04-20 19:33:14.000000000 +0200
@@ -26,7 +26,7 @@
 
   if (!S_ISDIR (stat_buf.st_mode))
     {
-      rel_add_records (out, rel_singleton_record_taking (rel_make_field_str (path)), 0);
+      rel_add_records (out, rel_singleton_record_taking (rel_make_field_str (path)), ENDRECORD);
     }
   else
     {
