comparison src/chartab.c @ 109179:8cfee7d2955f

Convert DEFUNs to standard C. * src/alloc.c: Convert DEFUNs to standard C. * src/buffer.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/dosfns.c: * src/editfns.c: * src/emacs.c: * src/eval.c: * src/fileio.c: * src/filelock.c: * src/floatfns.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/image.c: * src/indent.c: * src/insdel.c: * src/keyboard.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/menu.c: * src/minibuf.c: * src/msdos.c: * src/nsfns.m: * src/nsmenu.m: * src/nsselect.m: * src/print.c: * src/process.c: * src/search.c: * src/sound.c: * src/syntax.c: * src/term.c: * src/terminal.c: * src/textprop.c: * src/undo.c: * src/w16select.c: * src/w32console.c: * src/w32fns.c: * src/w32font.c: * src/w32menu.c: * src/w32proc.c: * src/w32select.c: * src/window.c: * src/xdisp.c: * src/xfaces.c: * src/xfns.c: * src/xmenu.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: Likewise.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 08 Jul 2010 14:25:08 -0700
parents c25c24812fb1
children ac49e05bfcf2
comparison
equal deleted inserted replaced
109178:53f8ebcd9a97 109179:8cfee7d2955f
60 60
61 PURPOSE should be a symbol. If it has a `char-table-extra-slots' 61 PURPOSE should be a symbol. If it has a `char-table-extra-slots'
62 property, the property's value should be an integer between 0 and 10 62 property, the property's value should be an integer between 0 and 10
63 that specifies how many extra slots the char-table has. Otherwise, 63 that specifies how many extra slots the char-table has. Otherwise,
64 the char-table has no extra slot. */) 64 the char-table has no extra slot. */)
65 (purpose, init) 65 (register Lisp_Object purpose, Lisp_Object init)
66 register Lisp_Object purpose, init;
67 { 66 {
68 Lisp_Object vector; 67 Lisp_Object vector;
69 Lisp_Object n; 68 Lisp_Object n;
70 int n_extras; 69 int n_extras;
71 int size; 70 int size;
450 449
451 DEFUN ("char-table-subtype", Fchar_table_subtype, Schar_table_subtype, 450 DEFUN ("char-table-subtype", Fchar_table_subtype, Schar_table_subtype,
452 1, 1, 0, 451 1, 1, 0,
453 doc: /* 452 doc: /*
454 Return the subtype of char-table CHAR-TABLE. The value is a symbol. */) 453 Return the subtype of char-table CHAR-TABLE. The value is a symbol. */)
455 (char_table) 454 (Lisp_Object char_table)
456 Lisp_Object char_table;
457 { 455 {
458 CHECK_CHAR_TABLE (char_table); 456 CHECK_CHAR_TABLE (char_table);
459 457
460 return XCHAR_TABLE (char_table)->purpose; 458 return XCHAR_TABLE (char_table)->purpose;
461 } 459 }
465 doc: /* Return the parent char-table of CHAR-TABLE. 463 doc: /* Return the parent char-table of CHAR-TABLE.
466 The value is either nil or another char-table. 464 The value is either nil or another char-table.
467 If CHAR-TABLE holds nil for a given character, 465 If CHAR-TABLE holds nil for a given character,
468 then the actual applicable value is inherited from the parent char-table 466 then the actual applicable value is inherited from the parent char-table
469 \(or from its parents, if necessary). */) 467 \(or from its parents, if necessary). */)
470 (char_table) 468 (Lisp_Object char_table)
471 Lisp_Object char_table;
472 { 469 {
473 CHECK_CHAR_TABLE (char_table); 470 CHECK_CHAR_TABLE (char_table);
474 471
475 return XCHAR_TABLE (char_table)->parent; 472 return XCHAR_TABLE (char_table)->parent;
476 } 473 }
477 474
478 DEFUN ("set-char-table-parent", Fset_char_table_parent, Sset_char_table_parent, 475 DEFUN ("set-char-table-parent", Fset_char_table_parent, Sset_char_table_parent,
479 2, 2, 0, 476 2, 2, 0,
480 doc: /* Set the parent char-table of CHAR-TABLE to PARENT. 477 doc: /* Set the parent char-table of CHAR-TABLE to PARENT.
481 Return PARENT. PARENT must be either nil or another char-table. */) 478 Return PARENT. PARENT must be either nil or another char-table. */)
482 (char_table, parent) 479 (Lisp_Object char_table, Lisp_Object parent)
483 Lisp_Object char_table, parent;
484 { 480 {
485 Lisp_Object temp; 481 Lisp_Object temp;
486 482
487 CHECK_CHAR_TABLE (char_table); 483 CHECK_CHAR_TABLE (char_table);
488 484
501 } 497 }
502 498
503 DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot, 499 DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot,
504 2, 2, 0, 500 2, 2, 0,
505 doc: /* Return the value of CHAR-TABLE's extra-slot number N. */) 501 doc: /* Return the value of CHAR-TABLE's extra-slot number N. */)
506 (char_table, n) 502 (Lisp_Object char_table, Lisp_Object n)
507 Lisp_Object char_table, n;
508 { 503 {
509 CHECK_CHAR_TABLE (char_table); 504 CHECK_CHAR_TABLE (char_table);
510 CHECK_NUMBER (n); 505 CHECK_NUMBER (n);
511 if (XINT (n) < 0 506 if (XINT (n) < 0
512 || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table))) 507 || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
517 512
518 DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot, 513 DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot,
519 Sset_char_table_extra_slot, 514 Sset_char_table_extra_slot,
520 3, 3, 0, 515 3, 3, 0,
521 doc: /* Set CHAR-TABLE's extra-slot number N to VALUE. */) 516 doc: /* Set CHAR-TABLE's extra-slot number N to VALUE. */)
522 (char_table, n, value) 517 (Lisp_Object char_table, Lisp_Object n, Lisp_Object value)
523 Lisp_Object char_table, n, value;
524 { 518 {
525 CHECK_CHAR_TABLE (char_table); 519 CHECK_CHAR_TABLE (char_table);
526 CHECK_NUMBER (n); 520 CHECK_NUMBER (n);
527 if (XINT (n) < 0 521 if (XINT (n) < 0
528 || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table))) 522 || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
534 DEFUN ("char-table-range", Fchar_table_range, Schar_table_range, 528 DEFUN ("char-table-range", Fchar_table_range, Schar_table_range,
535 2, 2, 0, 529 2, 2, 0,
536 doc: /* Return the value in CHAR-TABLE for a range of characters RANGE. 530 doc: /* Return the value in CHAR-TABLE for a range of characters RANGE.
537 RANGE should be nil (for the default value), 531 RANGE should be nil (for the default value),
538 a cons of character codes (for characters in the range), or a character code. */) 532 a cons of character codes (for characters in the range), or a character code. */)
539 (char_table, range) 533 (Lisp_Object char_table, Lisp_Object range)
540 Lisp_Object char_table, range;
541 { 534 {
542 Lisp_Object val; 535 Lisp_Object val;
543 CHECK_CHAR_TABLE (char_table); 536 CHECK_CHAR_TABLE (char_table);
544 537
545 if (EQ (range, Qnil)) 538 if (EQ (range, Qnil))
565 3, 3, 0, 558 3, 3, 0,
566 doc: /* Set the value in CHAR-TABLE for a range of characters RANGE to VALUE. 559 doc: /* Set the value in CHAR-TABLE for a range of characters RANGE to VALUE.
567 RANGE should be t (for all characters), nil (for the default value), 560 RANGE should be t (for all characters), nil (for the default value),
568 a cons of character codes (for characters in the range), 561 a cons of character codes (for characters in the range),
569 or a character code. Return VALUE. */) 562 or a character code. Return VALUE. */)
570 (char_table, range, value) 563 (Lisp_Object char_table, Lisp_Object range, Lisp_Object value)
571 Lisp_Object char_table, range, value;
572 { 564 {
573 CHECK_CHAR_TABLE (char_table); 565 CHECK_CHAR_TABLE (char_table);
574 if (EQ (range, Qt)) 566 if (EQ (range, Qt))
575 { 567 {
576 int i; 568 int i;
598 590
599 DEFUN ("set-char-table-default", Fset_char_table_default, 591 DEFUN ("set-char-table-default", Fset_char_table_default,
600 Sset_char_table_default, 3, 3, 0, 592 Sset_char_table_default, 3, 3, 0,
601 doc: /* 593 doc: /*
602 This function is obsolete and has no effect. */) 594 This function is obsolete and has no effect. */)
603 (char_table, ch, value) 595 (Lisp_Object char_table, Lisp_Object ch, Lisp_Object value)
604 Lisp_Object char_table, ch, value;
605 { 596 {
606 return Qnil; 597 return Qnil;
607 } 598 }
608 599
609 /* Look up the element in TABLE at index CH, and return it as an 600 /* Look up the element in TABLE at index CH, and return it as an
651 DEFUN ("optimize-char-table", Foptimize_char_table, Soptimize_char_table, 642 DEFUN ("optimize-char-table", Foptimize_char_table, Soptimize_char_table,
652 1, 2, 0, 643 1, 2, 0,
653 doc: /* Optimize CHAR-TABLE. 644 doc: /* Optimize CHAR-TABLE.
654 TEST is the comparison function used to decide whether two entries are 645 TEST is the comparison function used to decide whether two entries are
655 equivalent and can be merged. It defaults to `equal'. */) 646 equivalent and can be merged. It defaults to `equal'. */)
656 (char_table, test) 647 (Lisp_Object char_table, Lisp_Object test)
657 Lisp_Object char_table, test;
658 { 648 {
659 Lisp_Object elt; 649 Lisp_Object elt;
660 int i; 650 int i;
661 651
662 CHECK_CHAR_TABLE (char_table); 652 CHECK_CHAR_TABLE (char_table);
864 doc: /* 854 doc: /*
865 Call FUNCTION for each character in CHAR-TABLE that has non-nil value. 855 Call FUNCTION for each character in CHAR-TABLE that has non-nil value.
866 FUNCTION is called with two arguments--a key and a value. 856 FUNCTION is called with two arguments--a key and a value.
867 The key is a character code or a cons of character codes specifying a 857 The key is a character code or a cons of character codes specifying a
868 range of characters that have the same value. */) 858 range of characters that have the same value. */)
869 (function, char_table) 859 (Lisp_Object function, Lisp_Object char_table)
870 Lisp_Object function, char_table;
871 { 860 {
872 CHECK_CHAR_TABLE (char_table); 861 CHECK_CHAR_TABLE (char_table);
873 862
874 map_char_table (NULL, function, char_table, char_table); 863 map_char_table (NULL, function, char_table, char_table);
875 return Qnil; 864 return Qnil;