Changeset 4003

Show
Ignore:
Timestamp:
2005年12月20日 07時07分00秒 (3 years ago)
Author:
fujii
Message:

Fix return value of x_rgb_names.
Fix 3rd arguments of call to try_window() in x-show-tip().
Add parameter type declaration.
Add function prototypes.
Use EQ() instead of comparison by operator.
See [meadow-develop:7096] for details.

* mw32font.c (check_lisp_object_logfont): Use EQ() instead of
equation.
(mw32_set_encoding_byte_from_charset): type of variable charset is
changed.
(set_font_frame_param): Add parameter declaration.
(Fw32_add_font_internal): Ditto.
(Fw32_get_font_info): Ditto.
(Fw32_score_logfont_candidates): use XINT().

* process.c (create_process): Use EQ() instead of equation
operator.

* mw32fns.c: Add function prototypes.
(x_rgb_names): Correct a return value.
(mw32_WndProc<WM_EMACS_MODIFY_IME_FONT_PROP>): Use NILP() instead
of evaluating value of Lisp_Object as boolean.
(Fx_show_tip): type of 3rd argument of try_window() should be 0,
not Qnil.
(Fmw32_file_dialog): Add parameter declaration.

* buffer.c (pdump_global_buffer_p): Use EQ() instead of equation
operator.

* mw32bdf.c (mw32_get_bdf_font_info): Use make_number() instead of
XFASTINT()

* w32inevt.c (key_event): Use assignment instead of XSETINT().

* mw32menu.c: Add a function prototype.

* lisp.h: Add a function prototype.

* mw32reg.c (Fmw32_registry_set): Add parameter declaration.

* mw32ime.c: Add function prototypes.
(IMMCONTEXTCAR): Use make_number() instead of XFASTINT().
(IMMCONTEXTCDR): Ditto.
(immcontext): Use XUINT().
(Fw32_ime_create_conversion_agent): Use make_number() instead of
XFASTINT().
(Fw32_ime_get_composition_string): Use make_number() instead of
direct assignment.

* mw32term.c: Add function prototypes.
(Fmw32_get_window_position): Add parameter declaration.
(Fmw32_get_scroll_bar_info): Ditto.
(note_sync_event): Use EQ() instead of equation operator.
(show_or_hide_mouse_cursor): Ditto.
(Fw32_get_system_metrics): Add parameter declaration.
(Fw32_get_key_state): Ditto.
(Fw32_get_mouse_wheel_scroll_lines): Ditto.
(FMeadow_version): Ditto.
(Fmw32_sh_get_file_info): Ditto.

* xfaces.c: Add function prototypes.

