mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
maint: remove form feed characters from sources
These are no longer useful and can impact viewing patches in some mail programs for example. * src/cksum.c: Remove ^L characters. * src/comm.c: Likewise. * src/kill.c Likewise. * src/ln.c Likewise. * src/nl.c Likewise. * src/pr.c Likewise. * src/ptx.c Likewise. * src/split.c Likewise. * src/tr.c Likewise. * src/tsort.c Likewise. * src/uniq.c Likewise. * src/wc.c Likewise. * cfg.mk (sc_prohibit-form-feed): A new syntax check.
This commit is contained in:
1 parent
2c5d86a8b8
commit
5f87f1ac1c
13 files changed
+41
-37
No files matched your search
@@ -746,6 +746,12 @@ sc_gitignore_redundant:
|
||||
sort | uniq -d | grep . && { echo '$(ME): Remove above' \
|
||||
'entries from .gitignore' >&2; exit 1; } || :
|
||||
|
||||
sc_prohibit-form-feed:
|
||||
@prohibit=$$'\f' \
|
||||
in_vc_files='\.[chly]$$' \
|
||||
halt='Form Feed (^L) detected' \
|
||||
$(_sc_search_regexp)
|
||||
|
||||
# Override the default Cc: used in generating an announcement.
|
||||
announcement_Cc_ = $(translation_project_), \
|
||||
coreutils@gnu.org, coreutils-announce@gnu.org
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Written by Q. Frank Xia, qx@math.columbia.edu.
|
||||
Cosmetic changes and reorganization by David MacKenzie, djm@gnu.ai.mit.edu.
|
||||
|
||||
|
||||
+1
-2
@@ -15,7 +15,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Richard Stallman and David MacKenzie. */
|
||||
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <getopt.h>
|
||||
@@ -91,7 +91,6 @@ static struct option const long_options[] =
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
|
||||
|
||||
void
|
||||
usage (int status)
|
||||
|
||||
+5
-5
@@ -32,7 +32,7 @@
|
||||
#define PROGRAM_NAME "kill"
|
||||
|
||||
#define AUTHORS proper_name ("Paul Eggert")
|
||||
|
||||
|
||||
#if ! (HAVE_DECL_STRSIGNAL || defined strsignal)
|
||||
# if ! (HAVE_DECL_SYS_SIGLIST || defined sys_siglist)
|
||||
# if HAVE_DECL__SYS_SIGLIST || defined _sys_siglist
|
||||
@@ -50,7 +50,7 @@
|
||||
# define strsignal(signum) 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
static char const short_options[] =
|
||||
"0::1::2::3::4::5::6::7::8::9::"
|
||||
"A::B::C::D::E::F::G::H::I::J::K::L::M::"
|
||||
@@ -104,7 +104,7 @@ PID is an integer; if negative it identifies a process group.\n\
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
|
||||
|
||||
/* Print a row of 'kill -t' output. NUM_WIDTH is the maximum signal
|
||||
number width, and SIGNUM is the signal number to print. The
|
||||
maximum name width is NAME_WIDTH, and SIGNAME is the name to print. */
|
||||
@@ -185,7 +185,7 @@ list_signals (bool table, char *const *argv)
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/* Send signal SIGNUM to all the processes or process groups specified
|
||||
by ARGV. Return a suitable exit status. */
|
||||
|
||||
@@ -216,7 +216,7 @@ send_signals (int signum, char *const *argv)
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Written by Mike Parker and David MacKenzie. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* Written by Scott Bartram (nancy!scott@uunet.uu.net)
|
||||
Revised by David MacKenzie (djm@gnu.ai.mit.edu) */
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* By Pete TerMaat, with considerable refinement by Roland Huebner. */
|
||||
|
||||
|
||||
/* Things to watch: Sys V screws up on ...
|
||||
pr -n -3 -s: /usr/dict/words
|
||||
pr -m -o10 -n /usr/dict/words{,,,}
|
||||
@@ -306,7 +306,6 @@
|
||||
affect -W option.)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1171,7 +1170,7 @@ getoptarg (char *arg, char switch_char, char *character, int *number)
|
||||
*number = tmp_long;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Set parameters related to formatting. */
|
||||
|
||||
static void
|
||||
@@ -1278,7 +1277,7 @@ init_parameters (int number_of_files)
|
||||
free (clump_buff);
|
||||
clump_buff = xmalloc (MAX (8, chars_per_input_tab));
|
||||
}
|
||||
|
||||
|
||||
/* Open the necessary files,
|
||||
maintaining a COLUMN structure for each column.
|
||||
|
||||
@@ -1354,7 +1353,7 @@ init_fps (int number_of_files, char **av)
|
||||
files_ready_to_read = total_files;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* Determine print_func and char_func, the functions
|
||||
used by each column for printing and/or storing.
|
||||
|
||||
@@ -1441,7 +1440,7 @@ init_funcs (void)
|
||||
p->numbered = numbered_lines && (!parallel_files || i == 1);
|
||||
p->start_position = h;
|
||||
}
|
||||
|
||||
|
||||
/* Open a file. Return true if successful.
|
||||
|
||||
With each file p, p->full_page_printed is initialized,
|
||||
@@ -1565,7 +1564,7 @@ reset_status (void)
|
||||
files_ready_to_read = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Print a single file, or multiple files in parallel.
|
||||
|
||||
Set up the list of columns, opening the necessary files.
|
||||
@@ -1600,7 +1599,7 @@ print_files (int number_of_files, char **av)
|
||||
while (print_page ())
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
/* Initialize header information.
|
||||
If DESC is non-negative, it is a file descriptor open to
|
||||
FILENAME for reading. */
|
||||
@@ -1649,7 +1648,7 @@ init_header (char const *filename, int desc)
|
||||
- mbswidth (date_text, 0)
|
||||
- mbswidth (file_text, 0));
|
||||
}
|
||||
|
||||
|
||||
/* Set things up for printing a page
|
||||
|
||||
Scan through the columns ...
|
||||
@@ -1854,7 +1853,7 @@ print_page (void)
|
||||
|
||||
return true; /* More pages to go. */
|
||||
}
|
||||
|
||||
|
||||
/* Allocate space for storing columns.
|
||||
|
||||
This is necessary when printing multiple columns from a single file.
|
||||
@@ -2028,7 +2027,7 @@ add_line_number (COLUMN *p)
|
||||
if (truncate_lines && !parallel_files)
|
||||
input_position += number_width;
|
||||
}
|
||||
|
||||
|
||||
/* Print (or store) padding until the current horizontal position
|
||||
is position. */
|
||||
|
||||
@@ -2164,7 +2163,7 @@ skip_read (COLUMN *p, int column_number)
|
||||
if ((!parallel_files || column_number == 1) && !single_ff)
|
||||
++line_count;
|
||||
}
|
||||
|
||||
|
||||
/* If we're tabifying output,
|
||||
|
||||
When print_char encounters white space it keeps track
|
||||
@@ -2710,7 +2709,7 @@ cleanup (void)
|
||||
free (end_vector);
|
||||
free (buff);
|
||||
}
|
||||
|
||||
|
||||
/* Complain, print a usage message, and die. */
|
||||
|
||||
void
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
# define MALLOC_FUNC_CHECK 1
|
||||
# include <dmalloc.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* Global definitions. */
|
||||
|
||||
/* FIXME: There are many unchecked integer overflows in this file,
|
||||
@@ -272,7 +272,7 @@ static BLOCK head; /* head field */
|
||||
static int head_truncation; /* flag truncation before the head field */
|
||||
|
||||
static BLOCK reference; /* reference field for input reference mode */
|
||||
|
||||
|
||||
/* Miscellaneous routines. */
|
||||
|
||||
/* Diagnose an error in the regular expression matcher. Then exit. */
|
||||
@@ -524,7 +524,7 @@ swallow_file_in_memory (const char *file_name, BLOCK *block)
|
||||
|
||||
block->end = block->start + used_length;
|
||||
}
|
||||
|
||||
|
||||
/* Sort and search routines. */
|
||||
|
||||
/*--------------------------------------------------------------------------.
|
||||
@@ -634,7 +634,7 @@ sort_found_occurs (void)
|
||||
qsort (occurs_table[0], number_of_occurs[0], sizeof **occurs_table,
|
||||
compare_occurs);
|
||||
}
|
||||
|
||||
|
||||
/* Parameter files reading routines. */
|
||||
|
||||
/*----------------------------------------------------------------------.
|
||||
@@ -736,7 +736,7 @@ digest_word_file (const char *file_name, WORD_TABLE *table)
|
||||
|
||||
qsort (table->start, table->length, sizeof table->start[0], compare_words);
|
||||
}
|
||||
|
||||
|
||||
/* Keyword recognition and selection. */
|
||||
|
||||
/*----------------------------------------------------------------------.
|
||||
@@ -1015,7 +1015,7 @@ find_occurs_in_text (size_t file_index)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Formatting and actual output - service routines. */
|
||||
|
||||
/*-----------------------------------------.
|
||||
@@ -1189,7 +1189,7 @@ print_field (BLOCK field)
|
||||
putchar (*cursor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Formatting and actual output - planning routines. */
|
||||
|
||||
/*--------------------------------------------------------------------.
|
||||
@@ -1552,7 +1552,7 @@ define_all_fields (OCCURS *occurs)
|
||||
SKIP_NON_WHITE (reference.end, right_context_end);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Formatting and actual output - control routines. */
|
||||
|
||||
/*----------------------------------------------------------------------.
|
||||
@@ -1802,7 +1802,7 @@ generate_all_output (void)
|
||||
occurs_cursor++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Option decoding and main program. */
|
||||
|
||||
/*------------------------------------------------------.
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
/* By tege@sics.se, with rms.
|
||||
|
||||
TODO:
|
||||
|
||||
@@ -275,7 +275,7 @@ static struct option const long_options[] =
|
||||
{GETOPT_VERSION_OPTION_DECL},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
|
||||
void
|
||||
usage (int status)
|
||||
{
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ static struct item *loop = NULL;
|
||||
|
||||
/* The number of strings to sort. */
|
||||
static size_t n_strings = 0;
|
||||
|
||||
|
||||
void
|
||||
usage (int status)
|
||||
{
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Richard M. Stallman and David MacKenzie. */
|
||||
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <getopt.h>
|
||||
|
||||
Reference in new issue
Block a user