char *xmalloc ();
char *xrealloc ();
-static int char_to_clump ();
-static int read_line ();
-static int print_page ();
-static int print_stored ();
-static int open_file ();
-static int skip_to_page ();
-static void getoptarg ();
-static void usage ();
-static void print_files ();
-static void init_header ();
-static void init_store_cols ();
-static void store_columns ();
-static void balance ();
-static void store_char ();
-static void pad_down ();
-static void read_rest_of_line ();
-static void print_char ();
-static void cleanup ();
-
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#define NULLCOL (COLUMN *)0
+static int char_to_clump (int c);
+static int read_line (COLUMN *p);
+static int print_page (void);
+static int print_stored (COLUMN *p);
+static int open_file (char *name, COLUMN *p);
+static int skip_to_page (int page);
+static void getoptarg (char *arg, char switch_char, char *character, int *number);
+static void usage (int status);
+static void print_files (int number_of_files, char **av);
+static void init_header (char *filename, int desc);
+static void init_store_cols (void);
+static void store_columns (void);
+static void balance (int total_stored);
+static void store_char (int c);
+static void pad_down (int lines);
+static void read_rest_of_line (COLUMN *p);
+static void print_char (int c);
+static void cleanup (void);
+
/* The name under which this program was invoked. */
char *program_name;
stored lines. */
static int
-cols_ready_to_print ()
+cols_ready_to_print (void)
{
COLUMN *q;
int i;
}
void
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int accum = 0;
a number. */
static void
-getoptarg (arg, switch_char, character, number)
- char *arg, switch_char, *character;
- int *number;
+getoptarg (char *arg, char switch_char, char *character, int *number)
{
if (!ISDIGIT (*arg))
*character = *arg++;
/* Set parameters related to formatting. */
static void
-init_parameters (number_of_files)
- int number_of_files;
+init_parameters (int number_of_files)
{
int chars_used_by_number = 0;
0 otherwise. */
static int
-init_fps (number_of_files, av)
- int number_of_files;
- char **av;
+init_fps (int number_of_files, char **av)
{
int i, files_left;
COLUMN *p;
printing a column (p->start_position). */
static void
-init_funcs ()
+init_funcs (void)
{
int i, h, h_next;
COLUMN *p;
/* Open a file. Return nonzero if successful, zero if failed. */
static int
-open_file (name, p)
- char *name;
- COLUMN *p;
+open_file (char *name, COLUMN *p)
{
if (!strcmp (name, "-"))
{
the status of all columns in the column list to reflect the close. */
static void
-close_file (p)
- COLUMN *p;
+close_file (COLUMN *p)
{
COLUMN *q;
int i;
status of all columns in the column list. */
static void
-hold_file (p)
- COLUMN *p;
+hold_file (COLUMN *p)
{
COLUMN *q;
int i;
ON_HOLD columns to OPEN. Used at the end of each page. */
static void
-reset_status ()
+reset_status (void)
{
int i = columns;
COLUMN *p;
Print the file(s). */
static void
-print_files (number_of_files, av)
- int number_of_files;
- char **av;
+print_files (int number_of_files, char **av)
{
init_parameters (number_of_files);
if (init_fps (number_of_files, av))
pr -h "" still prints the date and page number. */
static void
-init_header (filename, desc)
- char *filename;
- int desc;
+init_header (char *filename, int desc)
{
int chars_per_header;
char *f = filename;
Keep track of this total so we know when to stop printing */
static void
-init_page ()
+init_page (void)
{
int j;
COLUMN *p;
of formfeeds are now put back into the lineup. */
static int
-print_page ()
+print_page (void)
{
int j;
int lines_left_on_page;
which we need to know in order to print the last line in buff. */
static void
-init_store_cols ()
+init_store_cols (void)
{
int total_lines = lines_per_body * columns;
int chars_if_truncate = total_lines * (chars_per_column + 1);
current line. */
static void
-store_columns ()
+store_columns (void)
{
int i, j;
int line = 0;
}
static void
-balance (total_stored)
- int total_stored;
+balance (int total_stored)
{
COLUMN *p;
int i, lines;
/* Store a character in the buffer. */
static void
-store_char (c)
- int c;
+store_char (int c)
{
if (buff_current >= buff_allocated)
{
}
static void
-number (p)
- COLUMN *p;
+number (COLUMN *p)
{
int i;
char *s;
is position. */
static void
-pad_across_to (position)
- int position;
+pad_across_to (int position)
{
register int h = output_position;
Otherwise, use newlines. */
static void
-pad_down (lines)
- int lines;
+pad_down (int lines)
{
register int i;
to print or store its characters. */
static void
-read_rest_of_line (p)
- COLUMN *p;
+read_rest_of_line (COLUMN *p)
{
register int c;
FILE *f = p->fp;
until this function is called. */
static void
-print_white_space ()
+print_white_space (void)
{
register int h_new;
register int h_old = output_position;
then print_separators() is called. */
static void
-print_separators ()
+print_separators (void)
{
for (; separators_not_printed > 0; --separators_not_printed)
print_char (column_separator);
characters. */
static void
-print_clump (p, n, clump)
- COLUMN *p;
- int n;
- int *clump;
+print_clump (COLUMN *p, int n, int *clump)
{
while (n--)
(p->char_func) (*clump++);
required number of tabs and spaces. */
static void
-print_char (c)
- int c;
+print_char (int c)
{
if (tabify_output)
{
/* Skip to page PAGE before printing. */
static int
-skip_to_page (page)
- int page;
+skip_to_page (int page)
{
int n, i, j;
COLUMN *p;
the page. */
static void
-print_header ()
+print_header (void)
{
if (!use_form_feed)
fprintf (stdout, "\n\n");
an end of line character, TRUE otherwise. */
static int
-read_line (p)
- COLUMN *p;
+read_line (COLUMN *p)
{
register int c, chars;
int last_input_position;
Return TRUE, meaning there is no need to call read_rest_of_line. */
static int
-print_stored (p)
- COLUMN *p;
+print_stored (COLUMN *p)
{
int line = p->current_line++;
register char *first = &buff[line_vector[line]];
number of characters is 1.) */
static int
-char_to_clump (c)
- int c;
+char_to_clump (int c)
{
register int *s = clump_buff;
register int i;
Free everything we've xmalloc'ed, except `header'. */
static void
-cleanup ()
+cleanup (void)
{
if (number_buff)
free (number_buff);
/* Complain, print a usage message, and die. */
static void
-usage (status)
- int status;
+usage (int status)
{
if (status != 0)
fprintf (stderr, _("Try `%s --help' for more information.\n"),