Skip to content

Commit

Permalink
Bonk
Browse files Browse the repository at this point in the history
  • Loading branch information
peterix committed Jun 4, 2023
1 parent 75e32df commit c2c21de
Show file tree
Hide file tree
Showing 18 changed files with 202 additions and 209 deletions.
2 changes: 1 addition & 1 deletion libraries/LocalPeer/src/LocalPeer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ApplicationId ApplicationId::fromTraditionalApp()
prefix.remove(QRegularExpression("[^a-zA-Z]"));
prefix.truncate(6);
QByteArray idc = protoId.toUtf8();
quint16 idNum = qChecksum(idc.constData(), idc.size());
quint16 idNum = qChecksum(idc);
auto socketName = QLatin1String("qtsingleapp-") + prefix + QLatin1Char('-') + QString::number(idNum, 16);
#if defined(Q_OS_WIN)
if (!pProcessIdToSessionId)
Expand Down
2 changes: 1 addition & 1 deletion libraries/quazip
Submodule quazip updated 1 files
+8 −7 quazip/crypt.h
4 changes: 2 additions & 2 deletions libraries/zlib/adler32.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "zutil.h"

local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
static uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));

#define BASE 65521U /* largest prime smaller than 65536 */
#define NMAX 5552
Expand Down Expand Up @@ -140,7 +140,7 @@ uLong ZEXPORT adler32(adler, buf, len)
}

/* ========================================================================= */
local uLong adler32_combine_(adler1, adler2, len2)
static uLong adler32_combine_(adler1, adler2, len2)
uLong adler1;
uLong adler2;
z_off64_t len2;
Expand Down
72 changes: 36 additions & 36 deletions libraries/zlib/crc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
#endif

/* Local functions. */
local z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
static z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
static z_crc_t x2nmodp OF((z_off64_t n, unsigned k));

