Skip to content

Commit ac1add8

Browse files
committed
More updates
1 parent 4c17ae0 commit ac1add8

File tree

9 files changed

+20
-15
lines changed

9 files changed

+20
-15
lines changed

NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ NEWS - user visible changes -*- outline -*-
7474
to a file (see "Dependencies options" in the GnuCOBOL manual)
7575

7676
** New option --gentable to build EBCDIC/ASCII translation tables,
77-
for use with the --febcdic-table option
77+
for use with -febcdic-table
7878

7979
* More notable changes
8080

cobc/gentable.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ gentable (FILE *stream, const char *code_ebcdic, const char *code_ascii, char re
8787
--ascii_size;
8888
++nb_irreversible;
8989
} else {
90-
cb_error (_("an error occurred after converting %ld characters"),
91-
(ebcdic_ptr - ebcdic));
90+
cb_error (_("an error occurred after converting %ld characters (%d)"),
91+
(ebcdic_ptr - ebcdic), errno);
9292
iconv_close (ic);
9393
return -1;
9494
}
@@ -128,11 +128,11 @@ gentable (FILE *stream, const char *code_ebcdic, const char *code_ascii, char re
128128
}
129129
}
130130
cb_note (COB_WARNOPT_NONE, 0,
131-
_("%d non-reversible conversions were arbitrarily made reversible, you might want to review the generated table"),
131+
_("%d non-reversible conversions have been arbitrarily made reversible, you may want to check the generated table"),
132132
nb_irreversible);
133133
} else {
134134
cb_note (COB_WARNOPT_NONE, 0,
135-
_("%d non-reversible conversions were performed, you might want to review the generated table"),
135+
_("%d non-reversible conversions have been performed, you may want to check the generated table"),
136136
nb_irreversible);
137137
}
138138
}
@@ -144,7 +144,7 @@ gentable (FILE *stream, const char *code_ebcdic, const char *code_ascii, char re
144144

145145
fprintf (stream, "\n# %s to %s translation table\n\n", code_ascii, code_ebcdic);
146146
if ((nb_irreversible == 0) || (reversible != 0)) {
147-
fprintf (stream, "# This translation being symmetric, the table is built from the previous one.\n\n");
147+
fprintf (stream, "# As this translation is symmetrical, the table is built from the previous one.\n\n");
148148
} else {
149149
output_table (stream, ebcdic);
150150
fprintf (stream, "\n");

cobc/help.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ cobc_print_usage_common_options (void)
150150
puts (_(" -MD output dependencies in .d files while compiling"));
151151
puts (_(" -ext <extension> add file extension for resolving COPY"));
152152
puts (_(" -fcopybook-deps output copybook names as dependencies"));
153-
puts (_(" --gentable=<ebcdic-enc>,<ascii-enc>[+]\toutput to stdout an EBCDIC/ASCII translation table between the given encodings and exit (append + to make the translation reversible)"));
153+
puts (_(" --gentable=<ebcdic-enc>,<ascii-enc>[+]\toutput a translation table between the\n"
154+
" given encodings to stdout and exit"));
154155
putchar ('\n');
155156
}
156157

config/alternate.ttbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
3939

4040
# "alternate" ASCII to (?) EBCDIC conversion table
4141
#
42-
# This translation being symmetric, the table is built from the previous one.
42+
# As this translation is symmetrical, the table is built from the previous one.

config/default.ttbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ E6 7E 73 74 75 76 77 78 79 7A AD A8 D4 5B D6 D7
7676

7777
# "default" 8-bit ASCII to EBCDIC 1047 conversion table (likely MF)
7878
#
79-
# This translation being symmetric, the table is built from the previous one.
79+
# As this translation is symmetrical, the table is built from the previous one.

config/ebcdic500_ascii8bit.ttbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4 E5 E6 E7
4848

4949
# 8-bit ASCII to EBCDIC 500 conversion table (GCOS7)
5050
#
51-
# This translation being symmetric, the table is built from the previous one.
51+
# As this translation is symmetrical, the table is built from the previous one.

config/ebcdic500_latin1.ttbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ A2 A3 A5 B7 A9 A7 B6 BC BD BE AC 7C AF A8 B4 D7
4141

4242
# Latin-1 to EBCDIC 500 translation table
4343
#
44-
# This translation being symmetric, the table is built from the previous one.
44+
# As this translation is symmetrical, the table is built from the previous one.

doc/gnucobol.texi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ Do automatic initialization of the COBOL runtime system.
10531053

10541054
@item --gentable=@var{ebcdic-enc},@var{ascii-enc}[+]
10551055
Build an EBCDIC/ASCII translation table between @var{ebcdic-enc} and @var{ascii-enc}, and exit.
1056-
The translation might not be reversible: append + to arbitrarily make it reversible.
1056+
The translation might not be reversible: characters with no equivalent in the other encoding are mapped to the substitution character, thus leaving unused characters in both encodings. Append + to make the translation reversible, by arbitrarily mapping together these unused characters.
10571057

10581058
@end table
10591059

tests/testsuite.src/used_binaries.at

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ D7 D8 D9 E2 E3 E4 E5 E6 E7 E8 E9 4A E0 5A 5F 6D
15091509
3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F
15101510
3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F 3F
15111511

1512-
], [note: 128 non-reversible conversions were performed, you might want to review the generated table
1512+
], [note: 128 non-reversible conversions have been performed, you may want to check the generated table
15131513
])
15141514

15151515
AT_CHECK([$COBC --gentable=IBM500,ASCII+], [0],
@@ -1536,9 +1536,13 @@ D8 D9 DA DB DC DD DE DF E0 E1 E2 7C E3 E4 E5 E6
15361536

15371537
# ASCII to IBM500 translation table
15381538

1539-
# This translation being symmetric, the table is built from the previous one.
1539+
# As this translation is symmetrical, the table is built from the previous one.
15401540

1541-
], [note: 128 non-reversible conversions were arbitrarily made reversible, you might want to review the generated table
1541+
], [note: 128 non-reversible conversions have been arbitrarily made reversible, you may want to check the generated table
1542+
])
1543+
1544+
AT_CHECK([$COBC --gentable=EBCDIC_XXX,ASCII_XXX], [1], [],
1545+
[error: conversion from EBCDIC_XXX to ASCII_XXX is not supported by your iconv implementation
15421546
])
15431547

15441548
AT_CLEANUP

0 commit comments

Comments
 (0)