summaryrefslogtreecommitdiff
path: root/src/ptx.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-01-08 15:08:30 +0100
committerJim Meyering <meyering@redhat.com>2012-01-09 21:50:08 +0100
commita517386f1bf8c64ee7617cc2c9d0a16a1d85c8c4 (patch)
tree20ad6e7d6aa0baed16f884fca2bccff4dda4983d /src/ptx.c
parent9af0dced5a2eb167ec7b9dfe3f358f214e45d41a (diff)
downloadcoreutils-a517386f1bf8c64ee7617cc2c9d0a16a1d85c8c4.tar.xz
maint: src/*.c: change remaining quotes (without embedded spaces)
Run this (twice): git grep -E -l '`[^ ]+'\' src/*.c \ |xargs perl -pi -e 's/`([^ ]+'\'')/'\''$1/'
Diffstat (limited to 'src/ptx.c')
-rw-r--r--src/ptx.c104
1 files changed, 52 insertions, 52 deletions
diff --git a/src/ptx.c b/src/ptx.c
index 3e64fa131..257aa73dd 100644
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -33,7 +33,7 @@
#include "stdio--.h"
#include "xstrtol.h"
-/* The official name of this program (e.g., no `g' prefix). */
+/* The official name of this program (e.g., no 'g' prefix). */
#define PROGRAM_NAME "ptx"
/* TRANSLATORS: Please translate "F. Pinard" to "François Pinard"
@@ -69,12 +69,12 @@ enum Format
{
UNKNOWN_FORMAT, /* output format still unknown */
DUMB_FORMAT, /* output for a dumb terminal */
- ROFF_FORMAT, /* output for `troff' or `nroff' */
- TEX_FORMAT /* output for `TeX' or `LaTeX' */
+ ROFF_FORMAT, /* output for 'troff' or 'nroff' */
+ TEX_FORMAT /* output for 'TeX' or 'LaTeX' */
};
static bool gnu_extensions = true; /* trigger all GNU extensions */
-static bool auto_reference = false; /* refs are `file_name:line_number:' */
+static bool auto_reference = false; /* refs are 'file_name:line_number:' */
static bool input_reference = false; /* refs at beginning of input lines */
static bool right_reference = false; /* output refs after right context */
static int line_width = 72; /* output line width in characters */
@@ -164,7 +164,7 @@ static WORD_TABLE only_table; /* table of words to select */
static int number_input_files; /* number of text input files */
static int total_line_count; /* total number of lines seen so far */
static const char **input_file_name; /* array of text input file names */
-static int *file_line_count; /* array of `total_line_count' values at end */
+static int *file_line_count; /* array of 'total_line_count' values at end */
static BLOCK text_buffer; /* file to study */
@@ -199,14 +199,14 @@ static BLOCK text_buffer; /* file to study */
/* Occurrences table.
- The `keyword' pointer provides the central word, which is surrounded
- by a left context and a right context. The `keyword' and `length'
+ The 'keyword' pointer provides the central word, which is surrounded
+ by a left context and a right context. The 'keyword' and 'length'
field allow full 8-bit characters keys, even including NULs. At other
- places in this program, the name `keyafter' refers to the keyword
+ places in this program, the name 'keyafter' refers to the keyword
followed by its right context.
The left context does not extend, towards the beginning of the file,
- further than a distance given by the `left' value. This value is
+ further than a distance given by the 'left' value. This value is
relative to the keyword beginning, it is usually negative. This
insures that, except for white space, we will never have to backward
scan the source text, when it is time to generate the final output
@@ -214,12 +214,12 @@ static BLOCK text_buffer; /* file to study */
The right context, indirectly attainable through the keyword end, does
not extend, towards the end of the file, further than a distance given
- by the `right' value. This value is relative to the keyword
+ by the 'right' value. This value is relative to the keyword
beginning, it is usually positive.
- When automatic references are used, the `reference' value is the
+ When automatic references are used, the 'reference' value is the
overall line number in all input files read so far, in this case, it
- is of type (int). When input references are used, the `reference'
+ is of type (int). When input references are used, the 'reference'
value indicates the distance between the keyword beginning and the
start of the reference field, it is of type (DELTA) and usually
negative. */
@@ -254,8 +254,8 @@ static int keyafter_max_width; /* maximum width of keyword-and-after field */
static int truncation_string_length;/* length of string that flags truncation */
/* When context is limited by lines, wraparound may happen on final output:
- the `head' pointer gives access to some supplementary left context which
- will be seen at the end of the output line, the `tail' pointer gives
+ the 'head' pointer gives access to some supplementary left context which
+ will be seen at the end of the output line, the 'tail' pointer gives
access to some supplementary right context which will be seen at the
beginning of the output line. */
@@ -418,8 +418,8 @@ compile_regex (struct regex_data *regex)
if (message)
error (EXIT_FAILURE, 0, _("%s (for regexp %s)"), message, quote (string));
- /* The fastmap should be compiled before `re_match'. The following
- call is not mandatory, because `re_search' is always called sooner,
+ /* The fastmap should be compiled before 're_match'. The following
+ call is not mandatory, because 're_search' is always called sooner,
and it compiles the fastmap if this has not been done yet. */
re_compile_fastmap (pattern);
@@ -620,7 +620,7 @@ search_table (WORD *word, WORD_TABLE *table)
}
/*---------------------------------------------------------------------.
-| Sort the whole occurs table in memory. Presumably, `qsort' does not |
+| Sort the whole occurs table in memory. Presumably, 'qsort' does not |
| take intermediate copies or table elements, so the sort will be |
| stabilized throughout the comparison routine. |
`---------------------------------------------------------------------*/
@@ -791,16 +791,16 @@ find_occurs_in_text (void)
cursor = next_context_start)
{
- /* `context_start' gets initialized before the processing of each
+ /* 'context_start' gets initialized before the processing of each
line, or once for the whole buffer if no end of line or sentence
sequence separator. */
context_start = cursor;
/* If an end of line or end of sentence sequence is defined and
- non-empty, `next_context_start' will be recomputed to be the end of
+ non-empty, 'next_context_start' will be recomputed to be the end of
each line or sentence, before each one is processed. If no such
- sequence, then `next_context_start' is set at the end of the whole
+ sequence, then 'next_context_start' is set at the end of the whole
buffer, which is then considered to be a single line or sentence.
This test also accounts for the case of an incomplete line or
sentence at the end of the buffer. */
@@ -902,7 +902,7 @@ find_occurs_in_text (void)
if (possible_key.size > maximum_word_length)
maximum_word_length = possible_key.size;
- /* In input reference mode, update `line_start' from its previous
+ /* In input reference mode, update 'line_start' from its previous
value. Count the lines just in case auto reference mode is
also selected. If it happens that the word just matched is
indeed part of a reference; just ignore it. */
@@ -961,9 +961,9 @@ find_occurs_in_text (void)
if (auto_reference)
{
- /* While auto referencing, update `line_start' from its
+ /* While auto referencing, update 'line_start' from its
previous value, counting lines as we go. If input
- referencing at the same time, `line_start' has been
+ referencing at the same time, 'line_start' has been
advanced earlier, and the following loop is never really
executed. */
@@ -983,10 +983,10 @@ find_occurs_in_text (void)
else if (input_reference)
{
- /* If only input referencing, `line_start' has been computed
+ /* If only input referencing, 'line_start' has been computed
earlier to detect the case the word matched would be part
of the reference. The reference position is simply the
- value of `line_start'. */
+ value of 'line_start'. */
occurs_cursor->reference
= (DELTA) (line_start - possible_key.start);
@@ -1051,7 +1051,7 @@ print_field (BLOCK field)
/* First check if this is a diacriticized character.
This works only for TeX. I do not know how diacriticized
- letters work with `roff'. Please someone explain it to me! */
+ letters work with 'roff'. Please someone explain it to me! */
diacritic = todiac (character);
if (diacritic != 0 && output_format == TEX_FORMAT)
@@ -1144,7 +1144,7 @@ print_field (BLOCK field)
else
/* This is not a diacritic character, so handle cases which are
- really specific to `roff' or TeX. All white space processing
+ really specific to 'roff' or TeX. All white space processing
is done as the default case of this switch. */
switch (character)
@@ -1321,7 +1321,7 @@ fix_output_parameters (void)
case ROFF_FORMAT:
- /* `Quote' characters should be doubled. */
+ /* 'Quote' characters should be doubled. */
edited_flag['"'] = 1;
break;
@@ -1355,15 +1355,15 @@ define_all_fields (OCCURS *occurs)
char *cursor; /* running cursor in source text */
char *left_context_start; /* start of left context */
char *right_context_end; /* end of right context */
- char *left_field_start; /* conservative start for `head'/`before' */
+ char *left_field_start; /* conservative start for 'head'/'before' */
int file_index; /* index in text input file arrays */
const char *file_name; /* file name for reference */
int line_ordinal; /* line ordinal for reference */
- /* Define `keyafter', start of left context and end of right context.
- `keyafter' starts at the saved position for keyword and extend to the
+ /* Define 'keyafter', start of left context and end of right context.
+ 'keyafter' starts at the saved position for keyword and extend to the
right from the end of the keyword, eating separators or full words, but
- not beyond maximum allowed width for `keyafter' field or limit for the
+ not beyond maximum allowed width for 'keyafter' field or limit for the
right context. Suffix spaces will be removed afterwards. */
keyafter.start = occurs->key.start;
@@ -1386,7 +1386,7 @@ define_all_fields (OCCURS *occurs)
SKIP_WHITE_BACKWARDS (keyafter.end, keyafter.start);
/* When the left context is wide, it might take some time to catch up from
- the left context boundary to the beginning of the `head' or `before'
+ the left context boundary to the beginning of the 'head' or 'before'
fields. So, in this case, to speed the catchup, we jump back from the
keyword, using some secure distance, possibly falling in the middle of
a word. A secure backward jump would be at least half the maximum
@@ -1394,7 +1394,7 @@ define_all_fields (OCCURS *occurs)
input. We conclude this backward jump by a skip forward of at least
one word. In this manner, we should not inadvertently accept only part
of a word. From the reached point, when it will be time to fix the
- beginning of `head' or `before' fields, we will skip forward words or
+ beginning of 'head' or 'before' fields, we will skip forward words or
delimiters until we get sufficiently near. */
if (-occurs->left > half_line_width + maximum_word_length)
@@ -1406,10 +1406,10 @@ define_all_fields (OCCURS *occurs)
else
left_field_start = keyafter.start + occurs->left;
- /* `before' certainly ends at the keyword, but not including separating
+ /* 'before' certainly ends at the keyword, but not including separating
spaces. It starts after than the saved value for the left context, by
advancing it until it falls inside the maximum allowed width for the
- before field. There will be no prefix spaces either. `before' only
+ before field. There will be no prefix spaces either. 'before' only
advances by skipping single separators or whole words. */
before.start = left_field_start;
@@ -1477,7 +1477,7 @@ define_all_fields (OCCURS *occurs)
tail_truncation = 0;
}
- /* `head' could not take more columns than what has been left in the right
+ /* 'head' could not take more columns than what has been left in the right
context field, and a gap is mandatory. It ends before the left
context, and does not contain suffixed spaces. Its pointer is advanced
until the head field has shrunk to its allowed width. It cannot
@@ -1554,13 +1554,13 @@ define_all_fields (OCCURS *occurs)
/* Formatting and actual output - control routines. */
/*----------------------------------------------------------------------.
-| Output the current output fields as one line for `troff' or `nroff'. |
+| Output the current output fields as one line for 'troff' or 'nroff'. |
`----------------------------------------------------------------------*/
static void
output_one_roff_line (void)
{
- /* Output the `tail' field. */
+ /* Output the 'tail' field. */
printf (".%s \"", macro_name);
print_field (tail);
@@ -1568,7 +1568,7 @@ output_one_roff_line (void)
fputs (truncation_string, stdout);
putchar ('"');
- /* Output the `before' field. */
+ /* Output the 'before' field. */
fputs (" \"", stdout);
if (before_truncation)
@@ -1576,7 +1576,7 @@ output_one_roff_line (void)
print_field (before);
putchar ('"');
- /* Output the `keyafter' field. */
+ /* Output the 'keyafter' field. */
fputs (" \"", stdout);
print_field (keyafter);
@@ -1584,7 +1584,7 @@ output_one_roff_line (void)
fputs (truncation_string, stdout);
putchar ('"');
- /* Output the `head' field. */
+ /* Output the 'head' field. */
fputs (" \"", stdout);
if (head_truncation)
@@ -1592,7 +1592,7 @@ output_one_roff_line (void)
print_field (head);
putchar ('"');
- /* Conditionally output the `reference' field. */
+ /* Conditionally output the 'reference' field. */
if (auto_reference || input_reference)
{
@@ -1605,7 +1605,7 @@ output_one_roff_line (void)
}
/*---------------------------------------------------------.
-| Output the current output fields as one line for `TeX'. |
+| Output the current output fields as one line for 'TeX'. |
`---------------------------------------------------------*/
static void
@@ -1654,7 +1654,7 @@ output_one_dumb_line (void)
if (auto_reference)
{
- /* Output the `reference' field, in such a way that GNU emacs
+ /* Output the 'reference' field, in such a way that GNU emacs
next-error will handle it. The ending colon is taken from the
gap which follows. */
@@ -1668,7 +1668,7 @@ output_one_dumb_line (void)
else
{
- /* Output the `reference' field and its following gap. */
+ /* Output the 'reference' field and its following gap. */
print_field (reference);
print_spaces (reference_max_width
@@ -1679,7 +1679,7 @@ output_one_dumb_line (void)
if (tail.start < tail.end)
{
- /* Output the `tail' field. */
+ /* Output the 'tail' field. */
print_field (tail);
if (tail_truncation)
@@ -1696,7 +1696,7 @@ output_one_dumb_line (void)
- (before.end - before.start)
- (before_truncation ? truncation_string_length : 0));
- /* Output the `before' field. */
+ /* Output the 'before' field. */
if (before_truncation)
fputs (truncation_string, stdout);
@@ -1704,7 +1704,7 @@ output_one_dumb_line (void)
print_spaces (gap_size);
- /* Output the `keyafter' field. */
+ /* Output the 'keyafter' field. */
print_field (keyafter);
if (keyafter_truncation)
@@ -1712,7 +1712,7 @@ output_one_dumb_line (void)
if (head.start < head.end)
{
- /* Output the `head' field. */
+ /* Output the 'head' field. */
print_spaces (half_line_width
- (keyafter.end - keyafter.start)
@@ -1732,7 +1732,7 @@ output_one_dumb_line (void)
if ((auto_reference || input_reference) && right_reference)
{
- /* Output the `reference' field. */
+ /* Output the 'reference' field. */
print_spaces (gap_size);
print_field (reference);
@@ -2084,7 +2084,7 @@ main (int argc, char **argv)
}
/* If the output format has not been explicitly selected, choose dumb
- terminal format if GNU extensions are enabled, else `roff' format. */
+ terminal format if GNU extensions are enabled, else 'roff' format. */
if (output_format == UNKNOWN_FORMAT)
output_format = gnu_extensions ? DUMB_FORMAT : ROFF_FORMAT;