Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion HACKING.org
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Recode 4 should be organised thus:
- More steps from Recodec get moved into Recode, either coexisting
with or taking over the previous wrapping of Python codecs.
- The remaining code from the Recodec engine gets moved into Recode,
replacing C code having the same fonctionality.
replacing C code having the same functionality.
- Special care is given to GNU *libc* or *libiconv* support, maybe going
from the C side to the Python side.
- Proper documentation and decisions follow extensive comparison and
Expand Down
10 changes: 5 additions & 5 deletions doc/recode.texi
Original file line number Diff line number Diff line change
Expand Up @@ -2616,7 +2616,7 @@ are @code{UCS-2}, @code{BMP}, @code{rune} and @code{u2}.
@cindex combining characters
The Recode library is able to combine @code{UCS-2} some sequences
of codes into single code characters, to represent a few diacriticized
characters, ligatures or diphtongs which have been included to ease
characters, ligatures or diphthongs which have been included to ease
mapping with other existing charsets. It is also able to explode
such single code characters into the corresponding sequence of codes.
The request syntax for triggering such operations is rudimentary and
Expand Down Expand Up @@ -3066,7 +3066,7 @@ Internally, @w{RFC 1345} associates which each character an unambiguous
mnemonic of a few characters, taken from @w{ISO 646}, which is a minimal
ASCII subset of 83 characters. The charset made up by these mnemonics
is available in Recode under the name @code{RFC1345}. It has
@code{mnemonic} and @code{1345} for aliases. As implemened, this charset
@code{mnemonic} and @code{1345} for aliases. As implemented, this charset
exactly corresponds to @code{mnemonic+ascii+38}, using @w{RFC 1345}
nomenclature. Roughly said, @w{ISO 646} characters represent themselves,
except for the ampersand (@kbd{&}) which appears doubled. A prefix of a
Expand Down Expand Up @@ -3466,10 +3466,10 @@ lines being reachable by setting @code{RT} to @samp{Z}. If 6-bit bytes
in a file are sequentially counted from 1, a traditional end of line
does exist if bytes 10*@var{n}+9 and 10@var{n}+10 are both zero for a
given @var{n}, in which case these two bytes are not to be interpreted as
@kbd{::}. Also, up to 9 immediately preceeding zero bytes, going backward,
@kbd{::}. Also, up to 9 immediately preceding zero bytes, going backward,
are to be considered as part of the end of line and not interpreted as
@kbd{:}@footnote{This convention replaced an older one saying that up to 4
immediately preceeding @emph{pairs} of zero bytes, going backward, are to
immediately preceding @emph{pairs} of zero bytes, going backward, are to
be considered as part of the end of line and not interpreted as @kbd{::}.}.

@node CDC-NOS, Bang-Bang, Display Code, CDC
Expand Down Expand Up @@ -4241,7 +4241,7 @@ This chapter presents all surfaces currently available.
@cindex permutations of groups of bytes

@cindex byte order swapping
@cindex endiannes, changing
@cindex endianness, changing
A permutation is a surface transformation which reorders groups of
eight-bit bytes. A @emph{21} permutation exchanges pairs of successive
bytes. If the text contains an odd number of bytes, the last byte is
Expand Down
6 changes: 3 additions & 3 deletions src/combine.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,17 +435,17 @@ recode_init_combine (RECODE_STEP step,
}

/*------------------.
| Handle bactrack. |
| Handle backtrack. |
`------------------*/

/* When we cannot shift into a state allowing a terminal resulting character,
we ought to backtrack until such a terminal character if found, then output
we ought to backtrack until such a terminal character is found, then output
this resulting character for representing the partial sequence which ends
with that state. Then, we merely copy characters seen after that state.

This approach does not properly scan for combinings which might exist in
the copied characters, presuming that this case does not occur in practice.
If we later find that it does, backtracing will have to be revisited. */
If we later find that it does, backtracking will have to be revisited. */

static void
backtrack_byte (struct state *state, RECODE_SUBTASK subtask)
Expand Down
4 changes: 2 additions & 2 deletions src/ibmpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static const bool auto_crlf = false;
#define DOS_CR 13 /* carriage return */
#define DOS_LF 10 /* line feed */

