comparison src/coding.c @ 91622:0a283ea23533

(DECODE_EMACS_MULE_COMPOSITION_CHAR): Use "do...while (0)".
author Jan Djärv <jan.h.d@swipnet.se>
date Thu, 07 Feb 2008 12:55:44 +0000
parents 419a669bc4f2
children 507bcfb4342c
comparison
equal deleted inserted replaced
91621:d8d7c4cd2096 91622:0a283ea23533
1896 rule). If SRC doesn't points a composition component, set C to -1. 1896 rule). If SRC doesn't points a composition component, set C to -1.
1897 If SRC points an invalid byte sequence, global exit by a return 1897 If SRC points an invalid byte sequence, global exit by a return
1898 value 0. */ 1898 value 0. */
1899 1899
1900 #define DECODE_EMACS_MULE_COMPOSITION_CHAR(buf) \ 1900 #define DECODE_EMACS_MULE_COMPOSITION_CHAR(buf) \
1901 if (1) \ 1901 do \
1902 { \ 1902 { \
1903 int c; \ 1903 int c; \
1904 int nbytes, nchars; \ 1904 int nbytes, nchars; \
1905 \ 1905 \
1906 if (src == src_end) \ 1906 if (src == src_end) \
1914 } \ 1914 } \
1915 *buf++ = c; \ 1915 *buf++ = c; \
1916 src += nbytes; \ 1916 src += nbytes; \
1917 consumed_chars += nchars; \ 1917 consumed_chars += nchars; \
1918 } \ 1918 } \
1919 else 1919 while (0)
1920 1920
1921 1921
1922 /* Decode a composition rule represented as a component of composition 1922 /* Decode a composition rule represented as a component of composition
1923 sequence of Emacs 20 style at SRC. Store the decoded rule in *BUF, 1923 sequence of Emacs 20 style at SRC. Store the decoded rule in *BUF,
1924 and increment BUF. If SRC points an invalid byte sequence, set C 1924 and increment BUF. If SRC points an invalid byte sequence, set C