annotate admin/notes/iftc @ 51214:4011d3fb2912
kfs_20030524_post
(struct x_output): Move members left_pos, top_pos,
border_width, pixel_height, pixel_width, line_height,
internal_border_width, vertical_scroll_bar_extra,
left_fringe_width, right_fringe_width, fringe_cols,
fringes_extra, win_gravity, size_hint_flags, want_fullscreen,
x_pixels_diff, and y_pixels_diff to struct frame (frame.h).
(FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): Move to frame.h.
(FRAME_DEFAULT_FONT_WIDTH): Remove macro.
(PIXEL_WIDTH, PIXEL_HEIGHT)
(FRAME_X_FRINGE_COLS, FRAME_X_FRINGE_WIDTH)
(FRAME_X_LEFT_FRINGE_WIDTH, FRAME_X_RIGHT_FRINGE_WIDTH): Moved to
frame.h and renamed [see frame.h changes].
(CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, CHAR_TO_PIXEL_WIDTH)
(CHAR_TO_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW, PIXEL_TO_CHAR_COL)
(PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Moved to frame.h
and renamed [see frame.h changes].
author |
Kim F. Storm <storm@cua.dk> |
date |
Sat, 24 May 2003 22:10:38 +0000 |
parents |
28f0b229040c |
children |
695cf19ef79e |
rev |
line source |
45625
|
1 Iso-Functional Type Contour
|
|
2
|
|
3
|
|
4 This is a term coined to describe "column int->float" change approach, and can
|
|
5 be used whenever low-level types need to change (hopefully not often!) but the
|
|
6 meanings of the values (whose type has changed) do not.
|
|
7
|
|
8 The premise is that changing a low-level type potentially means lots of code
|
|
9 needs to be changed as well, and the question is how to do this incrementally,
|
|
10 which is the preferred way to change things.
|
|
11
|
|
12 Say LOW and HIGH are C functions:
|
|
13
|
|
14 int LOW (void) { return 1; }
|
|
15 void HIGH (void) { int value = LOW (); }
|
|
16
|
|
17 We want to convert LOW to return float, so we cast HIGH usage:
|
|
18
|
|
19 float LOW (void) { return 1.0; }
|
|
20 void HIGH (void) { int value = (int) LOW (); } /* iftc */
|
|
21
|
|
22 The comment /* iftc */ is used to mark this type of casting to differentiate
|
|
23 it from other casting. We commit the changes and can now go about modifying
|
|
24 LOW and HIGH separately. When HIGH is ready to handle the type change, the
|
|
25 cast can be removed.
|