/[emacs]/emacs/src/fns.c
ViewVC logotype

Diff of /emacs/src/fns.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.336 by lektu, Sun Apr 6 13:31:40 2003 UTC revision 1.337 by rms, Sat May 17 12:45:52 2003 UTC
# Line 2634  DEFUN ("optimize-char-table", Foptimize_ Line 2634  DEFUN ("optimize-char-table", Foptimize_
2634     ARG is passed to C_FUNCTION when that is called.  */     ARG is passed to C_FUNCTION when that is called.  */
2635    
2636  void  void
2637  map_char_table (c_function, function, subtable, arg, depth, indices)  map_char_table (c_function, function, table, subtable, arg, depth, indices)
2638       void (*c_function) P_ ((Lisp_Object, Lisp_Object, Lisp_Object));       void (*c_function) P_ ((Lisp_Object, Lisp_Object, Lisp_Object));
2639       Lisp_Object function, subtable, arg, *indices;       Lisp_Object function, table, subtable, arg, *indices;
2640       int depth;       int depth;
2641  {  {
2642    int i, to;    int i, to;
# Line 2646  map_char_table (c_function, function, su Line 2646  map_char_table (c_function, function, su
2646        /* At first, handle ASCII and 8-bit European characters.  */        /* At first, handle ASCII and 8-bit European characters.  */
2647        for (i = 0; i < CHAR_TABLE_SINGLE_BYTE_SLOTS; i++)        for (i = 0; i < CHAR_TABLE_SINGLE_BYTE_SLOTS; i++)
2648          {          {
2649            Lisp_Object elt = XCHAR_TABLE (subtable)->contents[i];            Lisp_Object elt= XCHAR_TABLE (subtable)->contents[i];
2650              if (NILP (elt))
2651                elt = XCHAR_TABLE (subtable)->defalt;
2652              if (NILP (elt))
2653                elt = Faref (subtable, make_number (i));
2654            if (c_function)            if (c_function)
2655              (*c_function) (arg, make_number (i), elt);              (*c_function) (arg, make_number (i), elt);
2656            else            else
# Line 2687  map_char_table (c_function, function, su Line 2691  map_char_table (c_function, function, su
2691          {          {
2692            if (depth >= 3)            if (depth >= 3)
2693              error ("Too deep char table");              error ("Too deep char table");
2694            map_char_table (c_function, function, elt, arg, depth + 1, indices);            map_char_table (c_function, function, table, elt, arg, depth + 1, indices);
2695          }          }
2696        else        else
2697          {          {
# Line 2695  map_char_table (c_function, function, su Line 2699  map_char_table (c_function, function, su
2699    
2700            if (NILP (elt))            if (NILP (elt))
2701              elt = XCHAR_TABLE (subtable)->defalt;              elt = XCHAR_TABLE (subtable)->defalt;
2702              if (NILP  (elt))
2703                elt = Faref (table, make_number (i));
2704            c1 = depth >= 1 ? XFASTINT (indices[1]) : 0;            c1 = depth >= 1 ? XFASTINT (indices[1]) : 0;
2705            c2 = depth >= 2 ? XFASTINT (indices[2]) : 0;            c2 = depth >= 2 ? XFASTINT (indices[2]) : 0;
2706            c = MAKE_CHAR (charset, c1, c2);            c = MAKE_CHAR (charset, c1, c2);
# Line 2731  The key is always a possible IDX argumen Line 2737  The key is always a possible IDX argumen
2737       be passed to map_char_table because it returns a Lisp_Object rather       be passed to map_char_table because it returns a Lisp_Object rather
2738       than returning nothing.       than returning nothing.
2739       Casting leads to crashes on some architectures.  -stef  */       Casting leads to crashes on some architectures.  -stef  */
2740    map_char_table (void_call2, Qnil, char_table, function, 0, indices);    map_char_table (void_call2, Qnil, char_table, char_table, function, 0, indices);
2741    return Qnil;    return Qnil;
2742  }  }
2743    

Legend:
Removed from v.1.336  
changed lines
  Added in v.1.337

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26