From: drh <> Date: Sat, 25 Apr 2026 10:45:17 +0000 (+0000) Subject: Minor code simplification in the CLI. X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=df7b22790ebee2784a703a3ae5d3479617151c81;p=thirdparty%2Fsqlite.git Minor code simplification in the CLI. FossilOrigin-Name: 59795c71e5745e8a27dc596b9f1fc8f137df58a6ec8d8d0dab2b31cf8562796d --- diff --git a/manifest b/manifest index d1c16b5f8b..708b554f36 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\sproblem\sin\sthe\sCLI\sin\swhich\sthe\s".www"\scommand\sfollowed\sby\n".dbstat"\sdoes\snot\srestore\sthe\smode\sto\sits\soriginal\ssetting\safterwards. -D 2026-04-25T00:29:40.729 +C Minor\scode\ssimplification\sin\sthe\sCLI. +D 2026-04-25T10:45:17.725 F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea @@ -736,7 +736,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c F src/resolve.c 928ff887f2a7c64275182060d94d06fdddbe32226c569781cf7e7edc6f58d7fd F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97 F src/select.c 4c05cde130f26991b7411d8c6809e0630625e18078742c963a047b4b9cc01d49 -F src/shell.c.in 8c0b79f3311868dd1c2e15cdeffd29615d3e997831e937b1f2fd866a2604c5dc +F src/shell.c.in 680ca2fe2aed5e72fbe1dfbf0218b6588b4b49f25419e558387d3f1fefdff72c F src/sqlite.h.in 39d2e09114d2bdb7afd998f4a469c8f8cd065f8093835a7d0422f260fc78fb4f F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479 F src/sqlite3ext.h 9788c301f95370fa30e808861f1d2e6f022a816ddbe2a4f67486784c1b31db2e @@ -2203,8 +2203,8 @@ F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee F tool/warnings.sh a554d13f6e5cf3760f041b87939e3d616ec6961859c3245e8ef701d1eafc2ca2 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c -P 22b791e404f0895b0f343b2ce0e169a7ada8578e46a39a9f4bd3a31f81c9853c -R 4a307597696b5c814c850a82410492a3 +P 4a5cac1d00e1fa287ab8ce3437c0152a9f362d72bdb9976889c93f6368b3fd66 +R 54dd7b78242779e894b6624461f247f2 U drh -Z e597a6ae213e43c8613929f6614f25ce +Z f75c7b9141c88c54596f2cf13247113b # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 4ebd5f29d9..a656f3feb1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -4a5cac1d00e1fa287ab8ce3437c0152a9f362d72bdb9976889c93f6368b3fd66 +59795c71e5745e8a27dc596b9f1fc8f137df58a6ec8d8d0dab2b31cf8562796d diff --git a/src/shell.c.in b/src/shell.c.in index fb42d84a91..13bd47dc01 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -596,7 +596,7 @@ static const ModeInfo aModeInfo[] = { ** text encoding |/ | show | \ ** v-------------------' | hdrs? | The QRF style ** 0: n/a blob | v-----' - ** 1: plain v_---------' 0: n/a + ** 1: plain v----------' 0: n/a ** 2: sql 0: auto 1: no ** 3: csv 1: as-text 2: yes ** 4: html 2: sql @@ -605,18 +605,6 @@ static const ModeInfo aModeInfo[] = { ** 5: json ** 6: size ******************************************************************/ -/* -** These are the column/row/line separators used by the various -** import/export modes. -*/ -#define SEP_Column "|" -#define SEP_Row "\n" -#define SEP_Tab "\t" -#define SEP_Space " " -#define SEP_Comma "," -#define SEP_CrLf "\r\n" -#define SEP_Unit "\x1F" -#define SEP_Record "\x1E" /* ** Default values for the various QRF limits @@ -7948,8 +7936,8 @@ static int dotCmdImport(ShellState *p){ }else if( cli_strcmp(z,"-skip")==0 && imode.mFlags &= ~MFLG_ECHO; p->mode.eMode = MODE_Csv; - modeSetStr(&p->mode.spec.zColumnSep, SEP_Comma); - modeSetStr(&p->mode.spec.zRowSep, SEP_CrLf); + modeSetStr(&p->mode.spec.zColumnSep, ","); + modeSetStr(&p->mode.spec.zRowSep, "\r\n"); #ifdef _WIN32 zBom = zBomUtf8; /* Always include the BOM on Windows, as Excel does ** not work without it. */