1. 05 Aug, 1998 7 commits
  2. 03 Aug, 1998 2 commits
  3. 02 Aug, 1998 5 commits
  4. 27 Jul, 1998 4 commits
  5. 26 Jul, 1998 22 commits
    • Per Cederqvist's avatar
      Protocol buglets fixed. · a68a020e
      Per Cederqvist authored
      a68a020e
    • Per Cederqvist's avatar
    • Per Cederqvist's avatar
      (init_cache): Handle database format 2. · b114adff
      Per Cederqvist authored
      b114adff
    • Per Cederqvist's avatar
      9e99c073
    • Per Cederqvist's avatar
      Remove all traces of the Text_list type. · 75b63921
      Per Cederqvist authored
      75b63921
    • Per Cederqvist's avatar
      033ceaeb
    • Per Cederqvist's avatar
      (prot_a_output_text_list): Removed. · 0b15e0c9
      Per Cederqvist authored
      0b15e0c9
    • Per Cederqvist's avatar
      (Res_type): Removed rt_text_list. · 5365a8f4
      Per Cederqvist authored
      (Result_holder): Removed text_list.
      5365a8f4
    • Per Cederqvist's avatar
      (Text_list): Removed. · bf439231
      Per Cederqvist authored
      bf439231
    • Per Cederqvist's avatar
      Code cleanup. · bfa1a192
      Per Cederqvist authored
      Improve documentation.
      Start using the Local_to_global structure.
      Fixes and improvements to the Local_to_global structure.
      Improve the test suite with new tests of the Local_to_global structure.
      bfa1a192
    • 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