mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-24 23:09:02 +00:00
WIP: Correct all typos (#498)
This commit is contained in:
parent
98254a7c1f
commit
ed205e98a1
79 changed files with 162 additions and 162 deletions
|
@ -51,7 +51,7 @@
|
||||||
.previous
|
.previous
|
||||||
.section .rodata,"a",@progbits
|
.section .rodata,"a",@progbits
|
||||||
.align __SIZEOF_POINTER__
|
.align __SIZEOF_POINTER__
|
||||||
__ro: .endobj __ro,globl,hidden # ←for gdb readibility
|
__ro: .endobj __ro,globl,hidden # ←for gdb readability
|
||||||
.previous
|
.previous
|
||||||
.section .data,"aw",@progbits
|
.section .data,"aw",@progbits
|
||||||
.align __SIZEOF_POINTER__
|
.align __SIZEOF_POINTER__
|
||||||
|
@ -60,7 +60,7 @@ __ro: .endobj __ro,globl,hidden # ←for gdb readibility
|
||||||
.align __SIZEOF_POINTER__
|
.align __SIZEOF_POINTER__
|
||||||
.previous
|
.previous
|
||||||
.section .rodata.str1.1,"a",@progbits
|
.section .rodata.str1.1,"a",@progbits
|
||||||
cstr: .endobj cstr,globl,hidden # ←for gdb readibility
|
cstr: .endobj cstr,globl,hidden # ←for gdb readability
|
||||||
.previous
|
.previous
|
||||||
.section .head,"ax",@progbits
|
.section .head,"ax",@progbits
|
||||||
|
|
||||||
|
|
10
ape/loader.c
10
ape/loader.c
|
@ -562,11 +562,11 @@ __attribute__((__noreturn__)) static void Spawn(int os, const char *exe, int fd,
|
||||||
"xor\t%%r9d,%%r9d\n\t"
|
"xor\t%%r9d,%%r9d\n\t"
|
||||||
"xor\t%%r10d,%%r10d\n\t"
|
"xor\t%%r10d,%%r10d\n\t"
|
||||||
"xor\t%%r11d,%%r11d\n\t"
|
"xor\t%%r11d,%%r11d\n\t"
|
||||||
"xor\t%%ebx,%%ebx\n\t" // netbsd dosen't clear this
|
"xor\t%%ebx,%%ebx\n\t" // netbsd doesnt't clear this
|
||||||
"xor\t%%r12d,%%r12d\n\t" // netbsd dosen't clear this
|
"xor\t%%r12d,%%r12d\n\t" // netbsd doesnt't clear this
|
||||||
"xor\t%%r13d,%%r13d\n\t" // netbsd dosen't clear this
|
"xor\t%%r13d,%%r13d\n\t" // netbsd doesnt't clear this
|
||||||
"xor\t%%r14d,%%r14d\n\t" // netbsd dosen't clear this
|
"xor\t%%r14d,%%r14d\n\t" // netbsd doesnt't clear this
|
||||||
"xor\t%%r15d,%%r15d\n\t" // netbsd dosen't clear this
|
"xor\t%%r15d,%%r15d\n\t" // netbsd doesnt't clear this
|
||||||
"mov\t%%rdx,%%rsp\n\t"
|
"mov\t%%rdx,%%rsp\n\t"
|
||||||
"xor\t%%edx,%%edx\n\t"
|
"xor\t%%edx,%%edx\n\t"
|
||||||
"push\t%%rsi\n\t"
|
"push\t%%rsi\n\t"
|
||||||
|
|
|
@ -96,7 +96,7 @@ plm_t *plm_create_with_buffer(plm_buffer_t *buffer, int destroy_when_done) {
|
||||||
|
|
||||||
// In theory we should check plm_demux_get_num_video_streams() and
|
// In theory we should check plm_demux_get_num_video_streams() and
|
||||||
// plm_demux_get_num_audio_streams() here, but older files typically
|
// plm_demux_get_num_audio_streams() here, but older files typically
|
||||||
// do not specify these correcly. So we just assume we have a video and
|
// do not specify these correctly. So we just assume we have a video and
|
||||||
// audio stream and create the decoders.
|
// audio stream and create the decoders.
|
||||||
|
|
||||||
self->video_packet_type = PLM_DEMUX_PACKET_VIDEO_1;
|
self->video_packet_type = PLM_DEMUX_PACKET_VIDEO_1;
|
||||||
|
|
|
@ -40,7 +40,7 @@ asm(".include \"libc/disclaimer.inc\"");
|
||||||
* @see YCbCr2RGB() in tool/viz/lib/ycbcr2rgb.c
|
* @see YCbCr2RGB() in tool/viz/lib/ycbcr2rgb.c
|
||||||
*/
|
*/
|
||||||
void plm_frame_to_rgb(plm_frame_t *frame, uint8_t *rgb) {
|
void plm_frame_to_rgb(plm_frame_t *frame, uint8_t *rgb) {
|
||||||
// Chroma values are the same for each block of 4 pixels, so we proccess
|
// Chroma values are the same for each block of 4 pixels, so we process
|
||||||
// 2 lines at a time, 2 neighboring pixels each.
|
// 2 lines at a time, 2 neighboring pixels each.
|
||||||
int w = frame->y.width, w2 = w >> 1;
|
int w = frame->y.width, w2 = w >> 1;
|
||||||
int y_index1 = 0, y_index2 = w, y_next_2_lines = w + (w - frame->width);
|
int y_index1 = 0, y_index2 = w, y_next_2_lines = w + (w - frame->width);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "libc/log/log.h"
|
#include "libc/log/log.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Automatically launchs GDB Debugger TUI during crash.
|
* Automatically launches GDB Debugger TUI during crash.
|
||||||
*
|
*
|
||||||
* Run the following inside a terminal:
|
* Run the following inside a terminal:
|
||||||
*
|
*
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
*
|
*
|
||||||
* On supported platforms, this will cause GDB to automatically attach.
|
* On supported platforms, this will cause GDB to automatically attach.
|
||||||
* The nice thing about this, is you can start stepping through your
|
* The nice thing about this, is you can start stepping through your
|
||||||
* code at the precice instruction where the interrupt happened. See
|
* code at the precise instruction where the interrupt happened. See
|
||||||
* `libc/log/attachdebugger.c` to see how it works.
|
* `libc/log/attachdebugger.c` to see how it works.
|
||||||
*
|
*
|
||||||
* If you wish to suppress the auto-GDB behavior, then:
|
* If you wish to suppress the auto-GDB behavior, then:
|
||||||
|
|
|
@ -539,7 +539,7 @@ void editorUpdateSyntax(erow *row) {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Propagate syntax change to the next row if the open commen
|
/* Propagate syntax change to the next row if the open comment
|
||||||
* state changed. This may recursively affect all the following rows
|
* state changed. This may recursively affect all the following rows
|
||||||
* in the file. */
|
* in the file. */
|
||||||
int oc = editorRowHasOpenComment(row);
|
int oc = editorRowHasOpenComment(row);
|
||||||
|
@ -745,7 +745,7 @@ void editorInsertChar(int c) {
|
||||||
erow *row = (filerow >= E.numrows) ? NULL : &E.row[filerow];
|
erow *row = (filerow >= E.numrows) ? NULL : &E.row[filerow];
|
||||||
|
|
||||||
/* If the row where the cursor is currently located does not exist in our
|
/* If the row where the cursor is currently located does not exist in our
|
||||||
* logical representaion of the file, add enough empty rows as needed. */
|
* logical representation of the file, add enough empty rows as needed. */
|
||||||
if (!row) {
|
if (!row) {
|
||||||
while (E.numrows <= filerow) editorInsertRow(E.numrows, "", 0);
|
while (E.numrows <= filerow) editorInsertRow(E.numrows, "", 0);
|
||||||
}
|
}
|
||||||
|
@ -920,7 +920,7 @@ void editorRefreshScreen(void) {
|
||||||
char welcome[80];
|
char welcome[80];
|
||||||
int welcomelen =
|
int welcomelen =
|
||||||
snprintf(welcome, sizeof(welcome),
|
snprintf(welcome, sizeof(welcome),
|
||||||
"Kilo editor -- verison %s\e[0K\r\n", KILO_VERSION);
|
"Kilo editor -- version %s\e[0K\r\n", KILO_VERSION);
|
||||||
int padding = (E.screencols - welcomelen) / 2;
|
int padding = (E.screencols - welcomelen) / 2;
|
||||||
if (padding) {
|
if (padding) {
|
||||||
abAppend(&ab, "~", 1);
|
abAppend(&ab, "~", 1);
|
||||||
|
|
|
@ -41,7 +41,7 @@ EXAMPLES_PACKAGE_LIB_A = o/$(MODE)/examples/package/lib/lib.a
|
||||||
EXAMPLES_PACKAGE_LIB_ARTIFACTS += EXAMPLES_PACKAGE_LIB_A
|
EXAMPLES_PACKAGE_LIB_ARTIFACTS += EXAMPLES_PACKAGE_LIB_A
|
||||||
|
|
||||||
# Build configs might seem somewhat complicated. Rest assured they're
|
# Build configs might seem somewhat complicated. Rest assured they're
|
||||||
# mostly maintainence free. That's largely thanks to how we wildcard.
|
# mostly maintenance free. That's largely thanks to how we wildcard.
|
||||||
EXAMPLES_PACKAGE_LIB_A_FILES := $(wildcard examples/package/lib/*)
|
EXAMPLES_PACKAGE_LIB_A_FILES := $(wildcard examples/package/lib/*)
|
||||||
EXAMPLES_PACKAGE_LIB_A_HDRS = $(filter %.h,$(EXAMPLES_PACKAGE_LIB_A_FILES))
|
EXAMPLES_PACKAGE_LIB_A_HDRS = $(filter %.h,$(EXAMPLES_PACKAGE_LIB_A_FILES))
|
||||||
|
|
||||||
|
|
|
@ -676,7 +676,7 @@ struct redirtab {
|
||||||
* We enclose jmp_buf in a structure so that we can declare pointers to
|
* We enclose jmp_buf in a structure so that we can declare pointers to
|
||||||
* jump locations. The global variable handler contains the location to
|
* jump locations. The global variable handler contains the location to
|
||||||
* jump to when an exception occurs, and the global variable exception
|
* jump to when an exception occurs, and the global variable exception
|
||||||
* contains a code identifying the exeception. To implement nested
|
* contains a code identifying the exception. To implement nested
|
||||||
* exception handlers, the user should save the value of handler on
|
* exception handlers, the user should save the value of handler on
|
||||||
* entry to an inner scope, set handler to point to a jmploc structure
|
* entry to an inner scope, set handler to point to a jmploc structure
|
||||||
* for the inner scope, and restore handler on exit from the scope.
|
* for the inner scope, and restore handler on exit from the scope.
|
||||||
|
@ -1953,7 +1953,7 @@ wontreturn static void varunset(const char *end, const char *var_, const char *u
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert a string into an integer of type int64. Alow trailing spaces.
|
* Convert a string into an integer of type int64. Allow trailing spaces.
|
||||||
*/
|
*/
|
||||||
static int64_t atomax(const char *s, int base) {
|
static int64_t atomax(const char *s, int base) {
|
||||||
char *p;
|
char *p;
|
||||||
|
@ -6653,7 +6653,7 @@ static struct job *vforkexec(union node *n, char **argv, const char *path, int i
|
||||||
* the interactive program catches interrupts, the user doesn't want
|
* the interactive program catches interrupts, the user doesn't want
|
||||||
* these interrupts to also abort the loop. The approach we take here
|
* these interrupts to also abort the loop. The approach we take here
|
||||||
* is to have the shell ignore interrupt signals while waiting for a
|
* is to have the shell ignore interrupt signals while waiting for a
|
||||||
* forground process to terminate, and then send itself an interrupt
|
* foreground process to terminate, and then send itself an interrupt
|
||||||
* signal if the child process was terminated by an interrupt signal.
|
* signal if the child process was terminated by an interrupt signal.
|
||||||
* Unfortunately, some programs want to do a bit of cleanup and then
|
* Unfortunately, some programs want to do a bit of cleanup and then
|
||||||
* exit on interrupt; unless these processes terminate themselves by
|
* exit on interrupt; unless these processes terminate themselves by
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||||
|
|
||||||
/* TOOD(jart): DELETE */
|
/* TODO(jart): DELETE */
|
||||||
|
|
||||||
#define append(ARRAYLIST, ITEM) concat((ARRAYLIST), (ITEM), 1)
|
#define append(ARRAYLIST, ITEM) concat((ARRAYLIST), (ITEM), 1)
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ static int createHostInfo(struct NtIpAdapterAddresses *firstAdapter) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Use max IFNAMSIZ-1 chars, leave the last char for eventual conficts */
|
/* Use max IFNAMSIZ-1 chars, leave the last char for eventual conflicts */
|
||||||
tprecode16to8(baseName, IFNAMSIZ - 1, aa->FriendlyName);
|
tprecode16to8(baseName, IFNAMSIZ - 1, aa->FriendlyName);
|
||||||
baseName[IFNAMSIZ - 2] = '\0';
|
baseName[IFNAMSIZ - 2] = '\0';
|
||||||
/* Replace any space with a '_' */
|
/* Replace any space with a '_' */
|
||||||
|
|
|
@ -50,7 +50,7 @@ ssize_t readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) {
|
||||||
bytes = efault();
|
bytes = efault();
|
||||||
} else if (weaken(__zipos_notat) &&
|
} else if (weaken(__zipos_notat) &&
|
||||||
(bytes = __zipos_notat(dirfd, path)) == -1) {
|
(bytes = __zipos_notat(dirfd, path)) == -1) {
|
||||||
STRACE("TOOD: zipos support for readlinkat");
|
STRACE("TODO: zipos support for readlinkat");
|
||||||
} else if (!IsWindows()) {
|
} else if (!IsWindows()) {
|
||||||
assert(bufsiz);
|
assert(bufsiz);
|
||||||
bytes = sys_readlinkat(dirfd, path, buf, bufsiz);
|
bytes = sys_readlinkat(dirfd, path, buf, bufsiz);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "libc/runtime/symbols.internal.h"
|
#include "libc/runtime/symbols.internal.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attachs GDB temporarilly, to do something like print a variable.
|
* Attaches GDB temporarily, to do something like print a variable.
|
||||||
*/
|
*/
|
||||||
privileged int(gdbexec)(const char *cmd) {
|
privileged int(gdbexec)(const char *cmd) {
|
||||||
struct StackFrame *bp;
|
struct StackFrame *bp;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include "libc/runtime/symbols.internal.h"
|
#include "libc/runtime/symbols.internal.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns name of funciton that called caller function.
|
* Returns name of function that called caller function.
|
||||||
*/
|
*/
|
||||||
const char *GetCallerName(const struct StackFrame *bp) {
|
const char *GetCallerName(const struct StackFrame *bp) {
|
||||||
struct SymbolTable *st;
|
struct SymbolTable *st;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
// Releases the chunk of memory pointed to by p, that had been
|
// Releases the chunk of memory pointed to by p, that had been
|
||||||
// previously allocated using malloc or a related routine such as
|
// previously allocated using malloc or a related routine such as
|
||||||
// realloc. It has no effect if p is null. If p was not malloced or
|
// realloc. It has no effect if p is null. If p was not malloced or
|
||||||
// already freed, free(p) will by default cuase the current program to
|
// already freed, free(p) will by default cause the current program to
|
||||||
// abort.
|
// abort.
|
||||||
//
|
//
|
||||||
// @param rdi is allocation address, which may be NULL
|
// @param rdi is allocation address, which may be NULL
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
#include "libc/runtime/runtime.h"
|
#include "libc/runtime/runtime.h"
|
||||||
#include "libc/str/str.h"
|
#include "libc/str/str.h"
|
||||||
|
|
||||||
/* TOOD: Why can't we change CR3? Could it really need PML5T? */
|
/* TODO: Why can't we change CR3? Could it really need PML5T? */
|
||||||
/* TOOD: Why does QEMU in UEFI mode take ten seconds to boot? */
|
/* TODO: Why does QEMU in UEFI mode take ten seconds to boot? */
|
||||||
|
|
||||||
struct EfiArgs {
|
struct EfiArgs {
|
||||||
char *Args[0x400 / sizeof(char *)];
|
char *Args[0x400 / sizeof(char *)];
|
||||||
|
|
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
|
* and if it's not any of the current logins
|
||||||
* can't use time comparison because there may be a small
|
* can't use time comparison because there may be a small
|
||||||
* discrepency since login calls time() twice
|
* discrepancy since login calls time() twice
|
||||||
*/
|
*/
|
||||||
for (w = pn->whead; doit && w != NULL; w = w->next)
|
for (w = pn->whead; doit && w != NULL; w = w->next)
|
||||||
if (w->info == LOGGEDIN &&
|
if (w->info == LOGGEDIN &&
|
||||||
|
|
|
@ -666,25 +666,25 @@ class ProcessTestCase(BaseTestCase):
|
||||||
subprocess.Popen([sys.executable, "-c", "pass#\0"])
|
subprocess.Popen([sys.executable, "-c", "pass#\0"])
|
||||||
|
|
||||||
def test_invalid_env(self):
|
def test_invalid_env(self):
|
||||||
# null character in the enviroment variable name
|
# null character in the environment variable name
|
||||||
newenv = os.environ.copy()
|
newenv = os.environ.copy()
|
||||||
newenv["FRUIT\0VEGETABLE"] = "cabbage"
|
newenv["FRUIT\0VEGETABLE"] = "cabbage"
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
|
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
|
||||||
|
|
||||||
# null character in the enviroment variable value
|
# null character in the environment variable value
|
||||||
newenv = os.environ.copy()
|
newenv = os.environ.copy()
|
||||||
newenv["FRUIT"] = "orange\0VEGETABLE=cabbage"
|
newenv["FRUIT"] = "orange\0VEGETABLE=cabbage"
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
|
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
|
||||||
|
|
||||||
# equal character in the enviroment variable name
|
# equal character in the environment variable name
|
||||||
newenv = os.environ.copy()
|
newenv = os.environ.copy()
|
||||||
newenv["FRUIT=ORANGE"] = "lemon"
|
newenv["FRUIT=ORANGE"] = "lemon"
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
|
subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
|
||||||
|
|
||||||
# equal character in the enviroment variable value
|
# equal character in the environment variable value
|
||||||
newenv = os.environ.copy()
|
newenv = os.environ.copy()
|
||||||
newenv["FRUIT"] = "orange=lemon"
|
newenv["FRUIT"] = "orange=lemon"
|
||||||
with subprocess.Popen([sys.executable, "-c",
|
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())
|
self.assertTrue(frame is sys._getframe())
|
||||||
|
|
||||||
# Verify that the captured thread frame is blocked in g456, called
|
# Verify that the captured thread frame is blocked in g456, called
|
||||||
# from f123. This is a litte tricky, since various bits of
|
# from f123. This is a little tricky, since various bits of
|
||||||
# threading.py are also in the thread's call stack.
|
# threading.py are also in the thread's call stack.
|
||||||
frame = d.pop(thread_id)
|
frame = d.pop(thread_id)
|
||||||
stack = traceback.extract_stack(frame)
|
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);
|
ret = bfdec_div(r, a, b, BF_PREC_INF, BF_RNDZ);
|
||||||
break;
|
break;
|
||||||
case OP_math_mod:
|
case OP_math_mod:
|
||||||
/* Euclidian remainder */
|
/* Euclidean remainder */
|
||||||
ret = bfdec_rem(r, a, b, BF_PREC_INF, BF_RNDZ, BF_DIVREM_EUCLIDIAN);
|
ret = bfdec_rem(r, a, b, BF_PREC_INF, BF_RNDZ, BF_DIVREM_EUCLIDEAN);
|
||||||
break;
|
break;
|
||||||
case OP_mod:
|
case OP_mod:
|
||||||
ret = bfdec_rem(r, a, b, BF_PREC_INF, BF_RNDZ, BF_RNDZ);
|
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("tdiv", 2, js_bigint_div, BF_RNDZ ),
|
||||||
JS_CFUNC_MAGIC_DEF("fdiv", 2, js_bigint_div, BF_RNDD ),
|
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("cdiv", 2, js_bigint_div, BF_RNDU ),
|
||||||
JS_CFUNC_MAGIC_DEF("ediv", 2, js_bigint_div, BF_DIVREM_EUCLIDIAN ),
|
JS_CFUNC_MAGIC_DEF("ediv", 2, js_bigint_div, BF_DIVREM_EUCLIDEAN ),
|
||||||
JS_CFUNC_MAGIC_DEF("tdivrem", 2, js_bigint_div, BF_RNDZ | 0x10 ),
|
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("fdivrem", 2, js_bigint_div, BF_RNDD | 0x10 ),
|
||||||
JS_CFUNC_MAGIC_DEF("cdivrem", 2, js_bigint_div, BF_RNDU | 0x10 ),
|
JS_CFUNC_MAGIC_DEF("cdivrem", 2, js_bigint_div, BF_RNDU | 0x10 ),
|
||||||
JS_CFUNC_MAGIC_DEF("edivrem", 2, js_bigint_div, BF_DIVREM_EUCLIDIAN | 0x10 ),
|
JS_CFUNC_MAGIC_DEF("edivrem", 2, js_bigint_div, BF_DIVREM_EUCLIDEAN | 0x10 ),
|
||||||
JS_CFUNC_MAGIC_DEF("sqrt", 1, js_bigint_sqrt, 0 ),
|
JS_CFUNC_MAGIC_DEF("sqrt", 1, js_bigint_sqrt, 0 ),
|
||||||
JS_CFUNC_MAGIC_DEF("sqrtrem", 1, js_bigint_sqrt, 1 ),
|
JS_CFUNC_MAGIC_DEF("sqrtrem", 1, js_bigint_sqrt, 1 ),
|
||||||
JS_CFUNC_MAGIC_DEF("floorLog2", 1, js_bigint_op1, 0 ),
|
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;
|
break;
|
||||||
case OP_math_mod:
|
case OP_math_mod:
|
||||||
/* Euclidian remainder */
|
/* Euclidean remainder */
|
||||||
ret = bf_rem(r, a, b, BF_PREC_INF, BF_RNDZ,
|
ret = bf_rem(r, a, b, BF_PREC_INF, BF_RNDZ,
|
||||||
BF_DIVREM_EUCLIDIAN) & BF_ST_INVALID_OP;
|
BF_DIVREM_EUCLIDEAN) & BF_ST_INVALID_OP;
|
||||||
break;
|
break;
|
||||||
case OP_mod:
|
case OP_mod:
|
||||||
ret = bf_rem(r, a, b, BF_PREC_INF, BF_RNDZ,
|
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)
|
if (JS_DefineObjectName(ctx, ctor, class_name, JS_PROP_CONFIGURABLE) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
/* the constructor property must be first. It can be overriden by
|
/* the constructor property must be first. It can be overridden by
|
||||||
computed property names */
|
computed property names */
|
||||||
if (JS_DefinePropertyValue(ctx, proto, JS_ATOM_constructor,
|
if (JS_DefinePropertyValue(ctx, proto, JS_ATOM_constructor,
|
||||||
JS_DupValue(ctx, ctor),
|
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 ));
|
(cmp(b, c, opaque) > 0 ? b : (cmp(a, c, opaque) < 0 ? a : c ));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pointer based version with local stack and insertion sort threshhold */
|
/* pointer based version with local stack and insertion sort threshold */
|
||||||
void rqsort(void *base, size_t nmemb, size_t size, cmp_f cmp, void *opaque)
|
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;
|
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);
|
ret = bf_div(r, a, b, ctx->fp_env.prec, ctx->fp_env.flags);
|
||||||
break;
|
break;
|
||||||
case OP_math_mod:
|
case OP_math_mod:
|
||||||
/* Euclidian remainder */
|
/* Euclidean remainder */
|
||||||
ret = bf_rem(r, a, b, ctx->fp_env.prec, ctx->fp_env.flags,
|
ret = bf_rem(r, a, b, ctx->fp_env.prec, ctx->fp_env.flags,
|
||||||
BF_DIVREM_EUCLIDIAN);
|
BF_DIVREM_EUCLIDEAN);
|
||||||
break;
|
break;
|
||||||
case OP_mod:
|
case OP_mod:
|
||||||
ret = bf_rem(r, a, b, ctx->fp_env.prec, ctx->fp_env.flags,
|
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 =
|
/* decrement the reference of the children of each object. mark =
|
||||||
1 after this pass. */
|
1 after this pass. */
|
||||||
gc_decref(rt);
|
gc_decref(rt);
|
||||||
/* keep the GC objects with a non zero refcount and their childs */
|
/* keep the GC objects with a non zero refcount and their children */
|
||||||
gc_scan(rt);
|
gc_scan(rt);
|
||||||
/* free the GC objects in a cycle */
|
/* free the GC objects in a cycle */
|
||||||
gc_free_cycles(rt);
|
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 {
|
typedef struct JSGlobalVar {
|
||||||
int cpool_idx; /* if >= 0, index in the constant pool for hoisted
|
int cpool_idx; /* if >= 0, index in the constant pool for hoisted
|
||||||
function defintion*/
|
function definition*/
|
||||||
uint8_t force_init : 1; /* force initialization to undefined */
|
uint8_t force_init : 1; /* force initialization to undefined */
|
||||||
uint8_t is_lexical : 1; /* global let/const definition */
|
uint8_t is_lexical : 1; /* global let/const definition */
|
||||||
uint8_t is_const : 1; /* 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
|
int func_var_idx; /* variable containing the current function (-1
|
||||||
if none, only used if is_func_expr is true) */
|
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 eval_ret_idx; /* variable containing the return value of the eval, -1 if none */
|
||||||
int this_var_idx; /* variable containg the 'this' value, -1 if none */
|
int this_var_idx; /* variable containing the 'this' value, -1 if none */
|
||||||
int new_target_var_idx; /* variable containg the 'new.target' 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 containg the 'this.active_func' value, -1 if none */
|
int this_active_func_var_idx; /* variable containing the 'this.active_func' value, -1 if none */
|
||||||
int home_object_var_idx;
|
int home_object_var_idx;
|
||||||
BOOL need_home_object;
|
BOOL need_home_object;
|
||||||
int scope_level; /* index into fd->scopes if the current lexical scope */
|
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.
|
/* division and remainder.
|
||||||
|
|
||||||
rnd_mode is the rounding mode for the quotient. The additional
|
rnd_mode is the rounding mode for the quotient. The additional
|
||||||
rounding mode BF_RND_EUCLIDIAN is supported.
|
rounding mode BF_RND_EUCLIDEAN is supported.
|
||||||
|
|
||||||
'q' is an integer. 'r' is rounded with prec and flags (prec can be
|
'q' is an integer. 'r' is rounded with prec and flags (prec can be
|
||||||
BF_PREC_INF).
|
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:
|
case BF_RNDA:
|
||||||
is_ceil = TRUE;
|
is_ceil = TRUE;
|
||||||
break;
|
break;
|
||||||
case BF_DIVREM_EUCLIDIAN:
|
case BF_DIVREM_EUCLIDEAN:
|
||||||
is_ceil = a->sign;
|
is_ceil = a->sign;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4120,7 +4120,7 @@ static void bf_const_pi_internal(bf_t *Q, limb_t prec)
|
||||||
int64_t n, prec1;
|
int64_t n, prec1;
|
||||||
bf_t P, G;
|
bf_t P, G;
|
||||||
|
|
||||||
/* number of serie terms */
|
/* number of series terms */
|
||||||
n = prec / CHUD_BITS_PER_TERM + 1;
|
n = prec / CHUD_BITS_PER_TERM + 1;
|
||||||
/* XXX: precision analysis */
|
/* XXX: precision analysis */
|
||||||
prec1 = prec + 32;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* compute atan(y/x) assumming inf/inf = 1 and 0/0 = 0 */
|
/* compute atan(y/x) assuming inf/inf = 1 and 0/0 = 0 */
|
||||||
bf_init(s, T);
|
bf_init(s, T);
|
||||||
prec1 = prec + 32;
|
prec1 = prec + 32;
|
||||||
if (y->expn == BF_EXP_INF && x->expn == BF_EXP_INF) {
|
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
|
/* tabr[] -= taba[] * b. 0 <= b <= base - 1. Return the value to
|
||||||
substract to the high word. */
|
subtract to the high word. */
|
||||||
limb_t mp_sub_mul1_dec(limb_t *tabr, const limb_t *taba, mp_size_t n,
|
limb_t mp_sub_mul1_dec(limb_t *tabr, const limb_t *taba, mp_size_t n,
|
||||||
limb_t b)
|
limb_t b)
|
||||||
{
|
{
|
||||||
|
@ -6934,7 +6934,7 @@ static void bfdec_tdivremu(bf_context_t *s, bfdec_t *q, bfdec_t *r,
|
||||||
/* division and remainder.
|
/* division and remainder.
|
||||||
|
|
||||||
rnd_mode is the rounding mode for the quotient. The additional
|
rnd_mode is the rounding mode for the quotient. The additional
|
||||||
rounding mode BF_RND_EUCLIDIAN is supported.
|
rounding mode BF_RND_EUCLIDEAN is supported.
|
||||||
|
|
||||||
'q' is an integer. 'r' is rounded with prec and flags (prec can be
|
'q' is an integer. 'r' is rounded with prec and flags (prec can be
|
||||||
BF_PREC_INF).
|
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:
|
case BF_RNDA:
|
||||||
is_ceil = TRUE;
|
is_ceil = TRUE;
|
||||||
break;
|
break;
|
||||||
case BF_DIVREM_EUCLIDIAN:
|
case BF_DIVREM_EUCLIDEAN:
|
||||||
is_ceil = a->sign;
|
is_ceil = a->sign;
|
||||||
break;
|
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_OVERFLOW (1 << 2)
|
||||||
#define BF_ST_UNDERFLOW (1 << 3)
|
#define BF_ST_UNDERFLOW (1 << 3)
|
||||||
#define BF_ST_INEXACT (1 << 4)
|
#define BF_ST_INEXACT (1 << 4)
|
||||||
/* indicate that a memory allocation error occured. NaN is returned */
|
/* indicate that a memory allocation error occurred. NaN is returned */
|
||||||
#define BF_ST_MEM_ERROR (1 << 5)
|
#define BF_ST_MEM_ERROR (1 << 5)
|
||||||
|
|
||||||
#define BF_RADIX_MAX 36 /* maximum radix for bf_atof() and bf_ftoa() */
|
#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);
|
bf_flags_t flags);
|
||||||
int bf_mul_2exp(bf_t *r, slimb_t e, 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);
|
int bf_div(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags);
|
||||||
#define BF_DIVREM_EUCLIDIAN BF_RNDF
|
#define BF_DIVREM_EUCLIDEAN BF_RNDF
|
||||||
int bf_divrem(bf_t *q, bf_t *r, const bf_t *a, const bf_t *b,
|
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);
|
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,
|
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,
|
put_u32(s->byte_code.buf + last_atom_start + 1,
|
||||||
len + 5 + add_zero_advance_check);
|
len + 5 + add_zero_advance_check);
|
||||||
if (add_zero_advance_check) {
|
if (add_zero_advance_check) {
|
||||||
/* avoid infinite loop by stoping the
|
/* avoid infinite loop by stopping the
|
||||||
recursion if no advance was made in the
|
recursion if no advance was made in the
|
||||||
atom (only works if the atom has no
|
atom (only works if the atom has no
|
||||||
side effect) */
|
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)
|
static void get_loc_or_ref(DynBuf *bc, BOOL is_ref, int idx)
|
||||||
{
|
{
|
||||||
/* if the field is not initialized, the error is catched when
|
/* if the field is not initialized, the error is caught when
|
||||||
accessing it */
|
accessing it */
|
||||||
if (is_ref)
|
if (is_ref)
|
||||||
dbuf_putc(bc, OP_get_var_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) {
|
if (s->stack_level_tab[pos] != 0xffff) {
|
||||||
/* already explored: check that the stack size is consistent */
|
/* already explored: check that the stack size is consistent */
|
||||||
if (s->stack_level_tab[pos] != stack_len) {
|
if (s->stack_level_tab[pos] != stack_len) {
|
||||||
JS_ThrowInternalError(ctx, "unconsistent stack size: %d %d (pc=%d)",
|
JS_ThrowInternalError(ctx, "inconsistent stack size: %d %d (pc=%d)",
|
||||||
s->stack_level_tab[pos], stack_len, pos);
|
s->stack_level_tab[pos], stack_len, pos);
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} 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
|
** Technically, the various VFSes are free to implement these locks however
|
||||||
** they see fit. However, compatibility is encouraged so that VFSes can
|
** they see fit. However, compatibility is encouraged so that VFSes can
|
||||||
** interoperate. The standard implemention used on both unix and windows
|
** interoperate. The standard implementation used on both unix and windows
|
||||||
** is for the index number to indicate a byte offset into the
|
** is for the index number to indicate a byte offset into the
|
||||||
** WalCkptInfo.aLock[] array in the wal-index header. In other words, all
|
** WalCkptInfo.aLock[] array in the wal-index header. In other words, all
|
||||||
** locks are on the shm file. The WALINDEX_LOCK_OFFSET constant (which
|
** 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)
|
** the mxFrame for that reader. The value READMARK_NOT_USED (0xffffffff)
|
||||||
** for any aReadMark[] means that entry is unused. aReadMark[0] is
|
** 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
|
** a special case; its value is never used and it exists as a place-holder
|
||||||
** to avoid having to offset aReadMark[] indexs by one. Readers holding
|
** to avoid having to offset aReadMark[] indexes by one. Readers holding
|
||||||
** WAL_READ_LOCK(0) always ignore the entire WAL and read all content
|
** WAL_READ_LOCK(0) always ignore the entire WAL and read all content
|
||||||
** directly from the database.
|
** directly from the database.
|
||||||
**
|
**
|
||||||
|
@ -1469,7 +1469,7 @@ int sqlite3WalOpen(
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Change the size to which the WAL file is trucated on each reset.
|
** Change the size to which the WAL file is truncated on each reset.
|
||||||
*/
|
*/
|
||||||
void sqlite3WalLimit(Wal *pWal, i64 iLimit){
|
void sqlite3WalLimit(Wal *pWal, i64 iLimit){
|
||||||
if( pWal ) pWal->mxWalSize = 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
|
** Value pLoop->nOut is currently set to the estimated number of rows
|
||||||
** visited for scanning (a=? AND b=?). This function reduces that estimate
|
** visited for scanning (a=? AND b=?). This function reduces that estimate
|
||||||
** by some factor to account for the (c BETWEEN ? AND ?) expression based
|
** by some factor to account for the (c BETWEEN ? AND ?) expression based
|
||||||
** on the stat4 data for the index. this scan will be peformed multiple
|
** on the stat4 data for the index. this scan will be performed multiple
|
||||||
** times (once for each (a,b) combination that matches a=?) is dealt with
|
** times (once for each (a,b) combination that matches a=?) is dealt with
|
||||||
** by the caller.
|
** by the caller.
|
||||||
**
|
**
|
||||||
|
@ -2929,7 +2929,7 @@ static int whereUsablePartialIndex(
|
||||||
*/
|
*/
|
||||||
static int whereLoopAddBtree(
|
static int whereLoopAddBtree(
|
||||||
WhereLoopBuilder *pBuilder, /* WHERE clause information */
|
WhereLoopBuilder *pBuilder, /* WHERE clause information */
|
||||||
Bitmask mPrereq /* Extra prerequesites for using this table */
|
Bitmask mPrereq /* Extra prerequisites for using this table */
|
||||||
){
|
){
|
||||||
WhereInfo *pWInfo; /* WHERE analysis context */
|
WhereInfo *pWInfo; /* WHERE analysis context */
|
||||||
Index *pProbe; /* An index we are evaluating */
|
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 */
|
u8 hasOr; /* True if any a[].eOperator is WO_OR */
|
||||||
int nTerm; /* Number of terms */
|
int nTerm; /* Number of terms */
|
||||||
int nSlot; /* Number of entries in a[] */
|
int nSlot; /* Number of entries in a[] */
|
||||||
WhereTerm *a; /* Each a[] describes a term of the WHERE cluase */
|
WhereTerm *a; /* Each a[] describes a term of the WHERE clause */
|
||||||
#if defined(SQLITE_SMALL_STACK)
|
#if defined(SQLITE_SMALL_STACK)
|
||||||
WhereTerm aStatic[1]; /* Initial static space for a[] */
|
WhereTerm aStatic[1]; /* Initial static space for a[] */
|
||||||
#else
|
#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 */
|
WhereTerm *pTerm; /* The term to be analyzed */
|
||||||
WhereMaskSet *pMaskSet; /* Set of table index masks */
|
WhereMaskSet *pMaskSet; /* Set of table index masks */
|
||||||
Expr *pExpr; /* The expression to be analyzed */
|
Expr *pExpr; /* The expression to be analyzed */
|
||||||
Bitmask prereqLeft; /* Prerequesites of the pExpr->pLeft */
|
Bitmask prereqLeft; /* Prerequisites of the pExpr->pLeft */
|
||||||
Bitmask prereqAll; /* Prerequesites of pExpr */
|
Bitmask prereqAll; /* Prerequisites of pExpr */
|
||||||
Bitmask extraRight = 0; /* Extra dependencies on LEFT JOIN */
|
Bitmask extraRight = 0; /* Extra dependencies on LEFT JOIN */
|
||||||
Expr *pStr1 = 0; /* RHS of LIKE/GLOB operator */
|
Expr *pStr1 = 0; /* RHS of LIKE/GLOB operator */
|
||||||
int isComplete = 0; /* RHS of LIKE/GLOB ends with wildcard */
|
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
|
** is the Window object representing the associated OVER clause. This
|
||||||
** function updates the contents of pWin as follows:
|
** function updates the contents of pWin as follows:
|
||||||
**
|
**
|
||||||
** * If the OVER clause refered to a named window (as in "max(x) OVER win"),
|
** * If the OVER clause referred to a named window (as in "max(x) OVER win"),
|
||||||
** search list pList for a matching WINDOW definition, and update pWin
|
** search list pList for a matching WINDOW definition, and update pWin
|
||||||
** accordingly. If no such WINDOW clause can be found, leave an error
|
** accordingly. If no such WINDOW clause can be found, leave an error
|
||||||
** in pParse.
|
** in pParse.
|
||||||
|
@ -1537,7 +1537,7 @@ struct WindowCsrAndReg {
|
||||||
**
|
**
|
||||||
** (ORDER BY a, b GROUPS BETWEEN 2 PRECEDING AND 2 FOLLOWING)
|
** (ORDER BY a, b GROUPS BETWEEN 2 PRECEDING AND 2 FOLLOWING)
|
||||||
**
|
**
|
||||||
** The windows functions implmentation caches the input rows in a temp
|
** The windows functions implementation caches the input rows in a temp
|
||||||
** table, sorted by "a, b" (it actually populates the cache lazily, and
|
** table, sorted by "a, b" (it actually populates the cache lazily, and
|
||||||
** aggressively removes rows once they are no longer required, but that's
|
** 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
|
** 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
|
** For the most part, the patterns above are adapted to support UNBOUNDED by
|
||||||
** assuming that it is equivalent to "infinity PRECEDING/FOLLOWING" and
|
** assuming that it is equivalent to "infinity PRECEDING/FOLLOWING" and
|
||||||
** CURRENT ROW by assuming that it is equivilent to "0 PRECEDING/FOLLOWING".
|
** CURRENT ROW by assuming that it is equivalent to "0 PRECEDING/FOLLOWING".
|
||||||
** This is optimized of course - branches that will never be taken and
|
** 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
|
** conditions that are always true are omitted from the VM code. The only
|
||||||
** exceptional case is:
|
** 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);
|
return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a * b, add);
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns 1 if "a*b*c + add" has no negaive terms/factors and doesn't overflow
|
// returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow
|
||||||
static int stbi__mad3sizes_valid(int a, int b, int c, int add) {
|
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) &&
|
return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a * b, c) &&
|
||||||
stbi__addsizes_valid(a * b * c, add);
|
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->marker = STBI__MARKER_none;
|
||||||
j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
|
j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff;
|
||||||
j->eob_run = 0;
|
j->eob_run = 0;
|
||||||
// no more than 1<<31 MCUs if no restart_interal? that's plenty safe,
|
// no more than 1<<31 MCUs if no restart_interval? that's plenty safe,
|
||||||
// since we don't even allow 1<<30 pixels
|
// 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 {
|
} else {
|
||||||
// This is a non-disposal case eithe way, so just
|
// This is a non-disposal case either way, so just
|
||||||
// leave the pixels as is, and they will become the new background
|
// leave the pixels as is, and they will become the new background
|
||||||
// 1: do not dispose
|
// 1: do not dispose
|
||||||
// 0: not specified.
|
// 0: not specified.
|
||||||
}
|
}
|
||||||
|
|
||||||
// background is what out is after the undoing of the previou frame;
|
// background is what out is after the undoing of the previous frame;
|
||||||
memcpy(g->background, g->out, 4 * g->w * g->h);
|
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
|
// tessellate until threshold p is happy... @TODO warped to compensate for non-linear stretching
|
||||||
static int stbtt__tesselate_curve(stbtt__point *points, int *num_points,
|
static int stbtt__tessellate_curve(stbtt__point *points, int *num_points,
|
||||||
float x0, float y0, float x1, float y1,
|
float x0, float y0, float x1, float y1,
|
||||||
float x2, float y2,
|
float x2, float y2,
|
||||||
float objspace_flatness_squared, int n)
|
float objspace_flatness_squared, int n)
|
||||||
|
@ -2677,8 +2677,8 @@ static int stbtt__tesselate_curve(stbtt__point *points, int *num_points,
|
||||||
if (n > 16) // 65536 segments on one curve better be enough!
|
if (n > 16) // 65536 segments on one curve better be enough!
|
||||||
return 1;
|
return 1;
|
||||||
if (dx*dx+dy*dy > objspace_flatness_squared) { // half-pixel error allowed... need to be smaller if AA
|
if (dx*dx+dy*dy > objspace_flatness_squared) { // half-pixel error allowed... need to be smaller if AA
|
||||||
stbtt__tesselate_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, 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);
|
stbtt__tessellate_curve(points, num_points, mx,my, (x1+x2)/2.0f,(y1+y2)/2.0f, x2,y2, objspace_flatness_squared,n+1);
|
||||||
} else {
|
} else {
|
||||||
stbtt__add_point(points, *num_points,x2,y2);
|
stbtt__add_point(points, *num_points,x2,y2);
|
||||||
*num_points = *num_points+1;
|
*num_points = *num_points+1;
|
||||||
|
@ -2686,7 +2686,7 @@ static int stbtt__tesselate_curve(stbtt__point *points, int *num_points,
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void stbtt__tesselate_cubic(stbtt__point *points, int *num_points,
|
static void stbtt__tessellate_cubic(stbtt__point *points, int *num_points,
|
||||||
float x0, float y0, float x1, float y1,
|
float x0, float y0, float x1, float y1,
|
||||||
float x2, float y2, float x3, float y3,
|
float x2, float y2, float x3, float y3,
|
||||||
float objspace_flatness_squared, int n)
|
float objspace_flatness_squared, int n)
|
||||||
|
@ -2718,8 +2718,8 @@ static void stbtt__tesselate_cubic(stbtt__point *points, int *num_points,
|
||||||
float yb = (y12+y23)/2;
|
float yb = (y12+y23)/2;
|
||||||
float mx = (xa+xb)/2;
|
float mx = (xa+xb)/2;
|
||||||
float my = (ya+yb)/2;
|
float my = (ya+yb)/2;
|
||||||
stbtt__tesselate_cubic(points, num_points, x0,y0, x01,y01, xa,ya, mx,my, objspace_flatness_squared,n+1);
|
stbtt__tessellate_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);
|
stbtt__tessellate_cubic(points, num_points, mx,my, xb,yb, x23,y23, x3,y3, objspace_flatness_squared,n+1);
|
||||||
} else {
|
} else {
|
||||||
stbtt__add_point(points, *num_points,x3,y3);
|
stbtt__add_point(points, *num_points,x3,y3);
|
||||||
*num_points = *num_points+1;
|
*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);
|
stbtt__add_point(points, num_points++, x, y);
|
||||||
break;
|
break;
|
||||||
case STBTT_vcurve:
|
case STBTT_vcurve:
|
||||||
stbtt__tesselate_curve(points, &num_points, x,y,
|
stbtt__tessellate_curve(points, &num_points, x,y,
|
||||||
vertices[i].cx, vertices[i].cy,
|
vertices[i].cx, vertices[i].cy,
|
||||||
vertices[i].x, vertices[i].y,
|
vertices[i].x, vertices[i].y,
|
||||||
objspace_flatness_squared, 0);
|
objspace_flatness_squared, 0);
|
||||||
x = vertices[i].x, y = vertices[i].y;
|
x = vertices[i].x, y = vertices[i].y;
|
||||||
break;
|
break;
|
||||||
case STBTT_vcubic:
|
case STBTT_vcubic:
|
||||||
stbtt__tesselate_cubic(points, &num_points, x,y,
|
stbtt__tessellate_cubic(points, &num_points, x,y,
|
||||||
vertices[i].cx, vertices[i].cy,
|
vertices[i].cx, vertices[i].cy,
|
||||||
vertices[i].cx1, vertices[i].cy1,
|
vertices[i].cx1, vertices[i].cy1,
|
||||||
vertices[i].x, vertices[i].y,
|
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 sy = (float) y + 0.5f;
|
||||||
float x_gspace = (sx / scale_x);
|
float x_gspace = (sx / scale_x);
|
||||||
float y_gspace = (sy / scale_y);
|
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-tesselated 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-tessellated curves so a new path
|
||||||
for (i=0; i < num_verts; ++i) {
|
for (i=0; i < num_verts; ++i) {
|
||||||
float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y;
|
float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y;
|
||||||
if (verts[i].type == STBTT_vline && precompute[i] != 0.0f) {
|
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
|
// Note there are bugs in that pseudocode, presumably due to them attempting
|
||||||
// to rename the arrays nicely rather than representing the way their actual
|
// to rename the arrays nicely rather than representing the way their actual
|
||||||
// implementation bounces buffers back and forth. As a result, even in the
|
// implementation bounces buffers back and forth. As a result, even in the
|
||||||
// "some formulars corrected" version, a direct implementation fails. These
|
// "some formulas corrected" version, a direct implementation fails. These
|
||||||
// are noted below as "paper bug".
|
// are noted below as "paper bug".
|
||||||
|
|
||||||
// copy and reflect spectral data
|
// 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
|
** Issue #643 - list increased to
|
||||||
** 2032 known entities.
|
** 2032 known entities.
|
||||||
** Note also stuct /not/ padded to
|
** Note also struct /not/ padded to
|
||||||
** keep source weight down, 79K vs 149K,
|
** keep source weight down, 79K vs 149K,
|
||||||
** and is strictly alphabetic to optimize
|
** and is strictly alphabetic to optimize
|
||||||
** the searching.
|
** 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
|
This is basically what Tidy 04 August 2000 did and far more accurate
|
||||||
with respect to browser behaivour than the code commented out above.
|
with respect to browser behaviour than the code commented out above.
|
||||||
Tidy could try to propagate the <pre> into each disallowed child where
|
Tidy could try to propagate the <pre> into each disallowed child where
|
||||||
<pre> is allowed in order to replicate some browsers behaivour, but
|
<pre> is allowed in order to replicate some browsers behaviour, but
|
||||||
there are a lot of exceptions, e.g. Internet Explorer does not propagate
|
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 table cells while Mozilla does. Opera 6 never propagates
|
||||||
<pre> into blocklevel elements while Opera 7 behaves much like Mozilla.
|
<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
|
a wildcard to be meaningful
|
||||||
pattern = string to search for
|
pattern = string to search for
|
||||||
cmd = 0 - case-insensitive search
|
cmd = 0 - case-insensitive search
|
||||||
1 - case-sensitve search
|
1 - case-sensitive search
|
||||||
2 - case-insensitive, whole words only
|
2 - case-insensitive, whole words only
|
||||||
3 - case-sensitive, whole words only
|
3 - case-sensitive, whole words only
|
||||||
SkipBin = if true, skip any files that have control
|
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 */
|
/* finally, add a NULL after the last arg, like Unix */
|
||||||
*argv = (char *)NULL;
|
*argv = (char *)NULL;
|
||||||
|
|
||||||
/* save the values and return, indicating succes */
|
/* save the values and return, indicating success */
|
||||||
*Pargv = argvect;
|
*Pargv = argvect;
|
||||||
*Pargc = argc;
|
*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 ((filnum == 0) && error_in_archive <= PK_WARN) {
|
||||||
if (num_skipped > 0L)
|
if (num_skipped > 0L)
|
||||||
error_in_archive = IZ_UNSUP; /* unsupport. compression/encryption */
|
error_in_archive = IZ_UNSUP; /* unsupported. compression/encryption */
|
||||||
else
|
else
|
||||||
error_in_archive = PK_FIND; /* no files found at all */
|
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
|
* appear in filenames by itself. The following default definition
|
||||||
* sets the replacement char to a question mark as the most common
|
* sets the replacement char to a question mark as the most common
|
||||||
* "single char wildcard"; this setting should be overridden in the
|
* "single char wildcard"; this setting should be overridden in the
|
||||||
* appropiate system-specific configuration header when needed.
|
* appropriate system-specific configuration header when needed.
|
||||||
*/
|
*/
|
||||||
# define UZ_FNFILTER_REPLACECHAR '?'
|
# define UZ_FNFILTER_REPLACECHAR '?'
|
||||||
#endif
|
#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
|
end-of-block. Note however that the static length tree defines
|
||||||
288 codes just to fill out the Huffman codes. Codes 286 and 287
|
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
|
cannot be used though, since there is no length base or extra bits
|
||||||
defined for them. Similarily, there are up to 30 distance codes.
|
defined for them. Similarly, there are up to 30 distance codes.
|
||||||
However, static trees define 32 codes (all 5 bits) to fill out the
|
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.
|
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.
|
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.
|
block. See the huft_build() routine.
|
||||||
|
|
||||||
Actually, the precautions mentioned above are not sufficient to
|
Actually, the precautions mentioned above are not sufficient to
|
||||||
prevent fetches of bits beyound the end of the last block in every
|
prevent fetches of bits beyond the end of the last block in every
|
||||||
case. When the last code fetched before the end-of-block code was
|
case. When the last code fetched before the end-of-block code was
|
||||||
a very short distance code (shorter than "distance-prefetch-bits" -
|
a very short distance code (shorter than "distance-prefetch-bits" -
|
||||||
"end-of-block code bits"), this last distance code fetch already
|
"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
|
#ifdef FIX_PAST_EOB_BY_TABLEADJUST
|
||||||
/* Adjust the requested distance base table size so that a distance code
|
/* Adjust the requested distance base table size so that a distance code
|
||||||
fetch never tries to get bits behind an immediatly following end-of-block
|
fetch never tries to get bits behind an immediately following end-of-block
|
||||||
code. */
|
code. */
|
||||||
bd = (dbits <= bl+1 ? dbits : bl+1);
|
bd = (dbits <= bl+1 ? dbits : bl+1);
|
||||||
#else
|
#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 */
|
#endif /* IZ_CHECK_TZ && USE_EF_UT_TIME */
|
||||||
|
|
||||||
/* For systems that do not have tzset() but supply this function using another
|
/* For systems that do not have tzset() but supply this function using another
|
||||||
name (_tzset() or something similar), an appropiate "#define tzset ..."
|
name (_tzset() or something similar), an appropriate "#define tzset ..."
|
||||||
should be added to the system specifc configuration section. */
|
should be added to the system specific configuration section. */
|
||||||
#if (!defined(T20_VMS) && !defined(MACOS) && !defined(RISCOS) && !defined(QDOS))
|
#if (!defined(T20_VMS) && !defined(MACOS) && !defined(RISCOS) && !defined(QDOS))
|
||||||
#if (!defined(BSD) && !defined(MTS) && !defined(CMS_MVS) && !defined(TANDEM))
|
#if (!defined(BSD) && !defined(MTS) && !defined(CMS_MVS) && !defined(TANDEM))
|
||||||
tzset();
|
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).
|
structure (provided the z_utim pointer is not NULL).
|
||||||
If a IZUNIX2 block is found or the IZUNIX block contains UID/GID fields,
|
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
|
and the z_uidgid array pointer is valid (!= NULL), the owner info is
|
||||||
transfered as well.
|
transferred as well.
|
||||||
The presence of an EF_TIME or EF_IZUNIX2 block results in ignoring all
|
The presence of an EF_TIME or EF_IZUNIX2 block results in ignoring all
|
||||||
data from probably present obsolete EF_IZUNIX blocks.
|
data from probably present obsolete EF_IZUNIX blocks.
|
||||||
If multiple blocks of the same type are found, only the information from
|
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_MINIMUM)
|
||||||
: (dos_mdatetime >= DOSTIME_2038_01_18);
|
: (dos_mdatetime >= DOSTIME_2038_01_18);
|
||||||
if (!ut_zip_unzip_compatible) {
|
if (!ut_zip_unzip_compatible) {
|
||||||
/* UnZip interpretes mtime differently than Zip;
|
/* UnZip interprets mtime differently than Zip;
|
||||||
without modtime: ignore complete UT field */
|
without modtime: ignore complete UT field */
|
||||||
flags &= ~0x0ff; /* no time_t times available */
|
flags &= ~0x0ff; /* no time_t times available */
|
||||||
TTrace((stderr,
|
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().
|
/* Convert a string from one encoding to the current locale using iconv().
|
||||||
* Be as non-intrusive as possible. If error is encountered during
|
* Be as non-intrusive as possible. If error is encountered during
|
||||||
* convertion just leave the string intact. */
|
* conversion just leave the string intact. */
|
||||||
static void charset_to_intern(char *string, char *from_charset)
|
static void charset_to_intern(char *string, char *from_charset)
|
||||||
{
|
{
|
||||||
iconv_t cd;
|
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
|
lynx: unix_make
|
||||||
$(MAKE) unzips CC=gcc CF="$(CF) -DLynx -DLYNX -DBSD -DUNIX"
|
$(MAKE) unzips CC=gcc CF="$(CF) -DLynx -DLYNX -DBSD -DUNIX"
|
||||||
|
|
||||||
# Macintosh MacOS X (Unix-compatible enviroment), using standard compiler
|
# Macintosh MacOS X (Unix-compatible environment), using standard compiler
|
||||||
macosx: unix_make
|
macosx: unix_make
|
||||||
$(MAKE) unzips CFLAGS="-O3 -Wall -DBSD" LF2=""
|
$(MAKE) unzips CFLAGS="-O3 -Wall -DBSD" LF2=""
|
||||||
$(STRIP) $(UNZIPS)
|
$(STRIP) $(UNZIPS)
|
||||||
|
|
||||||
# Macintosh MacOS X (Unix-compatible enviroment), using gcc
|
# Macintosh MacOS X (Unix-compatible environment), using gcc
|
||||||
macosx_gcc: unix_make
|
macosx_gcc: unix_make
|
||||||
$(MAKE) unzips CC=gcc CFLAGS="-O3 -Wall -DBSD" LF2=""
|
$(MAKE) unzips CC=gcc CFLAGS="-O3 -Wall -DBSD" LF2=""
|
||||||
$(STRIP) $(UNZIPS)
|
$(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 " "
|
echo " "
|
||||||
echo "Installation is complete. Now, you should add the following"
|
echo "Installation is complete. Now, you should add the following"
|
||||||
echo "(or equivalnet) commands to the appropriate initial user shell"
|
echo "(or equivalent) commands to the appropriate initial user shell"
|
||||||
echo "scripts (such as .profile, .login, etc) -- "
|
echo "scripts (such as .profile, .login, etc) -- "
|
||||||
echo " "
|
echo " "
|
||||||
echo " For korn or bourne shell:"
|
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] == '@') {
|
} else if (allow_arg_files && arg[0] == '@') {
|
||||||
/* arg file */
|
/* arg file */
|
||||||
oERR(PK_PARMS, no_arg_files_err);
|
oERR(PK_PARAMS, no_arg_files_err);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} else {
|
} 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;
|
int save_dosify = dosify, save_pathput = pathput;
|
||||||
dosify = 0;
|
dosify = 0;
|
||||||
pathput = 1;
|
pathput = 1;
|
||||||
/* zname is temporarly mis-used as "undosmode" iname pointer */
|
/* zname is temporarily mis-used as "undosmode" iname pointer */
|
||||||
if ((znamew = ex2inw(namew, isdir, NULL)) != NULL) {
|
if ((znamew = ex2inw(namew, isdir, NULL)) != NULL) {
|
||||||
undosmw = in2exw(znamew);
|
undosmw = in2exw(znamew);
|
||||||
free(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
|
the provided buffer length. If the returned value is less than the
|
||||||
buffer length, then the contents of the buffer will be null-terminated;
|
buffer length, then the contents of the buffer will be null-terminated;
|
||||||
otherwise, it will not be terminated and may be invalid, possibly
|
otherwise, it will not be terminated and may be invalid, possibly
|
||||||
stopping in the middle of a multibyte sequence.
|
stopping in the middle of a multi-byte sequence.
|
||||||
|
|
||||||
In all cases you may pass NULL as the buffer and/or 0 as the length, if
|
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.
|
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)
|
if (bytes == 1)
|
||||||
ret = **utf8; /* ascii-7 */
|
ret = **utf8; /* ascii-7 */
|
||||||
else
|
else
|
||||||
ret = **utf8 & (0x7F >> bytes); /* lead byte of a multibyte sequence */
|
ret = **utf8 & (0x7F >> bytes); /* lead byte of a multi-byte sequence */
|
||||||
(*utf8)++;
|
(*utf8)++;
|
||||||
for (t = 1; t < bytes; t++) /* consume trailing bytes */
|
for (t = 1; t < bytes; t++) /* consume trailing bytes */
|
||||||
ret = (ret << 6) | (*((*utf8)++) & 0x3F);
|
ret = (ret << 6) | (*((*utf8)++) & 0x3F);
|
||||||
|
@ -3537,17 +3537,17 @@ zwchar *utf8_to_wide_string(utf8_string)
|
||||||
#define oERR(err,message) ZIPERR(err, (char *) message)
|
#define oERR(err,message) ZIPERR(err, (char *) message)
|
||||||
|
|
||||||
|
|
||||||
/* Although the below provides some support for multibyte characters
|
/* Although the below provides some support for multi-byte characters
|
||||||
the proper thing to do may be to use wide characters and support
|
the proper thing to do may be to use wide characters and support
|
||||||
Unicode. May get to it soon. EG
|
Unicode. May get to it soon. EG
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* For now stay with muti-byte characters. May support wide characters
|
/* For now stay with multi-byte characters. May support wide characters
|
||||||
in Zip 3.1.
|
in Zip 3.1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* multibyte character set support
|
/* multi-byte character set support
|
||||||
Multibyte characters use typically two or more sequential bytes
|
multi-byte characters use typically two or more sequential bytes
|
||||||
to represent additional characters than can fit in a single byte
|
to represent additional characters than can fit in a single byte
|
||||||
character set. The code used here is based on the ANSI mblen function. */
|
character set. The code used here is based on the ANSI mblen function. */
|
||||||
#ifdef MULTIBYTE_GETOPTNS
|
#ifdef MULTIBYTE_GETOPTNS
|
||||||
|
@ -3555,7 +3555,7 @@ zwchar *utf8_to_wide_string(utf8_string)
|
||||||
ZCONST char *ptr;
|
ZCONST char *ptr;
|
||||||
{
|
{
|
||||||
/* return the number of bytes that the char pointed to is. Return 1 if
|
/* return the number of bytes that the char pointed to is. Return 1 if
|
||||||
null character or error like not start of valid multibyte character. */
|
null character or error like not start of valid multi-byte character. */
|
||||||
int cl;
|
int cl;
|
||||||
|
|
||||||
cl = mblen(ptr, MB_CUR_MAX);
|
cl = mblen(ptr, MB_CUR_MAX);
|
||||||
|
@ -3578,8 +3578,8 @@ zwchar *utf8_to_wide_string(utf8_string)
|
||||||
# define MULTIBYTE_GETOPTNS
|
# define MULTIBYTE_GETOPTNS
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
/* multibyte character set support
|
/* multi-byte character set support
|
||||||
Multibyte characters use typically two or more sequential bytes
|
multi-byte characters use typically two or more sequential bytes
|
||||||
to represent additional characters than can fit in a single byte
|
to represent additional characters than can fit in a single byte
|
||||||
character set. The code used here is based on the ANSI mblen function. */
|
character set. The code used here is based on the ANSI mblen function. */
|
||||||
# ifdef MULTIBYTE_GETOPTNS
|
# ifdef MULTIBYTE_GETOPTNS
|
||||||
|
@ -3588,7 +3588,7 @@ zwchar *utf8_to_wide_string(utf8_string)
|
||||||
ZCONST char *ptr;
|
ZCONST char *ptr;
|
||||||
{
|
{
|
||||||
/* return the number of bytes that the char pointed to is. Return 1 if
|
/* return the number of bytes that the char pointed to is. Return 1 if
|
||||||
null character or error like not start of valid multibyte character. */
|
null character or error like not start of valid multi-byte character. */
|
||||||
int cl;
|
int cl;
|
||||||
|
|
||||||
cl = mblen(ptr, MB_CUR_MAX);
|
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 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 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_req_val_err[] = "option %s requires one character value";
|
||||||
static ZCONST char Far oco_no_mbc_err[] = "option %s does not support multibyte values";
|
static ZCONST char Far oco_no_mbc_err[] = "option %s does not support multi-byte values";
|
||||||
static ZCONST char Far num_req_val_err[] = "option %s requires number value";
|
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_ambig_err[] = "long option '%s' ambiguous";
|
||||||
static ZCONST char Far long_op_not_sup_err[] = "long option '%s' not supported";
|
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]) {
|
if (arg[(*optchar) + clen]) {
|
||||||
/* has value */
|
/* has value */
|
||||||
if (MB_CLEN(arg + (*optchar) + clen) > 1) {
|
if (MB_CLEN(arg + (*optchar) + clen) > 1) {
|
||||||
/* multibyte value not allowed for now */
|
/* multi-byte value not allowed for now */
|
||||||
optionerr(optionerrbuf, oco_no_mbc_err, match, 0);
|
optionerr(optionerrbuf, oco_no_mbc_err, match, 0);
|
||||||
if (depth > 0) {
|
if (depth > 0) {
|
||||||
/* unwind */
|
/* unwind */
|
||||||
|
@ -4364,7 +4364,7 @@ local unsigned long get_longopt(args, argnum, optchar, negated, value,
|
||||||
* -e=
|
* -e=
|
||||||
* Either optional or required values can be specified. Optional values
|
* Either optional or required values can be specified. Optional values
|
||||||
* now use both forms as ignoring the later got confusing. Any
|
* now use both forms as ignoring the later got confusing. Any
|
||||||
* non-value short options can preceed a valued short option as in
|
* non-value short options can precede a valued short option as in
|
||||||
* -abevalue
|
* -abevalue
|
||||||
* Some value types (one_char and number) allow options after the value
|
* 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
|
* 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 ...
|
* -o value1 value2 value3 ...
|
||||||
* for a list of values. The list ends at the next option, the
|
* for a list of values. The list ends at the next option, the
|
||||||
* end of the command line, or at a single "@" argument.
|
* end of the command line, or at a single "@" argument.
|
||||||
* Each value is treated as if it was preceeded by the option, so
|
* Each value is treated as if it was preceded by the option, so
|
||||||
* --option1 val1 val2
|
* --option1 val1 val2
|
||||||
* with option1 value_type set to o_VALUE_LIST is the same as
|
* with option1 value_type set to o_VALUE_LIST is the same as
|
||||||
* --option1=val1 --option1=val2
|
* --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 */
|
/* dots 10/20/04 */
|
||||||
zoff_t dot_size = 0; /* bytes processed in deflate per dot, 0 = no dots */
|
zoff_t dot_size = 0; /* bytes processed in deflate per dot, 0 = no dots */
|
||||||
zoff_t dot_count = 0; /* buffers seen, recyles at dot_size */
|
zoff_t dot_count = 0; /* buffers seen, recycles at dot_size */
|
||||||
/* status 10/30/04 */
|
/* status 10/30/04 */
|
||||||
int display_counts = 0; /* display running file count */
|
int display_counts = 0; /* display running file count */
|
||||||
int display_bytes = 0; /* display running bytes remaining */
|
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
|
# undef FORCE_UNIX_OVER_WIN32
|
||||||
# endif
|
# endif
|
||||||
# ifdef FORCE_WIN32_OVER_UNIX
|
# ifdef FORCE_WIN32_OVER_UNIX
|
||||||
/* native Win32 support was explicitely requested... */
|
/* native Win32 support was explicitly requested... */
|
||||||
# undef UNIX
|
# undef UNIX
|
||||||
# else
|
# else
|
||||||
/* use the POSIX (Unix) emulation features by default... */
|
/* use the POSIX (Unix) emulation features by default... */
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some compiler environments may require additional attributes attached
|
* Some compiler environments may require additional attributes attached
|
||||||
* to declarations of runtime libary functions (e.g. to prepare for
|
* to declarations of runtime library functions (e.g. to prepare for
|
||||||
* linking against a "shared dll" version of the RTL). Here, we provide
|
* linking against a "shared dll" version of the RTL). Here, we provide
|
||||||
* the "empty" default for these attributes.
|
* 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.
|
* 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
|
* This does not happen often and to recreate the problem a large file
|
||||||
* with non-compressable data is needed so that deflate chooses to store the
|
* with non-compressible data is needed so that deflate chooses to store the
|
||||||
* data. A test file of 400 MB seems large enough to recreate the problem
|
* data. A test file of 400 MB seems large enough to recreate the problem
|
||||||
* using a command such as
|
* using a command such as
|
||||||
* zip -1 -e crcerror.zip testfile.dat
|
* 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
|
#ifdef DOS
|
||||||
|
|
||||||
/* Do NEVER include (re)definiton of `environ' variable with any version
|
/* Do NEVER include (re)definition of `environ' variable with any version
|
||||||
of MSC or BORLAND/Turbo C. These compilers supply an incompatible
|
of MSC or BORLAND/Turbo C. These compilers supply an incompatible
|
||||||
definition in <stdlib.h>. */
|
definition in <stdlib.h>. */
|
||||||
#if defined(__GO32__) || defined(__EMX__)
|
#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 */
|
des_usize = 0; /* Data descriptor usize */
|
||||||
|
|
||||||
dot_size = 0; /* buffers processed in deflate per dot, 0 = no dots */
|
dot_size = 0; /* buffers processed in deflate per dot, 0 = no dots */
|
||||||
dot_count = 0; /* buffers seen, recyles at dot_size */
|
dot_count = 0; /* buffers seen, recycles at dot_size */
|
||||||
|
|
||||||
display_counts = 0; /* display running file count */
|
display_counts = 0; /* display running file count */
|
||||||
display_bytes = 0; /* display running bytes remaining */
|
display_bytes = 0; /* display running bytes remaining */
|
||||||
|
@ -2455,7 +2455,7 @@ char **argv; /* command line tokens */
|
||||||
#endif /* IZ_CHECK_TZ && USE_EF_UT_TIME */
|
#endif /* IZ_CHECK_TZ && USE_EF_UT_TIME */
|
||||||
|
|
||||||
/* For systems that do not have tzset() but supply this function using another
|
/* For systems that do not have tzset() but supply this function using another
|
||||||
name (_tzset() or something similar), an appropiate "#define tzset ..."
|
name (_tzset() or something similar), an appropriate "#define tzset ..."
|
||||||
should be added to the system specifc configuration section. */
|
should be added to the system specifc configuration section. */
|
||||||
#if (!defined(TOPS20) && !defined(VMS))
|
#if (!defined(TOPS20) && !defined(VMS))
|
||||||
#if (!defined(RISCOS) && !defined(MACOS) && !defined(QDOS))
|
#if (!defined(RISCOS) && !defined(MACOS) && !defined(QDOS))
|
||||||
|
|
2
third_party/zip/zip.h
vendored
2
third_party/zip/zip.h
vendored
|
@ -353,7 +353,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_2; /* ODS2 file name case in VMS. -1: down. */
|
||||||
extern int vms_case_5; /* ODS5 file name case in VMS. +1: preserve. */
|
extern int vms_case_5; /* ODS5 file name case in VMS. +1: preserve. */
|
||||||
|
|
||||||
/* Accomodation for /NAMES = AS_IS with old header files. */
|
/* Accommodation for /NAMES = AS_IS with old header files. */
|
||||||
# define cma$tis_errno_get_addr CMA$TIS_ERRNO_GET_ADDR
|
# define cma$tis_errno_get_addr CMA$TIS_ERRNO_GET_ADDR
|
||||||
# define lib$establish LIB$ESTABLISH
|
# define lib$establish LIB$ESTABLISH
|
||||||
# define lib$get_foreign LIB$GET_FOREIGN
|
# 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 },
|
/* 13 */ { "NAME", "Missing or empty zip file", ZE_S_ERROR },
|
||||||
/* 14 */ { "WRITE", "Output file write failure", ZE_S_SEVERE | ZE_S_PERR },
|
/* 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 },
|
/* 15 */ { "CREAT", "Could not create output file", ZE_S_SEVERE | ZE_S_PERR },
|
||||||
/* 16 */ { "PARMS", "Invalid command arguments", ZE_S_ERROR },
|
/* 16 */ { "PARAMS", "Invalid command arguments", ZE_S_ERROR },
|
||||||
/* 17 */ { "", "", ZE_S_UNUSED },
|
/* 17 */ { "", "", ZE_S_UNUSED },
|
||||||
/* 18 */ { "OPEN", "File not found or no read permission",
|
/* 18 */ { "OPEN", "File not found or no read permission",
|
||||||
ZE_S_ERROR | ZE_S_PERR },
|
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))
|
if ((fix == 2) && (z->flg != z->lflg))
|
||||||
/* The comparision between central and local version of the
|
/* The comparison between central and local version of the
|
||||||
"general purpose bit flag" cannot be used from scanzipf_regnew(),
|
"general purpose bit flag" cannot be used from scanzipf_regnew(),
|
||||||
because in the "regular" zipfile processing, the local header reads
|
because in the "regular" zipfile processing, the local header reads
|
||||||
have been postponed until the actual entry processing takes place.
|
have been postponed until the actual entry processing takes place.
|
||||||
They have not yet been read when "zipoddities()" is called.
|
They have not yet been read when "zipoddities()" is called.
|
||||||
This change was neccessary to support multivolume archives.
|
This change was necessary to support multivolume archives.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
sprintf(errbuf, "local flags = 0x%04x, central = 0x%04x: ",
|
sprintf(errbuf, "local flags = 0x%04x, central = 0x%04x: ",
|
||||||
|
@ -3959,7 +3959,7 @@ local int scanzipf_fixnew()
|
||||||
/* New regular scan */
|
/* New regular scan */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* scanzipf_regnew is similar to the orignal scanzipf_reg in that it
|
* scanzipf_regnew is similar to the original scanzipf_reg in that it
|
||||||
* reads the end of the archive and goes from there. Unlike that
|
* reads the end of the archive and goes from there. Unlike that
|
||||||
* scan this one stops after reading the central directory and does
|
* scan this one stops after reading the central directory and does
|
||||||
* not read the local headers. After the directory scan for new
|
* 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
|
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
|
Zip64 extra field if the uncompressed size did not. This assumption should
|
||||||
only fail for a large file of nearly totally uncompressable data.
|
only fail for a large file of nearly totally uncompressible data.
|
||||||
|
|
||||||
If streaming stdin in and use_descriptors is set then always create a Zip64
|
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
|
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)
|
local int catalloc(a, s)
|
||||||
char * far *a; /* pointer to a pointer to a malloc'ed string */
|
char * far *a; /* pointer to a pointer to a malloc'ed string */
|
||||||
char *s; /* string to concatenate on a */
|
char *s; /* string to concatenate on a */
|
||||||
/* Concatentate the string s to the malloc'ed string pointed to by a.
|
/* Concatenate the string s to the malloc'ed string pointed to by a.
|
||||||
Preprocess s by removing backslash escape characters. */
|
Preprocess s by removing backslash escape characters. */
|
||||||
{
|
{
|
||||||
char *p; /* temporary pointer */
|
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.
|
/* 2004-12-01 SMS.
|
||||||
* Changed to do big-n test only for small zoff_t.
|
* Changed to do big-n test only for small zoff_t.
|
||||||
* Changed big-n arithmetic to accomodate apparently negative values
|
* Changed big-n arithmetic to accommodate apparently negative values
|
||||||
* when a small zoff_t value exceeds 2G.
|
* when a small zoff_t value exceeds 2G.
|
||||||
* Increased the reduction divisor from 256 to 512 to avoid the sign bit
|
* Increased the reduction divisor from 256 to 512 to avoid the sign bit
|
||||||
* in a reduced intermediate, allowing signed arithmetic for the final
|
* 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
|
* deflate_stored() is written to minimize the number of times an input
|
||||||
* byte is copied. It is most efficient with large input and output
|
* byte is copied. It is most efficient with large input and output
|
||||||
* buffers, which maximizes the opportunites to have a single copy from
|
* buffers, which maximizes the opportunities to have a single copy from
|
||||||
* next_in to next_out.
|
* next_in to next_out.
|
||||||
*/
|
*/
|
||||||
static block_state deflate_stored(struct DeflateState *s, int flush) {
|
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
|
/* 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
|
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
|
codes. These values were found by exhaustive searches using the program
|
||||||
examples/enough.c found in the zlib distribtution. The arguments to that
|
examples/enough.c found in the zlib distribution. The arguments to that
|
||||||
program are the number of symbols, the initial root table size, and the
|
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
|
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.
|
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
|
* - Use pointers instead of long to specify source and
|
||||||
* destination sizes to avoid arbitrary 4 GB limits
|
* destination sizes to avoid arbitrary 4 GB limits
|
||||||
* 1.2 17 Mar 2002 - Add faster version of decode(), doubles speed (!),
|
* 1.2 17 Mar 2002 - Add faster version of decode(), doubles speed (!),
|
||||||
* but leave simple version for readabilty
|
* but leave simple version for readability
|
||||||
* - Make sure invalid distances detected if pointers
|
* - Make sure invalid distances detected if pointers
|
||||||
* are 16 bits
|
* are 16 bits
|
||||||
* - Fix fixed codes table error
|
* - 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
|
* 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
|
* 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.
|
* that length, and the symbols 16, 17, and 18 are run-length instructions.
|
||||||
* Each of 16, 17, and 18 are follwed by extra bits to define the length of
|
* Each of 16, 17, and 18 are followed by extra bits to define the length of
|
||||||
* the run. 16 copies the last length 3 to 6 times. 17 represents 3 to 10
|
* 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
|
* zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols
|
||||||
* are common, hence the special coding for zero lengths.
|
* 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) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Genererate the file trees.h describing the static trees.
|
* Generate the file trees.h describing the static trees.
|
||||||
*/
|
*/
|
||||||
#ifdef GEN_TREES_H
|
#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
|
* to dictionary. dictionary must have enough space, where 32768 bytes is
|
||||||
* always enough. If deflateGetDictionary() is called with dictionary equal to
|
* always enough. If deflateGetDictionary() is called with dictionary equal to
|
||||||
* Z_NULL, then only the dictionary length is returned, and nothing is copied.
|
* Z_NULL, then only the dictionary length is returned, and nothing is copied.
|
||||||
* Similary, if dictLength is Z_NULL, then it is not set.
|
* Similarly, if dictLength is Z_NULL, then it is not set.
|
||||||
*
|
*
|
||||||
* deflateGetDictionary() may return a length less than the window size, even
|
* 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
|
* 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
|
* to dictionary. dictionary must have enough space, where 32768 bytes is
|
||||||
* always enough. If inflateGetDictionary() is called with dictionary equal to
|
* always enough. If inflateGetDictionary() is called with dictionary equal to
|
||||||
* Z_NULL, then only the dictionary length is returned, and nothing is copied.
|
* Z_NULL, then only the dictionary length is returned, and nothing is copied.
|
||||||
* Similary, if dictLength is Z_NULL, then it is not set.
|
* Similarly, if dictLength is Z_NULL, then it is not set.
|
||||||
*
|
*
|
||||||
* @return Z_OK on success, or Z_STREAM_ERROR if the stream state is
|
* @return Z_OK on success, or Z_STREAM_ERROR if the stream state is
|
||||||
* inconsistent.
|
* 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
|
* provided, but could be inferred from the result of gztell(). This behavior
|
||||||
* is the same as the behavior of fread() implementations in common libraries,
|
* 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
|
* but it prevents the direct use of gzfread() to read a concurrently written
|
||||||
* file, reseting and retrying on end-of-file, when size is not 1.
|
* file, resetting and retrying on end-of-file, when size is not 1.
|
||||||
*/
|
*/
|
||||||
size_t gzfread(voidp buf, size_t size, size_t nitems, gzFile file);
|
size_t gzfread(voidp buf, size_t size, size_t nitems, gzFile file);
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ ENVIRONMENT\n\
|
||||||
V=4 print command w/ wall+cpu+mem usage\n\
|
V=4 print command w/ wall+cpu+mem usage\n\
|
||||||
V=5 print output when exitcode is zero\n\
|
V=5 print output when exitcode is zero\n\
|
||||||
COLUMNS=INT explicitly set terminal width for output truncation\n\
|
COLUMNS=INT explicitly set terminal width for output truncation\n\
|
||||||
TERM=dumb disable ansi x3.64 seuences and thousands separators\n\
|
TERM=dumb disable ansi x3.64 sequences and thousands separators\n\
|
||||||
\n"
|
\n"
|
||||||
|
|
||||||
struct Strings {
|
struct Strings {
|
||||||
|
|
|
@ -251,7 +251,7 @@ const struct Descriptors {
|
||||||
"STOS, and SCAS). In 64-bit mode, only 64-bit (RDI) and 32-bit (EDI) "
|
"STOS, and SCAS). In 64-bit mode, only 64-bit (RDI) and 32-bit (EDI) "
|
||||||
"address sizes are supported. In non-64-bit modes, only 32-bit (EDI) "
|
"address sizes are supported. In non-64-bit modes, only 32-bit (EDI) "
|
||||||
"and 16-bit (DI) address sizes are supported. The implicit ES "
|
"and 16-bit (DI) address sizes are supported. The implicit ES "
|
||||||
"segment register cannot be overriden by a segment prefix."},
|
"segment register cannot be overridden by a segment prefix."},
|
||||||
|
|
||||||
{"Z", "r",
|
{"Z", "r",
|
||||||
"The instruction has no ModR/M byte; the three least-significant "
|
"The instruction has no ModR/M byte; the three least-significant "
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "tool/build/lib/memory.h"
|
#include "tool/build/lib/memory.h"
|
||||||
#include "tool/build/lib/pml4t.h"
|
#include "tool/build/lib/pml4t.h"
|
||||||
|
|
||||||
struct Pml4tFormater {
|
struct Pml4tFormatter {
|
||||||
bool t;
|
bool t;
|
||||||
int64_t start;
|
int64_t start;
|
||||||
struct Buffer b;
|
struct Buffer b;
|
||||||
|
@ -45,14 +45,14 @@ static int64_t MakeAddress(unsigned short a[4]) {
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FormatStartPage(struct Pml4tFormater *pp, int64_t start) {
|
static void FormatStartPage(struct Pml4tFormatter *pp, int64_t start) {
|
||||||
pp->t = true;
|
pp->t = true;
|
||||||
pp->start = start;
|
pp->start = start;
|
||||||
if (pp->lines++) AppendChar(&pp->b, '\n');
|
if (pp->lines++) AppendChar(&pp->b, '\n');
|
||||||
AppendFmt(&pp->b, "%012lx-", start);
|
AppendFmt(&pp->b, "%012lx-", start);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FormatEndPage(struct Pml4tFormater *pp, int64_t end) {
|
static void FormatEndPage(struct Pml4tFormatter *pp, int64_t end) {
|
||||||
int64_t size;
|
int64_t size;
|
||||||
pp->t = false;
|
pp->t = false;
|
||||||
size = end - pp->start;
|
size = end - pp->start;
|
||||||
|
@ -67,7 +67,7 @@ static void *GetPt(struct Machine *m, uint64_t r) {
|
||||||
char *FormatPml4t(struct Machine *m) {
|
char *FormatPml4t(struct Machine *m) {
|
||||||
uint64_t *pd[4];
|
uint64_t *pd[4];
|
||||||
unsigned short i, a[4];
|
unsigned short i, a[4];
|
||||||
struct Pml4tFormater pp = {0};
|
struct Pml4tFormatter pp = {0};
|
||||||
unsigned short range[][2] = {{256, 512}, {0, 256}};
|
unsigned short range[][2] = {{256, 512}, {0, 256}};
|
||||||
if ((m->mode & 3) != XED_MODE_LONG) return strdup("");
|
if ((m->mode & 3) != XED_MODE_LONG) return strdup("");
|
||||||
pd[0] = GetPt(m, m->cr3);
|
pd[0] = GetPt(m, m->cr3);
|
||||||
|
|
|
@ -143,7 +143,7 @@ void OpPopZvq(struct Machine *m, uint32_t rde) {
|
||||||
static void OpCall(struct Machine *m, uint32_t rde, uint64_t func) {
|
static void OpCall(struct Machine *m, uint32_t rde, uint64_t func) {
|
||||||
if (!func) {
|
if (!func) {
|
||||||
/*
|
/*
|
||||||
* call null is technically possible but too fringe and disasterous
|
* call null is technically possible but too fringe and disastrous
|
||||||
* to accommodate at least until our debugger has rewind capability
|
* to accommodate at least until our debugger has rewind capability
|
||||||
*/
|
*/
|
||||||
HaltMachine(m, kMachineProtectionFault);
|
HaltMachine(m, kMachineProtectionFault);
|
||||||
|
|
|
@ -367,7 +367,7 @@ bool IsParallelBuild(void) {
|
||||||
return (makeflags = getenv("MAKEFLAGS")) && strstr(makeflags, "-j");
|
return (makeflags = getenv("MAKEFLAGS")) && strstr(makeflags, "-j");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShouldRunInParralel(void) {
|
bool ShouldRunInParallel(void) {
|
||||||
return !IsWindows() && IsParallelBuild();
|
return !IsWindows() && IsParallelBuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -148,7 +148,7 @@ const struct IdName kNtImageCharacteristicNames[] = {
|
||||||
{kNtImageFileExecutableImage, "kNtImageFileExecutableImage"},
|
{kNtImageFileExecutableImage, "kNtImageFileExecutableImage"},
|
||||||
{kNtImageFileLineNumsStripped, "kNtImageFileLineNumsStripped"},
|
{kNtImageFileLineNumsStripped, "kNtImageFileLineNumsStripped"},
|
||||||
{kNtImageFileLocalSymsStripped, "kNtImageFileLocalSymsStripped"},
|
{kNtImageFileLocalSymsStripped, "kNtImageFileLocalSymsStripped"},
|
||||||
{kNtImageFileAggresiveWsTrim, "kNtImageFileAggresiveWsTrim"},
|
{kNtImageFileAggressiveWsTrim, "kNtImageFileAggressiveWsTrim"},
|
||||||
{kNtImageFileLargeAddressAware, "kNtImageFileLargeAddressAware"},
|
{kNtImageFileLargeAddressAware, "kNtImageFileLargeAddressAware"},
|
||||||
{kNtImageFileBytesReversedLo, "kNtImageFileBytesReversedLo"},
|
{kNtImageFileBytesReversedLo, "kNtImageFileBytesReversedLo"},
|
||||||
{kNtImageFile32bitMachine, "kNtImageFile32bitMachine"},
|
{kNtImageFile32bitMachine, "kNtImageFile32bitMachine"},
|
||||||
|
|
|
@ -292,7 +292,7 @@
|
||||||
(1 font-lock-constant-face)
|
(1 font-lock-constant-face)
|
||||||
(2 font-lock-constant-face))
|
(2 font-lock-constant-face))
|
||||||
|
|
||||||
;; Bultin Constants
|
;; Builtin Constants
|
||||||
;;
|
;;
|
||||||
;; - Valid
|
;; - Valid
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -863,7 +863,7 @@ FUNCTIONS
|
||||||
|
|
||||||
Integer literals are encoded as decimal. However if the int64
|
Integer literals are encoded as decimal. However if the int64
|
||||||
number is ≥256 and has a population count of 1 then we switch
|
number is ≥256 and has a population count of 1 then we switch
|
||||||
to representating the number in hexadecimal, for readability.
|
to representing the number in hexadecimal, for readability.
|
||||||
Hex numbers have leading zeroes added in order to visualize
|
Hex numbers have leading zeroes added in order to visualize
|
||||||
whether the number fits in a uint16, uint32, or int64. Also
|
whether the number fits in a uint16, uint32, or int64. Also
|
||||||
some numbers can only be encoded expressionally. For example,
|
some numbers can only be encoded expressionally. For example,
|
||||||
|
|
|
@ -52,7 +52,7 @@ and later.
|
||||||
Note: this document is also valid for the
|
Note: this document is also valid for the
|
||||||
[lua-argon2-ffi](https://github.com/thibaultcha/lua-argon2-ffi) module: an FFI
|
[lua-argon2-ffi](https://github.com/thibaultcha/lua-argon2-ffi) module: an FFI
|
||||||
implementation of this binding for LuaJIT which uses the same API as this
|
implementation of this binding for LuaJIT which uses the same API as this
|
||||||
original implementaiton.
|
original implementation.
|
||||||
|
|
||||||
@module argon2
|
@module argon2
|
||||||
@author Thibault Charbonnier
|
@author Thibault Charbonnier
|
||||||
|
@ -76,7 +76,7 @@ for a description of those variants.
|
||||||
/***
|
/***
|
||||||
Argon2 hashing options. Those options can be given to `hash_encoded` as a table.
|
Argon2 hashing options. Those options can be given to `hash_encoded` as a table.
|
||||||
If values are omitted, the default values of this module will be used.
|
If values are omitted, the default values of this module will be used.
|
||||||
Default values of this module can be overriden with `m_cost()`, `t_cost()`,
|
Default values of this module can be overridden with `m_cost()`, `t_cost()`,
|
||||||
`parallelism()`, `hash_len()`, and `variant()`.
|
`parallelism()`, `hash_len()`, and `variant()`.
|
||||||
@field t_cost Number of iterations (`number`, default: `3`).
|
@field t_cost Number of iterations (`number`, default: `3`).
|
||||||
argon2.hash_encoded("password", "salt", { t_cost = 4 })
|
argon2.hash_encoded("password", "salt", { t_cost = 4 })
|
||||||
|
|
|
@ -1023,7 +1023,7 @@ static void db_sql_finalize_function(sqlite3_context *context) {
|
||||||
/*
|
/*
|
||||||
** Register a normal function
|
** Register a normal function
|
||||||
** Params: db, function name, number arguments, [ callback | step, finalize], user data
|
** Params: db, function name, number arguments, [ callback | step, finalize], user data
|
||||||
** Returns: true on sucess
|
** Returns: true on success
|
||||||
**
|
**
|
||||||
** Normal function:
|
** Normal function:
|
||||||
** Params: context, params
|
** Params: context, params
|
||||||
|
@ -1336,7 +1336,7 @@ static int db_rollback_hook(lua_State *L) {
|
||||||
**
|
**
|
||||||
** callback function:
|
** callback function:
|
||||||
** Params: userdata, number of tries
|
** Params: userdata, number of tries
|
||||||
** returns: 0 to return immediatly and return SQLITE_BUSY, non-zero to try again
|
** returns: 0 to return immediately and return SQLITE_BUSY, non-zero to try again
|
||||||
*/
|
*/
|
||||||
static int db_busy_callback(void *user, int tries) {
|
static int db_busy_callback(void *user, int tries) {
|
||||||
int retry = 0; /* abort by default */
|
int retry = 0; /* abort by default */
|
||||||
|
|
|
@ -7,7 +7,7 @@ DESCRIPTION
|
||||||
popular interpreters cannot do; this lets plinko gain a considerable
|
popular interpreters cannot do; this lets plinko gain a considerable
|
||||||
performance edge while retaining an event greater edge in simplicity
|
performance edge while retaining an event greater edge in simplicity
|
||||||
|
|
||||||
We hope you find these sources informative, eductional, and possibly
|
We hope you find these sources informative, educational, and possibly
|
||||||
useful too. Lisp source code, written in its dialect is included too
|
useful too. Lisp source code, written in its dialect is included too
|
||||||
under //tool/plinko/lib and unit tests which clarify their usage can
|
under //tool/plinko/lib and unit tests which clarify their usage can
|
||||||
be found in //test/tool/plinko.
|
be found in //test/tool/plinko.
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||||
|
|
||||||
// The modes below use various unicodes for 'progresssive' pixelization:
|
// The modes below use various unicodes for 'progressive' pixelization:
|
||||||
// each mode supersets the previous to increase resolution more and more.
|
// each mode supersets the previous to increase resolution more and more.
|
||||||
// Ideally, a fully dense mapping of the (Y*X) space defined by kGlyph size
|
// Ideally, a fully dense mapping of the (Y*X) space defined by kGlyph size
|
||||||
// would produce a picture perfect image, but at the cost of sampling speed.
|
// would produce a picture perfect image, but at the cost of sampling speed.
|
||||||
// Therefore, supersets are parcimonious: they only add the minimal set of
|
// Therefore, supersets are parsimonious: they only add the minimal set of
|
||||||
// missing shapes that can increase resolution.
|
// missing shapes that can increase resolution.
|
||||||
// Ideally, this should be based on a study of the residual, but some logic
|
// Ideally, this should be based on a study of the residual, but some logic
|
||||||
// can go a long way: after some block pixelization, will need diagonals
|
// can go a long way: after some block pixelization, will need diagonals
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
// from the space left below, seen by overimposing an underline ⠿_
|
// from the space left below, seen by overimposing an underline ⠿_
|
||||||
// along the 3 dots, the Y axis is least 1,0,1,0,1,0,0,1 so 8 steps
|
// along the 3 dots, the Y axis is least 1,0,1,0,1,0,0,1 so 8 steps
|
||||||
//
|
//
|
||||||
// Problem: fonts are taller than wider, and terminals are tradionally 80x24, so
|
// Problem: fonts are taller than wider, and terminals are traditionally 80x24, so
|
||||||
// - we shouldn't use square glyphs, 8x16 seems to be the minimal size
|
// - we shouldn't use square glyphs, 8x16 seems to be the minimal size
|
||||||
// - we should adapt the conversion to BMP to avoid accidental Y downsampling
|
// - we should adapt the conversion to BMP to avoid accidental Y downsampling
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ static const struct itimerval kTimerDisarm = {
|
||||||
{0, 0},
|
{0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct itimerval kTimerHalfSecordSingleShot = {
|
static const struct itimerval kTimerHalfSecondSingleShot = {
|
||||||
{0, 0},
|
{0, 0},
|
||||||
{0, 500000},
|
{0, 500000},
|
||||||
};
|
};
|
||||||
|
@ -353,7 +353,7 @@ static bool CloseSpeaker(void) {
|
||||||
if (playpid_) {
|
if (playpid_) {
|
||||||
kill(playpid_, SIGTERM);
|
kill(playpid_, SIGTERM);
|
||||||
xsigaction(SIGALRM, StrikeDownCrapware, SA_RESETHAND, 0, 0);
|
xsigaction(SIGALRM, StrikeDownCrapware, SA_RESETHAND, 0, 0);
|
||||||
setitimer(ITIMER_REAL, &kTimerHalfSecordSingleShot, NULL);
|
setitimer(ITIMER_REAL, &kTimerHalfSecondSingleShot, NULL);
|
||||||
while (playpid_) {
|
while (playpid_) {
|
||||||
if (waitpid(playpid_, &wstatus, 0) != -1) {
|
if (waitpid(playpid_, &wstatus, 0) != -1) {
|
||||||
rc |= WEXITSTATUS(wstatus);
|
rc |= WEXITSTATUS(wstatus);
|
||||||
|
|
Loading…
Add table
Reference in a new issue