summaryrefslogtreecommitdiff
path: root/examples/hist_purgecmd.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/hist_purgecmd.c
parent14144013617be12f94b99b05bf0928a8d1eba743 (diff)
downloadreadline-f156385efb545a5ab96a2461555955d7f280aac4.tar.gz
asan updates to non-incremental search, redisplay; rework non-incremental search to avoid pointer aliasing issuesdevel
Diffstat (limited to 'examples/hist_purgecmd.c')
-rw-r--r--examples/hist_purgecmd.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/hist_purgecmd.c b/examples/hist_purgecmd.c
index 7992d81..3adb699 100644
--- a/examples/hist_purgecmd.c
+++ b/examples/hist_purgecmd.c
@@ -1,7 +1,7 @@
/* hist_purgecmd -- remove all instances of command or pattern from history
file */
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011,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.
@@ -46,16 +46,14 @@
int hist_purgecmd (char *, int);
static void
-usage()
+usage(void)
{
fprintf (stderr, "hist_purgecmd: usage: hist_purgecmd [-r] [-t] [-f filename] command-spec\n");
exit (2);
}
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
char *fn;
int r, flags;
@@ -109,9 +107,7 @@ main (argc, argv)
}
int
-hist_purgecmd (cmd, flags)
- char *cmd;
- int flags;
+hist_purgecmd (char *cmd, int flags)
{
int r, n, rflags;
HIST_ENTRY *temp;