Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / externals / figlet / crc.h
blobbd7c5361f823480b63b80604507d572e458bd254
1 /*
2 * crc.h - CRC calculation routine
4 * Version 1.0.1
5 */
7 /*
8 * Copyright (C) 1995, Edward B. Hamrick
10 * Permission to use, copy, modify, and distribute this software and
11 * its documentation for any purpose and without fee is hereby granted,
12 * provided that the above copyright notice appear in all copies and
13 * that both that copyright notice and this permission notice appear in
14 * supporting documentation, and that the name of the copyright holders
15 * not be used in advertising or publicity pertaining to distribution of
16 * the software without specific, written prior permission. The copyright
17 * holders makes no representations about the suitability of this software
18 * for any purpose. It is provided "as is" without express or implied warranty.
20 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
21 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
22 * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT
23 * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
24 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
25 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
26 * OF THIS SOFTWARE.
30 * Changes from 1.0 to 1.0.1:
31 * Relicensed under the MIT license, with consent of the copyright holders.
32 * Claudio Matsuoka (Jan 11 2011)
36 * This CRC algorithm is the same as that used in zip. Normally it
37 * should be initialized with 0xffffffff, and the final CRC stored
38 * should be crc ^ 0xffffffff.
40 * It implements the polynomial:
42 * x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1
45 #ifndef __CRC_H
46 #define __CRC_H
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
52 unsigned long CrcUpdate( /* returns updated crc */
53 unsigned long crc, /* starting crc */
54 unsigned char *buffer, /* buffer to use to update crc */
55 long length /* length of buffer */
58 #ifdef __cplusplus
60 #endif
62 #endif