diff options
author | Tom Tromey <tom@tromey.com> | 2018-07-06 21:56:17 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-07-12 22:12:27 -0600 |
commit | 42fe787b0f26c2df682b2797407a669ef8522ccb (patch) | |
tree | e944fe465e2b65703a8361bc82647faf4f7907f1 /src/w32fns.c | |
parent | 01dbf2a347944497fdcf2ec156f4605020d7ba2a (diff) | |
download | emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.tar.gz emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.tar.bz2 emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.zip |
Rename integerp->fixnum, etc, in preparation for bignums
* src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c,
src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c,
src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c,
src/process.c, src/profiler.c, src/search.c, src/sound.c,
src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c,
src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
Diffstat (limited to 'src/w32fns.c')
-rw-r--r-- | src/w32fns.c | 214 |
1 files changed, 107 insertions, 107 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 760801cd1db..e8962b491fe 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -457,9 +457,9 @@ if the entry is new. */) Lisp_Object oldrgb = Qnil; Lisp_Object entry; - CHECK_NUMBER (red); - CHECK_NUMBER (green); - CHECK_NUMBER (blue); + CHECK_FIXNUM (red); + CHECK_FIXNUM (green); + CHECK_FIXNUM (blue); CHECK_STRING (name); XSETINT (rgb, RGB (XUINT (red), XUINT (green), XUINT (blue))); @@ -748,7 +748,7 @@ w32_default_color_map (void) for (i = 0; i < ARRAYELTS (w32_color_map); pc++, i++) cmap = Fcons (Fcons (build_string (pc->name), - make_number (pc->colorref)), + make_fixnum (pc->colorref)), cmap); unblock_input (); @@ -828,7 +828,7 @@ add_system_logical_colors_to_map (Lisp_Object *system_colors) unsigned r, g, b; if (sscanf (color_buffer, " %u %u %u", &r, &g, &b) == 3) *system_colors = Fcons (Fcons (build_string (full_name_buffer), - make_number (RGB (r, g, b))), + make_fixnum (RGB (r, g, b))), *system_colors); name_size = sizeof (full_name_buffer) - SYSTEM_COLOR_PREFIX_LEN; @@ -1343,7 +1343,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) if (!EQ (Qnil, Vx_pointer_shape)) { - CHECK_NUMBER (Vx_pointer_shape); + CHECK_FIXNUM (Vx_pointer_shape); cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_pointer_shape)); } else @@ -1352,7 +1352,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) if (!EQ (Qnil, Vx_nontext_pointer_shape)) { - CHECK_NUMBER (Vx_nontext_pointer_shape); + CHECK_FIXNUM (Vx_nontext_pointer_shape); nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_nontext_pointer_shape)); } @@ -1362,7 +1362,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) if (!EQ (Qnil, Vx_hourglass_pointer_shape)) { - CHECK_NUMBER (Vx_hourglass_pointer_shape); + CHECK_FIXNUM (Vx_hourglass_pointer_shape); hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_hourglass_pointer_shape)); } @@ -1373,7 +1373,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) x_check_errors (FRAME_W32_DISPLAY (f), "bad nontext pointer cursor: %s"); if (!EQ (Qnil, Vx_mode_pointer_shape)) { - CHECK_NUMBER (Vx_mode_pointer_shape); + CHECK_FIXNUM (Vx_mode_pointer_shape); mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_mode_pointer_shape)); } @@ -1383,7 +1383,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) if (!EQ (Qnil, Vx_sensitive_text_pointer_shape)) { - CHECK_NUMBER (Vx_sensitive_text_pointer_shape); + CHECK_FIXNUM (Vx_sensitive_text_pointer_shape); hand_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_sensitive_text_pointer_shape)); @@ -1393,7 +1393,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) if (!NILP (Vx_window_horizontal_drag_shape)) { - CHECK_NUMBER (Vx_window_horizontal_drag_shape); + CHECK_FIXNUM (Vx_window_horizontal_drag_shape); horizontal_drag_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_window_horizontal_drag_shape)); @@ -1404,7 +1404,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) if (!NILP (Vx_window_vertical_drag_shape)) { - CHECK_NUMBER (Vx_window_vertical_drag_shape); + CHECK_FIXNUM (Vx_window_vertical_drag_shape); vertical_drag_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_window_vertical_drag_shape)); @@ -1725,7 +1725,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) if (!FRAME_MINIBUF_ONLY_P (f) && !FRAME_PARENT_FRAME (f)) { boolean old = FRAME_EXTERNAL_MENU_BAR (f); - boolean new = (INTEGERP (value) && XINT (value) > 0) ? true : false; + boolean new = (FIXNUMP (value) && XINT (value) > 0) ? true : false; FRAME_MENU_BAR_LINES (f) = 0; FRAME_MENU_BAR_HEIGHT (f) = 0; @@ -1757,7 +1757,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) x_clear_under_internal_border (f); /* Don't store anything but 1 or 0 in the parameter. */ - store_frame_param (f, Qmenu_bar_lines, make_number (new ? 1 : 0)); + store_frame_param (f, Qmenu_bar_lines, make_fixnum (new ? 1 : 0)); } } } @@ -1780,7 +1780,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) return; /* Use VALUE only if an integer >= 0. */ - if (INTEGERP (value) && XINT (value) >= 0) + if (FIXNUMP (value) && XINT (value) >= 0) nlines = XFASTINT (value); else nlines = 0; @@ -1805,8 +1805,8 @@ x_change_tool_bar_height (struct frame *f, int height) FRAME_TOOL_BAR_HEIGHT (f) = height; FRAME_TOOL_BAR_LINES (f) = lines; /* Store `tool-bar-lines' and `height' frame parameters. */ - store_frame_param (f, Qtool_bar_lines, make_number (lines)); - store_frame_param (f, Qheight, make_number (FRAME_LINES (f))); + store_frame_param (f, Qtool_bar_lines, make_fixnum (lines)); + store_frame_param (f, Qheight, make_fixnum (FRAME_LINES (f))); if (FRAME_W32_WINDOW (f) && FRAME_TOOL_BAR_HEIGHT (f) == 0) { @@ -2027,7 +2027,7 @@ x_set_undecorated (struct frame *f, Lisp_Object new_value, Lisp_Object old_value if (!NILP (new_value) && !FRAME_UNDECORATED (f)) { dwStyle = ((dwStyle & ~WS_THICKFRAME & ~WS_CAPTION) - | ((NUMBERP (border_width) && (XINT (border_width) > 0)) + | ((FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0)) ? WS_BORDER : false)); SetWindowLong (hwnd, GWL_STYLE, dwStyle); SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0, @@ -2334,7 +2334,7 @@ w32_createwindow (struct frame *f, int *coords) if (FRAME_UNDECORATED (f)) { /* If we want a thin border, specify it here. */ - if (NUMBERP (border_width) && (XINT (border_width) > 0)) + if (FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0)) f->output_data.w32->dwStyle |= WS_BORDER; } else @@ -2350,7 +2350,7 @@ w32_createwindow (struct frame *f, int *coords) f->output_data.w32->dwStyle = WS_POPUP; /* If we want a thin border, specify it here. */ - if (NUMBERP (border_width) && (XINT (border_width) > 0)) + if (FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0)) f->output_data.w32->dwStyle |= WS_BORDER; } else @@ -3116,7 +3116,7 @@ map_keypad_keys (unsigned int virt_key, unsigned int extended) (Windows 2000 and later). */ static Lisp_Object w32_grabbed_keys; -#define HOTKEY(vk, mods) make_number (((vk) & 255) | ((mods) << 8)) +#define HOTKEY(vk, mods) make_fixnum (((vk) & 255) | ((mods) << 8)) #define HOTKEY_ID(k) (XFASTINT (k) & 0xbfff) #define HOTKEY_VK_CODE(k) (XFASTINT (k) & 255) #define HOTKEY_MODIFIERS(k) (XFASTINT (k) >> 8) @@ -3140,7 +3140,7 @@ register_hot_keys (HWND hwnd) Lisp_Object key = XCAR (keylist); /* Deleted entries get set to nil. */ - if (!INTEGERP (key)) + if (!FIXNUMP (key)) continue; RegisterHotKey (hwnd, HOTKEY_ID (key), @@ -3157,7 +3157,7 @@ unregister_hot_keys (HWND hwnd) { Lisp_Object key = XCAR (keylist); - if (!INTEGERP (key)) + if (!FIXNUMP (key)) continue; UnregisterHotKey (hwnd, HOTKEY_ID (key)); @@ -4199,7 +4199,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) press of Space which we will ignore. */ if (GetAsyncKeyState (wParam) & 1) { - if (NUMBERP (Vw32_phantom_key_code)) + if (FIXED_OR_FLOATP (Vw32_phantom_key_code)) key = XUINT (Vw32_phantom_key_code) & 255; else key = VK_SPACE; @@ -4215,7 +4215,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { if (GetAsyncKeyState (wParam) & 1) { - if (NUMBERP (Vw32_phantom_key_code)) + if (FIXED_OR_FLOATP (Vw32_phantom_key_code)) key = XUINT (Vw32_phantom_key_code) & 255; else key = VK_SPACE; @@ -5529,8 +5529,8 @@ x_icon (struct frame *f, Lisp_Object parms) icon_y = x_get_arg (dpyinfo, parms, Qicon_top, 0, 0, RES_TYPE_NUMBER); if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound)) { - CHECK_NUMBER (icon_x); - CHECK_NUMBER (icon_y); + CHECK_FIXNUM (icon_x); + CHECK_FIXNUM (icon_y); } else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound)) error ("Both left and top icon corners of icon must be specified"); @@ -5728,7 +5728,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, if (EQ (parent, Qunbound)) parent = Qnil; else if (!NILP (parent)) - CHECK_NUMBER (parent); + CHECK_FIXNUM (parent); /* make_frame_without_minibuffer can run Lisp code and garbage collect. */ /* No need to protect DISPLAY because that's not used after passing @@ -5845,7 +5845,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, x_default_font_parameter (f, parameters); /* Default BorderWidth to 0 to match other platforms. */ - x_default_parameter (f, parameters, Qborder_width, make_number (0), + x_default_parameter (f, parameters, Qborder_width, make_fixnum (0), "borderWidth", "BorderWidth", RES_TYPE_NUMBER); /* We recognize either internalBorderWidth or internalBorder @@ -5861,11 +5861,11 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, parameters); } - x_default_parameter (f, parameters, Qinternal_border_width, make_number (0), + x_default_parameter (f, parameters, Qinternal_border_width, make_fixnum (0), "internalBorderWidth", "InternalBorder", RES_TYPE_NUMBER); - x_default_parameter (f, parameters, Qright_divider_width, make_number (0), + x_default_parameter (f, parameters, Qright_divider_width, make_fixnum (0), NULL, NULL, RES_TYPE_NUMBER); - x_default_parameter (f, parameters, Qbottom_divider_width, make_number (0), + x_default_parameter (f, parameters, Qbottom_divider_width, make_fixnum (0), NULL, NULL, RES_TYPE_NUMBER); x_default_parameter (f, parameters, Qvertical_scroll_bars, Qright, "verticalScrollBars", "ScrollBars", RES_TYPE_SYMBOL); @@ -5921,11 +5921,11 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, because `frame-windows-min-size' needs them. */ tem = x_get_arg (dpyinfo, parameters, Qmin_width, NULL, NULL, RES_TYPE_NUMBER); - if (NUMBERP (tem)) + if (FIXED_OR_FLOATP (tem)) store_frame_param (f, Qmin_width, tem); tem = x_get_arg (dpyinfo, parameters, Qmin_height, NULL, NULL, RES_TYPE_NUMBER); - if (NUMBERP (tem)) + if (FIXED_OR_FLOATP (tem)) store_frame_param (f, Qmin_height, tem); adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, true, @@ -5938,16 +5938,16 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, { x_default_parameter (f, parameters, Qmenu_bar_lines, NILP (Vmenu_bar_mode) - ? make_number (0) : make_number (1), + ? make_fixnum (0) : make_fixnum (1), NULL, NULL, RES_TYPE_NUMBER); } else /* No menu bar for child frames. */ - store_frame_param (f, Qmenu_bar_lines, make_number (0)); + store_frame_param (f, Qmenu_bar_lines, make_fixnum (0)); x_default_parameter (f, parameters, Qtool_bar_lines, NILP (Vtool_bar_mode) - ? make_number (0) : make_number (1), + ? make_fixnum (0) : make_fixnum (1), NULL, NULL, RES_TYPE_NUMBER); x_default_parameter (f, parameters, Qbuffer_predicate, Qnil, @@ -6157,7 +6157,7 @@ DEFUN ("x-display-pixel-width", Fx_display_pixel_width, { struct w32_display_info *dpyinfo = check_x_display_info (display); - return make_number (x_display_pixel_width (dpyinfo)); + return make_fixnum (x_display_pixel_width (dpyinfo)); } DEFUN ("x-display-pixel-height", Fx_display_pixel_height, @@ -6167,7 +6167,7 @@ DEFUN ("x-display-pixel-height", Fx_display_pixel_height, { struct w32_display_info *dpyinfo = check_x_display_info (display); - return make_number (x_display_pixel_height (dpyinfo)); + return make_fixnum (x_display_pixel_height (dpyinfo)); } DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes, @@ -6177,7 +6177,7 @@ DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes, { struct w32_display_info *dpyinfo = check_x_display_info (display); - return make_number (dpyinfo->n_planes * dpyinfo->n_cbits); + return make_fixnum (dpyinfo->n_planes * dpyinfo->n_cbits); } DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, @@ -6194,7 +6194,7 @@ DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells, * anyway. */ cap = 1 << min (dpyinfo->n_planes * dpyinfo->n_cbits, 24); - return make_number (cap); + return make_fixnum (cap); } DEFUN ("x-server-max-request-size", Fx_server_max_request_size, @@ -6203,7 +6203,7 @@ DEFUN ("x-server-max-request-size", Fx_server_max_request_size, doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { - return make_number (1); + return make_fixnum (1); } DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0, @@ -6224,7 +6224,7 @@ DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0, doc: /* SKIP: real doc in xfns.c. */) (Lisp_Object display) { - return make_number (1); + return make_fixnum (1); } DEFUN ("x-display-mm-height", Fx_display_mm_height, @@ -6241,7 +6241,7 @@ DEFUN ("x-display-mm-height", Fx_display_mm_height, / GetDeviceCaps (hdc, VERTRES)); ReleaseDC (NULL, hdc); - return make_number (x_display_pixel_height (dpyinfo) * mm_per_pixel + 0.5); + return make_fixnum (x_display_pixel_height (dpyinfo) * mm_per_pixel + 0.5); } DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, @@ -6257,7 +6257,7 @@ DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, / GetDeviceCaps (hdc, HORZRES)); ReleaseDC (NULL, hdc); - return make_number (x_display_pixel_width (dpyinfo) * mm_per_pixel + 0.5); + return make_fixnum (x_display_pixel_width (dpyinfo) * mm_per_pixel + 0.5); } DEFUN ("x-display-backing-store", Fx_display_backing_store, @@ -6334,7 +6334,7 @@ w32_display_monitor_attributes_list (void) monitor_list = XCDR (monitor_list); } - monitor_frames = Fmake_vector (make_number (n_monitors), Qnil); + monitor_frames = Fmake_vector (make_fixnum (n_monitors), Qnil); FOR_EACH_FRAME (rest, frame) { struct frame *f = XFRAME (frame); @@ -6912,7 +6912,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, Lisp_Object parms) that are needed to determine window geometry. */ x_default_font_parameter (f, parms); - x_default_parameter (f, parms, Qborder_width, make_number (2), + x_default_parameter (f, parms, Qborder_width, make_fixnum (2), "borderWidth", "BorderWidth", RES_TYPE_NUMBER); /* This defaults to 2 in order to match xterm. We recognize either internalBorderWidth or internalBorder (which is what xterm calls @@ -6928,7 +6928,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo, Lisp_Object parms) parms); } - x_default_parameter (f, parms, Qinternal_border_width, make_number (1), + x_default_parameter (f, parms, Qinternal_border_width, make_fixnum (1), "internalBorderWidth", "internalBorderWidth", RES_TYPE_NUMBER); /* Also do the stuff which must be set before the window exists. */ @@ -7064,8 +7064,8 @@ compute_tip_xy (struct frame *f, /* Move the tooltip window where the mouse pointer is. Resize and show it. */ - if ((!INTEGERP (left) && !INTEGERP (right)) - || (!INTEGERP (top) && !INTEGERP (bottom))) + if ((!FIXNUMP (left) && !FIXNUMP (right)) + || (!FIXNUMP (top) && !FIXNUMP (bottom))) { POINT pt; @@ -7104,9 +7104,9 @@ compute_tip_xy (struct frame *f, } } - if (INTEGERP (top)) + if (FIXNUMP (top)) *root_y = XINT (top); - else if (INTEGERP (bottom)) + else if (FIXNUMP (bottom)) *root_y = XINT (bottom) - height; else if (*root_y + XINT (dy) <= min_y) *root_y = min_y; /* Can happen for negative dy */ @@ -7120,9 +7120,9 @@ compute_tip_xy (struct frame *f, /* Put it on the top. */ *root_y = min_y; - if (INTEGERP (left)) + if (FIXNUMP (left)) *root_x = XINT (left); - else if (INTEGERP (right)) + else if (FIXNUMP (right)) *root_x = XINT (right) - width; else if (*root_x + XINT (dx) <= min_x) *root_x = 0; /* Can happen for negative dx */ @@ -7221,19 +7221,19 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, decode_window_system_frame (frame); if (NILP (timeout)) - timeout = make_number (5); + timeout = make_fixnum (5); else - CHECK_NATNUM (timeout); + CHECK_FIXNAT (timeout); if (NILP (dx)) - dx = make_number (5); + dx = make_fixnum (5); else - CHECK_NUMBER (dx); + CHECK_FIXNUM (dx); if (NILP (dy)) - dy = make_number (-10); + dy = make_fixnum (-10); else - CHECK_NUMBER (dy); + CHECK_FIXNUM (dy); if (FRAMEP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame))) { @@ -7344,9 +7344,9 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, if (NILP (Fassq (Qname, parms))) parms = Fcons (Fcons (Qname, build_string ("tooltip")), parms); if (NILP (Fassq (Qinternal_border_width, parms))) - parms = Fcons (Fcons (Qinternal_border_width, make_number (3)), parms); + parms = Fcons (Fcons (Qinternal_border_width, make_fixnum (3)), parms); if (NILP (Fassq (Qborder_width, parms))) - parms = Fcons (Fcons (Qborder_width, make_number (1)), parms); + parms = Fcons (Fcons (Qborder_width, make_fixnum (1)), parms); if (NILP (Fassq (Qborder_color, parms))) parms = Fcons (Fcons (Qborder_color, build_string ("lightyellow")), parms); @@ -7370,8 +7370,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, tip_buf = Fget_buffer_create (tip); /* We will mark the tip window a "pseudo-window" below, and such windows cannot have display margins. */ - bset_left_margin_cols (XBUFFER (tip_buf), make_number (0)); - bset_right_margin_cols (XBUFFER (tip_buf), make_number (0)); + bset_left_margin_cols (XBUFFER (tip_buf), make_fixnum (0)); + bset_right_margin_cols (XBUFFER (tip_buf), make_fixnum (0)); set_window_buffer (window, tip_buf, false, false); w = XWINDOW (window); w->pseudo_window_p = true; @@ -7386,8 +7386,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, w->pixel_top = 0; if (CONSP (Vx_max_tooltip_size) - && RANGED_INTEGERP (1, XCAR (Vx_max_tooltip_size), INT_MAX) - && RANGED_INTEGERP (1, XCDR (Vx_max_tooltip_size), INT_MAX)) + && RANGED_FIXNUMP (1, XCAR (Vx_max_tooltip_size), INT_MAX) + && RANGED_FIXNUMP (1, XCDR (Vx_max_tooltip_size), INT_MAX)) { w->total_cols = XFASTINT (XCAR (Vx_max_tooltip_size)); w->total_lines = XFASTINT (XCDR (Vx_max_tooltip_size)); @@ -7420,7 +7420,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, try_window (window, pos, TRY_WINDOW_IGNORE_FONTS_CHANGE); /* Calculate size of tooltip window. */ size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil, - make_number (w->pixel_height), Qnil); + make_fixnum (w->pixel_height), Qnil); /* Add the frame's internal border to calculated size. */ width = XINT (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f); height = XINT (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f); @@ -7430,7 +7430,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0, /* Show tooltip frame. */ { RECT rect; - int pad = (NUMBERP (Vw32_tooltip_extra_pixels) + int pad = (FIXED_OR_FLOATP (Vw32_tooltip_extra_pixels) ? max (0, XINT (Vw32_tooltip_extra_pixels)) : FRAME_COLUMN_WIDTH (tip_f)); @@ -8033,7 +8033,7 @@ If optional parameter FRAME is not specified, use selected frame. */) { struct frame *f = decode_window_system_frame (frame); - CHECK_NUMBER (command); + CHECK_FIXNUM (command); if (FRAME_W32_P (f)) PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, XINT (command), 0); @@ -8143,7 +8143,7 @@ a ShowWindow flag: } result = (intptr_t) ShellExecuteW (NULL, ops_w, doc_w, params_w, GUI_SDATA (current_dir), - (INTEGERP (show_flag) + (FIXNUMP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT)); if (result > 32) @@ -8209,7 +8209,7 @@ a ShowWindow flag: if (c_isalpha (*p) && p[1] == ':' && IS_DIRECTORY_SEP (p[2])) document = Fsubstring_no_properties (document, - make_number (file_url_len), Qnil); + make_fixnum (file_url_len), Qnil); } /* We have a situation here. If DOCUMENT is a relative file name, but its name includes leading directories, i.e. it lives not in @@ -8301,7 +8301,7 @@ a ShowWindow flag: shexinfo_w.lpParameters = params_w; shexinfo_w.lpDirectory = current_dir_w; shexinfo_w.nShow = - (INTEGERP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT); + (FIXNUMP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT); success = ShellExecuteExW (&shexinfo_w); xfree (doc_w); } @@ -8336,7 +8336,7 @@ a ShowWindow flag: shexinfo_a.lpParameters = params_a; shexinfo_a.lpDirectory = current_dir_a; shexinfo_a.nShow = - (INTEGERP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT); + (FIXNUMP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT); success = ShellExecuteExA (&shexinfo_a); xfree (doc_w); xfree (doc_a); @@ -8412,7 +8412,7 @@ w32_parse_and_hook_hot_key (Lisp_Object key, int hook) if (CONSP (c) && lucid_event_type_list_p (c)) c = Fevent_convert_list (c); - if (! INTEGERP (c) && ! SYMBOLP (c)) + if (! FIXNUMP (c) && ! SYMBOLP (c)) error ("Key definition is invalid"); /* Work out the base key and the modifiers. */ @@ -8430,7 +8430,7 @@ w32_parse_and_hook_hot_key (Lisp_Object key, int hook) else vk_code = lookup_vk_code (vkname); } - else if (INTEGERP (c)) + else if (FIXNUMP (c)) { lisp_modifiers = XINT (c) & ~CHARACTERBITS; /* Many ascii characters are their own virtual key code. */ @@ -8547,7 +8547,7 @@ DEFUN ("w32-unregister-hot-key", Fw32_unregister_hot_key, { Lisp_Object item; - if (!INTEGERP (key)) + if (!FIXNUMP (key)) key = w32_parse_and_hook_hot_key (key, 0); if (w32_kbdhook_active) @@ -8594,7 +8594,7 @@ usage: (w32-reconstruct-hot-key ID) */) int vk_code, w32_modifiers; Lisp_Object key; - CHECK_NUMBER (hotkeyid); + CHECK_FIXNUM (hotkeyid); vk_code = HOTKEY_VK_CODE (hotkeyid); w32_modifiers = HOTKEY_MODIFIERS (hotkeyid); @@ -8602,7 +8602,7 @@ usage: (w32-reconstruct-hot-key ID) */) if (vk_code < 256 && lispy_function_keys[vk_code]) key = intern (lispy_function_keys[vk_code]); else - key = make_number (vk_code); + key = make_fixnum (vk_code); key = Fcons (key, Qnil); if (w32_modifiers & MOD_SHIFT) @@ -8642,7 +8642,7 @@ to change the state. */) return Qnil; if (!dwWindowsThreadId) - return make_number (w32_console_toggle_lock_key (vk_code, new_state)); + return make_fixnum (w32_console_toggle_lock_key (vk_code, new_state)); if (NILP (new_state)) lparam = -1; @@ -8653,7 +8653,7 @@ to change the state. */) { MSG msg; GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE); - return make_number (msg.wParam); + return make_fixnum (msg.wParam); } return Qnil; } @@ -8787,32 +8787,32 @@ and width values are in pixels. return listn (CONSTYPE_HEAP, 10, Fcons (Qouter_position, - Fcons (make_number (left), make_number (top))), + Fcons (make_fixnum (left), make_fixnum (top))), Fcons (Qouter_size, - Fcons (make_number (right - left), - make_number (bottom - top))), + Fcons (make_fixnum (right - left), + make_fixnum (bottom - top))), Fcons (Qexternal_border_size, - Fcons (make_number (external_border_width), - make_number (external_border_height))), + Fcons (make_fixnum (external_border_width), + make_fixnum (external_border_height))), Fcons (Qtitle_bar_size, - Fcons (make_number (title_bar_width), - make_number (title_bar_height))), + Fcons (make_fixnum (title_bar_width), + make_fixnum (title_bar_height))), Fcons (Qmenu_bar_external, Qt), Fcons (Qmenu_bar_size, - Fcons (make_number + Fcons (make_fixnum (menu_bar.rcBar.right - menu_bar.rcBar.left), - make_number (menu_bar_height))), + make_fixnum (menu_bar_height))), Fcons (Qtool_bar_external, Qnil), Fcons (Qtool_bar_position, tool_bar_height ? Qtop : Qnil), Fcons (Qtool_bar_size, - Fcons (make_number + Fcons (make_fixnum (tool_bar_height ? (right - left - 2 * external_border_width - 2 * internal_border_width) : 0), - make_number (tool_bar_height))), + make_fixnum (tool_bar_height))), Fcons (Qinternal_border_width, - make_number (internal_border_width))); + make_fixnum (internal_border_width))); } DEFUN ("w32-frame-edges", Fw32_frame_edges, Sw32_frame_edges, 0, 2, 0, @@ -8849,10 +8849,10 @@ menu bar or tool bar of FRAME. */) unblock_input (); if (success) - return list4 (make_number (rectangle.left), - make_number (rectangle.top), - make_number (rectangle.right), - make_number (rectangle.bottom)); + return list4 (make_fixnum (rectangle.left), + make_fixnum (rectangle.top), + make_fixnum (rectangle.right), + make_fixnum (rectangle.bottom)); else return Qnil; } @@ -8891,16 +8891,16 @@ menu bar or tool bar of FRAME. */) { int internal_border_width = FRAME_INTERNAL_BORDER_WIDTH (f); - return list4 (make_number (left + internal_border_width), - make_number (top + return list4 (make_fixnum (left + internal_border_width), + make_fixnum (top + FRAME_TOOL_BAR_HEIGHT (f) + internal_border_width), - make_number (right - internal_border_width), - make_number (bottom - internal_border_width)); + make_fixnum (right - internal_border_width), + make_fixnum (bottom - internal_border_width)); } else - return list4 (make_number (left), make_number (top), - make_number (right), make_number (bottom)); + return list4 (make_fixnum (left), make_fixnum (top), + make_fixnum (right), make_fixnum (bottom)); } } @@ -9048,7 +9048,7 @@ selected frame's display. */) GetCursorPos (&pt); unblock_input (); - return Fcons (make_number (pt.x), make_number (pt.y)); + return Fcons (make_fixnum (pt.x), make_fixnum (pt.y)); } DEFUN ("w32-set-mouse-absolute-pixel-position", Fw32_set_mouse_absolute_pixel_position, @@ -9431,7 +9431,7 @@ w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state) int cur_state = (GetKeyState (vk_code) & 1); if (NILP (new_state) - || (NUMBERP (new_state) + || (FIXED_OR_FLOATP (new_state) && ((XUINT (new_state)) & 1) != cur_state)) { #ifdef WINDOWSNT @@ -10059,7 +10059,7 @@ usage: (w32-notification-notify &rest PARAMS) */) /* Do it! */ retval = add_tray_notification (f, icon, tip, severity, timeout, title, msg); - return (retval < 0 ? Qnil : make_number (retval)); + return (retval < 0 ? Qnil : make_fixnum (retval)); } DEFUN ("w32-notification-close", @@ -10070,7 +10070,7 @@ DEFUN ("w32-notification-close", { struct frame *f = SELECTED_FRAME (); - if (INTEGERP (id)) + if (FIXNUMP (id)) delete_tray_notification (f, XINT (id)); return Qnil; @@ -10483,7 +10483,7 @@ bass-down, bass-boost, bass-up, treble-down, treble-up */); DEFVAR_LISP ("x-max-tooltip-size", Vx_max_tooltip_size, doc: /* SKIP: real doc in xfns.c. */); - Vx_max_tooltip_size = Fcons (make_number (80), make_number (40)); + Vx_max_tooltip_size = Fcons (make_fixnum (80), make_fixnum (40)); DEFVAR_LISP ("x-no-window-manager", Vx_no_window_manager, doc: /* SKIP: real doc in xfns.c. */); |