/* If available, use the ARM processor CRC32 instruction. */
#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8
Expand All @@ -114,7 +114,7 @@ local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
instruction, if one is available. This assumes that word_t is either 32 bits
or 64 bits.
*/
local z_word_t byte_swap(word)
static z_word_t byte_swap(word)
z_word_t word;
{
# if W == 8
Expand Down Expand Up @@ -142,19 +142,19 @@ local z_word_t byte_swap(word)

#ifdef DYNAMIC_CRC_TABLE

local z_crc_t FAR crc_table[256];
local z_crc_t FAR x2n_table[32];
local void make_crc_table OF((void));
static z_crc_t FAR crc_table[256];
static z_crc_t FAR x2n_table[32];
static void make_crc_table OF((void));
#ifdef W
local z_word_t FAR crc_big_table[256];
local z_crc_t FAR crc_braid_table[W][256];
local z_word_t FAR crc_braid_big_table[W][256];
local void braid OF((z_crc_t [][256], z_word_t [][256], int, int));
static z_word_t FAR crc_big_table[256];
static z_crc_t FAR crc_braid_table[W][256];
static z_word_t FAR crc_braid_big_table[W][256];
static void braid OF((z_crc_t [][256], z_word_t [][256], int, int));
#endif
#ifdef MAKECRCH
local void write_table OF((FILE *, const z_crc_t FAR *, int));
local void write_table32hi OF((FILE *, const z_word_t FAR *, int));
local void write_table64 OF((FILE *, const z_word_t FAR *, int));
static void write_table OF((FILE *, const z_crc_t FAR *, int));
static void write_table32hi OF((FILE *, const z_word_t FAR *, int));
static void write_table64 OF((FILE *, const z_word_t FAR *, int));
#endif /* MAKECRCH */

/*
Expand All @@ -167,7 +167,7 @@ local void make_crc_table OF((void));

/* Definition of once functionality. */
typedef struct once_s once_t;
local void once OF((once_t *, void (*)(void)));
static void once OF((once_t *, void (*)(void)));

/* Check for the availability of atomics. */
#if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \
Expand All @@ -187,7 +187,7 @@ struct once_s {
invoke once() at the same time. The state must be a once_t initialized with
ONCE_INIT.
*/
local void once(state, init)
static void once(state, init)
once_t *state;
void (*init)(void);
{
Expand All @@ -213,8 +213,8 @@ struct once_s {

/* Test and set. Alas, not atomic, but tries to minimize the period of
vulnerability. */
local int test_and_set OF((int volatile *));
local int test_and_set(flag)
static int test_and_set OF((int volatile *));
static int test_and_set(flag)
int volatile *flag;
{
int was;
Expand All @@ -225,7 +225,7 @@ local int test_and_set(flag)
}

/* Run the provided init() function once. This is not thread-safe. */
local void once(state, init)
static void once(state, init)
once_t *state;
void (*init)(void);
{
Expand All @@ -243,7 +243,7 @@ local void once(state, init)
#endif

/* State for once(). */
local once_t made = ONCE_INIT;
static once_t made = ONCE_INIT;

/*
Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
Expand All @@ -270,7 +270,7 @@ local once_t made = ONCE_INIT;
combinations of CRC register values and incoming bytes.
*/

local void make_crc_table()
static void make_crc_table()
{
unsigned i, j, n;
z_crc_t p;
Expand Down Expand Up @@ -321,7 +321,7 @@ local void make_crc_table()
"/* crc32.h -- tables for rapid CRC calculation\n"
" * Generated automatically by crc32.c\n */\n"
"\n"
"local const z_crc_t FAR crc_table[] = {\n"
"static const z_crc_t FAR crc_table[] = {\n"
" ");
write_table(out, crc_table, 256);
fprintf(out,
Expand All @@ -334,7 +334,7 @@ local void make_crc_table()
"\n"
"#if W == 8\n"
"\n"
"local const z_word_t FAR crc_big_table[] = {\n"
"static const z_word_t FAR crc_big_table[] = {\n"
" ");
write_table64(out, crc_big_table, 256);
fprintf(out,
Expand All @@ -345,7 +345,7 @@ local void make_crc_table()
"\n"
"#else /* W == 4 */\n"
"\n"
"local const z_word_t FAR crc_big_table[] = {\n"
"static const z_word_t FAR crc_big_table[] = {\n"
" ");
write_table32hi(out, crc_big_table, 256);
fprintf(out,
Expand All @@ -367,7 +367,7 @@ local void make_crc_table()
"\n"
"#if W == 8\n"
"\n"
"local const z_crc_t FAR crc_braid_table[][256] = {\n");
"static const z_crc_t FAR crc_braid_table[][256] = {\n");
for (k = 0; k < 8; k++) {
fprintf(out, " {");
write_table(out, ltl[k], 256);
Expand All @@ -376,7 +376,7 @@ local void make_crc_table()
fprintf(out,
"};\n"
"\n"
"local const z_word_t FAR crc_braid_big_table[][256] = {\n");
"static const z_word_t FAR crc_braid_big_table[][256] = {\n");
for (k = 0; k < 8; k++) {
fprintf(out, " {");
write_table64(out, big[k], 256);
Expand All @@ -393,7 +393,7 @@ local void make_crc_table()
"\n"
"#else /* W == 4 */\n"
"\n"
"local const z_crc_t FAR crc_braid_table[][256] = {\n");
"static const z_crc_t FAR crc_braid_table[][256] = {\n");
for (k = 0; k < 4; k++) {
fprintf(out, " {");
write_table(out, ltl[k], 256);
Expand All @@ -402,7 +402,7 @@ local void make_crc_table()
fprintf(out,
"};\n"
"\n"
"local const z_word_t FAR crc_braid_big_table[][256] = {\n");
"static const z_word_t FAR crc_braid_big_table[][256] = {\n");
for (k = 0; k < 4; k++) {
fprintf(out, " {");
write_table32hi(out, big[k], 256);
Expand All @@ -422,7 +422,7 @@ local void make_crc_table()
/* write out zeros operator table to crc32.h */
fprintf(out,
"\n"
"local const z_crc_t FAR x2n_table[] = {\n"
"static const z_crc_t FAR x2n_table[] = {\n"
" ");
write_table(out, x2n_table, 32);
fprintf(out,
Expand All @@ -438,7 +438,7 @@ local void make_crc_table()
Write the 32-bit values in table[0..k-1] to out, five per line in
hexadecimal separated by commas.
*/
local void write_table(out, table, k)
static void write_table(out, table, k)
FILE *out;
const z_crc_t FAR *table;
int k;
Expand All @@ -455,7 +455,7 @@ local void write_table(out, table, k)
Write the high 32-bits of each value in table[0..k-1] to out, five per line
in hexadecimal separated by commas.
*/
local void write_table32hi(out, table, k)
static void write_table32hi(out, table, k)
FILE *out;
const z_word_t FAR *table;
int k;
Expand All @@ -475,7 +475,7 @@ int k;
bits. If not, then the type cast and format string can be adjusted
accordingly.
*/
local void write_table64(out, table, k)
static void write_table64(out, table, k)
FILE *out;
const z_word_t FAR *table;
int k;
Expand All @@ -502,7 +502,7 @@ int main()
Generate the little and big-endian braid tables for the given n and z_word_t
size w. Each array must have room for w blocks of 256 elements.
*/
local void braid(ltl, big, n, w)
static void braid(ltl, big, n, w)
z_crc_t ltl[][256];
z_word_t big[][256];
int n;
Expand Down Expand Up @@ -539,7 +539,7 @@ local void braid(ltl, big, n, w)
Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial,
reflected. For speed, this requires that a not be zero.
*/
local z_crc_t multmodp(a, b)
static z_crc_t multmodp(a, b)
z_crc_t a;
z_crc_t b;
{
Expand All @@ -563,7 +563,7 @@ local z_crc_t multmodp(a, b)
Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been
initialized.
*/
local z_crc_t x2nmodp(n, k)
static z_crc_t x2nmodp(n, k)
z_off64_t n;
unsigned k;
{
Expand Down Expand Up @@ -714,7 +714,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
least-significant byte of the word as the first byte of data, without any pre
or post conditioning. This is used to combine the CRCs of each braid.
*/
local z_crc_t crc_word(data)
static z_crc_t crc_word(data)
z_word_t data;
{
int k;
Expand All @@ -723,7 +723,7 @@ local z_crc_t crc_word(data)
return (z_crc_t)data;
}

local z_word_t crc_word_big(data)
static z_word_t crc_word_big(data)
z_word_t data;
{
int k;
Expand Down
Loading

0 comments on commit c2c21de

Please sign in to comment.