Differences From Artifact [893754124c]:
- File extsrc/shell.c — part of check-in [c20aa86727] at 2024-09-26 19:49:40 on branch trunk — Merge the latest SQLite enhancements, and in particular the new ".www" dot-command available to "fossil sql". (user: drh size: 1041019) [more...]
To Artifact [dfb915e0fc]:
- File extsrc/shell.c — part of check-in [72070b304b] at 2024-10-07 13:33:14 on branch trunk — Update the built-in SQLite to the latest 3.47.0 alpha for testing. (user: drh size: 1040487)
| ︙ | ︙ | |||
915 916 917 918 919 920 921 |
/* Lookup table to estimate the number of columns consumed by a Unicode
** character.
*/
static const struct {
unsigned char w; /* Width of the character in columns */
int iFirst; /* First character in a span having this width */
} aUWidth[] = {
| | | 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 |
/* Lookup table to estimate the number of columns consumed by a Unicode
** character.
*/
static const struct {
unsigned char w; /* Width of the character in columns */
int iFirst; /* First character in a span having this width */
} aUWidth[] = {
/* {1, 0x00000}, */
{0, 0x00300}, {1, 0x00370}, {0, 0x00483}, {1, 0x00487}, {0, 0x00488},
{1, 0x0048a}, {0, 0x00591}, {1, 0x005be}, {0, 0x005bf}, {1, 0x005c0},
{0, 0x005c1}, {1, 0x005c3}, {0, 0x005c4}, {1, 0x005c6}, {0, 0x005c7},
{1, 0x005c8}, {0, 0x00600}, {1, 0x00604}, {0, 0x00610}, {1, 0x00616},
{0, 0x0064b}, {1, 0x0065f}, {0, 0x00670}, {1, 0x00671}, {0, 0x006d6},
{1, 0x006e5}, {0, 0x006e7}, {1, 0x006e9}, {0, 0x006ea}, {1, 0x006ee},
{0, 0x0070f}, {1, 0x00710}, {0, 0x00711}, {1, 0x00712}, {0, 0x00730},
|
| ︙ | ︙ | |||
993 994 995 996 997 998 999 |
** Inaccuracies in the width estimates might cause columns to be misaligned.
** Unfortunately, there is nothing we can do about that.
*/
int cli_wcwidth(int c){
int iFirst, iLast;
/* Fast path for common characters */
| < < < | 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 |
** Inaccuracies in the width estimates might cause columns to be misaligned.
** Unfortunately, there is nothing we can do about that.
*/
int cli_wcwidth(int c){
int iFirst, iLast;
/* Fast path for common characters */
if( c<=0x300 ) return 1;
/* The general case */
iFirst = 0;
iLast = sizeof(aUWidth)/sizeof(aUWidth[0]) - 1;
while( iFirst<iLast-1 ){
int iMid = (iFirst+iLast)/2;
|
| ︙ | ︙ | |||
29665 29666 29667 29668 29669 29670 29671 |
){
char *zFile = 0;
int bTxtMode = 0;
int i;
int eMode = 0;
int bOnce = 0; /* 0: .output, 1: .once, 2: .excel/.www */
int bPlain = 0; /* --plain option */
| | | 29662 29663 29664 29665 29666 29667 29668 29669 29670 29671 29672 29673 29674 29675 29676 |
){
char *zFile = 0;
int bTxtMode = 0;
int i;
int eMode = 0;
int bOnce = 0; /* 0: .output, 1: .once, 2: .excel/.www */
int bPlain = 0; /* --plain option */
static const char *zBomUtf8 = "\357\273\277";
const char *zBom = 0;
failIfSafeMode(p, "cannot run .%s in safe mode", azArg[0]);
if( c=='e' ){
eMode = 'x';
bOnce = 2;
}else if( c=='w' ){
|
| ︙ | ︙ | |||
31012 31013 31014 31015 31016 31017 31018 |
{"pending_byte", SQLITE_TESTCTRL_PENDING_BYTE,1, "OFFSET " },
{"prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE,0, "" },
{"prng_save", SQLITE_TESTCTRL_PRNG_SAVE, 0, "" },
{"prng_seed", SQLITE_TESTCTRL_PRNG_SEED, 0, "SEED ?db?" },
{"seek_count", SQLITE_TESTCTRL_SEEK_COUNT, 0, "" },
{"sorter_mmap", SQLITE_TESTCTRL_SORTER_MMAP, 0, "NMAX" },
{"tune", SQLITE_TESTCTRL_TUNE, 1, "ID VALUE" },
| < | 31009 31010 31011 31012 31013 31014 31015 31016 31017 31018 31019 31020 31021 31022 |
{"pending_byte", SQLITE_TESTCTRL_PENDING_BYTE,1, "OFFSET " },
{"prng_restore", SQLITE_TESTCTRL_PRNG_RESTORE,0, "" },
{"prng_save", SQLITE_TESTCTRL_PRNG_SAVE, 0, "" },
{"prng_seed", SQLITE_TESTCTRL_PRNG_SEED, 0, "SEED ?db?" },
{"seek_count", SQLITE_TESTCTRL_SEEK_COUNT, 0, "" },
{"sorter_mmap", SQLITE_TESTCTRL_SORTER_MMAP, 0, "NMAX" },
{"tune", SQLITE_TESTCTRL_TUNE, 1, "ID VALUE" },
};
int testctrl = -1;
int iCtrl = -1;
int rc2 = 0; /* 0: usage. 1: %d 2: %x 3: no-output */
int isOk = 0;
int i, n2;
const char *zCmd = 0;
|
| ︙ | ︙ | |||
31246 31247 31248 31249 31250 31251 31252 |
if( nArg==3 ){
int opt = booleanValue(azArg[2]);
rc2 = sqlite3_test_control(testctrl, opt);
isOk = 3;
}
break;
| < < < < < < < < < < < < < < < | 31242 31243 31244 31245 31246 31247 31248 31249 31250 31251 31252 31253 31254 31255 |
if( nArg==3 ){
int opt = booleanValue(azArg[2]);
rc2 = sqlite3_test_control(testctrl, opt);
isOk = 3;
}
break;
/* sqlite3_test_control(sqlite3*) */
case SQLITE_TESTCTRL_INTERNAL_FUNCTIONS:
rc2 = sqlite3_test_control(testctrl, p->db);
isOk = 3;
break;
case SQLITE_TESTCTRL_IMPOSTER:
|
| ︙ | ︙ | |||
32484 32485 32486 32487 32488 32489 32490 |
#if !defined(_WIN32_WCE)
if( getenv("SQLITE_DEBUG_BREAK") ){
if( isatty(0) && isatty(2) ){
char zLine[100];
sqlite3_fprintf(stderr,
"attach debugger to process %d and press ENTER to continue...",
GETPID());
| | > > > > | 32465 32466 32467 32468 32469 32470 32471 32472 32473 32474 32475 32476 32477 32478 32479 32480 32481 32482 32483 |
#if !defined(_WIN32_WCE)
if( getenv("SQLITE_DEBUG_BREAK") ){
if( isatty(0) && isatty(2) ){
char zLine[100];
sqlite3_fprintf(stderr,
"attach debugger to process %d and press ENTER to continue...",
GETPID());
if( sqlite3_fgets(zLine, sizeof(zLine), stdin)!=0
&& cli_strcmp(zLine,"stop")==0
){
exit(1);
}
}else{
#if defined(_WIN32) || defined(WIN32)
#if SQLITE_OS_WINRT
__debugbreak();
#else
DebugBreak();
#endif
|
| ︙ | ︙ |