comparison src/sunfns.c @ 40656:cdfd4d09b79a

Update usage of CHECK_ macros (remove unused second argument).
author Pavel Janík <Pavel@Janik.cz>
date Fri, 02 Nov 2001 20:46:55 +0000
parents e528f2adeed4
children b192e8b73558
comparison
equal deleted inserted replaced
40655:45453187feeb 40656:cdfd4d09b79a
157 Lisp_Object n; 157 Lisp_Object n;
158 { 158 {
159 struct timeval Timeout; 159 struct timeval Timeout;
160 int waitmask = 1; 160 int waitmask = 1;
161 161
162 CHECK_NUMBER (n, 0); 162 CHECK_NUMBER (n);
163 Timeout.tv_sec = XINT(n) / 1000; 163 Timeout.tv_sec = XINT(n) / 1000;
164 Timeout.tv_usec = (XINT(n) - (Timeout.tv_sec * 1000)) * 1000; 164 Timeout.tv_usec = (XINT(n) - (Timeout.tv_sec * 1000)) * 1000;
165 165
166 if (detect_input_pending()) return(Qnil); 166 if (detect_input_pending()) return(Qnil);
167 redisplay_preserve_echo_area (16); 167 redisplay_preserve_echo_area (16);
185 (n) 185 (n)
186 Lisp_Object n; 186 Lisp_Object n;
187 { 187 {
188 unsigned useconds; 188 unsigned useconds;
189 189
190 CHECK_NUMBER (n, 0); 190 CHECK_NUMBER (n);
191 useconds = XINT(n) * 1000; 191 useconds = XINT(n) * 1000;
192 usleep(useconds); 192 usleep(useconds);
193 return(Qt); 193 return(Qt);
194 } 194 }
195 195
228 CurrentCursor = DefaultCursor; 228 CurrentCursor = DefaultCursor;
229 else { 229 else {
230 /* 230 /*
231 * extract the data from the vector 231 * extract the data from the vector
232 */ 232 */
233 CHECK_VECTOR (Icon, 0); 233 CHECK_VECTOR (Icon);
234 if (XVECTOR(Icon)->size < 3) return(Qnil); 234 if (XVECTOR(Icon)->size < 3) return(Qnil);
235 X_Hot = XVECTOR(Icon)->contents[0]; 235 X_Hot = XVECTOR(Icon)->contents[0];
236 Y_Hot = XVECTOR(Icon)->contents[1]; 236 Y_Hot = XVECTOR(Icon)->contents[1];
237 Data = XVECTOR(Icon)->contents[2]; 237 Data = XVECTOR(Icon)->contents[2];
238 238
239 CHECK_NUMBER (X_Hot, 0); 239 CHECK_NUMBER (X_Hot);
240 CHECK_NUMBER (Y_Hot, 0); 240 CHECK_NUMBER (Y_Hot);
241 CHECK_STRING (Data, 0); 241 CHECK_STRING (Data);
242 if (XSTRING(Data)->size != 32) return(Qnil); 242 if (XSTRING(Data)->size != 32) return(Qnil);
243 /* 243 /*
244 * Setup the new cursor 244 * Setup the new cursor
245 */ 245 */
246 NewCursor.cur_xhot = X_Hot; 246 NewCursor.cur_xhot = X_Hot;
322 (str) 322 (str)
323 Lisp_Object str; 323 Lisp_Object str;
324 { 324 {
325 struct selection selection; 325 struct selection selection;
326 326
327 CHECK_STRING (str, 0); 327 CHECK_STRING (str);
328 Current_Selection = str; 328 Current_Selection = str;
329 329
330 CHECK_GFX (Qnil); 330 CHECK_GFX (Qnil);
331 selection.sel_type = SELTYPE_CHAR; 331 selection.sel_type = SELTYPE_CHAR;
332 selection.sel_items = XSTRING (str)->size; 332 selection.sel_items = XSTRING (str)->size;
361 Lisp_Object String; 361 Lisp_Object String;
362 Lisp_Object Value; 362 Lisp_Object Value;
363 363
364 if (!CONSP(Pair)) wrong_type_argument(Qlistp, Pair); 364 if (!CONSP(Pair)) wrong_type_argument(Qlistp, Pair);
365 String = Fcar(Pair); 365 String = Fcar(Pair);
366 CHECK_STRING(String, 0); 366 CHECK_STRING(String);
367 Value = Fcdr(Pair); 367 Value = Fcdr(Pair);
368 if (SYMBOLP (Value)) 368 if (SYMBOLP (Value))
369 Value = SYMBOL_VALUE (Value); 369 Value = SYMBOL_VALUE (Value);
370 if (VECTORP (Value)) { 370 if (VECTORP (Value)) {
371 submenu = sun_menu_create (Value); 371 submenu = sun_menu_create (Value);
382 sun_menu_create (Vector) 382 sun_menu_create (Vector)
383 Lisp_Object Vector; 383 Lisp_Object Vector;
384 { 384 {
385 Menu menu; 385 Menu menu;
386 int i; 386 int i;
387 CHECK_VECTOR(Vector,0); 387 CHECK_VECTOR(Vector);
388 menu=menu_create(0); 388 menu=menu_create(0);
389 for(i = 0; i < XVECTOR(Vector)->size; i++) { 389 for(i = 0; i < XVECTOR(Vector)->size; i++) {
390 menu_set (menu, MENU_APPEND_ITEM, 390 menu_set (menu, MENU_APPEND_ITEM,
391 sun_item_create(XVECTOR(Vector)->contents[i]), 0); 391 sun_item_create(XVECTOR(Vector)->contents[i]), 0);
392 } 392 }
443 int button, xpos, ypos; 443 int button, xpos, ypos;
444 Event event0; 444 Event event0;
445 Event *event = &event0; 445 Event *event = &event0;
446 Lisp_Object Value, Pair; 446 Lisp_Object Value, Pair;
447 447
448 CHECK_NUMBER(X_Position, 0); 448 CHECK_NUMBER(X_Position);
449 CHECK_NUMBER(Y_Position, 1); 449 CHECK_NUMBER(Y_Position);
450 CHECK_LIVE_WINDOW(window, 2); 450 CHECK_LIVE_WINDOW(window);
451 CHECK_NUMBER(Button, 3); 451 CHECK_NUMBER(Button);
452 CHECK_VECTOR(MEnu, 4); 452 CHECK_VECTOR(MEnu);
453 453
454 CHECK_GFX (Qnil); 454 CHECK_GFX (Qnil);
455 455
456 xpos = CtoSX (WINDOW_LEFT_MARGIN (XWINDOW (window)) + XINT(X_Position)); 456 xpos = CtoSX (WINDOW_LEFT_MARGIN (XWINDOW (window)) + XINT(X_Position));
457 ypos = CtoSY (XWINDOW(window)->top + XINT(Y_Position)); 457 ypos = CtoSY (XWINDOW(window)->top + XINT(Y_Position));