/* Correspondance for IBM PC ruler graphics characters into ASCII graphics
/* Correspondence for IBM PC ruler graphics characters into ASCII graphics
approximations. The current principles are:

- Single horizontal rulers are made up of dashes.
Expand Down Expand Up @@ -121,7 +121,7 @@ static struct recode_known_pair known_pairs[] =
{144, 201}, /* capital letter E with acute accent */
{145, 230}, /* small ligature a with e */
{146, 198}, /* capital ligature A with E */
{147, 244}, /* small letter o with circumblex accent */
{147, 244}, /* small letter o with circumflex accent */
{148, 246}, /* small letter o with diaeresis */
{149, 242}, /* small letter o with grave accent */
{150, 251}, /* small letter u with circumflex accent */
Expand Down
12 changes: 6 additions & 6 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
Public License for more details.

You should have received a copy of the GNU General Public License along
along with this program; if not, see <https://www.gnu.org/licenses/>.
with this program; if not, see <https://www.gnu.org/licenses/>.
*/

#include "config.h"
Expand Down Expand Up @@ -68,7 +68,7 @@ static bool verbose_flag = false;
it does not prevent recodings to be aborted or exit status to be set. */
static bool quiet_flag = false;

/* If the recoding yields some problems in recode_reversibility in some file, this
/* If the recoding yields some problems in reversibility in some file, this
file replacement is denied and it is left unrecoded or, if recode is used
as a mere filter, the recoding is aborted. The following flag forces
the recoding to run to completion and the replacement to be done even if
Expand All @@ -78,11 +78,11 @@ static bool force_flag = false;
/* When a file is recoded over itself, precautions are taken to move the
timestamps of the original file into the recoded file, so to make the
recoding the most transparent possible to make, and other tools.
However, selecting the following option inhibit the timestamps handling,
However, selecting the following option inhibits the timestamps handling,
thus effectively `touching' the file. */
static bool touch_option = false;

/* With strict mapping, all recode_reversibility fallbacks get defeated. */
/* With strict mapping, all reversibility fallbacks get defeated. */
static bool strict_mapping = false;

