[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looking through multibyte_char_to_unibyte
From: |
Eli Zaretskii |
Subject: |
Re: Looking through multibyte_char_to_unibyte |
Date: |
Sun, 22 Jun 2014 20:25:38 +0300 |
> Date: Sun, 22 Jun 2014 20:20:30 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden
>
> > Date: Sun, 22 Jun 2014 21:09:19 +0400
> > From: Dmitry Antipov <address@hidden>
> > Cc: Kenichi Handa <address@hidden>
> >
> > int
> > multibyte_char_to_unibyte (int c)
> > {
> > if (c < 0x80)
> > return c;
> > if (((c) > 0x3FFF7F))
> > return (((c) > 0x3FFF7F) ? (c) - 0x3FFF00 : multibyte_char_to_unibyte
> > (c));
> > return (c & 0xFF);
> > }
> >
> > Is this a subtle trick which I just can't understand and explain, or
> > something
> > is really wrong with this?
>
> What do you think this function intends to do? IOW, how would you go
> about "converting a multibyte character to unibyte", something that is
> not possible in principle?
Wait, you probably asked about the recursive call to
multibyte_char_to_unibyte, is that right? If so, that branch is never
taken, and will be optimized away by any reasonable compiler.