Update Lexbor

Upstream commit 48afb625af9178d1929ec81349f173116b136310.
This commit is contained in:
Niels Dossche 2024-07-21 18:08:59 +02:00
parent 3713c02803
commit c952f5625a
No known key found for this signature in database
GPG Key ID: B8A8AD166DF0E2E5

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019 Alexander Borisov
* Copyright (C) 2019-2024 Alexander Borisov
*
* Author: Alexander Borisov <borisov@lexbor.com>
*/
@ -389,14 +389,6 @@ lxb_encoding_encode_iso_2022_jp(lxb_encoding_encode_t *ctx, const lxb_codepoint_
case 0x007E:
break;
case 0x00A5:
LXB_ENCODING_ENCODE_APPEND(ctx, 0x5C);
continue;
case 0x203E:
LXB_ENCODING_ENCODE_APPEND(ctx, 0x7E);
continue;
default:
LXB_ENCODING_ENCODE_APPEND(ctx, cp);
continue;
@ -418,6 +410,14 @@ lxb_encoding_encode_iso_2022_jp(lxb_encoding_encode_t *ctx, const lxb_codepoint_
ctx->buffer_out[ ctx->buffer_used++ ] = (lxb_char_t) cp;
continue;
}
else if (cp == 0x00A5) {
LXB_ENCODING_ENCODE_APPEND(ctx, 0x5C);
continue;
}
else if (cp == 0x203E) {
LXB_ENCODING_ENCODE_APPEND(ctx, 0x7E);
continue;
}
break;
@ -1332,14 +1332,6 @@ begin:
case 0x007E:
break;
case 0x00A5:
*(*data)++ = 0x5C;
return size + 1;
case 0x203E:
*(*data)++ = 0x7E;
return size + 1;
default:
*(*data)++ = (lxb_char_t) cp;
return size + 1;
@ -1362,6 +1354,14 @@ begin:
return size + 4;
}
else if (cp == 0x00A5) {
*(*data)++ = 0x5C;
return size + 1;
}
else if (cp == 0x203E) {
*(*data)++ = 0x7E;
return size + 1;
}
break;