diff options
| author | Joakim Verona | 2012-03-25 22:04:52 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-03-25 22:04:52 +0200 |
| commit | 75da28a3845b9dfa4e730cfa19c14edc52cbb222 (patch) | |
| tree | b04519bffcb21264cbe3ce8af13df7186548667f /src/bidi.c | |
| parent | b827329a89291ed68dd017c53976be7ce5ed3b22 (diff) | |
| parent | f514f6f0e3f8bbeb5212d0337e5bda5a9a4eaeb5 (diff) | |
| download | emacs-75da28a3845b9dfa4e730cfa19c14edc52cbb222.tar.gz emacs-75da28a3845b9dfa4e730cfa19c14edc52cbb222.zip | |
upstream
Diffstat (limited to 'src/bidi.c')
| -rw-r--r-- | src/bidi.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/bidi.c b/src/bidi.c index 107c817abba..b3479b17b16 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -932,6 +932,7 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos, | |||
| 932 | EMACS_INT endpos | 932 | EMACS_INT endpos |
| 933 | = (string->s || STRINGP (string->lstring)) ? string->schars : ZV; | 933 | = (string->s || STRINGP (string->lstring)) ? string->schars : ZV; |
| 934 | struct text_pos pos; | 934 | struct text_pos pos; |
| 935 | int len; | ||
| 935 | 936 | ||
| 936 | /* If we got past the last known position of display string, compute | 937 | /* If we got past the last known position of display string, compute |
| 937 | the position of the next one. That position could be at CHARPOS. */ | 938 | the position of the next one. That position could be at CHARPOS. */ |
| @@ -1003,7 +1004,6 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos, | |||
| 1003 | normal_char: | 1004 | normal_char: |
| 1004 | if (string->s) | 1005 | if (string->s) |
| 1005 | { | 1006 | { |
| 1006 | int len; | ||
| 1007 | 1007 | ||
| 1008 | if (!string->unibyte) | 1008 | if (!string->unibyte) |
| 1009 | { | 1009 | { |
| @@ -1018,8 +1018,6 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos, | |||
| 1018 | } | 1018 | } |
| 1019 | else if (STRINGP (string->lstring)) | 1019 | else if (STRINGP (string->lstring)) |
| 1020 | { | 1020 | { |
| 1021 | int len; | ||
| 1022 | |||
| 1023 | if (!string->unibyte) | 1021 | if (!string->unibyte) |
| 1024 | { | 1022 | { |
| 1025 | ch = STRING_CHAR_AND_LENGTH (SDATA (string->lstring) + bytepos, | 1023 | ch = STRING_CHAR_AND_LENGTH (SDATA (string->lstring) + bytepos, |
| @@ -1034,8 +1032,8 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos, | |||
| 1034 | } | 1032 | } |
| 1035 | else | 1033 | else |
| 1036 | { | 1034 | { |
| 1037 | ch = FETCH_MULTIBYTE_CHAR (bytepos); | 1035 | ch = STRING_CHAR_AND_LENGTH (BYTE_POS_ADDR (bytepos), len); |
| 1038 | *ch_len = CHAR_BYTES (ch); | 1036 | *ch_len = len; |
| 1039 | } | 1037 | } |
| 1040 | *nchars = 1; | 1038 | *nchars = 1; |
| 1041 | } | 1039 | } |