]>
git.ipfire.org Git - thirdparty/cups.git/blob - driver/check.c
4 * Byte checking routines for CUPS.
6 * Copyright 2007 by Apple Inc.
7 * Copyright 1993-2005 by Easy Software Products.
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
17 * cupsCheckBytes() - Check to see if all bytes are zero.
18 * cupsCheckValue() - Check to see if all bytes match the given value.
22 * Include necessary headers.
29 * 'cupsCheckBytes()' - Check to see if all bytes are zero.
32 int /* O - 1 if they match */
33 cupsCheckBytes(const unsigned char *bytes
, /* I - Bytes to check */
34 int length
) /* I - Number of bytes to check */
69 * 'cupsCheckValue()' - Check to see if all bytes match the given value.
72 int /* O - 1 if they match */
73 cupsCheckValue(const unsigned char *bytes
, /* I - Bytes to check */
74 int length
, /* I - Number of bytes to check */
75 const unsigned char value
) /* I - Value to check */
79 if (*bytes
++ != value
)
81 if (*bytes
++ != value
)
83 if (*bytes
++ != value
)
85 if (*bytes
++ != value
)
87 if (*bytes
++ != value
)
89 if (*bytes
++ != value
)
91 if (*bytes
++ != value
)
93 if (*bytes
++ != value
)
100 if (*bytes
++ != value
)