summaryrefslogtreecommitdiff
path: root/examples/rlcat.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2023-04-27 15:33:37 -0400
committerChet Ramey <chet.ramey@case.edu>2023-04-27 15:33:37 -0400
commitf156385efb545a5ab96a2461555955d7f280aac4 (patch)
tree4c4ede0b0755f46629e1076b884ccf03654f5d47 /examples/rlcat.c
parent14144013617be12f94b99b05bf0928a8d1eba743 (diff)
downloadreadline-devel.tar.gz
asan updates to non-incremental search, redisplay; rework non-incremental search to avoid pointer aliasing issuesdevel
Diffstat (limited to 'examples/rlcat.c')
-rw-r--r--examples/rlcat.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/examples/rlcat.c b/examples/rlcat.c
index f1b0362..419a197 100644
--- a/examples/rlcat.c
+++ b/examples/rlcat.c
@@ -4,7 +4,7 @@
* usage: rlcat
*/
-/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2009,2023 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library for
reading lines of text with interactive input and history editing.
@@ -64,21 +64,20 @@ extern int errno;
extern int optind;
extern char *optarg;
-static int stdcat();
+static int fcopy(FILE *);
+static int stdcat(int, char **);
static char *progname;
static int vflag;
static void
-usage()
+usage(void)
{
fprintf (stderr, "%s: usage: %s [-vEVN] [filename]\n", progname, progname);
}
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
char *temp;
int opt, Vflag, Nflag;
@@ -134,8 +133,7 @@ main (argc, argv)
}
static int
-fcopy(fp)
- FILE *fp;
+fcopy(FILE *fp)
{
int c;
char *x;
@@ -155,9 +153,7 @@ fcopy(fp)
}
int
-stdcat (argc, argv)
- int argc;
- char **argv;
+stdcat (int argc, char **argv)
{
int i, fd, r;
char *s;