diff options
| author | Eli Zaretskii | 2013-03-28 20:13:59 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-03-28 20:13:59 +0200 |
| commit | d76bf86f438d4f5f9fe493ab76f02ffc78f3ae2e (patch) | |
| tree | 04fa8bc7bd2058a316a7ee30f8741d25bfd0b060 /src/ccl.c | |
| parent | 2ef26ceb192c7683754cf0b4aa3087f501254332 (diff) | |
| parent | e74aeda863cd6896e06e92586f87b45d63d67d15 (diff) | |
| download | emacs-d76bf86f438d4f5f9fe493ab76f02ffc78f3ae2e.tar.gz emacs-d76bf86f438d4f5f9fe493ab76f02ffc78f3ae2e.zip | |
Merge from trunk and resolve conflicts.
Diffstat (limited to 'src/ccl.c')
| -rw-r--r-- | src/ccl.c | 11 |
1 files changed, 5 insertions, 6 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* CCL (Code Conversion Language) interpreter. | 1 | /* CCL (Code Conversion Language) interpreter. |
| 2 | Copyright (C) 2001-2012 Free Software Foundation, Inc. | 2 | Copyright (C) 2001-2013 Free Software Foundation, Inc. |
| 3 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 3 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
| 4 | 2005, 2006, 2007, 2008, 2009, 2010, 2011 | 4 | 2005, 2006, 2007, 2008, 2009, 2010, 2011 |
| 5 | National Institute of Advanced Industrial Science and Technology (AIST) | 5 | National Institute of Advanced Industrial Science and Technology (AIST) |
| @@ -1668,7 +1668,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size | |||
| 1668 | } | 1668 | } |
| 1669 | map = XCDR (map); | 1669 | map = XCDR (map); |
| 1670 | if (! (VECTORP (map) | 1670 | if (! (VECTORP (map) |
| 1671 | && 0 < ASIZE (map) | 1671 | && ASIZE (map) > 0 |
| 1672 | && INTEGERP (AREF (map, 0)) | 1672 | && INTEGERP (AREF (map, 0)) |
| 1673 | && XINT (AREF (map, 0)) <= op | 1673 | && XINT (AREF (map, 0)) <= op |
| 1674 | && op - XINT (AREF (map, 0)) + 1 < ASIZE (map))) | 1674 | && op - XINT (AREF (map, 0)) + 1 < ASIZE (map))) |
| @@ -1867,7 +1867,7 @@ resolve_symbol_ccl_program (Lisp_Object ccl) | |||
| 1867 | return Qnil; | 1867 | return Qnil; |
| 1868 | } | 1868 | } |
| 1869 | 1869 | ||
| 1870 | if (! (0 <= XINT (AREF (result, CCL_HEADER_BUF_MAG)) | 1870 | if (! (XINT (AREF (result, CCL_HEADER_BUF_MAG)) >= 0 |
| 1871 | && ASCENDING_ORDER (0, XINT (AREF (result, CCL_HEADER_EOF)), | 1871 | && ASCENDING_ORDER (0, XINT (AREF (result, CCL_HEADER_EOF)), |
| 1872 | ASIZE (ccl)))) | 1872 | ASIZE (ccl)))) |
| 1873 | return Qnil; | 1873 | return Qnil; |
| @@ -2130,7 +2130,7 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY | |||
| 2130 | produced_chars += ccl.produced; | 2130 | produced_chars += ccl.produced; |
| 2131 | offset = outp - outbuf; | 2131 | offset = outp - outbuf; |
| 2132 | shortfall = ccl.produced * max_expansion - (outbufsize - offset); | 2132 | shortfall = ccl.produced * max_expansion - (outbufsize - offset); |
| 2133 | if (0 < shortfall) | 2133 | if (shortfall > 0) |
| 2134 | { | 2134 | { |
| 2135 | outbuf = xpalloc (outbuf, &outbufsize, shortfall, -1, 1); | 2135 | outbuf = xpalloc (outbuf, &outbufsize, shortfall, -1, 1); |
| 2136 | outp = outbuf + offset; | 2136 | outp = outbuf + offset; |
| @@ -2228,9 +2228,8 @@ Return index number of the registered CCL program. */) | |||
| 2228 | Vccl_program_table = larger_vector (Vccl_program_table, 1, -1); | 2228 | Vccl_program_table = larger_vector (Vccl_program_table, 1, -1); |
| 2229 | 2229 | ||
| 2230 | { | 2230 | { |
| 2231 | Lisp_Object elt; | 2231 | Lisp_Object elt = make_uninit_vector (4); |
| 2232 | 2232 | ||
| 2233 | elt = Fmake_vector (make_number (4), Qnil); | ||
| 2234 | ASET (elt, 0, name); | 2233 | ASET (elt, 0, name); |
| 2235 | ASET (elt, 1, ccl_prog); | 2234 | ASET (elt, 1, ccl_prog); |
| 2236 | ASET (elt, 2, resolved); | 2235 | ASET (elt, 2, resolved); |