comparison src/redisplay.c @ 603:1c880911c386

[xemacs-hg @ 2001-06-01 08:23:09 by martinb] Fix a bunch of 128-bit bugs
author martinb
date Fri, 01 Jun 2001 08:23:12 +0000
parents ed8e2ee8d29d
children 38db05db9cb5
comparison
equal deleted inserted replaced
602:b9f1a2e84ead 603:1c880911c386
6624 Qpost_redisplay_hook); 6624 Qpost_redisplay_hook);
6625 #endif /* INHIBIT_REDISPLAY_HOOKS */ 6625 #endif /* INHIBIT_REDISPLAY_HOOKS */
6626 } 6626 }
6627 6627
6628 6628
6629 static char window_line_number_buf[32];
6630
6631 /* Efficiently determine the window line number, and return a pointer 6629 /* Efficiently determine the window line number, and return a pointer
6632 to its printed representation. Do this regardless of whether 6630 to its printed representation. Do this regardless of whether
6633 line-number-mode is on. The first line in the buffer is counted as 6631 line-number-mode is on. The first line in the buffer is counted as
6634 1. If narrowing is in effect, the lines are counted from the 6632 1. If narrowing is in effect, the lines are counted from the
6635 beginning of the visible portion of the buffer. */ 6633 beginning of the visible portion of the buffer. */
6650 : marker_position (w->pointm[type])); 6648 : marker_position (w->pointm[type]));
6651 EMACS_INT line; 6649 EMACS_INT line;
6652 6650
6653 line = buffer_line_number (b, pos, 1); 6651 line = buffer_line_number (b, pos, 1);
6654 6652
6655 long_to_string (window_line_number_buf, line + 1); 6653 {
6656 6654 static char window_line_number_buf[DECIMAL_PRINT_SIZE (long)];
6657 return window_line_number_buf; 6655
6656 long_to_string (window_line_number_buf, line + 1);
6657
6658 return window_line_number_buf;
6659 }
6658 } 6660 }
6659 6661
6660 6662
6661 /* Given a character representing an object in a modeline 6663 /* Given a character representing an object in a modeline
6662 specification, return a string (stored into the global array 6664 specification, return a string (stored into the global array
6696 { 6698 {
6697 Bufpos pt = (w == XWINDOW (Fselected_window (Qnil))) 6699 Bufpos pt = (w == XWINDOW (Fselected_window (Qnil)))
6698 ? BUF_PT (b) 6700 ? BUF_PT (b)
6699 : marker_position (w->pointm[type]); 6701 : marker_position (w->pointm[type]);
6700 int col = column_at_point (b, pt, 1) + !!column_number_start_at_one; 6702 int col = column_at_point (b, pt, 1) + !!column_number_start_at_one;
6701 char buf[32]; 6703 char buf[DECIMAL_PRINT_SIZE (long)];
6702 6704
6703 long_to_string (buf, col); 6705 long_to_string (buf, col);
6704 6706
6705 Dynarr_add_many (mode_spec_bufbyte_string, 6707 Dynarr_add_many (mode_spec_bufbyte_string,
6706 (const Bufbyte *) buf, strlen (buf)); 6708 (const Bufbyte *) buf, strlen (buf));