1. 01 Jan, 1998 21 commits
    • Richard M. Stallman's avatar
      (move_gap): Use move_gap_both. · 3be11131
      Richard M. Stallman authored
      (move_gap_both): New function.
      (gap_left, gap_right): Take both charpos and bytepos args.
      (adjust_markers_gap_motion): Renamed from adjust_markers and simplified.
      (adjust_markers_for_delete): New function.
      (adjust_markers_for_insert): Take args in chars and bytes.
      Also new arg BEFORE_MARKERS.  One call does all marker updating
      needed for any insert.
      (adjust_point): Take 2 args and update PT and PT_BYTE.
      (make_gap): Handle bytes vs chars.
      (insert, insert_and_inherit): Handle bytes vs chars.
      Pass new BEFORE_MARKERS arg to insert_1.
      (insert_before_markers, insert_before_markers_and_inherit): Likewise.
      (insert_from_string, insert_from_string_before_markers): Likewise.
      (insert_from_buffer): Likewise.
      (insert_1): Handle bytes vs chars.  New arg BEFORE_MARKERS.
      (insert_from_string_1, insert_from_buffer_1): Likewise.
      (replace_range): Likewise.
      (del_range_2): New subroutine, taken from del_range_1.
      (del_range_1): Use del_range_2.
      (del_range_byte, del_range_both): New functions.
      3be11131
    • Richard M. Stallman's avatar
      Update copyright year. · 604ee0f3
      Richard M. Stallman authored
      604ee0f3
    • Richard M. Stallman's avatar
      (DECODE_POSITION): New macro. · 69f9064e
      Richard M. Stallman authored
      (CHAR_TO_BYTE, BYTE_TO_CHAR): New macros.
      
      (BEG_BYTE, BEGV_BYTE, PT_BYTE, GPT_BYTE)
      (ZV_BYTE, Z_BYTE): New macros.
      (BUF_BEG_BYTE, BUF_BEGV_BYTE, BUF_PT_BYTE, BUF_GPT_BYTE)
      (BUF_ZV_BYTE, BUF_Z_BYTE): New macros.
      (BUF_GAP_END_ADDR): New macro.
      (BEGV_ADDR, PT_ADDR, GPT_ADDR, GAP_END_ADDR, ZV_ADDR, Z_ADDR):
      Use the new ..._byte buffer data.
      (BUFFER_CEILING_OF, BUFFER_FLOOR_OF): Likewise.
      (BUF_GPT_ADDR, BUF_Z_ADDR): Likewise.
      (SET_PT_BOTH, TEMP_SET_PT_BOTH): New macros.
      (SET_PT, TEMP_SET_PT, BUF_SET_PT, BUF_TEMP_SET_PT):
      Call functions with new arg order.
      (SET_BUF_BEGV, SET_BUF_BEGV_BOTH): New macros.
      (SET_BUF_PT): Macro deleted.
      (SET_BUF_ZV): Set charpos and bytepos.
      (SET_BUF_ZV_BOTH, SET_BUF_PT_BOTH): New macros.
      (BYTE_POS_ADDR): Renamed from POS_ADDR.
      (CHAR_POS_ADDR): New macro.
      (FETCH_BYTE): Use BYTE_POS_ADDR.
      (FETCH_MULTIBYTE_CHAR): Use ..._BYTE macros.
      (BUF_CHAR_ADDRESS): Convert charpos to bytepos.
      (BUF_BYTE_ADDRESS): New macro, like the old BUF_CHAR_ADDRESS.
      (PTR_BYTE_POS): Renamed from PTR_CHAR_POS.
      (BUF_PTR_BYTE_POS): New macro.
      (BUF_FETCH_CHAR, BUF_FETCH_BYTE, BUF_FETCH_MULTIBYTE_CHAR): New macros.
      (struct buffer_text): New fields gpt_byte, z_byte.
      (struct buffer): New fields pt_byte, begv_byte, zv_byte.
      69f9064e
    • Richard M. Stallman's avatar
    • Richard M. Stallman's avatar
      (status_notify): Use byte and char pointers. · d8a2934e
      Richard M. Stallman authored
      (Fprocess_send_region): Make bytepos for send_process.
      (read_process_output): Save, restore, and update both kinds of ptrs.
      (send_process): OFFSET is now in bytes.
      d8a2934e
    • Richard M. Stallman's avatar
      (set_point, temp_set_point): Swap args in decl. · fdccf446
      Richard M. Stallman authored
      (set_point_both, temp_set_point_both): New decls.
      fdccf446
    • Richard M. Stallman's avatar
      (PRINTDECLARE): Declare old_point_byte and start_point_byte. · 6ddd6eee
      Richard M. Stallman authored
      (PRINTPREPARE): For a marker, set old_point_byte and start_point_byte.
      Set both kinds of PT from the marker.
      (PRINTFINISH): For a marker, use set_marker_both.
      Restore both kinds of PT.
      (print): For strings and symbols, handle multibyte chars.
      6ddd6eee
    • Richard M. Stallman's avatar
      (readchar_backlog): New variable. · 6f7f43d5
      Richard M. Stallman authored
      (readchar): When fetching from buffer or marker,
      use readchar_backlog to fetch bytes from a character.
      (unreadchar): Increment readchar_backlog.
      (readevalloop, Fread): Init readchar_backlog.
      6f7f43d5
    • Richard M. Stallman's avatar
    • Richard M. Stallman's avatar
      (scan_sexps_forward): Additional arg FROM_BYTE. Calls changed. · 6a140a74
      Richard M. Stallman authored
      (find_defun_start): Additional arg POS_BYTE.
      Save final byte pos in find_start_value_byte.
      (find_start_value_byte): New variable.
      
      (Fforward_comment): Scan by bytes and chars.
      (Fbackward_prefix_chars): Scan by bytes and chars.
      (scan_words, scan_sexps_forward): Scan bytes as well as chars.
      (skip_chars, scan_lists): Scan by bytes and chars.  Now static.
      
      (char_quoted): Take charpos and bytepos as args.
      (back_comment): Likewise.
      (update_syntax_table): Arg renamed.
      (inc_bytepos, dec_bytepos): New functions.
      6a140a74
    • Richard M. Stallman's avatar
      (looking_at_1): Use bytepos to call re_search_2. · fa8ed3e0
      Richard M. Stallman authored
      Convert search regs to charpos, if search succeeded.
      (search_buffer): Likewise.  Also convert charpos <-> bytepos
      in non-regexp case.
      (scan_buffer): Convert charpos <-> bytepos.
      (scan_newline): New function.
      (find_next_newline): Function deleted.
      (set_search_regs): Args now in bytes; convert to charpos.
      (Freplace_match): Convert charpos <-> bytepos when scanning case.
      fa8ed3e0
    • Richard M. Stallman's avatar
      (SETUP_SYNTAX_TABLE_FOR_OBJECT): Call bytepos_to_charpos. · 4bbd5bc3
      Richard M. Stallman authored
      Wrap in  if (1) ... else.
      4bbd5bc3
    • Richard M. Stallman's avatar
      (casify_region): Scan in bytes and chars. · 4c7b7eab
      Richard M. Stallman authored
      (casify_object, casify_region): Declare str, workbuf as unsigned char.
      4c7b7eab
    • Richard M. Stallman's avatar
      (marker.o): Depend on charset.h. · 3fa51c4e
      Richard M. Stallman authored
      3fa51c4e
    • Richard M. Stallman's avatar
      (forward_point): Function deleted. · 049749e6
      Richard M. Stallman authored
      (Fforward_point): Just add.
      (Fforward_char): Don't call forward_point, just add.
      (Fforward_line): Use scan_newline.
      (Fdelete_char): No need for forward_point, just add.
      (Fdelete_backward_char): Handle bytes and chars.
      (internal_self_insert): Handle bytes and chars.
      049749e6
    • Richard M. Stallman's avatar
      ac98710c
    • Richard M. Stallman's avatar
      (command_loop_1): Use PT_BYTE when calling FETCH_BYTE. · 8458ede6
      Richard M. Stallman authored
      Instead of Fforward_point, just add.
      8458ede6
    • Richard M. Stallman's avatar
      (Fmake_indirect_buffer): Use set_marker_both. · 3f236a40
      Richard M. Stallman authored
      (set_buffer_internal_1): Likewise.
      (set_buffer_temp): Likewise.
      
      (set_buffer_temp): Update BUF_PT_BYTE, BUF_BEGV_BYTE and BUF_ZV_BYTE.
      (Fmake_indirect_buffer, set_buffer_internal_1):
      Set up the pt, begv and zv markers with both kinds of position.
      Set BUF_PT_BYTE, BUF_BEGV_BYTE, BUF_ZV_BYTE.
      (Fget_buffer_create): Set BUF_..._BYTE.
      3f236a40
    • Richard M. Stallman's avatar
      (marker_byte_position): Renamed from marker_position. · 1389ad71
      Richard M. Stallman authored
      (marker_position): New function returns the charpos.
      (Fbuffer_has_markers_at): Test the marker's charpos.
      (set_marker_restricted, Fset_marker): Set both kinds of position.
      Optimize case where POSITION is a marker.
      (set_marker_both, set_marker_restricted_both): New functions.
      (Fmarker_position): Use the charpos.
      
      (charpos_to_bytepos, bytepos_to_charpos): New functions.
      (buf_charpos_to_bytepos, buf_bytepos_to_charpos): New functions.
      1389ad71
    • Richard M. Stallman's avatar
      (redisplay_internal): Use scan_newline. · 12adba34
      Richard M. Stallman authored
      (try_window_id): Use scan_newline.
      (display_text_line): Use scan_newline.
      
      (pos_tab_indent): Moved from indent,c.  Now static.
      Take POS in bytes and chars.  Callers changed.
      
      (redisplay_window): Handle byte and char positions.
      (try_window): Don't move W->start if it's already at right place.
      
      (display_count_lines): Several changes in args.
      Do the work directly.
      (display_scan_buffer): Function deleted.
      (decode_mode_spec): Pass new arg.
      (message_log_check_duplicate): Take charpos and bytepos args.
      (message_dolog): Use markers to update old PT, BEGV, ZV.
      Use scan_newline.  Handle positions in bytes and chars.
      
      (try_window): Pass bytepos to and from display_text_line.
      (try_window_id): Likewise.  Use byte pos as well as charpos.
      (redisplay_internal): Handle bytepos for tlbufpos.
      
      (message): Cast last arg to doprnt.
      12adba34
    • Richard M. Stallman's avatar
      (unshow_buffer): Set PT with TEMP_SET_PT_BOTH. · b73ea88e
      Richard M. Stallman authored
      (Fset_window_buffer): Use set_marker_both.
      (Fselect_window, Fscroll_other_window, save_window_save): Likewise.
      (Fset_window_configuration): Pass p->mark itself to Fset_marker
      and set_marker_restricted_both.
      (temp_output_buffer_show): Use set_marker_restricted_both.
      (window_scroll): Save and restore both kinds of pointers.
      
      (Fdelete_other_windows): Rely on vmotion to give bytepos.
      Use set_marker_both.  Use byte positions.
      (Frecenter): Likewise.
      (Fmove_to_window_line): Use set_marker_both and Fgoto_char.
      b73ea88e
  2. 31 Dec, 1997 7 commits
  3. 30 Dec, 1997 1 commit
  4. 28 Dec, 1997 2 commits
  5. 27 Dec, 1997 1 commit
  6. 26 Dec, 1997 4 commits
  7. 21 Dec, 1997 4 commits