+#include <msp/core/except.h>
#include "ascii.h"
#include "iso2022jp.h"
#include "jisx0201.h"
if(mode!=JISX0208)
switch_mode(JISX0208, buf);
- char jbuf[2] = { jis.ku+0x20, jis.ten+0x20 };
+ char jbuf[2];
+ jbuf[0] = jis.ku+0x20;
+ jbuf[1] = jis.ten+0x20;
buf.append(jbuf, 2);
}
}
Iso2022Jp::Decoder::Decoder(ErrorMode em):
Codec::Decoder(em),
- mode(ASCII),
dec(new Ascii::Decoder)
{ }
while(i!=str.end())
{
- string::const_iterator j = i;
+ auto j = i;
unichar result = -1;
if(*j==033)
else if(dec)
return dec->decode_char(str, i);
else
- throw logic_error("no sub-decoder");
+ throw internal_error("no sub-decoder");
if(result>=0)
return result;