1. 26 Jul, 1998 29 commits
    • Per Cederqvist's avatar
      (DATABASE VERSION 2): CONF-RECORD and PERS-RECORD uses the · 2f3a75d9
      Per Cederqvist authored
      	Local_to_global structure.
      2f3a75d9
    • Per Cederqvist's avatar
      Updated. · bc3cc783
      Per Cederqvist authored
      bc3cc783
    • Per Cederqvist's avatar
      (cached_get_highest_local_no): Adjusted to the fact that the texts · b1bce4e6
      Per Cederqvist authored
      	member is now a l2g.
      (cache_sync): Fixed type in some printf format strings.
      b1bce4e6
    • Per Cederqvist's avatar
      (struct delete_list): New struct. · 880ac08d
      Per Cederqvist authored
      (delete_list_append): New static function.
      (execute_deletions): New static function.
      (check_misc_infos): Adjusted to the fact that the texts member of
      	Conference is now a l2g.
      (adjust_text_list): Deleted.
      (check_created_texts): The "created" argument now points to a
      	Local_to_global.  Removed the check for "bad created_texts array"
      	since it can no longer be bad in that way.
      (check_membership): Adjusted to the fact that the texts member of
      	Conference is now a l2g.
      (check_texts_in_conf): The "tlist" argument now points to a
      	Local_to_global.  Removed the check for "bad created_texts array"
      	since it can no longer be bad in that way.
      880ac08d
    • Per Cederqvist's avatar
      Include assert.h. Only include · 2b107568
      Per Cederqvist authored
      stdlib.h if HAVE_STDLIB_H.  Include stdio.h if we didn't get NULL
      from stdlib.h.  Inlucd lyskomd.h and server/smalloc.h.
      (L2G_BLOCKSIZE): Moved here from local-to-global.h.
      (struct l2g_block_info): Likewise.
      (is_dense): New static function.
      (is_empty): New static function.
      (key_value): New static function.
      (sparse_skip_deleted): New static function.
      (sparse_locate_value): New static function.
      (sparse_compact): New static function.
      (add_block): Use srealloc instead of realloc.  Don't initialize
      	start -- the caller is responsible for doing so.
      (delete_block): Use sfree instead of free, and srealloc instead of
      	realloc.
      (make_sparse): Don't change the value of start, since there is no
      	need to, and make_sparse may now be called on an empty block,
      	which would cause start to be set to a garbage value.
      (find_block): Added a const qualifier to the return value and l2g
      	argument.  Use key_value to simplify code.
      (find_block_index_key): Added a const qualifier to the l2g
      	argument.  Use helper functions to simplify the code.  Use
      	sparse_skip_deleted so that the function never returns a deleted
      	key.  Never return deleted keys in dense blocks either.
      (join_range): New static function.
      (join_blocks): New static function.
      (l2g_init): Set first_unused to 1.
      (l2g_clear): Use sfree instead of free.  Set first_unused to 1.
      (l2g_copy): Added const qualifier to the src argument.  Simplified
      	code by using helper functions and relying on the fact that
      	calling l2g_append with a Text_no=0 is a no-op.  Set first_unused
      	of the copy.
      (l2g_append): Send a log message and do nothing if an attempt to
      	set a local number lower than first_unused is detected.  Set
      	first_unused.  Fixed the logic about when to add a new block, when
      	to compact the last block, and when to make it sparse.  Simplify
      	code by using the helper functions.
      (l2g_delete): Don't increase the zeroes counter if a zero is
      	deleted.  Delete the entire block if it became empty.  Attempt to
      	join this block to its neighbors.  Compact the block if it was
      	sparse and contained too many deleted entries.
      (l2g_lookup): Added const qualifier to the l2g argument.  Don't
      	return uninitialized data.  Use helper functions to simplify code
      	and make it slightly faster.
      (l2g_next_key): Added const qualifier to the l2g argument.
      (l2g_first_appendable_key): New function.
      (l2g_delete_global_in_sorted): New function.
      (l2g_compact): Removed.
      (l2g_dump): Switch placement of l2g and file arguments to match
      	other similar functions in the lyskomd code.  Added const
      	qualifier.  Dump first_unused.  Use helper functions to simplify
      	code.
      (l2g_read): Switch placement of l2g and file arguments to match
      	other similar functions in the lyskomd code.  Read first_unused.
      	Return a success indicator.  Detect unexpected EOF conditions.
      (l2g_write): Switch placement of l2g and file arguments to match
      	other similar functions in the lyskomd code.  Write first_unused.
      	Use helper functions to simplify code.
      (l2gi_searchall): Added const qualifier to the l2g argument.
      	Simplify code by calling l2gi_searchsome instead of duplicating
      	the code.
      (l2gi_searchsome): Added const qualifier to the l2g argument.
      	Complain if the begin argument is less than 1.  Don't forget to
      	initialize search_ended.  Set beginval.  Giving end==0 means that
      	the iterator should continue to the end of the set.  Use helper
      	functions to simplify the code.
      (l2gi_next): Use helper functions to simplify code.  The iterator
      	is unlimited if endval==0.
      (l2gi_begin): New function.
      (l2gi_end): New function.
      2b107568
    • Per Cederqvist's avatar
      (add_rec_time): Adjusted to the fact that the texts member of · fff3a251
      Per Cederqvist authored
      	Conference is now a l2g.
      (adjust_read): Likewise.
      (mark_as_read): Likewise.
      (check_membership): Likewise.
      (set_unread): Likewise.
      (set_last_read): Likewise.
      fff3a251
    • Per Cederqvist's avatar
      (clear_text_list): Removed. · 6645a66a
      Per Cederqvist authored
      (copy_text_list): Removed.
      (clear_conference): Adjusted to the fact that the texts member of
      	Conference is now a l2g.
      (init_conference): Likewise.
      (copy_conference): Likewise.  Added const qualifier to the argument.
      (clear_person): Adjusted to the fact that the created_texts member
      	of Person is now a l2g.
      (copy_person): Likewise.
      (init_person): Likewise.
      (init_text_list): Removed.
      (copy_aux_item_list): Added const qualifier to the src argument.
      6645a66a
    • Per Cederqvist's avatar
      (do_delete_pers): Adjusted to the fact that the created_texts member · 04d7e97a
      Per Cederqvist authored
      	of Person is now a l2g.
      (get_created_texts): The return value is now an
      	l2g_iterator_as_text_list, not a Text_list.  Adjusted to the
      	fact that the created_texts member of Person is now a l2g.
      04d7e97a
    • Per Cederqvist's avatar
      (prot_a_output_person): Adjusted to the fact that the created_texts · 9aebc160
      Per Cederqvist authored
      	member of Person is now a l2g.
      (prot_a_output_conference): Adjusted to the fact that the texts
       	member of Conference is now a l2g.
      (prot_a_output_conference_old): Likewise.
      (prot_a_output_l2g_iterator_as_text_list): New function which
      	emulates a Text_list.
      9aebc160
    • Per Cederqvist's avatar
      c58d9235
    • Per Cederqvist's avatar
      (foutput_person_0): Adjusted to new API of foutput_text_list. · 1ea7e221
      Per Cederqvist authored
      (foutput_person_2): Use l2g_write instead of foutput_text_list.
      (foutput_conference_2): Likewise.
      (foutput_conference_1): Adjusted to new API of foutput_text_list.
      (foutput_conference_0): Likewise.
      (foutput_text_list): The text_list argument is now a pointer to
      	Local_to_global instead of a Text_list.  The generated output is
      	still the same.
      (foutput_ulong): Eliminated a future buffer overrun.  Cleaned up the code.
      1ea7e221
    • Per Cederqvist's avatar
      (fparse_conference_2): Use l2g_read instead of fparse_text_list. · 8484c928
      Per Cederqvist authored
      (fparse_person_2): Likewise.
      (fparse_text_list): The result argument now points to a
      	Local_to_global instead of a Text_list.
      8484c928
    • Per Cederqvist's avatar
      (mark_conference_as_changed): Adjusted to the fact that the texts · adb7a81a
      Per Cederqvist authored
      	member of Conference is now a l2g.
      (setup_small_conf): Likewise.
      adb7a81a
    • Per Cederqvist's avatar
      (add_text_in_conf): Adjusted to the fact that the texts member of · 4fefe06b
      Per Cederqvist authored
      	Conference is now a l2g.
      (do_sub_recpt): Likewise.
      (set_loc_no): Removed.
      (adjust_text_list): Removed.
      (do_delete_text): Adjusted to the fact that the created_texts
       	member of Person is now a l2g.
      (do_create_text): Likewise.
      (get_map): The result argument now points to a
       	l2g_iterator_as_text_list instead of a Text_list.  Adjusted to the
       	fact that the texts member of Conference is now a l2g.
      4fefe06b
    • Per Cederqvist's avatar
    • Per Cederqvist's avatar
      (fparse_text_list): Removed. · 500e8dae
      Per Cederqvist authored
      500e8dae
    • Per Cederqvist's avatar
      (foutput_text_list): The text_list argument is now a pointer to · 7c88aa8f
      Per Cederqvist authored
      	Local_to_global instead of a Text_list.
      7c88aa8f
    • Per Cederqvist's avatar
    • Per Cederqvist's avatar
      (get_map): Changed return type from text_list to l2g_iterator_as_text_list. · 5f9dc6b8
      Per Cederqvist authored
      (get_created_texts): Likewise.
      5f9dc6b8
    • Per Cederqvist's avatar
      (copy_conference): The argument is const. · 2279e852
      Per Cederqvist authored
      (copy_aux_item_list): Likewise.
      (init_text_list): Removed.
      2279e852
    • Per Cederqvist's avatar
      (DBCK): Added local-to-global.c. · f99ffd11
      Per Cederqvist authored
      (all-recursive, check-recursive): Require libcheck.a to be built.
      f99ffd11
    • Per Cederqvist's avatar
      (Res_type): Added rt_l2g_iterator_as_text_list. · 8f1aa56c
      Per Cederqvist authored
      (Result_holder): Added l2g_iterator_as_text_list.
      8f1aa56c
    • Per Cederqvist's avatar
      (get_created_texts): Changed type of the result to · 81518ad3
      Per Cederqvist authored
      	L2g_iterator_as_text_list.
      (get_map): Likewise.
      81518ad3
    • Per Cederqvist's avatar
      (struct l2g_block_info): New forward declaration. · 6c0cfa62
      Per Cederqvist authored
      (Local_to_global): New type.
      (L2g_iterator): New type.
      (L2g_iterator_as_text_list): New type.
      (Conference): The texts member is now a Local_to_global, not a Text_list.
      (Person): The created_texts member is now a Local_to_global, not a Text_list.
      6c0cfa62
    • Per Cederqvist's avatar
      Added AC_C_INLINE. · 04e88933
      Per Cederqvist authored
      04e88933
    • Per Cederqvist's avatar
      (main): Removed the 'c' command since l2g_compact no longer exists. · 40dd93af
      Per Cederqvist authored
      Added the 'i' command that tests iterators.  Adjusted to the new API
      of l2g_dump, l2g_read and l2g_write.  Require an extra trailing
      newline after the representation l2g_read expects when the 'r' command
      is used, and produce a corresponding newline with the 'w' command.
      Renamed the 'p' command to 'w'.
      40dd93af
    • Per Cederqvist's avatar
      (l2g_stop): Added a wait statement to avoid creating zombies. · bbf6a23e
      Per Cederqvist authored
      (simple_expect): Added a missing space in a prompt regexp.
      bbf6a23e
    • Per Cederqvist's avatar
      Initial checkin. · 7a27ce1c
      Per Cederqvist authored
      7a27ce1c
    • Per Cederqvist's avatar
      The "C" command now takes the arguments the other way around. Adjust · a23d7d9c
      Per Cederqvist authored
      the test case.  Comments added.  Expect the "u" command to print
      first_unused.
      a23d7d9c
  2. 25 Jul, 1998 1 commit
  3. 20 Jul, 1998 3 commits
    • Per Cederqvist's avatar
      (L2G_BLOCKSIZE): Moved to local-to-global.c. · b91f7803
      Per Cederqvist authored
      (L2g_block_info): Likewise.
      (Local_to_global): Likewise.
      (l2g_copy): Switched placement of src and dest to match other copy
      	functions in the lyskomd code.  Added const qualifier.
      (l2g_lookup): Added const qualifier to the l2g argument.
      (l2g_next_key): Likewise.
      (l2g_compact): Removed.
      (l2g_first_appendable_key): New function.
      (l2g_delete_global_in_sorted): New function.
      (l2g_dump): Switch placement of l2g and file arguments to match
      	other similar functions in the lyskomd code.  Added const
      	qualifier.
      (l2g_write): Likewise.
      (l2g_read): Likewise.
      (l2g_searchall): Added const qualifier.
      (L2g_iterator): Moved to kom-types.h.
      (l2gi_searchsome): Added const qualifier.
      (l2gi_begin): New function.
      (l2gi_end): New function.
      b91f7803
    • Per Cederqvist's avatar
      Fixed indentation of include statements. · fbecb1e2
      Per Cederqvist authored
      fbecb1e2
    • Per Cederqvist's avatar
      30195a73
  4. 19 Jul, 1998 1 commit
  5. 12 Jul, 1998 6 commits