comparison src/dosfns.c @ 58012:934f6fb6fd8a

* dosfns.c (Fdos_memget, Fdos_memput): Use integer variable offs in comparisons with integers instead of Lisp_Object address. (Fmsdos_set_keyboard): Declare argument allkeys. * msdos.c (IT_set_frame_parameters): Use EQ, not ==, for Lisp_Object:s. * dired.c: extern declare Fmsdos_downcase_filename on MSDOS to avoid int/Lisp_Object mixup. * fileio.c: Ditto.
author Jan Djärv <jan.h.d@swipnet.se>
date Sun, 07 Nov 2004 09:13:26 +0000
parents 695cf19ef79e
children a8fa7c632ee4 cb7f41387eb3
comparison
equal deleted inserted replaced
58011:79614f2016d5 58012:934f6fb6fd8a
108 108
109 CHECK_NUMBER (address); 109 CHECK_NUMBER (address);
110 offs = (unsigned long) XINT (address); 110 offs = (unsigned long) XINT (address);
111 CHECK_VECTOR (vector); 111 CHECK_VECTOR (vector);
112 len = XVECTOR (vector)-> size; 112 len = XVECTOR (vector)-> size;
113 if (len < 1 || len > 2048 || address < 0 || address > 0xfffff - len) 113 if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len)
114 return Qnil; 114 return Qnil;
115 buf = alloca (len); 115 buf = alloca (len);
116 dosmemget (offs, len, buf); 116 dosmemget (offs, len, buf);
117 117
118 for (i = 0; i < len; i++) 118 for (i = 0; i < len; i++)
133 133
134 CHECK_NUMBER (address); 134 CHECK_NUMBER (address);
135 offs = (unsigned long) XINT (address); 135 offs = (unsigned long) XINT (address);
136 CHECK_VECTOR (vector); 136 CHECK_VECTOR (vector);
137 len = XVECTOR (vector)-> size; 137 len = XVECTOR (vector)-> size;
138 if (len < 1 || len > 2048 || address < 0 || address > 0xfffff - len) 138 if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len)
139 return Qnil; 139 return Qnil;
140 buf = alloca (len); 140 buf = alloca (len);
141 141
142 for (i = 0; i < len; i++) 142 for (i = 0; i < len; i++)
143 { 143 {
153 doc: /* Set keyboard layout according to COUNTRY-CODE. 153 doc: /* Set keyboard layout according to COUNTRY-CODE.
154 If the optional argument ALLKEYS is non-nil, the keyboard is mapped for 154 If the optional argument ALLKEYS is non-nil, the keyboard is mapped for
155 all keys; otherwise it is only used when the ALT key is pressed. 155 all keys; otherwise it is only used when the ALT key is pressed.
156 The current keyboard layout is available in dos-keyboard-code. */) 156 The current keyboard layout is available in dos-keyboard-code. */)
157 (country_code, allkeys) 157 (country_code, allkeys)
158 Lisp_Object country_code; 158 Lisp_Object country_code, allkeys;
159 { 159 {
160 CHECK_NUMBER (country_code); 160 CHECK_NUMBER (country_code);
161 if (!dos_set_keyboard (XINT (country_code), !NILP (allkeys))) 161 if (!dos_set_keyboard (XINT (country_code), !NILP (allkeys)))
162 return Qnil; 162 return Qnil;
163 return Qt; 163 return Qt;