Mercurial > hg > xemacs-beta
comparison src/redisplay.c @ 2500:3d8143fc88e1
[xemacs-hg @ 2005-01-24 23:33:30 by ben]
get working with VC7
config.inc.samp: Declare OPTIONAL_LIBRARY_DIR as root of library directories.
Redo all graphics library defaults to mirror the versions and
directories in the current binary aux distribution on xemacs
web site. Enable TIFF and COMPFACE by default since you can
now compile with them and binary libs are provided.
xemacs.mak: Put our own directories first in case of conflict (e.g. config.h
in compface).
xemacs.mak: Use MSVCRT to avoid link problems.
s/windowsnt.h:
bytecode.c, print.c: Add casts to avoid warning.
compiler.h: Add MSC_VERSION and include definitions of DOESNT_RETURN and
friends here, like for GCC. Need different definitions for VC7
and VC6.
s/windowsnt.h: Remove stuff moved to compiler.h. Disable warning 4646 ("function
declared with __declspec(noreturn) has non-void return type")
on VC7 since lots of Lisp primitives trigger this and there is
no easy way to kludge around the warning.
glyphs-eimage.c: Some really nasty hacks to allow TIFF and JPEG to both be compiled.
#### The better solution is to move the TIFF and JPEG code to
different files.
glyphs-msw.c: Define __STDC__ to avoid problems with compface.h.
intl-auto-encap-win32.c, intl-auto-encap-win32.h, intl-encap-win32.c, syswindows.h: Those wankers at Microsoft cannot leave well enough alone.
Various functions change parameter types semi-randomly between
VC6 and VC7, so we need to include our own versions that
can handle both kinds with appropriate casting.
EmacsFrame.c, EmacsShell-sub.c, EmacsShell.c, alloc.c, alloca.c, buffer.c, bytecode.c, charset.h, chartab.c, cm.c, console-stream.c, console.c, data.c, debug.h, device-msw.c, device-tty.c, device-x.c, doprnt.c, dumper.c, dynarr.c, elhash.c, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, free-hook.c, gccache-gtk.c, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-x.c, glyphs.c, gtk-glue.c, gutter.c, input-method-xlib.c, insdel.c, intl-win32.c, keymap.c, lisp.h, lread.c, lstream.c, macros.c, malloc.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, mule-coding.c, native-gtk-toolbar.c, number.c, objects-msw.c, objects.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, regex.c, scrollbar-gtk.c, scrollbar-x.c, search.c, select-x.c, signal.c, specifier.c, specifier.h, strftime.c, sunplay.c, symbols.c, sysdep.c, sysproc.h, text.c, text.h, toolbar-common.c, toolbar-msw.c, toolbar.c, ui-gtk.c, unexnt.c, unicode.c, win32.c, window.c, xgccache.c, s/windowsnt.h: abort() -> ABORT(). Eliminate preprocessor games with abort()
since it creates huge problems in VC7, solvable only by including
massive amounts of files in every compile (and not worth it).
author | ben |
---|---|
date | Mon, 24 Jan 2005 23:34:34 +0000 |
parents | ecf1ebac70d8 |
children | cc24b630b1d6 |
comparison
equal
deleted
inserted
replaced
2499:4c5ee4d2e921 | 2500:3d8143fc88e1 |
---|---|
1762 if (add_failed) | 1762 if (add_failed) |
1763 goto oops_no_more_space; | 1763 goto oops_no_more_space; |
1764 } | 1764 } |
1765 break; | 1765 break; |
1766 default: | 1766 default: |
1767 abort (); | 1767 ABORT (); |
1768 } | 1768 } |
1769 } | 1769 } |
1770 | 1770 |
1771 oops_no_more_space: | 1771 oops_no_more_space: |
1772 | 1772 |
1957 rb.object.dglyph.descent = pix_descent; | 1957 rb.object.dglyph.descent = pix_descent; |
1958 } | 1958 } |
1959 | 1959 |
1960 /* Otherwise something is screwed up. */ | 1960 /* Otherwise something is screwed up. */ |
1961 else | 1961 else |
1962 abort (); | 1962 ABORT (); |
1963 } | 1963 } |
1964 | 1964 |
1965 face = glyph_face (gb->glyph, data->window); | 1965 face = glyph_face (gb->glyph, data->window); |
1966 if (NILP (face)) | 1966 if (NILP (face)) |
1967 findex = data->findex; | 1967 findex = data->findex; |
2065 data->dl->right_glyphs = Dynarr_new (glyph_block); | 2065 data->dl->right_glyphs = Dynarr_new (glyph_block); |
2066 Dynarr_add (data->dl->right_glyphs, *gb); | 2066 Dynarr_add (data->dl->right_glyphs, *gb); |
2067 return NULL; | 2067 return NULL; |
2068 } | 2068 } |
2069 else | 2069 else |
2070 abort (); /* there are no unknown types */ | 2070 ABORT (); /* there are no unknown types */ |
2071 } | 2071 } |
2072 | 2072 |
2073 return NULL; | 2073 return NULL; |
2074 } | 2074 } |
2075 | 2075 |
3096 while (count && ((!reverse && elt < end) || (reverse && elt >= end))) | 3096 while (count && ((!reverse && elt < end) || (reverse && elt >= end))) |
3097 { | 3097 { |
3098 struct glyph_block *gb = Dynarr_atp (gbd, elt); | 3098 struct glyph_block *gb = Dynarr_atp (gbd, elt); |
3099 | 3099 |
3100 if (NILP (gb->extent)) | 3100 if (NILP (gb->extent)) |
3101 abort (); /* these should have been handled in add_glyph_rune */ | 3101 ABORT (); /* these should have been handled in add_glyph_rune */ |
3102 | 3102 |
3103 if (gb->active && | 3103 if (gb->active && |
3104 ((side == LEFT_GLYPHS && | 3104 ((side == LEFT_GLYPHS && |
3105 extent_begin_glyph_layout (XEXTENT (gb->extent)) == layout) | 3105 extent_begin_glyph_layout (XEXTENT (gb->extent)) == layout) |
3106 || (side == RIGHT_GLYPHS && | 3106 || (side == RIGHT_GLYPHS && |
3181 while (elt < Dynarr_length (dl->left_glyphs)) | 3181 while (elt < Dynarr_length (dl->left_glyphs)) |
3182 { | 3182 { |
3183 struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); | 3183 struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); |
3184 | 3184 |
3185 if (NILP (gb->extent)) | 3185 if (NILP (gb->extent)) |
3186 abort (); /* these should have been handled in add_glyph_rune */ | 3186 ABORT (); /* these should have been handled in add_glyph_rune */ |
3187 | 3187 |
3188 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == GL_WHITESPACE) | 3188 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == GL_WHITESPACE) |
3189 { | 3189 { |
3190 int width; | 3190 int width; |
3191 | 3191 |
3233 while (elt < Dynarr_length (dl->left_glyphs)) | 3233 while (elt < Dynarr_length (dl->left_glyphs)) |
3234 { | 3234 { |
3235 struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); | 3235 struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); |
3236 | 3236 |
3237 if (NILP (gb->extent)) | 3237 if (NILP (gb->extent)) |
3238 abort (); /* these should have been handled in add_glyph_rune */ | 3238 ABORT (); /* these should have been handled in add_glyph_rune */ |
3239 | 3239 |
3240 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == | 3240 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == |
3241 GL_INSIDE_MARGIN) | 3241 GL_INSIDE_MARGIN) |
3242 { | 3242 { |
3243 gb->width = glyph_width (gb->glyph, window); | 3243 gb->width = glyph_width (gb->glyph, window); |
3302 while (elt < Dynarr_length (dl->left_glyphs)) | 3302 while (elt < Dynarr_length (dl->left_glyphs)) |
3303 { | 3303 { |
3304 struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); | 3304 struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); |
3305 | 3305 |
3306 if (NILP (gb->extent)) | 3306 if (NILP (gb->extent)) |
3307 abort (); /* these should have been handled in add_glyph_rune */ | 3307 ABORT (); /* these should have been handled in add_glyph_rune */ |
3308 | 3308 |
3309 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == | 3309 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == |
3310 GL_INSIDE_MARGIN) | 3310 GL_INSIDE_MARGIN) |
3311 { | 3311 { |
3312 int width = glyph_width (gb->glyph, window); | 3312 int width = glyph_width (gb->glyph, window); |
3344 while (elt < Dynarr_length (dl->left_glyphs)) | 3344 while (elt < Dynarr_length (dl->left_glyphs)) |
3345 { | 3345 { |
3346 struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); | 3346 struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); |
3347 | 3347 |
3348 if (NILP (gb->extent)) | 3348 if (NILP (gb->extent)) |
3349 abort (); /* these should have been handled in add_glyph_rune */ | 3349 ABORT (); /* these should have been handled in add_glyph_rune */ |
3350 | 3350 |
3351 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == | 3351 if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == |
3352 GL_OUTSIDE_MARGIN) | 3352 GL_OUTSIDE_MARGIN) |
3353 { | 3353 { |
3354 int width = glyph_width (gb->glyph, window); | 3354 int width = glyph_width (gb->glyph, window); |
3502 while (elt < Dynarr_length (dl->right_glyphs)) | 3502 while (elt < Dynarr_length (dl->right_glyphs)) |
3503 { | 3503 { |
3504 struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); | 3504 struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); |
3505 | 3505 |
3506 if (NILP (gb->extent)) | 3506 if (NILP (gb->extent)) |
3507 abort (); /* these should have been handled in add_glyph_rune */ | 3507 ABORT (); /* these should have been handled in add_glyph_rune */ |
3508 | 3508 |
3509 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_WHITESPACE) | 3509 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_WHITESPACE) |
3510 { | 3510 { |
3511 int width = glyph_width (gb->glyph, window); | 3511 int width = glyph_width (gb->glyph, window); |
3512 | 3512 |
3552 while (elt < Dynarr_length (dl->right_glyphs)) | 3552 while (elt < Dynarr_length (dl->right_glyphs)) |
3553 { | 3553 { |
3554 struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); | 3554 struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); |
3555 | 3555 |
3556 if (NILP (gb->extent)) | 3556 if (NILP (gb->extent)) |
3557 abort (); /* these should have been handled in add_glyph_rune */ | 3557 ABORT (); /* these should have been handled in add_glyph_rune */ |
3558 | 3558 |
3559 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN) | 3559 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN) |
3560 { | 3560 { |
3561 gb->width = glyph_width (gb->glyph, window); | 3561 gb->width = glyph_width (gb->glyph, window); |
3562 used_in += gb->width; | 3562 used_in += gb->width; |
3616 while (elt < Dynarr_length (dl->right_glyphs)) | 3616 while (elt < Dynarr_length (dl->right_glyphs)) |
3617 { | 3617 { |
3618 struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); | 3618 struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); |
3619 | 3619 |
3620 if (NILP (gb->extent)) | 3620 if (NILP (gb->extent)) |
3621 abort (); /* these should have been handled in add_glyph_rune */ | 3621 ABORT (); /* these should have been handled in add_glyph_rune */ |
3622 | 3622 |
3623 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN) | 3623 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN) |
3624 { | 3624 { |
3625 int width = glyph_width (gb->glyph, window); | 3625 int width = glyph_width (gb->glyph, window); |
3626 | 3626 |
3657 while (elt < Dynarr_length (dl->right_glyphs)) | 3657 while (elt < Dynarr_length (dl->right_glyphs)) |
3658 { | 3658 { |
3659 struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); | 3659 struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); |
3660 | 3660 |
3661 if (NILP (gb->extent)) | 3661 if (NILP (gb->extent)) |
3662 abort (); /* these should have been handled in add_glyph_rune */ | 3662 ABORT (); /* these should have been handled in add_glyph_rune */ |
3663 | 3663 |
3664 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_OUTSIDE_MARGIN) | 3664 if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_OUTSIDE_MARGIN) |
3665 { | 3665 { |
3666 int width = glyph_width (gb->glyph, window); | 3666 int width = glyph_width (gb->glyph, window); |
3667 | 3667 |
5526 display_line_dynarr *dla; | 5526 display_line_dynarr *dla; |
5527 int need_modeline; | 5527 int need_modeline; |
5528 | 5528 |
5529 /* The lines had better exist by this point. */ | 5529 /* The lines had better exist by this point. */ |
5530 if (!(dla = window_display_lines (w, type))) | 5530 if (!(dla = window_display_lines (w, type))) |
5531 abort (); | 5531 ABORT (); |
5532 Dynarr_reset (dla); | 5532 Dynarr_reset (dla); |
5533 w->max_line_len = 0; | 5533 w->max_line_len = 0; |
5534 | 5534 |
5535 /* Normally these get updated in redisplay_window but it is possible | 5535 /* Normally these get updated in redisplay_window but it is possible |
5536 for this function to get called from some other points where that | 5536 for this function to get called from some other points where that |
5726 && !Dynarr_atp (ddla, 0)->modeline) \ | 5726 && !Dynarr_atp (ddla, 0)->modeline) \ |
5727 { \ | 5727 { \ |
5728 dla_start = 0; \ | 5728 dla_start = 0; \ |
5729 } \ | 5729 } \ |
5730 else \ | 5730 else \ |
5731 abort (); /* structs differ */ \ | 5731 ABORT (); /* structs differ */ \ |
5732 \ | 5732 \ |
5733 dla_end = Dynarr_length (cdla) - 1; \ | 5733 dla_end = Dynarr_length (cdla) - 1; \ |
5734 } \ | 5734 } \ |
5735 \ | 5735 \ |
5736 start_pos = (Dynarr_atp (cdla, dla_start)->charpos \ | 5736 start_pos = (Dynarr_atp (cdla, dla_start)->charpos \ |
7987 else if (point > end) | 7987 else if (point > end) |
7988 bottom = pos + 1; | 7988 bottom = pos + 1; |
7989 else if (point < start) | 7989 else if (point < start) |
7990 top = pos - 1; | 7990 top = pos - 1; |
7991 else | 7991 else |
7992 abort (); | 7992 ABORT (); |
7993 | 7993 |
7994 new_pos = (bottom + top + 1) >> 1; | 7994 new_pos = (bottom + top + 1) >> 1; |
7995 if (pos == new_pos) | 7995 if (pos == new_pos) |
7996 { | 7996 { |
7997 w->line_cache_validation_override--; | 7997 w->line_cache_validation_override--; |