1. 20 Mar, 2012 3 commits
    • Per Cederqvist's avatar
      komwordofday: Better heuristic when finding words. · a2411ef3
      Per Cederqvist authored
      * py-clients/komwordofday.py (komwordofday.append_occurences): Use
      the new lexer instead of splitting on WORDSPLIT.
      (WORDSPLIT): Constant removed.
      (add_words): Use words_in_body() instead of splitting on
      WORDSPLIT.
      (Terminal): New class.
      (Word): New class, inherited from Terminal.
      (Space): Ditto.
      (Begin): Ditto.
      (End): Ditto.
      (Junk): Ditto.
      (words_in_body): New function.
      (lexer): New function.  Split a string into a list of the
      Terminal-derived classes above.
      (Parser): New class.  Compute a list of Word objects that appear
      to be proper words, using heuristics of the acceptable sequences
      of Terminal-derived classes.
      a2411ef3
    • Per Cederqvist's avatar
      Remove trailing whitespace in komwordofday reports. · 9e973283
      Per Cederqvist authored
      * py-clients/komwordofday.py (komwordofday.create_winner): Remove
      trailing whitespace in the generated report.
      9e973283
    • Per Cederqvist's avatar
      Document how to bootstrap the build. · a2bd041c
      Per Cederqvist authored
      * README.Git: New file. Mention mkmi.
      a2bd041c
  2. 01 Mar, 2012 6 commits
  3. 29 Feb, 2012 3 commits
  4. 02 Feb, 2008 2 commits
    • Per Cederqvist's avatar
      Python 2.5.1 update. · 7dcfcfb1
      Per Cederqvist authored
      * py-clients/Makefile.am (pykom$(EXEEXT)): Added "srcdir=." and
      "MAINOBJ=python.o" when invoking make in the linkdir subdir.  This
      seems to help when building against Python 2.5.1.
      7dcfcfb1
    • Per Cederqvist's avatar
      Implemented visible_confs.py, which lists all visible conference · 6ec4443f
      Per Cederqvist authored
      numbers for a particular user.
      
      * py-clients/visible_confs.py: New file.
      * py-clients/Makefile.am (bin_SCRIPTS): Added visible_confs.
      (EXTRA_DIST): Added visible_confs.py.
      (visible_confs): New target.
      6ec4443f
  5. 23 Feb, 2007 5 commits
    • Per Cederqvist's avatar
      Implemeted bulk-eraser.py, which can remove many texts. · 103dfe97
      Per Cederqvist authored
      * py-clients/Makefile.am (EXTRA_DIST): Added bulk-eraser.py.
      (bin_SCRIPTS): Added bulk-eraser.
      (bulk-eraser): New target.
      * py-clients/bulk-eraser.py: New program.  Erase a lot of texts.
      * py-clients: Ignore bulk-eraser.
      103dfe97
    • Per Cederqvist's avatar
      kompolicy.py is written in latin1. · 776befd3
      Per Cederqvist authored
      * py-clients/kompolicy.py: Insert a coding cookie.
      776befd3
    • Per Cederqvist's avatar
      (Late commit of selector.list.) · 20a19b75
      Per Cederqvist authored
      Make it possible to delete many text efficiently from Python.	
      * py-clients/komxxmodule.cc (komxx_question_object): New type.
      (komxx_question_dealloc): New static function.
      (komxx_question_methods): New static table.
      (komxx_question_getattr): New static function.
      (Komxx_question_type): New static table.
      (komxx_session_unsafe_initiate_delete_text): New static function.
      (komxx_session_methods): Added
      session.unsafe_initiate_delete_text.
      * py-clients/selector.list: Added question.status,
      question.receive, question.error and question.error_blocking.
      * py-clients/README: Document
      session.unsafe_initiate_delete_text() and class question.
      20a19b75
    • Per Cederqvist's avatar
      Make it possible to delete many text efficiently from Python. · e40692ee
      Per Cederqvist authored
      * py-clients/komxxmodule.cc (komxx_question_object): New type.
      (komxx_question_dealloc): New static function.
      (komxx_question_methods): New static table.
      (komxx_question_getattr): New static function.
      (Komxx_question_type): New static table.
      (komxx_session_unsafe_initiate_delete_text): New static function.
      (komxx_session_methods): Added
      session.unsafe_initiate_delete_text.
      * py-clients/selector.list: Added question.status,
      question.receive, question.error and question.error_blocking.
      * py-clients/README: Document
      session.unsafe_initiate_delete_text() and class question.
      
      Make it possible to delete a text from Python.
      * py-clients/komxxmodule.cc (komxx_session_unsafe_delete_text):
      New static function.
      (komxx_session_methods): Added session.unsafe_delete_text.
      * py-clients/README: Document session.unsafe_delete_text().
      
      Make Text_mapping::prefetch() available from Python.
      * py-clients/komxxmodule.cc (komxx_text_mapping_prefetch): New
      static function.
      (komxx_text_mapping_methods): Added text_mapping.prefetch.
      * py-clients/README: Document text_mapping.prefetch().
      
      The text_mapping cannot be used before login, so don't allow
      Python programs to obtain it unless they are logged in.
      * py-clients/komxxmodule.cc (komxx_session_text_mapping): Return
      error KOM_LOGIN unless the user is logged in.
      e40692ee
    • Per Cederqvist's avatar
      Fixed off-by-one error that caused · 60489c4c
      Per Cederqvist authored
      Text_mapping_basic<Q>::next_existing to block when it needn't do
      so.
      
      * libkom++/local-text-no-set.cc (Local_text_no_set::get_range):
      Fixed off-by-one error that caused the last item in a range to not
      be considered.  This bug could cause
      Text_mapping_basic<Q>::next_existing() to blockingly fetch a new
      part of the map even though all needed data was present locally.
      60489c4c
  6. 21 Feb, 2007 3 commits
    • Per Cederqvist's avatar
      Use new-style Python classes. · 4c7704f6
      Per Cederqvist authored
      * py-clients/komwordofday.py (komwordofday): Inherit from object.
      * py-clients/kompolicy.py (tty_io): Inherit from object.
      (login): Ditto.
      * py-clients/curmgr.py (marker): Inherit from object.
      (buffer): Ditto.
      (window): Ditto.
      (frame): Ditto.
      * py-clients/graph.py (demo_kom): Inherit from object.
      * py-clients/komdemo.py (demo_kom): Inherit from object.
      * py-clients/t99699.py (window): Inherit from object.
      4c7704f6
    • Per Cederqvist's avatar
      Removed duplicate code in findhole. · bab190ac
      Per Cederqvist authored
      * py-clients/findhole.py (findhole.maybe_enable): Removed.  This
      method was identical to login.maybe_enable which it overrode.
      bab190ac
    • Per Cederqvist's avatar
      Fixed a protocol error on some platforms. · 772d2d35
      Per Cederqvist authored
      * libconnection/058get_last_text_q.cc
      (get_last_text_question::get_last_text_question): Don't produce a
      protocol error if tm_isdst is negative.
      772d2d35
  7. 15 Dec, 2006 1 commit
    • Per Cederqvist's avatar
      Implement 106=set-pers-flags and make it available from Python. · 4a339994
      Per Cederqvist authored
      Make it possible to read the unread-is-secret flag from Python.
      * libconnection/set_pers_flags_q.h: New file.
      * libconnection/106set_pers_flags_q.cc: New file.
      * libconnection/Makefile.am (libconnection_a_SOURCES): Added
      set_pers_flags_q.h and 106set_pers_flags_q.cc.
      * py-clients/komxxmodule.cc (komxx_pers_set_personal_flags): New
      static function.
      (komxx_pers_unread_is_secret): New static function.
      (komxx_pers_methods): Added pers.set_personal_flags and
      pers.unread_is_secret.  Removed a FIXME comment about the flags.
      * py-clients/README: Documented pers.unread_is_secret and
      pers.set_personal_flags.
      4a339994
  8. 13 Dec, 2006 3 commits
    • Per Cederqvist's avatar
      Fixed various C++ errors detected by gcc 4.1.1. · d38f0a35
      Per Cederqvist authored
      * py-clients/komxxmodule.cc (convert_aux_items): Moved, so that
      Komxx_aux_item_type is visible when the template is defined.
      * libkom++/text-mapping.cc (got_reply): Added missing "typename"
      keyword.
      * libkom++/conf-z-info.h (parse_conf_z_info): Declaration added.
      * libconnection/connection.h (Connection): Removed spurious
      "Connection::" prefix in the declaration of Connection::parse.
      * libconnection/async_conf_changed_name.cc
      (Async_administrator<Async_conf_changed_name>::parse): Added
      missing "template<>" in front of the specialization.
      * libconnection/async_text_message.cc
      (Async_administrator<Async_text_message>::parse): Ditto.
      * libconnection/async_text_created.cc
      (Async_administrator<Async_text_created>::parse): Ditto.
      * libconnection/async_i_am_on.cc
      (Async_administrator<Async_i_am_on>::parse): Ditto.
      d38f0a35
    • Per Cederqvist's avatar
      The text number of created texts were not available to TCL code. · d219440e
      Per Cederqvist authored
      * tcl-clients/tcl-glue.cc (tcl_kom_session): Properly return the
      text number when a text is created.  The problem was that there
      were no less than five variables called "rv", and they shadowed
      each other in unfortunate ways.
      d219440e
    • Per Cederqvist's avatar
      Use socklen_t instead of int where appropriate. · 0a6a845d
      Per Cederqvist authored
      * src/isc_tcp.c (isc_tcp_accept_fn): The third argument of accept
      is a socklen_t*, not an int*.
      * src/isc_socket.c (isc_getladdress): Changed the type of len from
      int to socklen_t.
      (isc_getraddress): Ditto.
      * src/isc_udp.c (isc_udp_read_fn): Ditto.
      0a6a845d
  9. 03 Apr, 2006 1 commit
    • Per Cederqvist's avatar
      Make 105=set-keep-commented and 22=set-garb-nice available from · c2e6f7fe
      Per Cederqvist authored
      Python via the Conference caching class.
      
      * libkom++/conf-stat.h, libkom++/conf-stat.cc
      (Conf_stat::set_garb_nice): New method.
      (Conf_stat::set_keep_commented): New method.
      * libkom++/conference.cc, libkom++/conference.h
      (Conference::set_garb_nice): New method.
      (Conference::set_keep_commented): New method.
      * py-clients/README: Document conf.set_garb_nice and
      conf.set_keep_commented.
      * py-clients/komxxmodule.cc
      (komxx_conf_set_garb_nice): New static function.
      (komxx_conf_set_keep_commented): New static function.
      (komxx_conf_methods): Added conf.set_garb_nice and
      conf.set_keep_commented.
      
      Implemented 105=set-keep-commented.
      * libconnection/105set_keep_commented_q.cc: New file.
      * libconnection/set_keep_commented_q.h: New file.
      (set_keep_commented_question): New class.
      * libconnection/Makefile.am (libconnection_a_SOURCES): Added
      set_keep_commented_q.h and 105set_keep_commented_q.cc.
      c2e6f7fe
  10. 07 Nov, 2005 6 commits
    • Per Cederqvist's avatar
      Make 104=map-created-texts accessible from Python using a caching · 3c7aed4b
      Per Cederqvist authored
      class, similar to the one used for mapping local to global text
      numbers.
      
      * libkom++/text-mapping.h (Created_mapping): New typedef.
      (Text_mapping_basic): Documented the use with
      Q=map_created_texts_question.
      * libkom++/text-mapping.h, libkom++/text-mapping.cc
      (Text_mapping_basic<Q>::add_unknown): New method.
      * libkom++/map-cache.cc (Map_cache<Text_mapping>::new_text): Moved
      to text-mapping-instance.cc to avoid duplicate definitions.
      * libkom++/local-text-no-set.h, libkom++/local-text-no-set.cc 
      (Local_text_no_set::erase_above): New method.
      * libkom++/created-mapping-instance.cc: New file, that
      instantiates Text_mapping_basic<map_created_texts_question>,
      Maps<Created_mapping> and Map_cache<Created_mapping>.
      (Map_cache<Created_mapping>::new_text): New method.
      * libkom++/Makefile.am (libkom___a_SOURCES): Added
      created-mapping-instance.cc.
      * py-clients/komxxmodule.cc (komxx_created_mapping_object): New
      typedef.
      (komxx_created_mapping_get_map): New function.
      (komxx_created_mapping_next_existing): New function.
      (komxx_created_mapping_getitem): New function.
      (komxx_created_mapping_dealloc): New function.
      (komxx_created_mapping_methods): New table.
      (komxx_created_mapping_getattr): New function.
      (komxx_created_mapping_as_mapping): New table.
      (Komxx_created_mapping_type): New constant.
      (komxx_session_created_mapping): New function.
      (komxx_session_methods): Added created_mapping.
      * py-clients/README: Document created_mapping.
      3c7aed4b
    • Per Cederqvist's avatar
      Fixed more missing template conversions. · e25d10ac
      Per Cederqvist authored
      * libkom++/map-cache.h (Map_cache::MtMap): Use M, not
      Text_mapping, as the value type of the map.
      (Map_cache::get): The return type is M, not necessarily
      Text_mapping.
      * libkom++/map-cache.cc (Map_cache::get): Ditto.
      e25d10ac
    • Per Cederqvist's avatar
      Fixed missing template conversion in last commit. · 6b3b8b26
      Per Cederqvist authored
      * libkom++/maps.cc, libkom++/maps.h
      (Maps<M>::operator[]): The return value is of type M, which is not
      necessarily a Text_mapping.
      6b3b8b26
    • Per Cederqvist's avatar
      Templatize classes Map_cache and Maps, in preparation for · a28ff82d
      Per Cederqvist authored
      implementing similar functionality for created texts.
      
      * libkom++/map-cache.h: Class Map_cache is now a template, with
      the underlying Text_mapping_basic instantiation as template
      parameter.
      * libkom++/map-cache.cc: Class Map_cache is now a template.
      (Map_cache<M>::get): Use the template parameter M, which is not
      necessarily a Text_mapping.
      (Map_cache<Text_mapping>::new_text): This method is only
      implemented for the Text_mapping instantiation.
      * libkom++/maps.h: Include map-cache.h instead of
      forward-declaring it.
      (class Maps): This is now a template class, with the underlying
      Text_mapping_basic instantiation as template parameter.
      (Maps::read_map_cache): Track type change of Map_cache.
      (Maps::cache): Ditto.
      * libkom++/maps.cc: class Maps is now a template.
      * libkom++/read-order.h: Removed unneeded forward-declaration of
      class Maps.
      * libkom++/session.cc (Session::maps): Track type change of Maps.
      * libkom++/session.h (Session::maps): Track type change of Maps.
      (Session::all_maps): Ditto.
      * libkom++/unread-confs.h (Unread_confs::maps): Track type change
      of Maps.
      * libkom++/text-mapping-instance.cc: Instantiate
      Maps<Text_mapping> and Map_cache<Text_mapping>.
      a28ff82d
    • Per Cederqvist's avatar
      Templatize class Text_mapping, in preparation for implementing a · b7f737f6
      Per Cederqvist authored
      similar class for created texts.
      
      * libkom++/text-mapping.h: Don't forward-declare
      get_map_question.  Forward-declare local_to_global_question.
      (Text_mapping_basic): New template class, based on class
      Text_mapping, with only the name changed.
      (Text_mapping): Now a typedef for
      Text_mapping_basic<local_to_global_question>.
      * libkom++/text-mapping.cc (Text_mapping_basic): New template
      class, based on class Text_mapping, with the additional changes
      listed below.
      (Text_mapping_basic<Q>::Pending::q): The q attribute is now of type
      Q, which is not necessarily a local_to_global_question.
      (Text_mapping_basic<Q>::Pending::Pending): Ditto for the qp
      argument of the constructor.
      (Text_mapping_basic<Q>::get_prefetch): Create a question of type
      Q, which is not necessarily a local_to_global_question.
      * libkom++/text-mapping-instance.cc: New file.  Instantiate
      Text_mapping_basic<local_to_global_question>.
      * libkom++/Makefile.am (libkom___a_SOURCES): Added
      text-mapping-instance.cc.
      * libkom++/maps.h: Include text-mapping, to get the new
      Text_mapping which is a typedef for a template instantiation.
      (Maps::operator=): Explicitly make it not availabe.
      (Maps::Maps(const Maps &)): Ditto.
      * libkom++/maps.cc: Removed commented-out operator=.
      b7f737f6
    • Per Cederqvist's avatar
      Fix bugs in Local_text_no_set related to MAX_LOCAL_TEXT_NO. · e4bd8829
      Per Cederqvist authored
      * libkom++/local-text-no-set.cc (plus_one): New static function.
      (Local_text_no_set::add): Use it, to avoid increasing
      MAX_LOCAL_TEXT_NO (which would overflow to 0).
      e4bd8829
  11. 15 Aug, 2005 3 commits
    • Per Cederqvist's avatar
      Made the Text_mapping class more standalone by removing the · b4915673
      Per Cederqvist authored
      dependency on the Conference class.
      
      * libkom++/text-mapping.h, libkom++/text-mapping.cc
      (Text_mapping::Text_mapping): Replaced the Conference argument
      with a Conf_no and a Connection argument.
      * libkom++/text-mapping.cc (Text_mapping::TMI::TMI):: Replaced the
      Conference argument with a Conf_no and a Connection argument.
      (Text_mapping::TMI::conf): Removed.
      (Text_mapping::TMI::conf_no): New private attribute.
      (Text_mapping::TMI::connection): New private attribute.
      (Text_mapping::get_prefetch): Updated for the new attributes.
      * libkom++/maps.h, libkom++/maps.cc (Maps::Maps): Replaced the
      Conferences argument with a Connection argument.
      * libkom++/session.cc (Session::maps): Updated for the new api of
      the Maps constructor.
      * libkom++/map-cache.h: Removed obsoleted forward declarations of
      Conf_cache and UConf_cache.
      (Map_cache::Map_cache): Replaced the Conferences argument with a
      Connection argument.
      (Map_cache::m_conf_cache): Attribute removed.
      (Map_cache::m_uconf_cache): Attribute removed.
      * libkom++/map-cache.cc (Map_cache::Map_cache): Don't initialize
      the removed attributes.
      (Map_cache::get): Adjusted to the new API of the Text_mapping
      constructor.
      b4915673
    • Per Cederqvist's avatar
      Implemented 104=map-created-texts. · e0b6d97b
      Per Cederqvist authored
      * libconnection/map_created_texts_q.h: New file.  A copy of
      map_created_texts_q.h, with the class name changed to
      map_created_texts_question, and the result_type changed to
      local_to_global_map.
      * libconnection/104map_created_texts_q.cc: New file.  A copy of
      get_created_texts_q.h, with the class name changed to
      map_created_texts_question, and that uses request 104 instead of
      47.
      * libconnection/Makefile.am (libconnection_a_SOURCES): Added
      map_created_texts_q.h and 104map_created_texts_q.cc.
      e0b6d97b
    • Per Cederqvist's avatar
      Removed redundant forward declarations of Conf_stat, Connection, · 3167a733
      Per Cederqvist authored
      LyStr, Pers_stat and Session_info that were present in many of the
      question header files.
      
      * libconnection/change_conference_q.h: Removed redundant forward
      declarations.
      * libconnection/add_member_old_q.h: Ditto.
      * libconnection/create_anonymous_text_q.h: Ditto.
      * libconnection/get_text_q.h: Ditto.
      * libconnection/set_garb_nice_q.h: Ditto.
      * libconnection/create_person_old_q.h: Ditto.
      * libconnection/get_last_text_q.h: Ditto.
      * libconnection/create_conf_old_q.h: Ditto.
      * libconnection/modify_conf_info_q.h: Ditto.
      * libconnection/set_membership_type_q.h: Ditto.
      * libconnection/create_conf_q.h: Ditto.
      * libconnection/login_q.h: Ditto.
      * libconnection/mark_as_read_q.h: Ditto.
      * libconnection/sub_comment_q.h: Ditto.
      * libconnection/set_passwd_q.h: Ditto.
      * libconnection/get_members_old_q.h: Ditto.
      * libconnection/obsolete.h: Ditto.
      * libconnection/unmark_text_q.h: Ditto.
      * libconnection/get_uconf_stat_q.h: Ditto.
      * libconnection/add_footnote_q.h: Ditto.
      * libconnection/modify_text_info_q.h: Ditto.
      * libconnection/modify_system_info_q.h: Ditto.
      * libconnection/who_is_on_ident_q.h: Ditto.
      * libconnection/get_conf_stat_old_q.h: Ditto.
      * libconnection/set_user_area_q.h: Ditto.
      * libconnection/who_am_i_q.h: Ditto.
      * libconnection/set_presentation_q.h: Ditto.
      * libconnection/get_info_old_q.h: Ditto.
      * libconnection/re_z_lookup_q.h: Ditto.
      * libconnection/get_collate_table_q.h: Ditto.
      * libconnection/get_info_q.h: Ditto.
      * libconnection/get_membership_q.h: Ditto.
      * libconnection/add_recipient_q.h: Ditto.
      * libconnection/get_version_info_q.h: Ditto.
      * libconnection/set_conf_type_q.h: Ditto.
      * libconnection/create_text_old_q.h: Ditto.
      * libconnection/shutdown_q.h: Ditto.
      * libconnection/find_previous_text_no_q.h: Ditto.
      * libconnection/sync_q.h: Ditto.
      * libconnection/get_client_name_q.h: Ditto.
      * libconnection/change_what_i_am_doing_q.h: Ditto.
      * libconnection/get_membership_list_q.h: Ditto.
      * libconnection/change_name_q.h: Ditto.
      * libconnection/enable_q.h: Ditto.
      * libconnection/set_client_version_q.h: Ditto.
      * libconnection/set_motd_of_lyskom_q.h: Ditto.
      * libconnection/delete_text_q.h: Ditto.
      * libconnection/query_predefined_aux_items_q.h: Ditto.
      * libconnection/lookup_name_q.h: Ditto.
      * libconnection/set_priv_bits_q.h: Ditto.
      * libconnection/create_anonymous_text_old_q.h: Ditto.
      * libconnection/set_super_conf_q.h: Ditto.
      * libconnection/add_member_q.h: Ditto.
      * libconnection/re_lookup_person_q.h: Ditto.
      * libconnection/create_person_q.h: Ditto.
      * libconnection/set_unread_q.h: Ditto.
      * libconnection/set_supervisor_q.h: Ditto.
      * libconnection/get_created_texts_q.h: Ditto.
      * libconnection/get_time_q.h: Ditto.
      * libconnection/query_async_q.h: Ditto.
      * libconnection/sub_footnote_q.h: Ditto.
      * libconnection/logout_q.h: Ditto.
      * libconnection/sub_member_q.h: Ditto.
      * libconnection/get_members_q.h: Ditto.
      * libconnection/set_permitted_submitters_q.h: Ditto.
      * libconnection/get_static_session_info_q.h: Ditto.
      * libconnection/get_unread_confs_q.h: Ditto.
      * libconnection/delete_conf_q.h: Ditto.
      * libconnection/set_etc_motd_q.h: Ditto.
      * libconnection/get_marks_q.h: Ditto.
      * libconnection/get_map_q.h: Ditto.
      * libconnection/local_to_global_q.h: Ditto.
      * libconnection/find_next_text_no_q.h: Ditto.
      * libconnection/get_conf_stat_q.h: Ditto.
      * libconnection/disconnect_q.h: Ditto.
      * libconnection/sub_recipient_q.h: Ditto.
      * libconnection/send_message_q.h: Ditto.
      * libconnection/mark_text_q.h: Ditto.
      * libconnection/get_person_stat_q.h: Ditto.
      * libconnection/lookup_z_name_q.h: Ditto.
      * libconnection/set_info_q.h: Ditto.
      * libconnection/create_text_q.h: Ditto.
      * libconnection/set_last_read_q.h: Ditto.
      * libconnection/user_active_q.h: Ditto.
      * libconnection/add_comment_q.h: Ditto.
      * libconnection/mark_as_unread_q.h: Ditto.
      * libconnection/get_text_stat_old_q.h: Ditto.
      * libconnection/get_text_stat_q.h: Ditto.
      * libconnection/get_client_version_q.h: Ditto.
      * libconnection/who_is_on_dynamic_q.h: Ditto.
      * libconnection/accept_async_q.h: Ditto.
      * libconnection/set_expire_q.h: Ditto.
      3167a733
  12. 14 Aug, 2005 1 commit
  13. 12 Aug, 2005 1 commit
    • Per Cederqvist's avatar
      Make it possible to store MAX_LOCAL_TEXT_NO in a · 5c16329d
      Per Cederqvist authored
      Local_text_no_set.  Improve Text_mapping.
      
      * libkom++/text-mapping.cc (Text_mapping::add): Update
      first_non_existing when new info becomes available.  Adjusted to
      the new API of Local_text_no_set::add().
      (Text_mapping::add_zero_range): Adjusted to the
      new API of Local_text_no_set::add().
      (Text_mapping::get_prefetch): Update first_non_existing when new
      info becomes available.
      (Text_mapping::chunk_size): Cleanup: use MAX_LOCAL_TEXT_NO instead
      of casting -1 to an unsigned.
      * libkom++/local-text-no-set.h (Local_text_no_set::add): Changed
      arguments from begin and end to first and last.
      (Local_text_no_set::included): Document how the data is stored,
      and change the representation so that MAX_LOCAL_TEXT_NO can be
      included in the set.
      * libkom++/local-text-no-set.cc (Local_text_no_set::add): Changed
      arguments from begin and end to first and last.  All callers
      updated.  Adjusted to new internal representation.
      (Local_text_no_set::present): Adjusted to new internal
      representation.
      (Local_text_no_set::erase): Ditto.
      (Local_text_no_set::get_range): Ditto.
      5c16329d
  14. 31 Jul, 2005 1 commit
    • Per Cederqvist's avatar
      Implement 103=local-to-global, and use it instead of 34=get-map. · 6c19eb29
      Per Cederqvist authored
      Make it possible to efficiently traverse all local numbers forward
      from Python.
      * py-clients/README: Document text_mapping.next_existing.
      * py-clients/komxxmodule.cc (komxx_text_mapping_next_existing):
      New static function.
      (komxx_text_mapping_methods): Added text_mapping.next_existing.
      * libkom++/text-mapping.cc: Use local_to_global_q instead of
      get_map_q.
      (Text_mapping::Pending): Changed types accordingly.
      * libkom++/text-mapping.h, libkom++/text-mapping.cc 
      (Text_mapping::next_existing): New method.
      (Text_mapping::add(const Local2Global&)): Removed.
      (Text_mapping::add(const local_to_global_map&)): New private
      method.
      * libkom++/text-mapping.h (Text_mapping::add_zero_range): Now private.
      (Text_mapping::chunk_size): Now private.
      * libkom++/local-to-global-map.cc: New file.
      * libkom++/local-to-global-map.h: New file.
      (local_to_global_map): New class.
      * libkom++/local-text-no-set.h, libkom++/local-text-no-set.cc
      (Local_text_no_set::get_range): New method.
      * libkom++/Makefile.am (libkomtypes_a_SOURCES): Added
      local-to-global-map.cc and local-to-global-map.h.
      * libconnection/local_to_global_q.h: New file, based on
      get_map_q.h.
      * libconnection/Makefile.am (libconnection_a_SOURCES): Added
      local_to_global_q.h and 103local_to_global_q.cc.
      * libconnection/103local_to_global_q.cc: A copy of 034get_map_q.cc
      with the changes:
      (local_to_global_question): New class, modeled after
      get_map_question, but using request 103.
      (local_to_global_question::parser): Use local_to_global_map to
      store the result.
      6c19eb29
  15. 16 Jun, 2005 1 commit
    • Per Cederqvist's avatar
      Implement 102=set-membership-type and make it accessible from · 17be5f84
      Per Cederqvist authored
      class Session and Python.
      
      * py-clients/README: Document session.set_membership_type.
      * py-clients/komxxmodule.cc (komxx_session_set_membership_type):
      New static function.
      (komxx_session_methods): Added session.set_membership_type.
      * libkom++/session.h, libkom++/session.cc
      (Session::set_membership_type): New method.
      * libkom++/membership.h, libkom++/membership.cc
      (Membership::set_membership_type): New method.
      * libconnection/Makefile.am (libconnection_a_SOURCES): Added
      set_membership_type_q.h and 102set_membership_type_q.cc.
      * libconnection/102set_membership_type_q.cc, 
      libconnection/set_membership_type_q.h: New files.
      (set_membership_type_question): New class.
      
      Refactoring: create append_membership_type().
      * libkom++/prot-a-LyStr.h, libkom++/prot-a-LyStr.cc
      (prot_a_LyStr::append_membership_type): New method.
      * libconnection/100add_member_q.cc
      (add_member_question::add_member_question): Use
      prot_a_LyStr.append_membership_type() to simplify code.
      17be5f84