Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix complex transi compact #547

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3bc41f4
[ruby/prism] Add macGreek encoding
kddnewton Nov 16, 2023
498b086
Skip test_ForwardingArgumentsNode
mame Nov 17, 2023
94c9f16
Refactor rb_obj_evacuate_ivs_to_hash_table
byroot Nov 16, 2023
940f2e7
size_pool_idx_for_size: Include debugging info in error message
byroot Nov 17, 2023
4a26a65
[ruby/prism] Add macTurkish
haldun Nov 16, 2023
9ba49c6
mingw.yml - remove encoding, run tests in cmd shell
MSP-Greg Nov 16, 2023
c2f2090
[ruby/prism] Do not test locale encoding on windows
kddnewton Nov 17, 2023
db4303f
[ruby/prism] Never test locale encoding
kddnewton Nov 17, 2023
e5d6b40
[ruby/prism] Do not allow trailing commas in calls without parenthesis
haldun Nov 13, 2023
85dcfef
[ruby/prism] Add macUkraine
haldun Nov 17, 2023
0a081a3
[ruby/prism] Add macRoman
haldun Nov 17, 2023
50b7b92
[ruby/prism] Add macThai
haldun Nov 17, 2023
229f6e5
[ruby/prism] Update spacing in encoding_test.rb
kddnewton Nov 17, 2023
585fdfe
[ruby/prism] add Windows-874 encoding
pcai Nov 17, 2023
cbdac2f
[ruby/prism] Silence clang analyzer warnings for the memory leaks
haldun Nov 17, 2023
7c99e43
[ruby/prism] Ensure serialized file is little endian
kddnewton Nov 13, 2023
3dd77bc
Fix corruption when out of shape during ivar remove
peterzhu2118 Nov 17, 2023
ef72970
Fix File.directory? doc hidding File::Stat#directory? doc
robotdana Nov 17, 2023
24fe22a
Fix ordering for auto compaction in get_overloaded_cme()
XrXr Nov 17, 2023
f479e62
[ruby/prism] Revert "Ensure serialized file is little endian"
kddnewton Nov 18, 2023
97fb07d
Pin object ivars while they are being copied in a hash
byroot Nov 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ jobs:
- name: test
timeout-minutes: 30
run: make test
shell: cmd
env:
GNUMAKEFLAGS: ''
RUBY_TESTOPTS: '-v --tty=no'
if: ${{ matrix.test_task == 'check' || matrix.test_task == 'test' }}

- name: test-all
timeout-minutes: 45
shell: cmd
run: |
# Actions uses UTF8, causes test failures, similar to normal OS setup
chcp.com 437
make ${{ StartsWith(matrix.test_task, 'test/') && matrix.test_task || 'test-all' }}
env:
RUBY_TESTOPTS: >-
Expand All @@ -147,6 +147,7 @@ jobs:
timeout-minutes: 10
run: |
make ${{ StartsWith(matrix.test_task, 'spec/') && matrix.test_task || 'test-spec' }}
shell: cmd
if: ${{ matrix.test_task == 'check' || matrix.test_task == 'test-spec' || StartsWith(matrix.test_task, 'spec/') }}

- uses: ./src/.github/actions/slack
Expand Down
2 changes: 0 additions & 2 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,8 +1593,6 @@ rb_access(VALUE fname, int mode)
*/

