]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
cat: fix references and variable names in cmdline.c
authorMartin Matuska <martin@matuska.de>
Sun, 30 Jul 2023 21:25:05 +0000 (23:25 +0200)
committerMartin Matuska <martin@matuska.de>
Sun, 30 Jul 2023 21:27:45 +0000 (23:27 +0200)
cat/cmdline.c

index cae19beb7d4cbc03baedd1692cf7b7aface06779..3c4b7a8c4b9e89ae4f0a5161e3becb98b0969684 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 /*
- * Command line parser for tar.
+ * Command line parser for bsdcat.
  */
 
 #include "bsdcat_platform.h"
@@ -44,12 +44,12 @@ __FBSDID("$FreeBSD$");
 #include "err.h"
 
 /*
- * Short options for tar.  Please keep this sorted.
+ * Short options for bsdcat.  Please keep this sorted.
  */
 static const char *short_options = "h";
 
 /*
- * Long options for tar.  Please keep this list sorted.
+ * Long options for bsdcat.  Please keep this list sorted.
  *
  * The symbolic names for options that lack a short equivalent are
  * defined in bsdcat.h.  Also note that so far I've found no need
@@ -61,7 +61,7 @@ static const struct bsdcat_option {
        const char *name;
        int required;      /* 1 if this option requires an argument. */
        int equivalent;    /* Equivalent short option. */
-} tar_longopts[] = {
+} bsdcat_longopts[] = {
        { "help",                 0, 'h' },
        { "version",              0, OPTION_VERSION },
        { NULL, 0, 0 }
@@ -90,7 +90,7 @@ static const struct bsdcat_option {
  * -W long options: There's an obscure GNU convention (only rarely
  * supported even there) that allows "-W option=argument" as an
  * alternative way to support long options.  This was supported in
- * early bsdcat as a way to access long options on platforms that did
+ * early bsdtar as a way to access long options on platforms that did
  * not support getopt_long() and is preserved here for backwards
  * compatibility.  (Of course, if I'd started with a custom
  * command-line parser from the beginning, I would have had normal
@@ -223,7 +223,7 @@ bsdcat_getopt(struct bsdcat *bsdcat)
                }
 
                /* Search the table for an unambiguous match. */
-               for (popt = tar_longopts; popt->name != NULL; popt++) {
+               for (popt = bsdcat_longopts; popt->name != NULL; popt++) {
                        /* Short-circuit if first chars don't match. */
                        if (popt->name[0] != bsdcat->getopt_word[0])
                                continue;