/* Use iconv if possible. */
Expand Down Expand Up @@ -351,15 +351,15 @@ int
main (int argc, char *const *argv)
{
int option_char; /* option character */
bool success = true; /* recode_reversibility of all recodings */
bool success = true; /* reversibility of all recodings */

static bool (*processor) (RECODE_TASK);
struct recode_outer outer_option;
struct recode_request request_option;
struct recode_task task_option;

program_name = argv[0];
/* libtool creates a temporary executable whose names is prefixed with
/* libtool creates a temporary executable whose name is prefixed with
"lt-". Remove this prefix here. */
if (strncmp (program_name, "lt-", 3) == 0)
program_name += 3;
Expand Down
6 changes: 3 additions & 3 deletions src/names.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ check_restricted (RECODE_CONST_OUTER outer,
pair < outer->pair_restriction + outer->pair_restrictions;
pair++)
{
/* Reject the charset if the characters in the pair do not exist of
/* Reject the charset if the characters in the pair do not exist or
if their respective definition do not match. */

left = recode_code_to_ucs2 (before, pair->left);
Expand Down Expand Up @@ -993,7 +993,7 @@ recode_list_full_charset (RECODE_OUTER outer, RECODE_CONST_SYMBOL charset)
const unsigned short *data = (const unsigned short *) charset->data;
unsigned code; /* code counter */
unsigned expected; /* expected value for code counter */
bool insert_white; /* insert a while line before printing */
bool insert_white; /* insert a white line before printing */

/* Print the long table according to explode data. */

Expand Down Expand Up @@ -1039,7 +1039,7 @@ recode_list_full_charset (RECODE_OUTER outer, RECODE_CONST_SYMBOL charset)
{
unsigned code; /* code counter */
int ucs2; /* UCS-2 translation */
bool insert_white; /* insert a while line before printing */
bool insert_white; /* insert a white line before printing */

/* Print the long table according to strip data. */

Expand Down
2 changes: 1 addition & 1 deletion src/outer.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ estimate_single_cost (_GL_UNUSED RECODE_OUTER outer, RECODE_SINGLE single)
int cost;

/* Ensure a small average cost for each single step, yet much trying to
avoid single steps prone to loosing information. */
avoid single steps prone to losing information. */

cost = single->quality.reversible ? 10 : 200;

Expand Down
2 changes: 1 addition & 1 deletion src/quoted.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ transform_data_quoted_printable (RECODE_SUBTASK subtask)

default:

/* Case of an inconditional quotable character. */
/* Case of an unconditionally quotable character. */

if (available > 3)
{
Expand Down
4 changes: 2 additions & 2 deletions src/recode.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ recode_invert_table (RECODE_OUTER outer, const unsigned char *table)
| NUMBER_OF_PAIRS constraints. If FIRST_HALF_IMPLIED is not zero, default |
| the unconstrained characters of the first 128 to the identity mapping. If |
| REVERSE is not zero, use right_table instead of left_table to complete the |
| table, yet new pairs are created only when fallback is recode_reversibility. |
| table, yet new pairs are created only when fallback is reversibility. |
`---------------------------------------------------------------------------*/

bool
Expand Down Expand Up @@ -206,7 +206,7 @@ recode_complete_pairs (RECODE_OUTER outer, RECODE_STEP step,
}
}

/* Set all the implied correspondances. */
/* Set all the implied correspondences. */

if (first_half_implied)
for (counter = 0; counter < 128; counter++)
Expand Down
4 changes: 2 additions & 2 deletions src/recodext.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ struct recode_request
the other charset, one can edit text as well as LaTeX directives. */
bool diacritics_only : 1;

/* For `ibmpc' charset, characters 176 to 223 are use to draw boxes. If
/* For `ibmpc' charset, characters 176 to 223 are used to draw boxes. If
this field is set, while getting out of `ibmpc', ASCII characters are
selected so to approximate these boxes. */
bool ascii_graphics : 1;
Expand Down Expand Up @@ -513,7 +513,7 @@ typedef unsigned short recode_ucs2;
/* "Are we speaking slips, strips or bars?" (of gold-pressed latinum :-) */
#define STRIP_SIZE 8

/* An struct strip_data is a pointer to a pool of strips, and an array
/* A struct strip_data is a pointer to a pool of strips, and an array
of 256/STRIP_SIZE offsets for the start of strips into the pool, each strip
describes STRIP_SIZE UCS-2 characters. A missing character in a strip is
indicated by all 16 bits set. */
Expand Down
8 changes: 4 additions & 4 deletions src/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ add_to_sequence (RECODE_REQUEST request, RECODE_SINGLE single,

/*----------------------------------------------------------------------.
| Find a SEQUENCE of single steps to achieve a conversion from charset |
| BEFORE to charset AFTER. Return false only if no sequence could been |
| BEFORE to charset AFTER. Return false only if no sequence could be |
| found. Explain what was selected if VERBOSE. |
`----------------------------------------------------------------------*/

Expand Down Expand Up @@ -406,7 +406,7 @@ compare_struct_item (const void *void_first, const void *void_second)
| Complete the initialisation of a double step which just has been merged |
| into a single STEP. Establish known pairings by comparing UCS-2 values |
| between the before and after charsets. Create new pairs only when |
| fallback is recode_reversibility. |
| fallback is reversibility. |
`------------------------------------------------------------------------*/

static bool
Expand Down Expand Up @@ -436,8 +436,8 @@ complete_double_ucs2_step (RECODE_OUTER outer, RECODE_STEP step)
struct recode_known_pair pair_array[256]; /* obtained pairings */
struct recode_known_pair *pair_cursor; /* cursor in array of pairings */

/* For ensuring recode_reversibility, known pairs should be computed the same
way regardless of the direction of recoding. This canonalisation is
/* For ensuring reversibility, known pairs should be computed the same
way regardless of the direction of recoding. This canonicalisation is
ensured through the charset values, which are increasing along the
initialisation order. This should also reflect the charset order in
rfc1345.txt. */
Expand Down