projects
/
chise
/
xemacs-chise.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update.
[chise/xemacs-chise.git]
/
src
/
window.c
diff --git
a/src/window.c
b/src/window.c
index
ef0cf7f
..
ccddef8
100644
(file)
--- a/
src/window.c
+++ b/
src/window.c
@@
-111,14
+111,14
@@
Lisp_Object Vtemp_buffer_show_function;
Lisp_Object Vtemp_buffer_show_hook;
/* If a window gets smaller than either of these, it is removed. */
Lisp_Object Vtemp_buffer_show_hook;
/* If a window gets smaller than either of these, it is removed. */
-int window_min_height;
-int window_min_width;
+Fixnum window_min_height;
+Fixnum window_min_width;
/* Hook run at end of temp_output_buffer_show. */
Lisp_Object Qtemp_buffer_show_hook;
/* Number of lines of continuity in scrolling by screenfuls. */
/* Hook run at end of temp_output_buffer_show. */
Lisp_Object Qtemp_buffer_show_hook;
/* Number of lines of continuity in scrolling by screenfuls. */
-int next_screen_context_lines;
+Fixnum next_screen_context_lines;
/* List of freed window configurations with 1 - 10 windows. */
static Lisp_Object Vwindow_configuration_free_list[10];
/* List of freed window configurations with 1 - 10 windows. */
static Lisp_Object Vwindow_configuration_free_list[10];
@@
-281,9
+281,8
@@
allocate_window (void)
p->face_cachels = Dynarr_new (face_cachel);
p->glyph_cachels = Dynarr_new (glyph_cachel);
p->line_start_cache = Dynarr_new (line_start_cache);
p->face_cachels = Dynarr_new (face_cachel);
p->glyph_cachels = Dynarr_new (glyph_cachel);
p->line_start_cache = Dynarr_new (line_start_cache);
- p->subwindow_instance_cache = make_lisp_hash_table (30,
- HASH_TABLE_KEY_VALUE_WEAK,
- HASH_TABLE_EQ);
+ p->subwindow_instance_cache = make_image_instance_cache_hash_table ();
+
p->line_cache_last_updated = Qzero;
INIT_DISP_VARIABLE (last_point_x, 0);
INIT_DISP_VARIABLE (last_point_y, 0);
p->line_cache_last_updated = Qzero;
INIT_DISP_VARIABLE (last_point_x, 0);
INIT_DISP_VARIABLE (last_point_y, 0);
@@
-3604,9
+3603,7
@@
make_dummy_parent (Lisp_Object window)
p->face_cachels = Dynarr_new (face_cachel);
p->glyph_cachels = Dynarr_new (glyph_cachel);
p->subwindow_instance_cache =
p->face_cachels = Dynarr_new (face_cachel);
p->glyph_cachels = Dynarr_new (glyph_cachel);
p->subwindow_instance_cache =
- make_lisp_hash_table (30,
- HASH_TABLE_KEY_VALUE_WEAK,
- HASH_TABLE_EQ);
+ make_image_instance_cache_hash_table ();
/* Put new into window structure in place of window */
replace_window (window, new);
/* Put new into window structure in place of window */
replace_window (window, new);
@@
-4334,7
+4331,7
@@
window_scroll (Lisp_Object window, Lisp_Object count, int direction,
&&
Dynarr_length (dla) >= (1 + modeline)
&&
&&
Dynarr_length (dla) >= (1 + modeline)
&&
- (dl->ascent - dl->top_clip) - fheight * value > 0)
+ (dl->ascent - dl->top_clip) > fheight * value)
{
WINDOW_TEXT_TOP_CLIP (w) += value * fheight;
MARK_WINDOWS_CHANGED (w);
{
WINDOW_TEXT_TOP_CLIP (w) += value * fheight;
MARK_WINDOWS_CHANGED (w);
@@
-5009,7
+5006,7
@@
struct window_config
/* Record the values of window-min-width and window-min-height
so that window sizes remain consistent with them. */
int min_width, min_height;
/* Record the values of window-min-width and window-min-height
so that window sizes remain consistent with them. */
int min_width, min_height;
- int saved_windows_count;
+ unsigned int saved_windows_count;
/* Zero-sized arrays aren't ANSI C */
struct saved_window saved_windows[1];
};
/* Zero-sized arrays aren't ANSI C */
struct saved_window saved_windows[1];
};
@@
-5024,7
+5021,7
@@
static Lisp_Object
mark_window_config (Lisp_Object obj)
{
struct window_config *config = XWINDOW_CONFIGURATION (obj);
mark_window_config (Lisp_Object obj)
{
struct window_config *config = XWINDOW_CONFIGURATION (obj);
- int i;
+ unsigned int i;
mark_object (config->current_window);
mark_object (config->current_buffer);
mark_object (config->minibuffer_scroll_window);
mark_object (config->current_window);
mark_object (config->current_buffer);
mark_object (config->minibuffer_scroll_window);
@@
-5053,12
+5050,11
@@
mark_window_config (Lisp_Object obj)
return Qnil;
}
return Qnil;
}
-static size_t
-sizeof_window_config_for_n_windows (int n)
+inline static size_t
+sizeof_window_config_for_n_windows (unsigned int n)
{
{
- return (sizeof (struct window_config) +
- /* n - 1 because zero-sized arrays aren't ANSI C */
- (n - 1) *sizeof (struct saved_window));
+ return FLEXIBLE_ARRAY_STRUCT_SIZEOF (struct window_config,
+ struct saved_window, saved_windows, n);
}
static size_t
}
static size_t
@@
-5123,7
+5119,7
@@
static int
window_config_equal (Lisp_Object conf1, Lisp_Object conf2)
{
struct window_config *fig1, *fig2;
window_config_equal (Lisp_Object conf1, Lisp_Object conf2)
{
struct window_config *fig1, *fig2;
- int i;
+ unsigned int i;
/* First check if they are truly the same. */
if (EQ (conf1, conf2))
/* First check if they are truly the same. */
if (EQ (conf1, conf2))
@@
-5178,7
+5174,7
@@
mark_windows_in_use (struct frame *f, int mark)
static Lisp_Object
free_window_configuration (Lisp_Object window_config)
{
static Lisp_Object
free_window_configuration (Lisp_Object window_config)
{
- int i;
+ unsigned int i;
struct window_config *config = XWINDOW_CONFIGURATION (window_config);
/* Free all the markers. It's not completely necessary that
struct window_config *config = XWINDOW_CONFIGURATION (window_config);
/* Free all the markers. It's not completely necessary that
@@
-5230,7
+5226,7
@@
by `current-window-configuration' (which see).
struct window_config *config;
struct saved_window *p;
Lisp_Object new_current_buffer;
struct window_config *config;
struct saved_window *p;
Lisp_Object new_current_buffer;
- int k;
+ unsigned int k;
Lisp_Object frame;
struct frame *f;
struct gcpro gcpro1;
Lisp_Object frame;
struct frame *f;
struct gcpro gcpro1;
@@
-5478,9
+5474,8
@@
by `current-window-configuration' (which see).
set. */
if (NILP (w->subwindow_instance_cache))
w->subwindow_instance_cache =
set. */
if (NILP (w->subwindow_instance_cache))
w->subwindow_instance_cache =
- make_lisp_hash_table (30,
- HASH_TABLE_KEY_VALUE_WEAK,
- HASH_TABLE_EQ);
+ make_image_instance_cache_hash_table ();
+
SET_LAST_MODIFIED (w, 1);
SET_LAST_FACECHANGE (w);
w->config_mark = 0;
SET_LAST_MODIFIED (w, 1);
SET_LAST_FACECHANGE (w);
w->config_mark = 0;
@@
-5729,7
+5724,7
@@
delete_all_subwindows (struct window *w)
}
\f
}
\f
-static int
+static unsigned int
count_windows (struct window *window)
{
return 1 +
count_windows (struct window *window)
{
return 1 +
@@
-5844,7
+5839,7
@@
its value is -not- saved.
Lisp_Object result;
struct frame *f = decode_frame (frame);
struct window_config *config;
Lisp_Object result;
struct frame *f = decode_frame (frame);
struct window_config *config;
- int n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f)));
+ unsigned int n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f)));
int minibuf_height;
int real_font_height;
int minibuf_height;
int real_font_height;
@@
-5861,14
+5856,20
@@
its value is -not- saved.
/*
config->frame_width = FRAME_WIDTH (f);
config->frame_height = FRAME_HEIGHT (f); */
/*
config->frame_width = FRAME_WIDTH (f);
config->frame_height = FRAME_HEIGHT (f); */
- /* When using `push-window-configuration', often the minibuffer ends
+ /* #### When using `push-window-configuration', often the minibuffer ends
up as the selected window because functions run as the result of
user interaction e.g. hyper-apropos. It seems to me the sensible
up as the selected window because functions run as the result of
user interaction e.g. hyper-apropos. It seems to me the sensible
- thing to do is not record the minibuffer here. */
+ thing to do is not record the minibuffer here.
+
+ #### Unfortunately this is a change to previous behaviour, however logical
+ it may be, so revert for the moment. */
+#if 0
if (FRAME_MINIBUF_ONLY_P (f) || minibuf_level)
config->current_window = FRAME_SELECTED_WINDOW (f);
else
config->current_window = FRAME_LAST_NONMINIBUF_WINDOW (f);
if (FRAME_MINIBUF_ONLY_P (f) || minibuf_level)
config->current_window = FRAME_SELECTED_WINDOW (f);
else
config->current_window = FRAME_LAST_NONMINIBUF_WINDOW (f);
+#endif
+ config->current_window = FRAME_SELECTED_WINDOW (f);
XSETBUFFER (config->current_buffer, current_buffer);
config->minibuffer_scroll_window = Vminibuffer_scroll_window;
config->root_window = FRAME_ROOT_WINDOW (f);
XSETBUFFER (config->current_buffer, current_buffer);
config->minibuffer_scroll_window = Vminibuffer_scroll_window;
config->root_window = FRAME_ROOT_WINDOW (f);
@@
-6150,7
+6151,7
@@
syms_of_window (void)
void
reinit_vars_of_window (void)
{
void
reinit_vars_of_window (void)
{
- int i;
+ unsigned int i;
/* Make sure all windows get marked */
minibuf_window = Qnil;
staticpro_nodump (&minibuf_window);
/* Make sure all windows get marked */
minibuf_window = Qnil;
staticpro_nodump (&minibuf_window);