/*
* Document-method: directory?
*
* call-seq:
* File.directory?(path) -> true or false
*
Expand Down
2 changes: 1 addition & 1 deletion gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2769,7 +2769,7 @@ size_pool_idx_for_size(size_t size)
size_t size_pool_idx = 64 - nlz_int64(slot_count - 1);

if (size_pool_idx >= SIZE_POOL_COUNT) {
rb_bug("size_pool_idx_for_size: allocation size too large");
rb_bug("size_pool_idx_for_size: allocation size too large (size=%lu, size_pool_idx=%lu)", size, size_pool_idx);
}

#if RGENGC_CHECK_MODE
Expand Down
4 changes: 3 additions & 1 deletion internal/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ VALUE rb_mod_set_temporary_name(VALUE, VALUE);

struct gen_ivtbl;
int rb_gen_ivtbl_get(VALUE obj, ID id, struct gen_ivtbl **ivtbl);
int rb_obj_evacuate_ivs_to_hash_table(ID key, VALUE val, st_data_t arg);
VALUE rb_obj_copy_ivs_to_hash_table(VALUE obj, st_table *table);
void rb_obj_copy_ivs_to_hash_table_complete(VALUE ivar_pinner);
void rb_obj_convert_to_too_complex(VALUE obj, st_table *table);
void rb_evict_ivars_to_hash(VALUE obj);

RUBY_SYMBOL_EXPORT_BEGIN
Expand Down
15 changes: 6 additions & 9 deletions object.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,10 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj)
rb_shape_t * src_shape = rb_shape_get_shape(obj);

if (rb_shape_obj_too_complex(obj)) {
// obj is TOO_COMPLEX so we can copy its iv_hash
st_table * table = rb_st_init_numtable_with_size(rb_st_table_size(ROBJECT_IV_HASH(obj)));

rb_ivar_foreach(obj, rb_obj_evacuate_ivs_to_hash_table, (st_data_t)table);
rb_shape_set_too_complex(dest);

ROBJECT(dest)->as.heap.ivptr = (VALUE *)table;
st_replace(table, ROBJECT_IV_HASH(obj));
rb_obj_convert_to_too_complex(dest, table);

return;
}
Expand Down Expand Up @@ -328,10 +326,9 @@ rb_obj_copy_ivar(VALUE dest, VALUE obj)
shape_to_set_on_dest = rb_shape_rebuild_shape(initial_shape, src_shape);
if (UNLIKELY(rb_shape_id(shape_to_set_on_dest) == OBJ_TOO_COMPLEX_SHAPE_ID)) {
st_table * table = rb_st_init_numtable_with_size(src_num_ivs);

rb_ivar_foreach(obj, rb_obj_evacuate_ivs_to_hash_table, (st_data_t)table);
rb_shape_set_too_complex(dest);
ROBJECT(dest)->as.heap.ivptr = (VALUE *)table;
VALUE ivar_pinner = rb_obj_copy_ivs_to_hash_table(obj, table);
rb_obj_convert_to_too_complex(dest, table);
rb_obj_copy_ivs_to_hash_table_complete(ivar_pinner);

return;
}
Expand Down
6 changes: 6 additions & 0 deletions prism/enc/pm_encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,13 @@ extern pm_encoding_t pm_encoding_iso_8859_14;
extern pm_encoding_t pm_encoding_iso_8859_15;
extern pm_encoding_t pm_encoding_iso_8859_16;
extern pm_encoding_t pm_encoding_koi8_r;
extern pm_encoding_t pm_encoding_mac_greek;
extern pm_encoding_t pm_encoding_mac_iceland;
extern pm_encoding_t pm_encoding_mac_roman;
extern pm_encoding_t pm_encoding_mac_romania;
extern pm_encoding_t pm_encoding_mac_thai;
extern pm_encoding_t pm_encoding_mac_turkish;
extern pm_encoding_t pm_encoding_mac_ukraine;
extern pm_encoding_t pm_encoding_shift_jis;
extern pm_encoding_t pm_encoding_utf_8;
extern pm_encoding_t pm_encoding_utf8_mac;
Expand All @@ -205,5 +210,6 @@ extern pm_encoding_t pm_encoding_windows_1256;
extern pm_encoding_t pm_encoding_windows_1257;
extern pm_encoding_t pm_encoding_windows_1258;
extern pm_encoding_t pm_encoding_windows_31j;
extern pm_encoding_t pm_encoding_windows_874;

#endif
210 changes: 210 additions & 0 deletions prism/enc/pm_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,30 @@ static uint8_t pm_encoding_koi8_r_table[256] = {
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // Fx
};

/**
* Each element of the following table contains a bitfield that indicates a
* piece of information about the corresponding macGreek character.
*/
static uint8_t pm_encoding_mac_greek_table[256] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
};

/**
* Each element of the following table contains a bitfield that indicates a
* piece of information about the corresponding macIceland character.
Expand All @@ -744,6 +768,30 @@ static uint8_t pm_encoding_mac_iceland_table[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
};

/**
* Each element of the following table contains a bitfield that indicates a
* piece of information about the corresponding macRoman character.
*/
static uint8_t pm_encoding_mac_roman_table[256] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
};

/**
* Each element of the following table contains a bitfield that indicates a
* piece of information about the corresponding macRomania character.
Expand All @@ -768,6 +816,78 @@ static uint8_t pm_encoding_mac_romania_table[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
};

/**
* Each element of the following table contains a bitfield that indicates a
* piece of information about the corresponding macThai character.
*/
static uint8_t pm_encoding_mac_thai_table[256] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
};

/**
* Each element of the following table contains a bitfield that indicates a
* piece of information about the corresponding macTurkish character.
*/
static uint8_t pm_encoding_mac_turkish_table[256] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
};

/**
* Each element of the following table contains a bitfield that indicates a
* piece of information about the corresponding macUkraine character.
*/
static uint8_t pm_encoding_mac_ukraine_table[256] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
};

/**
* Each element of the following table contains a bitfield that indicates a
* piece of information about the corresponding windows-1250 character.
Expand Down Expand Up @@ -984,6 +1104,30 @@ static uint8_t pm_encoding_windows_1258_table[256] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
};

/**
* Each element of the following table contains a bitfield that indicates a
* piece of information about the corresponding windows-874 character.
*/
static uint8_t pm_encoding_windows_874_table[256] = {
// 0 1 2 3 4 5 6 7 8 9 A B C D E F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2x
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, // 3x
0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // 4x
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, // 5x
0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 6x
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, // 7x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9x
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ax
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Bx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Cx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Dx
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Ex
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Fx
};

