MCPcopy Create free account
hub / github.com/OpenPrinting/cups / parse_options

Function parse_options

backend/usb-darwin.c:1967–2041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1965 */
1966
1967static void parse_options(char *options,
1968 char *serial,
1969 int serial_size,
1970 UInt32 *location,
1971 Boolean *wait_eof)
1972{
1973 char sep, /* Separator character */
1974 *name, /* Name of option */
1975 *value; /* Value of option */
1976
1977
1978 if (serial)
1979 *serial = '\0';
1980 if (location)
1981 *location = 0;
1982
1983 if (!options)
1984 return;
1985
1986 while (*options)
1987 {
1988 /*
1989 * Get the name...
1990 */
1991
1992 name = options;
1993
1994 while (*options && *options != '=' && *options != '+' && *options != '&')
1995 options ++;
1996
1997 if ((sep = *options) != '\0')
1998 *options++ = '\0';
1999
2000 if (sep == '=')
2001 {
2002 /*
2003 * Get the value...
2004 */
2005
2006 value = options;
2007
2008 while (*options && *options != '+' && *options != '&')
2009 options ++;
2010
2011 if (*options)
2012 *options++ = '\0';
2013 }
2014 else
2015 value = (char *)"";
2016
2017 /*
2018 * Process the option...
2019 */
2020
2021 if (!_cups_strcasecmp(name, "waiteof"))
2022 {
2023 if (!_cups_strcasecmp(value, "on") ||
2024 !_cups_strcasecmp(value, "yes") ||

Callers 1

print_deviceFunction · 0.70

Calls 2

_cups_strcasecmpFunction · 0.85
_cupsLangPrintFilterFunction · 0.85

Tested by

no test coverage detected