mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
Revert whitespace fixes to third_party (#501)
This commit is contained in:
parent
d4000bb8f7
commit
9de3d8f1e6
365 changed files with 39190 additions and 39211 deletions
2
third_party/finger/util.c
vendored
2
third_party/finger/util.c
vendored
|
@ -258,7 +258,7 @@ void enter_lastlog(PERSON *pn) {
|
|||
/*
|
||||
* and if it's not any of the current logins
|
||||
* can't use time comparison because there may be a small
|
||||
* discrepancy since login calls time() twice
|
||||
* discrepency since login calls time() twice
|
||||
*/
|
||||
for (w = pn->whead; doit && w != NULL; w = w->next)
|
||||
if (w->info == LOGGEDIN &&
|
||||
|
|
|
@ -17,25 +17,4 @@ TkwxETAPBgNVBAoTCFBvbGFyU1NMMRwwGgYDVQQDExNQb2xhcnNzbCBUZXN0IEVD
|
|||
IENBggkAwUPifmJDzOgwCgYIKoZIzj0EAwQDaQAwZgIxAL/VFrDIYUECsS0rVpAy
|
||||
6zt/CqeAZ1sa/l5LTaG1XW286n2Kibipr6EpkYZNYIQILgIxAI0wb3Py1DHPWpYf
|
||||
/BFBH7C3KYq+nWTrLeEnhrjU1LzG/CiQ8lnuskya6lw/P3lJ/A==
|
||||
-----END X509 CRL----- M third_party/mbedtls/base64.c
|
||||
M third_party/mbedtls/bigshift.c
|
||||
M third_party/mbedtls/cipher.c
|
||||
M third_party/mbedtls/dhm.c
|
||||
M third_party/mbedtls/ecp.c
|
||||
M third_party/mbedtls/ecp_internal.h
|
||||
M third_party/mbedtls/md.c
|
||||
M third_party/mbedtls/md.h
|
||||
M third_party/mbedtls/pk.c
|
||||
M third_party/mbedtls/pk_wrap.c
|
||||
M third_party/mbedtls/ssl.h
|
||||
M third_party/mbedtls/ssl_ciphersuites.c
|
||||
M third_party/mbedtls/ssl_srv.c
|
||||
M third_party/mbedtls/test/data/crl-malformed-trailing-spaces.pem
|
||||
M third_party/mbedtls/test/data/dir4/Readme
|
||||
M third_party/mbedtls/test/data/server10_int3_int-ca2_ca.crt
|
||||
M third_party/mbedtls/test/data/server7_trailing_space.crt
|
||||
M third_party/mbedtls/test/data/server9-with-ca.crt
|
||||
M third_party/mbedtls/test/test_suite_ssl.c
|
||||
M third_party/mbedtls/x509.h
|
||||
M third_party/mbedtls/x509write_crt.c
|
||||
|
||||
-----END X509 CRL-----
|
||||
|
|
|
@ -666,25 +666,25 @@ class ProcessTestCase(BaseTestCase):
|
|||
subprocess.Popen([sys.executable, "-c", "pass#\0"])
|
||||
|
||||
def test_invalid_env(self):
|
||||
# null character in the environment variable name
|
||||
# null character in the enviroment variable name
|
||||
newenv = os.environ.copy()
|
||||
newenv["FRUIT\0VEGETABLE"] = "cabbage"
|
||||
with self.assertRaises(ValueError):
|
||||
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
|
||||
|
||||
# null character in the environment variable value
|
||||
# null character in the enviroment variable value
|
||||
newenv = os.environ.copy()
|
||||
newenv["FRUIT"] = "orange\0VEGETABLE=cabbage"
|
||||
with self.assertRaises(ValueError):
|
||||
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
|
||||
|
||||
# equal character in the environment variable name
|
||||
# equal character in the enviroment variable name
|
||||
newenv = os.environ.copy()
|
||||
newenv["FRUIT=ORANGE"] = "lemon"
|
||||
with self.assertRaises(ValueError):
|
||||
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
|
||||
|
||||
# equal character in the environment variable value
|
||||
# equal character in the enviroment variable value
|
||||
newenv = os.environ.copy()
|
||||
newenv["FRUIT"] = "orange=lemon"
|
||||
with subprocess.Popen([sys.executable, "-c",
|
||||
|
|
2
third_party/python/Lib/test/test_sys.py
vendored
2
third_party/python/Lib/test/test_sys.py
vendored
|
@ -409,7 +409,7 @@ class SysModuleTest(unittest.TestCase):
|
|||
self.assertTrue(frame is sys._getframe())
|
||||
|
||||
# Verify that the captured thread frame is blocked in g456, called
|
||||
# from f123. This is a little tricky, since various bits of
|
||||
# from f123. This is a litte tricky, since various bits of
|
||||
# threading.py are also in the thread's call stack.
|
||||
frame = d.pop(thread_id)
|
||||
stack = traceback.extract_stack(frame)
|
||||
|
|
4
third_party/quickjs/bigdecimal.c
vendored
4
third_party/quickjs/bigdecimal.c
vendored
|
@ -669,8 +669,8 @@ static int js_binary_arith_bigdecimal(JSContext *ctx, OPCodeEnum op,
|
|||
ret = bfdec_div(r, a, b, BF_PREC_INF, BF_RNDZ);
|
||||
break;
|
||||
case OP_math_mod:
|
||||
/* Euclidean remainder */
|
||||
ret = bfdec_rem(r, a, b, BF_PREC_INF, BF_RNDZ, BF_DIVREM_EUCLIDEAN);
|
||||
/* Euclidian remainder */
|
||||
ret = bfdec_rem(r, a, b, BF_PREC_INF, BF_RNDZ, BF_DIVREM_EUCLIDIAN);
|
||||
break;
|
||||
case OP_mod:
|
||||
ret = bfdec_rem(r, a, b, BF_PREC_INF, BF_RNDZ, BF_RNDZ);
|
||||
|
|
8
third_party/quickjs/bigint.c
vendored
8
third_party/quickjs/bigint.c
vendored
|
@ -403,11 +403,11 @@ static const JSCFunctionListEntry js_bigint_funcs[] = {
|
|||
JS_CFUNC_MAGIC_DEF("tdiv", 2, js_bigint_div, BF_RNDZ ),
|
||||
JS_CFUNC_MAGIC_DEF("fdiv", 2, js_bigint_div, BF_RNDD ),
|
||||
JS_CFUNC_MAGIC_DEF("cdiv", 2, js_bigint_div, BF_RNDU ),
|
||||
JS_CFUNC_MAGIC_DEF("ediv", 2, js_bigint_div, BF_DIVREM_EUCLIDEAN ),
|
||||
JS_CFUNC_MAGIC_DEF("ediv", 2, js_bigint_div, BF_DIVREM_EUCLIDIAN ),
|
||||
JS_CFUNC_MAGIC_DEF("tdivrem", 2, js_bigint_div, BF_RNDZ | 0x10 ),
|
||||
JS_CFUNC_MAGIC_DEF("fdivrem", 2, js_bigint_div, BF_RNDD | 0x10 ),
|
||||
JS_CFUNC_MAGIC_DEF("cdivrem", 2, js_bigint_div, BF_RNDU | 0x10 ),
|
||||
JS_CFUNC_MAGIC_DEF("edivrem", 2, js_bigint_div, BF_DIVREM_EUCLIDEAN | 0x10 ),
|
||||
JS_CFUNC_MAGIC_DEF("edivrem", 2, js_bigint_div, BF_DIVREM_EUCLIDIAN | 0x10 ),
|
||||
JS_CFUNC_MAGIC_DEF("sqrt", 1, js_bigint_sqrt, 0 ),
|
||||
JS_CFUNC_MAGIC_DEF("sqrtrem", 1, js_bigint_sqrt, 1 ),
|
||||
JS_CFUNC_MAGIC_DEF("floorLog2", 1, js_bigint_op1, 0 ),
|
||||
|
@ -584,9 +584,9 @@ static int js_binary_arith_bigint(JSContext *ctx, OPCodeEnum op,
|
|||
}
|
||||
break;
|
||||
case OP_math_mod:
|
||||
/* Euclidean remainder */
|
||||
/* Euclidian remainder */
|
||||
ret = bf_rem(r, a, b, BF_PREC_INF, BF_RNDZ,
|
||||
BF_DIVREM_EUCLIDEAN) & BF_ST_INVALID_OP;
|
||||
BF_DIVREM_EUCLIDIAN) & BF_ST_INVALID_OP;
|
||||
break;
|
||||
case OP_mod:
|
||||
ret = bf_rem(r, a, b, BF_PREC_INF, BF_RNDZ,
|
||||
|
|
2
third_party/quickjs/call.c
vendored
2
third_party/quickjs/call.c
vendored
|
@ -1240,7 +1240,7 @@ static int js_op_define_class(JSContext *ctx, JSValue *sp,
|
|||
if (JS_DefineObjectName(ctx, ctor, class_name, JS_PROP_CONFIGURABLE) < 0)
|
||||
goto fail;
|
||||
}
|
||||
/* the constructor property must be first. It can be overridden by
|
||||
/* the constructor property must be first. It can be overriden by
|
||||
computed property names */
|
||||
if (JS_DefinePropertyValue(ctx, proto, JS_ATOM_constructor,
|
||||
JS_DupValue(ctx, ctor),
|
||||
|
|
2
third_party/quickjs/cutils.c
vendored
2
third_party/quickjs/cutils.c
vendored
|
@ -394,7 +394,7 @@ static inline void *med3(void *a, void *b, void *c, cmp_f cmp, void *opaque)
|
|||
(cmp(b, c, opaque) > 0 ? b : (cmp(a, c, opaque) < 0 ? a : c ));
|
||||
}
|
||||
|
||||
/* pointer based version with local stack and insertion sort threshold */
|
||||
/* pointer based version with local stack and insertion sort threshhold */
|
||||
void rqsort(void *base, size_t nmemb, size_t size, cmp_f cmp, void *opaque)
|
||||
{
|
||||
struct { uint8_t *base; size_t count; int depth; } stack[50], *sp = stack;
|
||||
|
|
4
third_party/quickjs/float.c
vendored
4
third_party/quickjs/float.c
vendored
|
@ -1000,9 +1000,9 @@ static int js_binary_arith_bigfloat(JSContext *ctx, OPCodeEnum op,
|
|||
ret = bf_div(r, a, b, ctx->fp_env.prec, ctx->fp_env.flags);
|
||||
break;
|
||||
case OP_math_mod:
|
||||
/* Euclidean remainder */
|
||||
/* Euclidian remainder */
|
||||
ret = bf_rem(r, a, b, ctx->fp_env.prec, ctx->fp_env.flags,
|
||||
BF_DIVREM_EUCLIDEAN);
|
||||
BF_DIVREM_EUCLIDIAN);
|
||||
break;
|
||||
case OP_mod:
|
||||
ret = bf_rem(r, a, b, ctx->fp_env.prec, ctx->fp_env.flags,
|
||||
|
|
2
third_party/quickjs/gc.c
vendored
2
third_party/quickjs/gc.c
vendored
|
@ -397,7 +397,7 @@ void JS_RunGC(JSRuntime *rt)
|
|||
/* decrement the reference of the children of each object. mark =
|
||||
1 after this pass. */
|
||||
gc_decref(rt);
|
||||
/* keep the GC objects with a non zero refcount and their children */
|
||||
/* keep the GC objects with a non zero refcount and their childs */
|
||||
gc_scan(rt);
|
||||
/* free the GC objects in a cycle */
|
||||
gc_free_cycles(rt);
|
||||
|
|
8
third_party/quickjs/internal.h
vendored
8
third_party/quickjs/internal.h
vendored
|
@ -1291,7 +1291,7 @@ typedef struct BlockEnv {
|
|||
|
||||
typedef struct JSGlobalVar {
|
||||
int cpool_idx; /* if >= 0, index in the constant pool for hoisted
|
||||
function definition*/
|
||||
function defintion*/
|
||||
uint8_t force_init : 1; /* force initialization to undefined */
|
||||
uint8_t is_lexical : 1; /* global let/const definition */
|
||||
uint8_t is_const : 1; /* const definition */
|
||||
|
@ -1393,9 +1393,9 @@ typedef struct JSFunctionDef {
|
|||
int func_var_idx; /* variable containing the current function (-1
|
||||
if none, only used if is_func_expr is true) */
|
||||
int eval_ret_idx; /* variable containing the return value of the eval, -1 if none */
|
||||
int this_var_idx; /* variable containing the 'this' value, -1 if none */
|
||||
int new_target_var_idx; /* variable containing the 'new.target' value, -1 if none */
|
||||
int this_active_func_var_idx; /* variable containing the 'this.active_func' value, -1 if none */
|
||||
int this_var_idx; /* variable containg the 'this' value, -1 if none */
|
||||
int new_target_var_idx; /* variable containg the 'new.target' value, -1 if none */
|
||||
int this_active_func_var_idx; /* variable containg the 'this.active_func' value, -1 if none */
|
||||
int home_object_var_idx;
|
||||
BOOL need_home_object;
|
||||
int scope_level; /* index into fd->scopes if the current lexical scope */
|
||||
|
|
14
third_party/quickjs/libbf.c
vendored
14
third_party/quickjs/libbf.c
vendored
|
@ -1729,7 +1729,7 @@ static int __bf_div(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec,
|
|||
/* division and remainder.
|
||||
|
||||
rnd_mode is the rounding mode for the quotient. The additional
|
||||
rounding mode BF_RND_EUCLIDEAN is supported.
|
||||
rounding mode BF_RND_EUCLIDIAN is supported.
|
||||
|
||||
'q' is an integer. 'r' is rounded with prec and flags (prec can be
|
||||
BF_PREC_INF).
|
||||
|
@ -1778,7 +1778,7 @@ int bf_divrem(bf_t *q, bf_t *r, const bf_t *a, const bf_t *b,
|
|||
case BF_RNDA:
|
||||
is_ceil = TRUE;
|
||||
break;
|
||||
case BF_DIVREM_EUCLIDEAN:
|
||||
case BF_DIVREM_EUCLIDIAN:
|
||||
is_ceil = a->sign;
|
||||
break;
|
||||
}
|
||||
|
@ -4120,7 +4120,7 @@ static void bf_const_pi_internal(bf_t *Q, limb_t prec)
|
|||
int64_t n, prec1;
|
||||
bf_t P, G;
|
||||
|
||||
/* number of series terms */
|
||||
/* number of serie terms */
|
||||
n = prec / CHUD_BITS_PER_TERM + 1;
|
||||
/* XXX: precision analysis */
|
||||
prec1 = prec + 32;
|
||||
|
@ -5188,7 +5188,7 @@ static int bf_atan2_internal(bf_t *r, const bf_t *y, limb_t prec, void *opaque)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* compute atan(y/x) assuming inf/inf = 1 and 0/0 = 0 */
|
||||
/* compute atan(y/x) assumming inf/inf = 1 and 0/0 = 0 */
|
||||
bf_init(s, T);
|
||||
prec1 = prec + 32;
|
||||
if (y->expn == BF_EXP_INF && x->expn == BF_EXP_INF) {
|
||||
|
@ -5670,7 +5670,7 @@ limb_t mp_add_mul1_dec(limb_t *tabr, const limb_t *taba, mp_size_t n,
|
|||
}
|
||||
|
||||
/* tabr[] -= taba[] * b. 0 <= b <= base - 1. Return the value to
|
||||
subtract to the high word. */
|
||||
substract to the high word. */
|
||||
limb_t mp_sub_mul1_dec(limb_t *tabr, const limb_t *taba, mp_size_t n,
|
||||
limb_t b)
|
||||
{
|
||||
|
@ -6934,7 +6934,7 @@ static void bfdec_tdivremu(bf_context_t *s, bfdec_t *q, bfdec_t *r,
|
|||
/* division and remainder.
|
||||
|
||||
rnd_mode is the rounding mode for the quotient. The additional
|
||||
rounding mode BF_RND_EUCLIDEAN is supported.
|
||||
rounding mode BF_RND_EUCLIDIAN is supported.
|
||||
|
||||
'q' is an integer. 'r' is rounded with prec and flags (prec can be
|
||||
BF_PREC_INF).
|
||||
|
@ -6985,7 +6985,7 @@ int bfdec_divrem(bfdec_t *q, bfdec_t *r, const bfdec_t *a, const bfdec_t *b,
|
|||
case BF_RNDA:
|
||||
is_ceil = TRUE;
|
||||
break;
|
||||
case BF_DIVREM_EUCLIDEAN:
|
||||
case BF_DIVREM_EUCLIDIAN:
|
||||
is_ceil = a->sign;
|
||||
break;
|
||||
}
|
||||
|
|
4
third_party/quickjs/libbf.h
vendored
4
third_party/quickjs/libbf.h
vendored
|
@ -149,7 +149,7 @@ static inline bf_flags_t bf_set_exp_bits(int n)
|
|||
#define BF_ST_OVERFLOW (1 << 2)
|
||||
#define BF_ST_UNDERFLOW (1 << 3)
|
||||
#define BF_ST_INEXACT (1 << 4)
|
||||
/* indicate that a memory allocation error occurred. NaN is returned */
|
||||
/* indicate that a memory allocation error occured. NaN is returned */
|
||||
#define BF_ST_MEM_ERROR (1 << 5)
|
||||
|
||||
#define BF_RADIX_MAX 36 /* maximum radix for bf_atof() and bf_ftoa() */
|
||||
|
@ -267,7 +267,7 @@ int bf_mul_si(bf_t *r, const bf_t *a, int64_t b1, limb_t prec,
|
|||
bf_flags_t flags);
|
||||
int bf_mul_2exp(bf_t *r, slimb_t e, limb_t prec, bf_flags_t flags);
|
||||
int bf_div(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags);
|
||||
#define BF_DIVREM_EUCLIDEAN BF_RNDF
|
||||
#define BF_DIVREM_EUCLIDIAN BF_RNDF
|
||||
int bf_divrem(bf_t *q, bf_t *r, const bf_t *a, const bf_t *b,
|
||||
limb_t prec, bf_flags_t flags, int rnd_mode);
|
||||
int bf_rem(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec,
|
||||
|
|
2
third_party/quickjs/libregexp.c
vendored
2
third_party/quickjs/libregexp.c
vendored
|
@ -1635,7 +1635,7 @@ static int re_parse_term(REParseState *s, BOOL is_backward_dir)
|
|||
put_u32(s->byte_code.buf + last_atom_start + 1,
|
||||
len + 5 + add_zero_advance_check);
|
||||
if (add_zero_advance_check) {
|
||||
/* avoid infinite loop by stopping the
|
||||
/* avoid infinite loop by stoping the
|
||||
recursion if no advance was made in the
|
||||
atom (only works if the atom has no
|
||||
side effect) */
|
||||
|
|
4
third_party/quickjs/quickjs.c
vendored
4
third_party/quickjs/quickjs.c
vendored
|
@ -10513,7 +10513,7 @@ static int find_private_class_field_all(JSContext *ctx, JSFunctionDef *fd,
|
|||
|
||||
static void get_loc_or_ref(DynBuf *bc, BOOL is_ref, int idx)
|
||||
{
|
||||
/* if the field is not initialized, the error is caught when
|
||||
/* if the field is not initialized, the error is catched when
|
||||
accessing it */
|
||||
if (is_ref)
|
||||
dbuf_putc(bc, OP_get_var_ref);
|
||||
|
@ -12667,7 +12667,7 @@ static __exception int ss_check(JSContext *ctx, StackSizeState *s,
|
|||
if (s->stack_level_tab[pos] != 0xffff) {
|
||||
/* already explored: check that the stack size is consistent */
|
||||
if (s->stack_level_tab[pos] != stack_len) {
|
||||
JS_ThrowInternalError(ctx, "inconsistent stack size: %d %d (pc=%d)",
|
||||
JS_ThrowInternalError(ctx, "unconsistent stack size: %d %d (pc=%d)",
|
||||
s->stack_level_tab[pos], stack_len, pos);
|
||||
return -1;
|
||||
} else {
|
||||
|
|
6
third_party/sqlite3/wal.c
vendored
6
third_party/sqlite3/wal.c
vendored
|
@ -282,7 +282,7 @@ int sqlite3WalTrace = 0;
|
|||
**
|
||||
** Technically, the various VFSes are free to implement these locks however
|
||||
** they see fit. However, compatibility is encouraged so that VFSes can
|
||||
** interoperate. The standard implementation used on both unix and windows
|
||||
** interoperate. The standard implemention used on both unix and windows
|
||||
** is for the index number to indicate a byte offset into the
|
||||
** WalCkptInfo.aLock[] array in the wal-index header. In other words, all
|
||||
** locks are on the shm file. The WALINDEX_LOCK_OFFSET constant (which
|
||||
|
@ -358,7 +358,7 @@ struct WalIndexHdr {
|
|||
** the mxFrame for that reader. The value READMARK_NOT_USED (0xffffffff)
|
||||
** for any aReadMark[] means that entry is unused. aReadMark[0] is
|
||||
** a special case; its value is never used and it exists as a place-holder
|
||||
** to avoid having to offset aReadMark[] indexes by one. Readers holding
|
||||
** to avoid having to offset aReadMark[] indexs by one. Readers holding
|
||||
** WAL_READ_LOCK(0) always ignore the entire WAL and read all content
|
||||
** directly from the database.
|
||||
**
|
||||
|
@ -1469,7 +1469,7 @@ int sqlite3WalOpen(
|
|||
}
|
||||
|
||||
/*
|
||||
** Change the size to which the WAL file is truncated on each reset.
|
||||
** Change the size to which the WAL file is trucated on each reset.
|
||||
*/
|
||||
void sqlite3WalLimit(Wal *pWal, i64 iLimit){
|
||||
if( pWal ) pWal->mxWalSize = iLimit;
|
||||
|
|
4
third_party/sqlite3/where.c
vendored
4
third_party/sqlite3/where.c
vendored
|
@ -1356,7 +1356,7 @@ char sqlite3IndexColumnAffinity(sqlite3 *db, Index *pIdx, int iCol){
|
|||
** Value pLoop->nOut is currently set to the estimated number of rows
|
||||
** visited for scanning (a=? AND b=?). This function reduces that estimate
|
||||
** by some factor to account for the (c BETWEEN ? AND ?) expression based
|
||||
** on the stat4 data for the index. this scan will be performed multiple
|
||||
** on the stat4 data for the index. this scan will be peformed multiple
|
||||
** times (once for each (a,b) combination that matches a=?) is dealt with
|
||||
** by the caller.
|
||||
**
|
||||
|
@ -2929,7 +2929,7 @@ static int whereUsablePartialIndex(
|
|||
*/
|
||||
static int whereLoopAddBtree(
|
||||
WhereLoopBuilder *pBuilder, /* WHERE clause information */
|
||||
Bitmask mPrereq /* Extra prerequisites for using this table */
|
||||
Bitmask mPrereq /* Extra prerequesites for using this table */
|
||||
){
|
||||
WhereInfo *pWInfo; /* WHERE analysis context */
|
||||
Index *pProbe; /* An index we are evaluating */
|
||||
|
|
2
third_party/sqlite3/whereInt.inc
vendored
2
third_party/sqlite3/whereInt.inc
vendored
|
@ -321,7 +321,7 @@ struct WhereClause {
|
|||
u8 hasOr; /* True if any a[].eOperator is WO_OR */
|
||||
int nTerm; /* Number of terms */
|
||||
int nSlot; /* Number of entries in a[] */
|
||||
WhereTerm *a; /* Each a[] describes a term of the WHERE clause */
|
||||
WhereTerm *a; /* Each a[] describes a term of the WHERE cluase */
|
||||
#if defined(SQLITE_SMALL_STACK)
|
||||
WhereTerm aStatic[1]; /* Initial static space for a[] */
|
||||
#else
|
||||
|
|
4
third_party/sqlite3/whereexpr.c
vendored
4
third_party/sqlite3/whereexpr.c
vendored
|
@ -1307,8 +1307,8 @@ static void exprAnalyze(
|
|||
WhereTerm *pTerm; /* The term to be analyzed */
|
||||
WhereMaskSet *pMaskSet; /* Set of table index masks */
|
||||
Expr *pExpr; /* The expression to be analyzed */
|
||||
Bitmask prereqLeft; /* Prerequisites of the pExpr->pLeft */
|
||||
Bitmask prereqAll; /* Prerequisites of pExpr */
|
||||
Bitmask prereqLeft; /* Prerequesites of the pExpr->pLeft */
|
||||
Bitmask prereqAll; /* Prerequesites of pExpr */
|
||||
Bitmask extraRight = 0; /* Extra dependencies on LEFT JOIN */
|
||||
Expr *pStr1 = 0; /* RHS of LIKE/GLOB operator */
|
||||
int isComplete = 0; /* RHS of LIKE/GLOB ends with wildcard */
|
||||
|
|
6
third_party/sqlite3/window.c
vendored
6
third_party/sqlite3/window.c
vendored
|
@ -648,7 +648,7 @@ static Window *windowFind(Parse *pParse, Window *pList, const char *zName){
|
|||
** is the Window object representing the associated OVER clause. This
|
||||
** function updates the contents of pWin as follows:
|
||||
**
|
||||
** * If the OVER clause referred to a named window (as in "max(x) OVER win"),
|
||||
** * If the OVER clause refered to a named window (as in "max(x) OVER win"),
|
||||
** search list pList for a matching WINDOW definition, and update pWin
|
||||
** accordingly. If no such WINDOW clause can be found, leave an error
|
||||
** in pParse.
|
||||
|
@ -1537,7 +1537,7 @@ struct WindowCsrAndReg {
|
|||
**
|
||||
** (ORDER BY a, b GROUPS BETWEEN 2 PRECEDING AND 2 FOLLOWING)
|
||||
**
|
||||
** The windows functions implementation caches the input rows in a temp
|
||||
** The windows functions implmentation caches the input rows in a temp
|
||||
** table, sorted by "a, b" (it actually populates the cache lazily, and
|
||||
** aggressively removes rows once they are no longer required, but that's
|
||||
** a mere detail). It keeps three cursors open on the temp table. One
|
||||
|
@ -2529,7 +2529,7 @@ static int windowExprGtZero(Parse *pParse, Expr *pExpr){
|
|||
**
|
||||
** For the most part, the patterns above are adapted to support UNBOUNDED by
|
||||
** assuming that it is equivalent to "infinity PRECEDING/FOLLOWING" and
|
||||
** CURRENT ROW by assuming that it is equivalent to "0 PRECEDING/FOLLOWING".
|
||||
** CURRENT ROW by assuming that it is equivilent to "0 PRECEDING/FOLLOWING".
|
||||
** This is optimized of course - branches that will never be taken and
|
||||
** conditions that are always true are omitted from the VM code. The only
|
||||
** exceptional case is:
|
||||
|
|
8
third_party/stb/stb_image.c
vendored
8
third_party/stb/stb_image.c
vendored
|
@ -194,7 +194,7 @@ static int stbi__mad2sizes_valid(int a, int b, int add) {
|
|||
return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add);
|
||||
}
|
||||
|
||||
// returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow
|
||||
// returns 1 if "a*b*c + add" has no negaive terms/factors and doesn't overflow
|
||||
static int stbi__mad3sizes_valid(int a, int b, int c, int add) {
|
||||
return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) &&
|
||||
stbi__addsizes_valid(a * b * c, add);
|
||||
|
@ -1251,7 +1251,7 @@ static void stbi__jpeg_reset(stbi__jpeg *j) {
|
|||
j->marker = STBI__MARKER_none;
|
||||
j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
|
||||
j->eob_run = 0;
|
||||
// no more than 1<<31 MCUs if no restart_interval? that's plenty safe,
|
||||
// no more than 1<<31 MCUs if no restart_interal? that's plenty safe,
|
||||
// since we don't even allow 1<<30 pixels
|
||||
}
|
||||
|
||||
|
@ -3728,13 +3728,13 @@ static unsigned char *stbi__gif_load_next(stbi__context *s, stbi__gif *g,
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// This is a non-disposal case either way, so just
|
||||
// This is a non-disposal case eithe way, so just
|
||||
// leave the pixels as is, and they will become the new background
|
||||
// 1: do not dispose
|
||||
// 0: not specified.
|
||||
}
|
||||
|
||||
// background is what out is after the undoing of the previous frame;
|
||||
// background is what out is after the undoing of the previou frame;
|
||||
memcpy(g->background, g->out, 4 * g->w * g->h);
|
||||
}
|
||||
|
||||
|
|
18
third_party/stb/stb_truetype.c
vendored
18
third_party/stb/stb_truetype.c
vendored
|
@ -2663,7 +2663,7 @@ static void stbtt__add_point(stbtt__point *points, int n, float x, float y)
|
|||
}
|
||||
|
||||
// tessellate until threshold p is happy... @TODO warped to compensate for non-linear stretching
|
||||
static int stbtt__tessellate_curve(stbtt__point *points, int *num_points,
|
||||
static int stbtt__tesselate_curve(stbtt__point *points, int *num_points,
|
||||
float x0, float y0, float x1, float y1,
|
||||
float x2, float y2,
|
||||
float objspace_flatness_squared, int n)
|
||||
|
@ -2677,8 +2677,8 @@ static int stbtt__tessellate_curve(stbtt__point *points, int *num_points,
|
|||
if (n > 16) // 65536 segments on one curve better be enough!
|
||||
return 1;
|
||||
if (dx*dx+dy*dy > objspace_flatness_squared) { // half-pixel error allowed... need to be smaller if AA
|
||||
stbtt__tessellate_curve(points, num_points, x0,y0, (x0+x1)/2.0f,(y0+y1)/2.0f, mx,my, objspace_flatness_squared,n+1);
|
||||
stbtt__tessellate_curve(points, num_points, mx,my, (x1+x2)/2.0f,(y1+y2)/2.0f, x2,y2, objspace_flatness_squared,n+1);
|
||||
stbtt__tesselate_curve(points, num_points, x0,y0, (x0+x1)/2.0f,(y0+y1)/2.0f, mx,my, objspace_flatness_squared,n+1);
|
||||
stbtt__tesselate_curve(points, num_points, mx,my, (x1+x2)/2.0f,(y1+y2)/2.0f, x2,y2, objspace_flatness_squared,n+1);
|
||||
} else {
|
||||
stbtt__add_point(points, *num_points,x2,y2);
|
||||
*num_points = *num_points+1;
|
||||
|
@ -2686,7 +2686,7 @@ static int stbtt__tessellate_curve(stbtt__point *points, int *num_points,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void stbtt__tessellate_cubic(stbtt__point *points, int *num_points,
|
||||
static void stbtt__tesselate_cubic(stbtt__point *points, int *num_points,
|
||||
float x0, float y0, float x1, float y1,
|
||||
float x2, float y2, float x3, float y3,
|
||||
float objspace_flatness_squared, int n)
|
||||
|
@ -2718,8 +2718,8 @@ static void stbtt__tessellate_cubic(stbtt__point *points, int *num_points,
|
|||
float yb = (y12+y23)/2;
|
||||
float mx = (xa+xb)/2;
|
||||
float my = (ya+yb)/2;
|
||||
stbtt__tessellate_cubic(points, num_points, x0,y0, x01,y01, xa,ya, mx,my, objspace_flatness_squared,n+1);
|
||||
stbtt__tessellate_cubic(points, num_points, mx,my, xb,yb, x23,y23, x3,y3, objspace_flatness_squared,n+1);
|
||||
stbtt__tesselate_cubic(points, num_points, x0,y0, x01,y01, xa,ya, mx,my, objspace_flatness_squared,n+1);
|
||||
stbtt__tesselate_cubic(points, num_points, mx,my, xb,yb, x23,y23, x3,y3, objspace_flatness_squared,n+1);
|
||||
} else {
|
||||
stbtt__add_point(points, *num_points,x3,y3);
|
||||
*num_points = *num_points+1;
|
||||
|
@ -2772,14 +2772,14 @@ static stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts,
|
|||
stbtt__add_point(points, num_points++, x, y);
|
||||
break;
|
||||
case STBTT_vcurve:
|
||||
stbtt__tessellate_curve(points, &num_points, x,y,
|
||||
stbtt__tesselate_curve(points, &num_points, x,y,
|
||||
vertices[i].cx, vertices[i].cy,
|
||||
vertices[i].x, vertices[i].y,
|
||||
objspace_flatness_squared, 0);
|
||||
x = vertices[i].x, y = vertices[i].y;
|
||||
break;
|
||||
case STBTT_vcubic:
|
||||
stbtt__tessellate_cubic(points, &num_points, x,y,
|
||||
stbtt__tesselate_cubic(points, &num_points, x,y,
|
||||
vertices[i].cx, vertices[i].cy,
|
||||
vertices[i].cx1, vertices[i].cy1,
|
||||
vertices[i].x, vertices[i].y,
|
||||
|
@ -3853,7 +3853,7 @@ unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale,
|
|||
float sy = (float) y + 0.5f;
|
||||
float x_gspace = (sx / scale_x);
|
||||
float y_gspace = (sy / scale_y);
|
||||
int winding = stbtt__compute_crossings_x(x_gspace, y_gspace, num_verts, verts); // @OPTIMIZE: this could just be a rasterization, but needs to be line vs. non-tessellated curves so a new path
|
||||
int winding = stbtt__compute_crossings_x(x_gspace, y_gspace, num_verts, verts); // @OPTIMIZE: this could just be a rasterization, but needs to be line vs. non-tesselated curves so a new path
|
||||
for (i=0; i < num_verts; ++i) {
|
||||
float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y;
|
||||
if (verts[i].type == STBTT_vline && precompute[i] != 0.0f) {
|
||||
|
|
2
third_party/stb/stb_vorbis.c
vendored
2
third_party/stb/stb_vorbis.c
vendored
|
@ -2517,7 +2517,7 @@ void inverse_mdct_naive(float *buffer, int n)
|
|||
// Note there are bugs in that pseudocode, presumably due to them attempting
|
||||
// to rename the arrays nicely rather than representing the way their actual
|
||||
// implementation bounces buffers back and forth. As a result, even in the
|
||||
// "some formulas corrected" version, a direct implementation fails. These
|
||||
// "some formulars corrected" version, a direct implementation fails. These
|
||||
// are noted below as "paper bug".
|
||||
|
||||
// copy and reflect spectral data
|
||||
|
|
2
third_party/tidy/entities.c
vendored
2
third_party/tidy/entities.c
vendored
|
@ -33,7 +33,7 @@ struct _entity
|
|||
/*
|
||||
** Issue #643 - list increased to
|
||||
** 2032 known entities.
|
||||
** Note also struct /not/ padded to
|
||||
** Note also stuct /not/ padded to
|
||||
** keep source weight down, 79K vs 149K,
|
||||
** and is strictly alphabetic to optimize
|
||||
** the searching.
|
||||
|
|
4
third_party/tidy/parser.c
vendored
4
third_party/tidy/parser.c
vendored
|
@ -4555,9 +4555,9 @@ Node* TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode)
|
|||
|
||||
/*
|
||||
This is basically what Tidy 04 August 2000 did and far more accurate
|
||||
with respect to browser behaviour than the code commented out above.
|
||||
with respect to browser behaivour than the code commented out above.
|
||||
Tidy could try to propagate the <pre> into each disallowed child where
|
||||
<pre> is allowed in order to replicate some browsers behaviour, but
|
||||
<pre> is allowed in order to replicate some browsers behaivour, but
|
||||
there are a lot of exceptions, e.g. Internet Explorer does not propagate
|
||||
<pre> into table cells while Mozilla does. Opera 6 never propagates
|
||||
<pre> into blocklevel elements while Opera 7 behaves much like Mozilla.
|
||||
|
|
2
third_party/unzip/api.c
vendored
2
third_party/unzip/api.c
vendored
|
@ -519,7 +519,7 @@ int close_redirect(__G)
|
|||
a wildcard to be meaningful
|
||||
pattern = string to search for
|
||||
cmd = 0 - case-insensitive search
|
||||
1 - case-sensitive search
|
||||
1 - case-sensitve search
|
||||
2 - case-insensitive, whole words only
|
||||
3 - case-sensitive, whole words only
|
||||
SkipBin = if true, skip any files that have control
|
||||
|
|
2
third_party/unzip/envargs.c
vendored
2
third_party/unzip/envargs.c
vendored
|
@ -168,7 +168,7 @@ int envargs(Pargc, Pargv, envstr, envstr2)
|
|||
/* finally, add a NULL after the last arg, like Unix */
|
||||
*argv = (char *)NULL;
|
||||
|
||||
/* save the values and return, indicating success */
|
||||
/* save the values and return, indicating succes */
|
||||
*Pargv = argvect;
|
||||
*Pargc = argc;
|
||||
|
||||
|
|
4
third_party/unzip/extract.c
vendored
4
third_party/unzip/extract.c
vendored
|
@ -887,7 +887,7 @@ int extract_or_test_files(__G) /* return PK-type error code */
|
|||
|
||||
if ((filnum == 0) && error_in_archive <= PK_WARN) {
|
||||
if (num_skipped > 0L)
|
||||
error_in_archive = IZ_UNSUP; /* unsupported. compression/encryption */
|
||||
error_in_archive = IZ_UNSUP; /* unsupport. compression/encryption */
|
||||
else
|
||||
error_in_archive = PK_FIND; /* no files found at all */
|
||||
}
|
||||
|
@ -3239,7 +3239,7 @@ char *fnfilter(raw, space, size) /* convert name to safely printable form */
|
|||
* appear in filenames by itself. The following default definition
|
||||
* sets the replacement char to a question mark as the most common
|
||||
* "single char wildcard"; this setting should be overridden in the
|
||||
* appropriate system-specific configuration header when needed.
|
||||
* appropiate system-specific configuration header when needed.
|
||||
*/
|
||||
# define UZ_FNFILTER_REPLACECHAR '?'
|
||||
#endif
|
||||
|
|
6
third_party/unzip/inflate.c
vendored
6
third_party/unzip/inflate.c
vendored
|
@ -207,7 +207,7 @@
|
|||
end-of-block. Note however that the static length tree defines
|
||||
288 codes just to fill out the Huffman codes. Codes 286 and 287
|
||||
cannot be used though, since there is no length base or extra bits
|
||||
defined for them. Similarly, there are up to 30 distance codes.
|
||||
defined for them. Similarily, there are up to 30 distance codes.
|
||||
However, static trees define 32 codes (all 5 bits) to fill out the
|
||||
Huffman codes, but the last two had better not show up in the data.
|
||||
7. Unzip can check dynamic Huffman blocks for complete code sets.
|
||||
|
@ -855,7 +855,7 @@ ZCONST unsigned near mask_bits[17] = {
|
|||
block. See the huft_build() routine.
|
||||
|
||||
Actually, the precautions mentioned above are not sufficient to
|
||||
prevent fetches of bits beyond the end of the last block in every
|
||||
prevent fetches of bits beyound the end of the last block in every
|
||||
case. When the last code fetched before the end-of-block code was
|
||||
a very short distance code (shorter than "distance-prefetch-bits" -
|
||||
"end-of-block code bits"), this last distance code fetch already
|
||||
|
@ -1351,7 +1351,7 @@ static int inflate_dynamic(__G)
|
|||
}
|
||||
#ifdef FIX_PAST_EOB_BY_TABLEADJUST
|
||||
/* Adjust the requested distance base table size so that a distance code
|
||||
fetch never tries to get bits behind an immediately following end-of-block
|
||||
fetch never tries to get bits behind an immediatly following end-of-block
|
||||
code. */
|
||||
bd = (dbits <= bl+1 ? dbits : bl+1);
|
||||
#else
|
||||
|
|
8
third_party/unzip/process.c
vendored
8
third_party/unzip/process.c
vendored
|
@ -304,8 +304,8 @@ int process_zipfiles(__G) /* return PK-type error code */
|
|||
#endif /* IZ_CHECK_TZ && USE_EF_UT_TIME */
|
||||
|
||||
/* For systems that do not have tzset() but supply this function using another
|
||||
name (_tzset() or something similar), an appropriate "#define tzset ..."
|
||||
should be added to the system specific configuration section. */
|
||||
name (_tzset() or something similar), an appropiate "#define tzset ..."
|
||||
should be added to the system specifc configuration section. */
|
||||
#if (!defined(T20_VMS) && !defined(MACOS) && !defined(RISCOS) && !defined(QDOS))
|
||||
#if (!defined(BSD) && !defined(MTS) && !defined(CMS_MVS) && !defined(TANDEM))
|
||||
tzset();
|
||||
|
@ -2784,7 +2784,7 @@ unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime,
|
|||
structure (provided the z_utim pointer is not NULL).
|
||||
If a IZUNIX2 block is found or the IZUNIX block contains UID/GID fields,
|
||||
and the z_uidgid array pointer is valid (!= NULL), the owner info is
|
||||
transferred as well.
|
||||
transfered as well.
|
||||
The presence of an EF_TIME or EF_IZUNIX2 block results in ignoring all
|
||||
data from probably present obsolete EF_IZUNIX blocks.
|
||||
If multiple blocks of the same type are found, only the information from
|
||||
|
@ -3052,7 +3052,7 @@ unsigned ef_scan_for_izux(ef_buf, ef_len, ef_is_c, dos_mdatetime,
|
|||
? (dos_mdatetime == DOSTIME_MINIMUM)
|
||||
: (dos_mdatetime >= DOSTIME_2038_01_18);
|
||||
if (!ut_zip_unzip_compatible) {
|
||||
/* UnZip interprets mtime differently than Zip;
|
||||
/* UnZip interpretes mtime differently than Zip;
|
||||
without modtime: ignore complete UT field */
|
||||
flags &= ~0x0ff; /* no time_t times available */
|
||||
TTrace((stderr,
|
||||
|
|
2
third_party/unzip/unix.c
vendored
2
third_party/unzip/unix.c
vendored
|
@ -1994,7 +1994,7 @@ void init_conversion_charsets()
|
|||
|
||||
/* Convert a string from one encoding to the current locale using iconv().
|
||||
* Be as non-intrusive as possible. If error is encountered during
|
||||
* conversion just leave the string intact. */
|
||||
* convertion just leave the string intact. */
|
||||
static void charset_to_intern(char *string, char *from_charset)
|
||||
{
|
||||
iconv_t cd;
|
||||
|
|
4
third_party/unzip/unix/Makefile
vendored
4
third_party/unzip/unix/Makefile
vendored
|
@ -888,12 +888,12 @@ linux_shlibz: unix_make
|
|||
lynx: unix_make
|
||||
$(MAKE) unzips CC=gcc CF="$(CF) -DLynx -DLYNX -DBSD -DUNIX"
|
||||
|
||||
# Macintosh MacOS X (Unix-compatible environment), using standard compiler
|
||||
# Macintosh MacOS X (Unix-compatible enviroment), using standard compiler
|
||||
macosx: unix_make
|
||||
$(MAKE) unzips CFLAGS="-O3 -Wall -DBSD" LF2=""
|
||||
$(STRIP) $(UNZIPS)
|
||||
|
||||
# Macintosh MacOS X (Unix-compatible environment), using gcc
|
||||
# Macintosh MacOS X (Unix-compatible enviroment), using gcc
|
||||
macosx_gcc: unix_make
|
||||
$(MAKE) unzips CC=gcc CFLAGS="-O3 -Wall -DBSD" LF2=""
|
||||
$(STRIP) $(UNZIPS)
|
||||
|
|
2
third_party/unzip/unix/Packaging/postinstall
vendored
2
third_party/unzip/unix/Packaging/postinstall
vendored
|
@ -5,7 +5,7 @@
|
|||
echo " "
|
||||
echo " "
|
||||
echo "Installation is complete. Now, you should add the following"
|
||||
echo "(or equivalent) commands to the appropriate initial user shell"
|
||||
echo "(or equivalnet) commands to the appropriate initial user shell"
|
||||
echo "scripts (such as .profile, .login, etc) -- "
|
||||
echo " "
|
||||
echo " For korn or bourne shell:"
|
||||
|
|
2
third_party/unzip/unzip.c
vendored
2
third_party/unzip/unzip.c
vendored
|
@ -4832,7 +4832,7 @@ unsigned long get_option(__G__ option_group, pargs, argc, argnum, optchar, value
|
|||
|
||||
} else if (allow_arg_files && arg[0] == '@') {
|
||||
/* arg file */
|
||||
oERR(PK_PARAMS, no_arg_files_err);
|
||||
oERR(PK_PARMS, no_arg_files_err);
|
||||
#endif
|
||||
|
||||
} else {
|
||||
|
|
30
third_party/zip/fileio.c
vendored
30
third_party/zip/fileio.c
vendored
|
@ -645,7 +645,7 @@ int newnamew(namew, isdir, casesensitive)
|
|||
int save_dosify = dosify, save_pathput = pathput;
|
||||
dosify = 0;
|
||||
pathput = 1;
|
||||
/* zname is temporarily mis-used as "undosmode" iname pointer */
|
||||
/* zname is temporarly mis-used as "undosmode" iname pointer */
|
||||
if ((znamew = ex2inw(namew, isdir, NULL)) != NULL) {
|
||||
undosmw = in2exw(znamew);
|
||||
free(znamew);
|
||||
|
@ -2757,7 +2757,7 @@ size_t bfwrite(buffer, size, count, mode)
|
|||
the provided buffer length. If the returned value is less than the
|
||||
buffer length, then the contents of the buffer will be null-terminated;
|
||||
otherwise, it will not be terminated and may be invalid, possibly
|
||||
stopping in the middle of a multi-byte sequence.
|
||||
stopping in the middle of a multibyte sequence.
|
||||
|
||||
In all cases you may pass NULL as the buffer and/or 0 as the length, if
|
||||
you just want to learn how much space the string is going to require.
|
||||
|
@ -2830,7 +2830,7 @@ long ucs4_char_from_utf8(utf8)
|
|||
if (bytes == 1)
|
||||
ret = **utf8; /* ascii-7 */
|
||||
else
|
||||
ret = **utf8 & (0x7F >> bytes); /* lead byte of a multi-byte sequence */
|
||||
ret = **utf8 & (0x7F >> bytes); /* lead byte of a multibyte sequence */
|
||||
(*utf8)++;
|
||||
for (t = 1; t < bytes; t++) /* consume trailing bytes */
|
||||
ret = (ret << 6) | (*((*utf8)++) & 0x3F);
|
||||
|
@ -3537,17 +3537,17 @@ zwchar *utf8_to_wide_string(utf8_string)
|
|||
#define oERR(err,message) ZIPERR(err, (char *) message)
|
||||
|
||||
|
||||
/* Although the below provides some support for multi-byte characters
|
||||
/* Although the below provides some support for multibyte characters
|
||||
the proper thing to do may be to use wide characters and support
|
||||
Unicode. May get to it soon. EG
|
||||
*/
|
||||
|
||||
/* For now stay with multi-byte characters. May support wide characters
|
||||
/* For now stay with muti-byte characters. May support wide characters
|
||||
in Zip 3.1.
|
||||
*/
|
||||
|
||||
/* multi-byte character set support
|
||||
multi-byte characters use typically two or more sequential bytes
|
||||
/* multibyte character set support
|
||||
Multibyte characters use typically two or more sequential bytes
|
||||
to represent additional characters than can fit in a single byte
|
||||
character set. The code used here is based on the ANSI mblen function. */
|
||||
#ifdef MULTIBYTE_GETOPTNS
|
||||
|
@ -3555,7 +3555,7 @@ zwchar *utf8_to_wide_string(utf8_string)
|
|||
ZCONST char *ptr;
|
||||
{
|
||||
/* return the number of bytes that the char pointed to is. Return 1 if
|
||||
null character or error like not start of valid multi-byte character. */
|
||||
null character or error like not start of valid multibyte character. */
|
||||
int cl;
|
||||
|
||||
cl = mblen(ptr, MB_CUR_MAX);
|
||||
|
@ -3578,8 +3578,8 @@ zwchar *utf8_to_wide_string(utf8_string)
|
|||
# define MULTIBYTE_GETOPTNS
|
||||
# endif
|
||||
# endif
|
||||
/* multi-byte character set support
|
||||
multi-byte characters use typically two or more sequential bytes
|
||||
/* multibyte character set support
|
||||
Multibyte characters use typically two or more sequential bytes
|
||||
to represent additional characters than can fit in a single byte
|
||||
character set. The code used here is based on the ANSI mblen function. */
|
||||
# ifdef MULTIBYTE_GETOPTNS
|
||||
|
@ -3588,7 +3588,7 @@ zwchar *utf8_to_wide_string(utf8_string)
|
|||
ZCONST char *ptr;
|
||||
{
|
||||
/* return the number of bytes that the char pointed to is. Return 1 if
|
||||
null character or error like not start of valid multi-byte character. */
|
||||
null character or error like not start of valid multibyte character. */
|
||||
int cl;
|
||||
|
||||
cl = mblen(ptr, MB_CUR_MAX);
|
||||
|
@ -3636,7 +3636,7 @@ static ZCONST char Far op_req_val_err[] = "option %s requires a value";
|
|||
static ZCONST char Far op_no_allow_val_err[] = "option %s does not allow a value";
|
||||
static ZCONST char Far sh_op_not_sup_err[] = "short option '%c' not supported";
|
||||
static ZCONST char Far oco_req_val_err[] = "option %s requires one character value";
|
||||
static ZCONST char Far oco_no_mbc_err[] = "option %s does not support multi-byte values";
|
||||
static ZCONST char Far oco_no_mbc_err[] = "option %s does not support multibyte values";
|
||||
static ZCONST char Far num_req_val_err[] = "option %s requires number value";
|
||||
static ZCONST char Far long_op_ambig_err[] = "long option '%s' ambiguous";
|
||||
static ZCONST char Far long_op_not_sup_err[] = "long option '%s' not supported";
|
||||
|
@ -3940,7 +3940,7 @@ local unsigned long get_shortopt(args, argnum, optchar, negated, value,
|
|||
if (arg[(*optchar) + clen]) {
|
||||
/* has value */
|
||||
if (MB_CLEN(arg + (*optchar) + clen) > 1) {
|
||||
/* multi-byte value not allowed for now */
|
||||
/* multibyte value not allowed for now */
|
||||
optionerr(optionerrbuf, oco_no_mbc_err, match, 0);
|
||||
if (depth > 0) {
|
||||
/* unwind */
|
||||
|
@ -4364,7 +4364,7 @@ local unsigned long get_longopt(args, argnum, optchar, negated, value,
|
|||
* -e=
|
||||
* Either optional or required values can be specified. Optional values
|
||||
* now use both forms as ignoring the later got confusing. Any
|
||||
* non-value short options can precede a valued short option as in
|
||||
* non-value short options can preceed a valued short option as in
|
||||
* -abevalue
|
||||
* Some value types (one_char and number) allow options after the value
|
||||
* so if oc is an option that takes a character and n takes a number
|
||||
|
@ -4406,7 +4406,7 @@ local unsigned long get_longopt(args, argnum, optchar, negated, value,
|
|||
* -o value1 value2 value3 ...
|
||||
* for a list of values. The list ends at the next option, the
|
||||
* end of the command line, or at a single "@" argument.
|
||||
* Each value is treated as if it was preceded by the option, so
|
||||
* Each value is treated as if it was preceeded by the option, so
|
||||
* --option1 val1 val2
|
||||
* with option1 value_type set to o_VALUE_LIST is the same as
|
||||
* --option1=val1 --option1=val2
|
||||
|
|
2
third_party/zip/globals.c
vendored
2
third_party/zip/globals.c
vendored
|
@ -73,7 +73,7 @@ uzoff_t des_usize = 0; /* Data descriptor usize */
|
|||
|
||||
/* dots 10/20/04 */
|
||||
zoff_t dot_size = 0; /* bytes processed in deflate per dot, 0 = no dots */
|
||||
zoff_t dot_count = 0; /* buffers seen, recycles at dot_size */
|
||||
zoff_t dot_count = 0; /* buffers seen, recyles at dot_size */
|
||||
/* status 10/30/04 */
|
||||
int display_counts = 0; /* display running file count */
|
||||
int display_bytes = 0; /* display running bytes remaining */
|
||||
|
|
4
third_party/zip/tailor.h
vendored
4
third_party/zip/tailor.h
vendored
|
@ -20,7 +20,7 @@
|
|||
# undef FORCE_UNIX_OVER_WIN32
|
||||
# endif
|
||||
# ifdef FORCE_WIN32_OVER_UNIX
|
||||
/* native Win32 support was explicitly requested... */
|
||||
/* native Win32 support was explicitely requested... */
|
||||
# undef UNIX
|
||||
# else
|
||||
/* use the POSIX (Unix) emulation features by default... */
|
||||
|
@ -122,7 +122,7 @@
|
|||
|
||||
/*
|
||||
* Some compiler environments may require additional attributes attached
|
||||
* to declarations of runtime library functions (e.g. to prepare for
|
||||
* to declarations of runtime libary functions (e.g. to prepare for
|
||||
* linking against a "shared dll" version of the RTL). Here, we provide
|
||||
* the "empty" default for these attributes.
|
||||
*/
|
||||
|
|
2
third_party/zip/trees.c
vendored
2
third_party/zip/trees.c
vendored
|
@ -1409,7 +1409,7 @@ local void bi_windup()
|
|||
*
|
||||
* The problem results in the zip file having bad data and so a bad CRC.
|
||||
* This does not happen often and to recreate the problem a large file
|
||||
* with non-compressible data is needed so that deflate chooses to store the
|
||||
* with non-compressable data is needed so that deflate chooses to store the
|
||||
* data. A test file of 400 MB seems large enough to recreate the problem
|
||||
* using a command such as
|
||||
* zip -1 -e crcerror.zip testfile.dat
|
||||
|
|
2
third_party/zip/util.c
vendored
2
third_party/zip/util.c
vendored
|
@ -894,7 +894,7 @@ void expand_args(argcp, argvp)
|
|||
{
|
||||
#ifdef DOS
|
||||
|
||||
/* Do NEVER include (re)definition of `environ' variable with any version
|
||||
/* Do NEVER include (re)definiton of `environ' variable with any version
|
||||
of MSC or BORLAND/Turbo C. These compilers supply an incompatible
|
||||
definition in <stdlib.h>. */
|
||||
#if defined(__GO32__) || defined(__EMX__)
|
||||
|
|
4
third_party/zip/zip.c
vendored
4
third_party/zip/zip.c
vendored
|
@ -2259,7 +2259,7 @@ char **argv; /* command line tokens */
|
|||
des_usize = 0; /* Data descriptor usize */
|
||||
|
||||
dot_size = 0; /* buffers processed in deflate per dot, 0 = no dots */
|
||||
dot_count = 0; /* buffers seen, recycles at dot_size */
|
||||
dot_count = 0; /* buffers seen, recyles at dot_size */
|
||||
|
||||
display_counts = 0; /* display running file count */
|
||||
display_bytes = 0; /* display running bytes remaining */
|
||||
|
@ -2455,7 +2455,7 @@ char **argv; /* command line tokens */
|
|||
#endif /* IZ_CHECK_TZ && USE_EF_UT_TIME */
|
||||
|
||||
/* For systems that do not have tzset() but supply this function using another
|
||||
name (_tzset() or something similar), an appropriate "#define tzset ..."
|
||||
name (_tzset() or something similar), an appropiate "#define tzset ..."
|
||||
should be added to the system specifc configuration section. */
|
||||
#if (!defined(TOPS20) && !defined(VMS))
|
||||
#if (!defined(RISCOS) && !defined(MACOS) && !defined(QDOS))
|
||||
|
|
2
third_party/zip/zip.h
vendored
2
third_party/zip/zip.h
vendored
|
@ -278,7 +278,7 @@ extern int translate_eol; /* Translate end-of-line LF -> CR LF */
|
|||
extern int vms_case_2; /* ODS2 file name case in VMS. -1: down. */
|
||||
extern int vms_case_5; /* ODS5 file name case in VMS. +1: preserve. */
|
||||
|
||||
/* Accommodation for /NAMES = AS_IS with old header files. */
|
||||
/* Accomodation for /NAMES = AS_IS with old header files. */
|
||||
# define cma$tis_errno_get_addr CMA$TIS_ERRNO_GET_ADDR
|
||||
# define lib$establish LIB$ESTABLISH
|
||||
# define lib$get_foreign LIB$GET_FOREIGN
|
||||
|
|
2
third_party/zip/ziperr.h
vendored
2
third_party/zip/ziperr.h
vendored
|
@ -88,7 +88,7 @@ struct
|
|||
/* 13 */ { "NAME", "Missing or empty zip file", ZE_S_ERROR },
|
||||
/* 14 */ { "WRITE", "Output file write failure", ZE_S_SEVERE | ZE_S_PERR },
|
||||
/* 15 */ { "CREAT", "Could not create output file", ZE_S_SEVERE | ZE_S_PERR },
|
||||
/* 16 */ { "PARAMS", "Invalid command arguments", ZE_S_ERROR },
|
||||
/* 16 */ { "PARMS", "Invalid command arguments", ZE_S_ERROR },
|
||||
/* 17 */ { "", "", ZE_S_UNUSED },
|
||||
/* 18 */ { "OPEN", "File not found or no read permission",
|
||||
ZE_S_ERROR | ZE_S_PERR },
|
||||
|
|
8
third_party/zip/zipfile.c
vendored
8
third_party/zip/zipfile.c
vendored
|
@ -1777,12 +1777,12 @@ struct zlist far *z;
|
|||
}
|
||||
|
||||
if ((fix == 2) && (z->flg != z->lflg))
|
||||
/* The comparison between central and local version of the
|
||||
/* The comparision between central and local version of the
|
||||
"general purpose bit flag" cannot be used from scanzipf_regnew(),
|
||||
because in the "regular" zipfile processing, the local header reads
|
||||
have been postponed until the actual entry processing takes place.
|
||||
They have not yet been read when "zipoddities()" is called.
|
||||
This change was necessary to support multivolume archives.
|
||||
This change was neccessary to support multivolume archives.
|
||||
*/
|
||||
{
|
||||
sprintf(errbuf, "local flags = 0x%04x, central = 0x%04x: ",
|
||||
|
@ -3959,7 +3959,7 @@ local int scanzipf_fixnew()
|
|||
/* New regular scan */
|
||||
|
||||
/*
|
||||
* scanzipf_regnew is similar to the original scanzipf_reg in that it
|
||||
* scanzipf_regnew is similar to the orignal scanzipf_reg in that it
|
||||
* reads the end of the archive and goes from there. Unlike that
|
||||
* scan this one stops after reading the central directory and does
|
||||
* not read the local headers. After the directory scan for new
|
||||
|
@ -5280,7 +5280,7 @@ int putlocal(z, rewrite)
|
|||
|
||||
This assumes that for large entries the compressed size won't need a
|
||||
Zip64 extra field if the uncompressed size did not. This assumption should
|
||||
only fail for a large file of nearly totally uncompressible data.
|
||||
only fail for a large file of nearly totally uncompressable data.
|
||||
|
||||
If streaming stdin in and use_descriptors is set then always create a Zip64
|
||||
extra field flagging the data descriptor as being in Zip64 format. This is
|
||||
|
|
2
third_party/zip/zipnote.c
vendored
2
third_party/zip/zipnote.c
vendored
|
@ -365,7 +365,7 @@ extent size;
|
|||
local int catalloc(a, s)
|
||||
char * far *a; /* pointer to a pointer to a malloc'ed string */
|
||||
char *s; /* string to concatenate on a */
|
||||
/* Concatenate the string s to the malloc'ed string pointed to by a.
|
||||
/* Concatentate the string s to the malloc'ed string pointed to by a.
|
||||
Preprocess s by removing backslash escape characters. */
|
||||
{
|
||||
char *p; /* temporary pointer */
|
||||
|
|
2
third_party/zip/zipup.c
vendored
2
third_party/zip/zipup.c
vendored
|
@ -166,7 +166,7 @@ int percent(n, m)
|
|||
|
||||
/* 2004-12-01 SMS.
|
||||
* Changed to do big-n test only for small zoff_t.
|
||||
* Changed big-n arithmetic to accommodate apparently negative values
|
||||
* Changed big-n arithmetic to accomodate apparently negative values
|
||||
* when a small zoff_t value exceeds 2G.
|
||||
* Increased the reduction divisor from 256 to 512 to avoid the sign bit
|
||||
* in a reduced intermediate, allowing signed arithmetic for the final
|
||||
|
|
2
third_party/zlib/deflate.c
vendored
2
third_party/zlib/deflate.c
vendored
|
@ -1393,7 +1393,7 @@ static void check_match(struct DeflateState *s, IPos start, IPos match,
|
|||
*
|
||||
* deflate_stored() is written to minimize the number of times an input
|
||||
* byte is copied. It is most efficient with large input and output
|
||||
* buffers, which maximizes the opportunities to have a single copy from
|
||||
* buffers, which maximizes the opportunites to have a single copy from
|
||||
* next_in to next_out.
|
||||
*/
|
||||
static block_state deflate_stored(struct DeflateState *s, int flush) {
|
||||
|
|
2
third_party/zlib/inftrees.internal.h
vendored
2
third_party/zlib/inftrees.internal.h
vendored
|
@ -9,7 +9,7 @@
|
|||
/* Maximum size of the dynamic table. The maximum number of code structures is
|
||||
1444, which is the sum of 852 for literal/length codes and 592 for distance
|
||||
codes. These values were found by exhaustive searches using the program
|
||||
examples/enough.c found in the zlib distribution. The arguments to that
|
||||
examples/enough.c found in the zlib distribtution. The arguments to that
|
||||
program are the number of symbols, the initial root table size, and the
|
||||
maximum bit length of a code. "enough 286 9 15" for literal/length codes
|
||||
returns returns 852, and "enough 30 6 15" for distance codes returns 592.
|
||||
|
|
4
third_party/zlib/puff.c
vendored
4
third_party/zlib/puff.c
vendored
|
@ -52,7 +52,7 @@ asm(".include \"libc/disclaimer.inc\"");
|
|||
* - Use pointers instead of long to specify source and
|
||||
* destination sizes to avoid arbitrary 4 GB limits
|
||||
* 1.2 17 Mar 2002 - Add faster version of decode(), doubles speed (!),
|
||||
* but leave simple version for readability
|
||||
* but leave simple version for readabilty
|
||||
* - Make sure invalid distances detected if pointers
|
||||
* are 16 bits
|
||||
* - Fix fixed codes table error
|
||||
|
@ -599,7 +599,7 @@ static int fixed(struct state *s) {
|
|||
* are themselves compressed using Huffman codes and run-length encoding. In
|
||||
* the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
|
||||
* that length, and the symbols 16, 17, and 18 are run-length instructions.
|
||||
* Each of 16, 17, and 18 are followed by extra bits to define the length of
|
||||
* Each of 16, 17, and 18 are follwed by extra bits to define the length of
|
||||
* the run. 16 copies the last length 3 to 6 times. 17 represents 3 to 10
|
||||
* zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols
|
||||
* are common, hence the special coding for zero lengths.
|
||||
|
|
2
third_party/zlib/trees.c
vendored
2
third_party/zlib/trees.c
vendored
|
@ -272,7 +272,7 @@ static void tr_static_init(void) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Generate the file trees.h describing the static trees.
|
||||
* Genererate the file trees.h describing the static trees.
|
||||
*/
|
||||
#ifdef GEN_TREES_H
|
||||
|
||||
|
|
6
third_party/zlib/zlib.h
vendored
6
third_party/zlib/zlib.h
vendored
|
@ -636,7 +636,7 @@ int deflateSetDictionary(z_streamp strm, const Bytef *dictionary,
|
|||
* to dictionary. dictionary must have enough space, where 32768 bytes is
|
||||
* always enough. If deflateGetDictionary() is called with dictionary equal to
|
||||
* Z_NULL, then only the dictionary length is returned, and nothing is copied.
|
||||
* Similarly, if dictLength is Z_NULL, then it is not set.
|
||||
* Similary, if dictLength is Z_NULL, then it is not set.
|
||||
*
|
||||
* deflateGetDictionary() may return a length less than the window size, even
|
||||
* when more than the window size in input has been provided. It may return up
|
||||
|
@ -881,7 +881,7 @@ int inflateSetDictionary(z_streamp strm, const Bytef *dictionary,
|
|||
* to dictionary. dictionary must have enough space, where 32768 bytes is
|
||||
* always enough. If inflateGetDictionary() is called with dictionary equal to
|
||||
* Z_NULL, then only the dictionary length is returned, and nothing is copied.
|
||||
* Similarly, if dictLength is Z_NULL, then it is not set.
|
||||
* Similary, if dictLength is Z_NULL, then it is not set.
|
||||
*
|
||||
* @return Z_OK on success, or Z_STREAM_ERROR if the stream state is
|
||||
* inconsistent.
|
||||
|
@ -1411,7 +1411,7 @@ int gzread(gzFile file, voidp buf, unsigned len);
|
|||
* provided, but could be inferred from the result of gztell(). This behavior
|
||||
* is the same as the behavior of fread() implementations in common libraries,
|
||||
* but it prevents the direct use of gzfread() to read a concurrently written
|
||||
* file, resetting and retrying on end-of-file, when size is not 1.
|
||||
* file, reseting and retrying on end-of-file, when size is not 1.
|
||||
*/
|
||||
size_t gzfread(voidp buf, size_t size, size_t nitems, gzFile file);
|
||||
|
||||
|
|
Loading…
Reference in a new issue