* sysdep.c (read_input_waiting): Use = operator instead of
XSETINT().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/ChangeLog.Meadow

    r4000 r4003  
     12005-12-20  Masayuki FUJII  <boochang@m4.kcn.ne.jp> 
     2 
     3        * mw32font.c (check_lisp_object_logfont): Use EQ() instead of 
     4        equation. 
     5        (mw32_set_encoding_byte_from_charset): type of variable charset is 
     6        changed. 
     7        (set_font_frame_param): Add parameter declaration. 
     8        (Fw32_add_font_internal): Ditto. 
     9        (Fw32_get_font_info): Ditto. 
     10        (Fw32_score_logfont_candidates): use XINT(). 
     11 
     12        * process.c (create_process): Use EQ() instead of equation 
     13        operator. 
     14 
     15        * mw32fns.c: Add function prototypes. 
     16        (x_rgb_names): Correct a return value. 
     17        (mw32_WndProc<WM_EMACS_MODIFY_IME_FONT_PROP>): Use NILP() instead 
     18        of evaluating value of Lisp_Object as boolean. 
     19        (Fx_show_tip): type of 3rd argument of try_window() should be 0, 
     20        not Qnil. 
     21        (Fmw32_file_dialog): Add parameter declaration. 
     22 
     23        * buffer.c (pdump_global_buffer_p): Use EQ() instead of equation 
     24        operator. 
     25 
     26        * mw32bdf.c (mw32_get_bdf_font_info): Use make_number() instead of 
     27        XFASTINT() 
     28 
     29        * w32inevt.c (key_event): Use assignment instead of XSETINT(). 
     30 
     31        * mw32menu.c: Add a function prototype. 
     32 
     33        * lisp.h: Add a function prototype. 
     34 
     35        * mw32reg.c (Fmw32_registry_set): Add parameter declaration. 
     36 
     37        * mw32ime.c: Add function prototypes. 
     38        (IMMCONTEXTCAR): Use make_number() instead of XFASTINT(). 
     39        (IMMCONTEXTCDR): Ditto. 
     40        (immcontext): Use XUINT(). 
     41        (Fw32_ime_create_conversion_agent): Use make_number() instead of 
     42        XFASTINT(). 
     43        (Fw32_ime_get_composition_string): Use make_number() instead of 
     44        direct assignment. 
     45 
     46        * mw32term.c: Add function prototypes. 
     47        (Fmw32_get_window_position): Add parameter declaration. 
     48        (Fmw32_get_scroll_bar_info): Ditto. 
     49        (note_sync_event): Use EQ() instead of equation operator. 
     50        (show_or_hide_mouse_cursor): Ditto. 
     51        (Fw32_get_system_metrics): Add parameter declaration. 
     52        (Fw32_get_key_state): Ditto. 
     53        (Fw32_get_mouse_wheel_scroll_lines): Ditto. 
     54        (FMeadow_version): Ditto. 
     55        (Fmw32_sh_get_file_info): Ditto. 
     56 
     57        * xfaces.c: Add function prototypes. 
     58 
     59        * sysdep.c (read_input_waiting): Use = operator instead of 
     60        XSETINT(). 
     61 
    1622005-12-13  Kyotaro HORIGUCHI  <horiguti@meadowy.org> 
    263 
  • trunk/src/buffer.c

    r3945 r4003  
    49354935pdump_global_buffer_p (Lisp_Object obj) 
    49364936{ 
    4937   return (obj == Vbuffer_defaults || obj == Vbuffer_local_symbols); 
     4937  return EQ (obj, Vbuffer_defaults) || EQ (obj, Vbuffer_local_symbols); 
    49384938} 
    49394939#endif 
  • trunk/src/lisp.h

    r3990 r4003  
    32353235EXFUN (Fxw_display_color_p, 1); 
    32363236EXFUN (Fx_file_dialog, 5); 
     3237#ifdef MEADOW 
     3238EXFUN (Fmw32_file_dialog, 5); 
     3239#endif 
    32373240#endif /* HAVE_WINDOW_SYSTEM */ 
    32383241 
  • trunk/src/mw32bdf.c

    r3801 r4003  
    350350  store_in_alist (&ret, intern ("base"), 
    351351                  make_number (bdffontp->ury)); 
    352   store_in_alist (&ret, intern ("overhang"), XFASTINT(0)); 
     352  store_in_alist (&ret, intern ("overhang"), make_number (0)); 
    353353  store_in_alist (&ret, intern ("relative-compose"), 
    354354                  make_number (bdffontp->relative_compose)); 
  • trunk/src/mw32fns.c

    r3999 r4003  
    120120int image_cache_refcount, dpyinfo_refcount; 
    121121#endif 
     122 
     123EXFUN (Funix_to_dos_filename, 1); 
     124EXFUN (Fdos_to_unix_filename, 1); 
    122125  
    123126/* Error if we are not connected to X.  */ 
     
    446449  colstrend = memchr (colstr, '/', len); 
    447450  if (!colstrend) 
    448     return Qnil
     451    return CLR_INVALID
    449452  redchars = (int) (colstrend - colstr); 
    450453  red = color_radix_change (colstr, redchars); 
     
    24342437         is main thread. Use selected_frame as target frame. */ 
    24352438 
    2436       if (selected_frame
     2439      if (!NILP (selected_frame)
    24372440        { 
    24382441          struct frame *f = XFRAME (selected_frame); 
     
    44394442  clear_glyph_matrix (w->current_matrix); 
    44404443  SET_TEXT_POS (pos, BEGV, BEGV_BYTE); 
    4441   try_window (FRAME_ROOT_WINDOW (f), pos, Qnil); 
     4444  try_window (FRAME_ROOT_WINDOW (f), pos, 0); 
    44424445 
    44434446  /* Compute width and height of the tooltip.  */ 
     
    46284631selection dialog's entry field, if MUSTMATCH is non-nil.  */) 
    46294632  (prompt, dir, default_filename, mustmatch, only_dir_p) 
    4630      Lisp_Object prompt, dir, default_filename, mustmatch
     4633     Lisp_Object prompt, dir, default_filename, mustmatch, only_dir_p
    46314634{ 
    46324635  struct frame *f = SELECTED_FRAME (); 
  • trunk/src/mw32font.c

    r3997 r4003  
    965965  else CHECK_STRING (tmpcar); /* name  or path */ 
    966966 
    967   if (type == Qw32_logfont
     967  if (EQ (type, Qw32_logfont)
    968968    { 
    969969      encode_logfont_name (tmpcar, NULL); 
     
    10221022      else CHECK_NUMBER (tmpcar); /* PitchAndFamily */ 
    10231023    } 
    1024   else if (type != Qbdf_font
     1024  else if (!EQ (type, Qbdf_font)
    10251025    { 
    10261026      if (noerror) return 0; 
     
    11281128      else 
    11291129        { 
    1130           Lisp_Object charset = CHAR_CHARSET (c); 
    1131           if (NILP (charset)
     1130          int charset = CHAR_CHARSET (c); 
     1131          if (!charset
    11321132            plf->encoding.font_unit_byte = 1; 
    11331133          else 
     
    22332233   the default font name.  */ 
    22342234 
    2235 void set_font_frame_param (frame, lface) 
     2235void set_font_frame_param (Lisp_Object frame, Lisp_Object lface) 
    22362236{ 
    22372237  struct frame *f = XFRAME (frame); 
     
    24012401ALIST is parameters to use this font.  */) 
    24022402     (name, alist) 
     2403     Lisp_Object name, alist; 
    24032404{ 
    24042405  CHECK_STRING (name); 
     
    24612462NAME is a name of the font.  */) 
    24622463     (name) 
     2464     Lisp_Object name; 
    24632465{ 
    24642466  int idx; 
     
    27322734  int i; 
    27332735 
    2734   num = Flength (candidates); 
     2736  num = XINT (Flength (candidates)); 
    27352737  plc = (logfont_candidates*) xmalloc (sizeof (logfont_candidates) * num); 
    27362738  pscore = (int *) xmalloc (sizeof (int) * num); 
  • trunk/src/mw32ime.c

    r3998 r4003  
    2424#include "config.h" 
    2525#include "lisp.h" 
     26#include "intervals.h" 
    2627#include <imm.h> 
    2728#ifdef IME_RECONVERSION 
     
    5152 
    5253#define IMMCONTEXTCAR(imc) \ 
    53   (XFASTINT ((((unsigned long) (imc)) >> 16) & 0xffff)) 
     54  (make_number ((((unsigned long) (imc)) >> 16) & 0xffff)) 
    5455 
    5556#define IMMCONTEXTCDR(imc) \ 
    56   (XFASTINT (((unsigned long) (imc)) & 0xffff)) 
     57  (make_number (((unsigned long) (imc)) & 0xffff)) 
    5758 
    5859#ifdef IME_CONTROL 
     
    162163static int last_ime_vkeycode; 
    163164static int last_ime_vkeymod; 
     165 
     166EXFUN (Fsubstring_no_properties, 3); 
     167EXFUN (Ffep_get_mode, 0); 
    164168 
    165169int 
     
    627631    return agent[XFASTINT (context)].himc; 
    628632  else 
    629     return ((HIMC)((((unsigned long) (XCONS (context)->car)) << 16) | 
    630                    (((unsigned long) (XCONS (context)->u.cdr)) & 0xffff))); 
     633    return ((HIMC)((((unsigned long) (XUINT (XCONS (context)->car))) << 16) | 
     634                   (((unsigned long) (XUINT (XCONS (context)->u.cdr))) & 0xffff))); 
    631635} 
    632636 
     
    13751379  SendMessage (hwnd, WM_MULE_IMM_SET_STATUS, 1, 0); 
    13761380 
    1377   return XFASTINT (i); 
     1381  return make_number (i); 
    13781382} 
    13791383 
     
    16361640      result = concat2 (result, str); 
    16371641 
    1638       Fput_text_property (start_idx, end_idx, Qim_info
    1639                           get_attribute_lisp_object (*aa), 
     1642      Fput_text_property (make_number (start_idx), make_number (end_idx)
     1643                          Qim_info, get_attribute_lisp_object (*aa), 
    16401644                          result); 
    16411645    } 
  • trunk/src/mw32menu.c

    r3919 r4003  
    176176 
    177177int pending_menu_activation; 
     178 
     179EXFUN (Fkeymapp, 1); 
     180 
    178181  
    179182#ifdef USE_X_TOOLKIT 
  • trunk/src/mw32reg.c

    r3871 r4003  
    11421142) 
    11431143     (key, name, data) 
     1144     Lisp_Object key, name, data; 
    11441145{ 
    11451146  registry_key regkey; 
  • trunk/src/mw32term.c

    r3998 r4003  
    288288int mw32_restrict_frame_position = TRUE; 
    289289 
     290extern Lisp_Object mw32_create_image_blob_from_icon P_((HICON hicon)); 
     291 
     292EXFUN (Finternal_get_lisp_face_attribute, 3); 
     293EXFUN (Funix_to_dos_filename, 1); 
    290294  
    291295/* Flush message queue of frame F, or of all frames if F is null.  */ 
     
    36173621Returns the dimensions as (LEFT TOP RIGHT BOTTOM) in screen coordinates, 
    36183622or nil if specified window is not found, or failed to get the position. */) 
    3619   (class_name, window_name) 
     3623     (class_name, window_name) 
     3624     Lisp_Object class_name, window_name; 
    36203625{ 
    36213626  HWND hwnd; 
     
    36483653Nil means selected window. 
    36493654Return value is (MIN MAX PAGE POS TRACKPOS), or nil if window has no scroll-bar. */) 
    3650   (window) 
     3655     (window) 
     3656     Lisp_Object window; 
    36513657{ 
    36523658  struct scroll_bar *bar; 
     
    42054211      /* If the contents of the global variable help_echo 
    42064212         has changed, generate a HELP_EVENT.  */ 
    4207       if (help_echo_string != previous_help_echo_string || 
     4213      if (!EQ (help_echo_string, previous_help_echo_string) || 
    42084214          (!NILP (help_echo_string) && !STRINGP (help_echo_string) 
    42094215           && f->mouse_moved)) 
     
    42684274 
    42694275  if (! last_timeout_obj_init_p 
    4270       || last_timeout_obj != mw32_hide_mouse_timeout
     4276      || !EQ (last_timeout_obj, mw32_hide_mouse_timeout)
    42714277    { 
    42724278      last_timeout_obj = mw32_hide_mouse_timeout; 
     
    62986304       1, 1, 0, 
    62996305       doc: /* Retrieve system metrics. This function only calls GetSystemMetrics.  */) 
    6300   (index) 
     6306     (index) 
     6307     Lisp_Object index; 
    63016308{ 
    63026309  Lisp_Object ret; 
     
    63176324'hyper...hyper modifier.  */) 
    63186325     (key, modifier) 
     6326     Lisp_Object key, modifier; 
    63196327{ 
    63206328  int virtkey; 
     
    63936401       doc: /* Retrieve a key state when the previous message was received; 
    63946402not the current state. KEY is a virtual key code to get a state.  */) 
    6395   (key) 
     6403     (key) 
     6404     Lisp_Object key; 
    63966405{ 
    63976406  int state; 
     
    64096418       1, 1, 0, 
    64106419       doc: /* Retrieve a number of scroll lines from delta number of mouse wheel.  */) 
    6411   (delta) 
     6420     (delta) 
     6421     Lisp_Object delta; 
    64126422{ 
    64136423#ifdef W32_INTELLIMOUSE 
     
    65176527       1, 2, 0, 
    65186528       doc: /* Retrieve system metrics. This function only calls GetSystemMetrics.  */) 
    6519   (item, target) 
     6529     (item, target) 
     6530     Lisp_Object item, target; 
    65206531{ 
    65216532  HDC hdc; 
     
    66436654The optional argument DUMMY is not currently used.  */) 
    66446655     (dummy) 
     6656     Lisp_Object dummy; 
    66456657{ 
    66466658  return (build_string (MEADOW_VERSION_STRING)); 
     
    67586770This function simply calls SHGetFileInfo().  Please refer to the 
    67596771specification of the function.  */) 
    6760   (path, attrib, retrieve) 
     6772    (path, attrib, retrieve) 
     6773     Lisp_Object path, attrib, retrieve; 
    67616774{ 
    67626775  LPCTSTR path_string; 
  • trunk/src/process.c

    r4000 r4003  
    21282128   Vmw32_process_under_setup = process; 
    21292129 
    2130    if (Vprocess_connection_type != Qnil
     2130   if (!EQ (Vprocess_connection_type, Qnil)
    21312131     Vmw32_process_expects_pty = 1; 
    21322132   else  
  • trunk/src/sysdep.c

    r3945 r4003  
    27432743            } 
    27442744 
     2745#ifdef MEADOW 
     2746          e.code = buf[i]; 
     2747#else 
    27452748          XSETINT (e.code, buf[i]); 
     2749#endif 
    27462750          kbd_buffer_store_event (&e); 
    27472751          /* Don't look at input that follows a C-g too closely. 
  • trunk/src/w32inevt.c

    r3809 r4003  
    492492      if (key_flag < 0) 
    493493        *isdead = 1; 
    494       XSETINT (emacs_ev->code, event->uChar.AsciiChar)
     494      emacs_ev->code = event->uChar.AsciiChar
    495495    } 
    496496#ifdef MULE 
     
    517517#ifdef HAVE_NTGUI 
    518518      /* use Windows keysym map */ 
    519       XSETINT (emacs_ev->code, event->wVirtualKeyCode)
     519      emacs_ev->code = event->wVirtualKeyCode
    520520#else 
    521521      /* 
  • trunk/src/xfaces.c

    r3990 r4003  
    593593extern void free_frame_menubar P_ ((struct frame *)); 
    594594#endif /* USE_X_TOOLKIT */ 
     595 
     596#ifdef MEADOW 
     597extern Lisp_Object vga_stdcolor_name P_ ((int)); 
     598extern Lisp_Object mw32_list_fonts P_ ((struct frame *, Lisp_Object, int, 
     599                                        int)); 
     600                                         
     601extern Lisp_Object display_x_get_resource P_ ((Display_Info *, Lisp_Object,  
     602                                               Lisp_Object, Lisp_Object, 
     603                                               Lisp_Object)); 
     604#endif 
    595605 
    596606#endif /* HAVE_WINDOW_SYSTEM */