/*
- * "$Id: lpc.c 7079 2007-11-30 01:58:31Z mike $"
+ * "$Id: lpc.c 11558 2014-02-06 18:33:34Z msweet $"
*
- * "lpc" command for CUPS.
+ * "lpc" command for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
- * Copyright 1997-2006 by Easy Software Products.
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 1997-2006 by Easy Software Products.
*
- * These coded instructions, statements, and computer programs are the
- * property of Apple Inc. and are protected by Federal copyright
- * law. Distribution and use rights are outlined in the file "LICENSE.txt"
- * which should have been included with this file. If this file is
- * file is missing or damaged, see the license at "http://www.cups.org/".
- *
- * Contents:
- *
- * main() - Parse options and commands.
- * compare_strings() - Compare two command-line strings.
- * do_command() - Do an lpc command...
- * show_help() - Show help messages.
- * show_status() - Show printers.
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law. Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file. If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
*/
/*
* Local functions...
*/
-static int compare_strings(const char *, const char *, int);
+static int compare_strings(const char *, const char *, size_t);
static void do_command(http_t *, const char *, const char *);
static void show_help(const char *);
static void show_status(http_t *, const char *);
static int /* O - -1 or 1 = no match, 0 = match */
compare_strings(const char *s, /* I - Command-line string */
const char *t, /* I - Option string */
- int tmin) /* I - Minimum number of unique chars in option */
+ size_t tmin) /* I - Minimum number of unique chars in option */
{
- int slen; /* Length of command-line string */
+ size_t slen; /* Length of command-line string */
slen = strlen(s);
for (ptr = printer;
*ptr != '\0' && *dptr != '\0' && *ptr == *dptr;
- ptr ++, dptr ++);
+ ptr ++, dptr ++)
+ /* do nothing */;
if (*ptr == '\0' && (*dptr == '\0' || *dptr == ',' ||
isspace(*dptr & 255)))
/*
- * End of "$Id: lpc.c 7079 2007-11-30 01:58:31Z mike $".
+ * End of "$Id: lpc.c 11558 2014-02-06 18:33:34Z msweet $".
*/