comparison src/window.c @ 3025:facf3239ba30

[xemacs-hg @ 2005-10-25 11:16:19 by ben] rename new->new_, convert 'foo to `foo' EmacsFrame.c, ExternalClient.c, ExternalShell.c, chartab.c, cmdloop.c, compiler.h, console.c, database.c, device-msw.c, device-x.c, device.c, doc.c, dragdrop.c, eval.c, event-msw.c, event-stream.c, events.c, extents.c, file-coding.c, fns.c, frame-tty.c, frame.c, gpmevent.c, gutter.c, hash.c, imgproc.c, indent.c, keymap.c, lisp-union.h, macros.c, malloc.c, marker.c, menubar-x.c, menubar.c, mule-charset.c, number.c, process.c, profile.h, ralloc.c, redisplay.c, select-common.h, select.c, syntax.c, sysfile.h, sysproc.h, systime.h, syswindows.h, toolbar.c, tooltalk.c, tparam.c, unexaix.c, unexalpha.c, unexconvex.c, unexec.c, unexhp9k800.c, unexmips.c, unicode.c, window.c: new -> new_. 'foo -> `foo'. lwlib-internal.h: redo assert macros to follow lisp.h and not trigger warnings. lwlib.c, xlwtabs.c: new -> new_.
author ben
date Tue, 25 Oct 2005 11:16:49 +0000
parents b7f26b2f78bd
children 135bb6aa3ee2
comparison
equal deleted inserted replaced
3024:b7f26b2f78bd 3025:facf3239ba30
3798 } 3798 }
3799 3799
3800 static void 3800 static void
3801 make_dummy_parent (Lisp_Object window) 3801 make_dummy_parent (Lisp_Object window)
3802 { 3802 {
3803 Lisp_Object new; 3803 Lisp_Object new_;
3804 struct window *o = XWINDOW (window); 3804 struct window *o = XWINDOW (window);
3805 struct window *p = ALLOC_LCRECORD_TYPE (struct window, &lrecord_window); 3805 struct window *p = ALLOC_LCRECORD_TYPE (struct window, &lrecord_window);
3806 3806
3807 new = wrap_window (p); 3807 new_ = wrap_window (p);
3808 COPY_LCRECORD (p, o); 3808 COPY_LCRECORD (p, o);
3809 3809
3810 /* Don't copy the pointers to the line start cache or the face 3810 /* Don't copy the pointers to the line start cache or the face
3811 instances. */ 3811 instances. */
3812 p->line_start_cache = Dynarr_new (line_start_cache); 3812 p->line_start_cache = Dynarr_new (line_start_cache);
3814 p->glyph_cachels = Dynarr_new (glyph_cachel); 3814 p->glyph_cachels = Dynarr_new (glyph_cachel);
3815 p->subwindow_instance_cache = 3815 p->subwindow_instance_cache =
3816 make_image_instance_cache_hash_table (); 3816 make_image_instance_cache_hash_table ();
3817 3817
3818 /* Put new into window structure in place of window */ 3818 /* Put new into window structure in place of window */
3819 replace_window (window, new); 3819 replace_window (window, new_);
3820 3820
3821 o->next = Qnil; 3821 o->next = Qnil;
3822 o->prev = Qnil; 3822 o->prev = Qnil;
3823 o->vchild = Qnil; 3823 o->vchild = Qnil;
3824 o->hchild = Qnil; 3824 o->hchild = Qnil;
3825 o->parent = new; 3825 o->parent = new_;
3826 3826
3827 p->start[CURRENT_DISP] = Qnil; 3827 p->start[CURRENT_DISP] = Qnil;
3828 p->start[DESIRED_DISP] = Qnil; 3828 p->start[DESIRED_DISP] = Qnil;
3829 p->start[CMOTION_DISP] = Qnil; 3829 p->start[CMOTION_DISP] = Qnil;
3830 p->pointm[CURRENT_DISP] = Qnil; 3830 p->pointm[CURRENT_DISP] = Qnil;
3843 SIZE columns in the first of the pair. The newly created window is 3843 SIZE columns in the first of the pair. The newly created window is
3844 returned. 3844 returned.
3845 */ 3845 */
3846 (window, size, horflag)) 3846 (window, size, horflag))
3847 { 3847 {
3848 Lisp_Object new; 3848 Lisp_Object new_;
3849 struct window *o, *p; 3849 struct window *o, *p;
3850 struct frame *f; 3850 struct frame *f;
3851 int csize; 3851 int csize;
3852 int psize; 3852 int psize;
3853 3853
3906 /* #### I can't understand why you have to reset face 3906 /* #### I can't understand why you have to reset face
3907 cachels here. This can cause crash so let's disable it 3907 cachels here. This can cause crash so let's disable it
3908 and see the difference. See redisplay-tests.el --yh */ 3908 and see the difference. See redisplay-tests.el --yh */
3909 reset_face_cachels (XWINDOW (window)); 3909 reset_face_cachels (XWINDOW (window));
3910 #endif 3910 #endif
3911 new = o->parent; 3911 new_ = o->parent;
3912 XWINDOW (new)->vchild = window; 3912 XWINDOW (new_)->vchild = window;
3913 XFRAME (o->frame)->mirror_dirty = 1; 3913 XFRAME (o->frame)->mirror_dirty = 1;
3914 } 3914 }
3915 } 3915 }
3916 else 3916 else
3917 { 3917 {
3926 make_dummy_parent (window); 3926 make_dummy_parent (window);
3927 #if 0 3927 #if 0
3928 /* #### See above. */ 3928 /* #### See above. */
3929 reset_face_cachels (XWINDOW (window)); 3929 reset_face_cachels (XWINDOW (window));
3930 #endif 3930 #endif
3931 new = o->parent; 3931 new_ = o->parent;
3932 XWINDOW (new)->hchild = window; 3932 XWINDOW (new_)->hchild = window;
3933 XFRAME (o->frame)->mirror_dirty = 1; 3933 XFRAME (o->frame)->mirror_dirty = 1;
3934 } 3934 }
3935 } 3935 }
3936 3936
3937 /* Now we know that window's parent is a vertical combination 3937 /* Now we know that window's parent is a vertical combination
3938 if we are dividing vertically, or a horizontal combination 3938 if we are dividing vertically, or a horizontal combination
3939 if we are making side-by-side windows */ 3939 if we are making side-by-side windows */
3940 3940
3941 MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f); 3941 MARK_FRAME_WINDOWS_STRUCTURE_CHANGED (f);
3942 new = allocate_window (); 3942 new_ = allocate_window ();
3943 p = XWINDOW (new); 3943 p = XWINDOW (new_);
3944 3944
3945 p->frame = o->frame; 3945 p->frame = o->frame;
3946 p->next = o->next; 3946 p->next = o->next;
3947 if (!NILP (p->next)) 3947 if (!NILP (p->next))
3948 XWINDOW (p->next)->prev = new; 3948 XWINDOW (p->next)->prev = new_;
3949 p->prev = window; 3949 p->prev = window;
3950 o->next = new; 3950 o->next = new_;
3951 p->parent = o->parent; 3951 p->parent = o->parent;
3952 p->buffer = Qt; 3952 p->buffer = Qt;
3953 3953
3954 reset_face_cachels (p); 3954 reset_face_cachels (p);
3955 reset_glyph_cachels (p); 3955 reset_glyph_cachels (p);
3974 WINDOW_TOP (p) = WINDOW_TOP (o) + psize; 3974 WINDOW_TOP (p) = WINDOW_TOP (o) + psize;
3975 } 3975 }
3976 3976
3977 XFRAME (p->frame)->mirror_dirty = 1; 3977 XFRAME (p->frame)->mirror_dirty = 1;
3978 3978
3979 note_object_created (new); 3979 note_object_created (new_);
3980 3980
3981 /* do this last (after the window is completely initialized and 3981 /* do this last (after the window is completely initialized and
3982 the mirror-dirty flag is set) so that specifier recomputation 3982 the mirror-dirty flag is set) so that specifier recomputation
3983 caused as a result of this will work properly and not abort. */ 3983 caused as a result of this will work properly and not abort. */
3984 Fset_window_buffer (new, o->buffer, Qt); 3984 Fset_window_buffer (new_, o->buffer, Qt);
3985 return new; 3985 return new_;
3986 } 3986 }
3987 3987
3988 3988
3989 DEFUN ("enlarge-window", Fenlarge_window, 1, 3, "_p", /* 3989 DEFUN ("enlarge-window", Fenlarge_window, 1, 3, "_p", /*
3990 Make the selected window COUNT lines taller. 3990 Make the selected window COUNT lines taller.