/**
* Returns the size of the next character in the ASCII encoding. This basically
* means that if the top bit is not set, the character is 1 byte long.
Expand Down Expand Up @@ -1078,8 +1222,13 @@ PRISM_ENCODING_TABLE(iso_8859_14)
PRISM_ENCODING_TABLE(iso_8859_15)
PRISM_ENCODING_TABLE(iso_8859_16)
PRISM_ENCODING_TABLE(koi8_r)
PRISM_ENCODING_TABLE(mac_greek)
PRISM_ENCODING_TABLE(mac_iceland)
PRISM_ENCODING_TABLE(mac_roman)
PRISM_ENCODING_TABLE(mac_romania)
PRISM_ENCODING_TABLE(mac_thai)
PRISM_ENCODING_TABLE(mac_turkish)
PRISM_ENCODING_TABLE(mac_ukraine)
PRISM_ENCODING_TABLE(windows_1250)
PRISM_ENCODING_TABLE(windows_1251)
PRISM_ENCODING_TABLE(windows_1252)
Expand All @@ -1089,6 +1238,7 @@ PRISM_ENCODING_TABLE(windows_1255)
PRISM_ENCODING_TABLE(windows_1256)
PRISM_ENCODING_TABLE(windows_1257)
PRISM_ENCODING_TABLE(windows_1258)
PRISM_ENCODING_TABLE(windows_874)

#undef PRISM_ENCODING_TABLE

Expand Down Expand Up @@ -1402,6 +1552,16 @@ pm_encoding_t pm_encoding_koi8_r = {
.multibyte = false
};

/** macGreek */
pm_encoding_t pm_encoding_mac_greek = {
.name = "macGreek",
.char_width = pm_encoding_single_char_width,
.alnum_char = pm_encoding_mac_greek_alnum_char,
.alpha_char = pm_encoding_mac_greek_alpha_char,
.isupper_char = pm_encoding_mac_greek_isupper_char,
.multibyte = false
};

/** macIceland */
pm_encoding_t pm_encoding_mac_iceland = {
.name = "macIceland",
Expand All @@ -1412,6 +1572,16 @@ pm_encoding_t pm_encoding_mac_iceland = {
.multibyte = false
};

/** macRoman */
pm_encoding_t pm_encoding_mac_roman = {
.name = "macRoman",
.char_width = pm_encoding_single_char_width,
.alnum_char = pm_encoding_mac_roman_alnum_char,
.alpha_char = pm_encoding_mac_roman_alpha_char,
.isupper_char = pm_encoding_mac_roman_isupper_char,
.multibyte = false
};

/** macRomania */
pm_encoding_t pm_encoding_mac_romania = {
.name = "macRomania",
Expand All @@ -1422,6 +1592,36 @@ pm_encoding_t pm_encoding_mac_romania = {
.multibyte = false
};

/** macThai */
pm_encoding_t pm_encoding_mac_thai = {
.name = "macThai",
.char_width = pm_encoding_single_char_width,
.alnum_char = pm_encoding_mac_thai_alnum_char,
.alpha_char = pm_encoding_mac_thai_alpha_char,
.isupper_char = pm_encoding_mac_thai_isupper_char,
.multibyte = false
};

/** macTurkish */
pm_encoding_t pm_encoding_mac_turkish = {
.name = "macTurkish",
.char_width = pm_encoding_single_char_width,
.alnum_char = pm_encoding_mac_turkish_alnum_char,
.alpha_char = pm_encoding_mac_turkish_alpha_char,
.isupper_char = pm_encoding_mac_turkish_isupper_char,
.multibyte = false
};

/** macUkraine */
pm_encoding_t pm_encoding_mac_ukraine = {
.name = "macUkraine",
.char_width = pm_encoding_single_char_width,
.alnum_char = pm_encoding_mac_ukraine_alnum_char,
.alpha_char = pm_encoding_mac_ukraine_alpha_char,
.isupper_char = pm_encoding_mac_ukraine_isupper_char,
.multibyte = false
};

/** Windows-1250 */
pm_encoding_t pm_encoding_windows_1250 = {
.name = "Windows-1250",
Expand Down Expand Up @@ -1511,3 +1711,13 @@ pm_encoding_t pm_encoding_windows_1258 = {
.isupper_char = pm_encoding_windows_1258_isupper_char,
.multibyte = false
};

/** Windows-874 */
pm_encoding_t pm_encoding_windows_874 = {
.name = "Windows-874",
.char_width = pm_encoding_single_char_width,
.alnum_char = pm_encoding_windows_874_alnum_char,
.alpha_char = pm_encoding_windows_874_alpha_char,
.isupper_char = pm_encoding_windows_874_isupper_char,
.multibyte = false
};
Loading
Loading