Skip to content

Commit e666179

Browse files
committed
More updates
1 parent 9465e96 commit e666179

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

cobc/gentable.c

Lines changed: 2 additions & 2 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 (%d)"),
91-
(ebcdic_ptr - ebcdic), errno);
90+
cb_error (_("an error occurred after converting %ld characters"),
91+
(ebcdic_ptr - ebcdic));
9292
iconv_close (ic);
9393
return -1;
9494
}

doc/gnucobol.texi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,8 +1052,12 @@ Save intermediate files (by default, in current directory).
10521052
Do automatic initialization of the COBOL runtime system.
10531053

10541054
@item --gentable=@var{ebcdic-enc},@var{ascii-enc}[+]
1055-
Build an EBCDIC/ASCII translation table between @var{ebcdic-enc} and @var{ascii-enc}, and exit.
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.
1055+
Build an EBCDIC/ASCII translation table between @var{ebcdic-enc} and
1056+
@var{ascii-enc}, and exit.
1057+
The translation might not be reversible: characters with no equivalent in the
1058+
other encoding are mapped to the substitution character, thus leaving unused
1059+
characters in both encodings. Append + to make the translation reversible,
1060+
by arbitrarily mapping together these unused characters.
10571061

10581062
@end table
10591063

tests/testsuite.src/used_binaries.at

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,10 @@ D8 D9 DA DB DC DD DE DF E0 E1 E2 7C E3 E4 E5 E6
15431543
], [note: 128 non-reversible conversions have been arbitrarily made reversible, you may want to check the generated table
15441544
])
15451545

1546+
AT_CHECK([$COBC --gentable=IBM500,UTF-8], [1], [],
1547+
[error: an error occurred after converting 172 characters
1548+
])
1549+
15461550
AT_CHECK([$COBC --gentable=EBCDIC_XXX,ASCII_XXX], [1], [],
15471551
[error: conversion from EBCDIC_XXX to ASCII_XXX is not supported by your iconv implementation
15481552
])

0 commit comments

Comments
 (0)