]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Minor code simplification in the CLI.
authordrh <>
Sat, 25 Apr 2026 10:45:17 +0000 (10:45 +0000)
committerdrh <>
Sat, 25 Apr 2026 10:45:17 +0000 (10:45 +0000)
FossilOrigin-Name: 59795c71e5745e8a27dc596b9f1fc8f137df58a6ec8d8d0dab2b31cf8562796d

manifest
manifest.uuid
src/shell.c.in

index d1c16b5f8bb1c1a3c5d69111a3f1e604a0812e7d..708b554f367506498f3759a8193194e3ae018b83 100644 (file)
--- 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.
index 4ebd5f29d93401590267fbed5a615e9b7c1e978a..a656f3feb1deef5f7012383b438616d733ff14ec 100644 (file)
@@ -1 +1 @@
-4a5cac1d00e1fa287ab8ce3437c0152a9f362d72bdb9976889c93f6368b3fd66
+59795c71e5745e8a27dc596b9f1fc8f137df58a6ec8d8d0dab2b31cf8562796d
index fb42d84a91209332801a8be27109a29684c18ba0..13bd47dc017e40446fb5cd27b43533e2a8632d81 100644 (file)
@@ -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 && i<nArg-1 ){
       nSkip = integerValue(azArg[++i]);
     }else if( cli_strcmp(z,"-ascii")==0 ){
-      if( sCtx.cColSep==0 ) sCtx.cColSep = SEP_Unit[0];
-      if( sCtx.cRowSep==0 ) sCtx.cRowSep = SEP_Record[0];
+      if( sCtx.cColSep==0 ) sCtx.cColSep = '\037';
+      if( sCtx.cRowSep==0 ) sCtx.cRowSep = '\036';
       xRead = ascii_read_one_field;
     }else if( cli_strcmp(z,"-csv")==0 ){
       if( sCtx.cColSep==0 ) sCtx.cColSep = ',';
@@ -9065,8 +9053,8 @@ static int dotCmdOutput(ShellState *p){
       newTempFile(p, "csv");
       p->mode.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. */