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

Diff of /emacs/src/ccl.c

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

revision 1.80 by fx, Wed Jul 17 14:39:54 2002 UTC revision 1.81 by lektu, Tue Feb 4 14:03:11 2003 UTC
# Line 426  Lisp_Object Vtranslation_hash_table_vect Line 426  Lisp_Object Vtranslation_hash_table_vect
426                                          extended_command (rrr,RRR,Rrr,ARGS)                                          extended_command (rrr,RRR,Rrr,ARGS)
427                                        */                                        */
428    
429  /*  /*
430     Here after, Extended CCL Instructions.     Here after, Extended CCL Instructions.
431     Bit length of extended command is 14.     Bit length of extended command is 14.
432     Therefore, the instruction code range is 0..16384(0x3fff).     Therefore, the instruction code range is 0..16384(0x3fff).
# Line 484  Lisp_Object Vtranslation_hash_table_vect Line 484  Lisp_Object Vtranslation_hash_table_vect
484                                          3:MAP-ID1                                          3:MAP-ID1
485                                          4:MAP-ID2                                          4:MAP-ID2
486                                          ...                                          ...
487                                       */                                       */
488    
489  /* Map the code in reg[rrr] by MAPs starting from the Nth (N =  /* Map the code in reg[rrr] by MAPs starting from the Nth (N =
490     reg[RRR]) map.     reg[RRR]) map.
# Line 562  Lisp_Object Vtranslation_hash_table_vect Line 562  Lisp_Object Vtranslation_hash_table_vect
562     where     where
563          STARTPOINT is an offset to be used for indexing a map,          STARTPOINT is an offset to be used for indexing a map,
564          ENDPOINT is a maximum index number of a map,          ENDPOINT is a maximum index number of a map,
565          VAL and VALn is a number, nil, t, or lambda.            VAL and VALn is a number, nil, t, or lambda.
566    
567     Valid index range of a map of type (a) is:     Valid index range of a map of type (a) is:
568          STARTPOINT <= index < STARTPOINT + map_size - 1          STARTPOINT <= index < STARTPOINT + map_size - 1
# Line 862  struct ccl_prog_stack Line 862  struct ccl_prog_stack
862      int ic;                     /* Instruction Counter.  */      int ic;                     /* Instruction Counter.  */
863    };    };
864    
865  /* For the moment, we only support depth 256 of stack.  */  /* For the moment, we only support depth 256 of stack.  */
866  static struct ccl_prog_stack ccl_prog_stack_struct[256];  static struct ccl_prog_stack ccl_prog_stack_struct[256];
867    
868  int  int
# Line 1096  ccl_driver (ccl, source, destination, sr Line 1096  ccl_driver (ccl, source, destination, sr
1096                    }                    }
1097                  CCL_INVALID_CMD;                  CCL_INVALID_CMD;
1098                }                }
1099                
1100              ccl_prog_stack_struct[stack_idx].ccl_prog = ccl_prog;              ccl_prog_stack_struct[stack_idx].ccl_prog = ccl_prog;
1101              ccl_prog_stack_struct[stack_idx].ic = ic;              ccl_prog_stack_struct[stack_idx].ic = ic;
1102              stack_idx++;              stack_idx++;
# Line 1260  ccl_driver (ccl, source, destination, sr Line 1260  ccl_driver (ccl, source, destination, sr
1260                    src++;                    src++;
1261                    goto ccl_read_multibyte_character_suspend;                    goto ccl_read_multibyte_character_suspend;
1262                  }                  }
1263                  
1264                if (!ccl->multibyte)                if (!ccl->multibyte)
1265                  {                  {
1266                    int bytes;                    int bytes;
# Line 1274  ccl_driver (ccl, source, destination, sr Line 1274  ccl_driver (ccl, source, destination, sr
1274                i = *src++;                i = *src++;
1275                if (i == '\n' && ccl->eol_type != CODING_EOL_LF)                if (i == '\n' && ccl->eol_type != CODING_EOL_LF)
1276                  {                  {
1277                    /* We are encoding.  */                    /* We are encoding.  */
1278                    if (ccl->eol_type == CODING_EOL_CRLF)                    if (ccl->eol_type == CODING_EOL_CRLF)
1279                      {                      {
1280                        if (ccl->cr_consumed)                        if (ccl->cr_consumed)
# Line 1399  ccl_driver (ccl, source, destination, sr Line 1399  ccl_driver (ccl, source, destination, sr
1399                SPLIT_CHAR (op, reg[RRR], i, j);                SPLIT_CHAR (op, reg[RRR], i, j);
1400                if (j != -1)                if (j != -1)
1401                  i = (i << 7) | j;                  i = (i << 7) | j;
1402                  
1403                reg[rrr] = i;                reg[rrr] = i;
1404                break;                break;
1405    
# Line 1411  ccl_driver (ccl, source, destination, sr Line 1411  ccl_driver (ccl, source, destination, sr
1411                SPLIT_CHAR (op, reg[RRR], i, j);                SPLIT_CHAR (op, reg[RRR], i, j);
1412                if (j != -1)                if (j != -1)
1413                  i = (i << 7) | j;                  i = (i << 7) | j;
1414                  
1415                reg[rrr] = i;                reg[rrr] = i;
1416                break;                break;
1417    
1418              case CCL_LookupIntConstTbl:              case CCL_LookupIntConstTbl:
1419                op = XINT (ccl_prog[ic]); /* table */                op = XINT (ccl_prog[ic]); /* table */
1420                ic++;                ic++;
1421                {                        {
1422                  struct Lisp_Hash_Table *h = GET_HASH_TABLE (op);                  struct Lisp_Hash_Table *h = GET_HASH_TABLE (op);
1423    
1424                  op = hash_lookup (h, make_number (reg[RRR]), NULL);                  op = hash_lookup (h, make_number (reg[RRR]), NULL);
# Line 1443  ccl_driver (ccl, source, destination, sr Line 1443  ccl_driver (ccl, source, destination, sr
1443                op = XINT (ccl_prog[ic]); /* table */                op = XINT (ccl_prog[ic]); /* table */
1444                ic++;                ic++;
1445                CCL_MAKE_CHAR (reg[RRR], reg[rrr], i);                CCL_MAKE_CHAR (reg[RRR], reg[rrr], i);
1446                {                        {
1447                  struct Lisp_Hash_Table *h = GET_HASH_TABLE (op);                  struct Lisp_Hash_Table *h = GET_HASH_TABLE (op);
1448    
1449                  op = hash_lookup (h, make_number (i), NULL);                  op = hash_lookup (h, make_number (i), NULL);
# Line 1517  ccl_driver (ccl, source, destination, sr Line 1517  ccl_driver (ccl, source, destination, sr
1517                          else                          else
1518                            continue;                            continue;
1519                        }                        }
1520                      else                      else
1521                        continue;                        continue;
1522    
1523                      if (NILP (content))                      if (NILP (content))
# Line 1553  ccl_driver (ccl, source, destination, sr Line 1553  ccl_driver (ccl, source, destination, sr
1553                  ic = fin_ic;                  ic = fin_ic;
1554                }                }
1555                break;                break;
1556                  
1557              case CCL_MapMultiple:              case CCL_MapMultiple:
1558                {                {
1559                  Lisp_Object map, content, attrib, value;                  Lisp_Object map, content, attrib, value;
# Line 1640  ccl_driver (ccl, source, destination, sr Line 1640  ccl_driver (ccl, source, destination, sr
1640                        }                        }
1641                    }                    }
1642                  map_vector_size = ASIZE (Vcode_conversion_map_vector);                  map_vector_size = ASIZE (Vcode_conversion_map_vector);
1643                    
1644                  do {                  do {
1645                    for (;map_set_rest_length > 0;i++, ic++, map_set_rest_length--)                    for (;map_set_rest_length > 0;i++, ic++, map_set_rest_length--)
1646                      {                      {
# Line 1690  ccl_driver (ccl, source, destination, sr Line 1690  ccl_driver (ccl, source, destination, sr
1690                            else                            else
1691                              continue;                              continue;
1692                          }                          }
1693                        else                        else
1694                          continue;                          continue;
1695    
1696                        if (NILP (content))                        if (NILP (content))
# Line 1808  ccl_driver (ccl, source, destination, sr Line 1808  ccl_driver (ccl, source, destination, sr
1808                    }                    }
1809                }                }
1810                break;                break;
1811                  
1812              default:              default:
1813                CCL_INVALID_CMD;                CCL_INVALID_CMD;
1814              }              }
# Line 1881  ccl_driver (ccl, source, destination, sr Line 1881  ccl_driver (ccl, source, destination, sr
1881            bcopy (msg, dst, msglen);            bcopy (msg, dst, msglen);
1882            dst += msglen;            dst += msglen;
1883          }          }
1884          
1885        if (ccl->status == CCL_STAT_INVALID_CMD)        if (ccl->status == CCL_STAT_INVALID_CMD)
1886          {          {
1887  #if 0 /* If the remaining bytes contain 0x80..0x9F, copying them  #if 0 /* If the remaining bytes contain 0x80..0x9F, copying them
# Line 2317  Return index number of the registered ma Line 2317  Return index number of the registered ma
2317    
2318    CHECK_SYMBOL (symbol);    CHECK_SYMBOL (symbol);
2319    CHECK_VECTOR (map);    CHECK_VECTOR (map);
2320      
2321    for (i = 0; i < len; i++)    for (i = 0; i < len; i++)
2322      {      {
2323        Lisp_Object slot = AREF (Vcode_conversion_map_vector, i);        Lisp_Object slot = AREF (Vcode_conversion_map_vector, i);

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.81

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