]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Change the name of the ".binary" command in the CLI to ".crnl". The sense of
authordrh <>
Mon, 14 Aug 2023 13:33:19 +0000 (13:33 +0000)
committerdrh <>
Mon, 14 Aug 2023 13:33:19 +0000 (13:33 +0000)
the setting is inverted.  The original ".binary" still works for backwards
compatibility but is now undocumented.  ".crnl" is also undocumented on machines
where it is a no-op (all machines other than Windows).
[forum:/forumpost/8bd0b0fbdbc12477|forum thread 8bd0b0fbdbc12477]

FossilOrigin-Name: 544de2da09cd7b9bbb6cb4c52bb22325ace3391fca00c6a43847bfc158032b66

manifest
manifest.uuid
src/shell.c.in

index 01b41d272ba6d7837f84b0f65817623fd583a78c..d123a018ac0a9777fefb0038cd0731d44025398c 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sharmless\scompiler\swarnings\sreported\sby\sMSVC.
-D 2023-08-14T12:20:44.209
+C Change\sthe\sname\sof\sthe\s".binary"\scommand\sin\sthe\sCLI\sto\s".crnl".\s\sThe\ssense\sof\nthe\ssetting\sis\sinverted.\s\sThe\soriginal\s".binary"\sstill\sworks\sfor\sbackwards\ncompatibility\sbut\sis\snow\sundocumented.\s\s".crnl"\sis\salso\sundocumented\son\smachines\nwhere\sit\sis\sa\sno-op\s(all\smachines\sother\sthan\sWindows).\n[forum:/forumpost/8bd0b0fbdbc12477|forum\sthread\s8bd0b0fbdbc12477]
+D 2023-08-14T13:33:19.213
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -684,7 +684,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
 F src/resolve.c 37953a5f36c60bea413c3c04efcd433b6177009f508ef2ace0494728912fe2e9
 F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
 F src/select.c 5f545a2c8702d4d3430bbb188cfec47d6c122d899061ef00cbe56af14591c574
-F src/shell.c.in 694aaf751f00610381533d4a31c83d142cfc83ef91ef65e2aa6912ace7c39b40
+F src/shell.c.in 0c3dd37ab2787a63f1e1c1b7160647c5d3276d9ac941890b2735a773a7495d27
 F src/sqlite.h.in 73a366c1c45d5ac9888cfe81c458826a44498531d106cfb4f328193ab5f6f17d
 F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
 F src/sqlite3ext.h da473ce2b3d0ae407a6300c4a164589b9a6bfdbec9462688a8593ff16f3bb6e4
@@ -2091,8 +2091,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P faae792fd5db7afeb7e4345d96f14c8986ea9a3cd4764ddee71314bfca36ac71
-R fe9366bd97de6b1440602f35f2ed9fc3
+P 391e21bb6e0b2f4632972b6617a3a18192f88deb29eee5bc060846468e624b21
+R 676721f5b95d5972349e28e60fde58e8
 U drh
-Z cc27d150f7bbd6ca9f01328a7c41ab26
+Z 343246f1d1f398cedd6a7b7f3f3868a2
 # Remove this line to create a well-formed Fossil manifest.
index 9f74628c6c7a8201d15e693150e75a322beab5bb..e65d56dc1652c81a6f6133358403f5a276bce8c9 100644 (file)
@@ -1 +1 @@
-391e21bb6e0b2f4632972b6617a3a18192f88deb29eee5bc060846468e624b21
\ No newline at end of file
+544de2da09cd7b9bbb6cb4c52bb22325ace3391fca00c6a43847bfc158032b66
\ No newline at end of file
index 1e65d0e9fdffeec93c7f3f5c62e1dbba7c4d5768..55a13bc116c4662b506846b0946832727ebdf874 100644 (file)
@@ -4799,7 +4799,6 @@ static const char *(azHelp[]) = {
   "       --async             Write to FILE without journal and fsync()",
 #endif
   ".bail on|off             Stop after hitting an error.  Default OFF",
-  ".binary on|off           Turn binary output on or off.  Default OFF",
 #ifndef SQLITE_SHELL_FIDDLE
   ".cd DIRECTORY            Change the working directory to DIRECTORY",
 #endif
@@ -4809,6 +4808,9 @@ static const char *(azHelp[]) = {
   ".clone NEWDB             Clone data into NEWDB from the existing database",
 #endif
   ".connection [close] [#]  Open or close an auxiliary database connection",
+#if defined(_WIN32) || defined(WIN32)
+  ".crnl on|off             Turn translate \\n to \\r\\n.  Default ON",
+#endif
   ".databases               List names and files of attached databases",
   ".dbconfig ?op? ?val?     List or change sqlite3_db_config() options",
 #if SQLITE_SHELL_HAVE_RECOVER
@@ -8164,6 +8166,7 @@ static int do_meta_command(char *zLine, ShellState *p){
     }
   }else
 
+  /* Undocumented.  Legacy only.  See "crnl" below */
   if( c=='b' && n>=3 && cli_strncmp(azArg[0], "binary", n)==0 ){
     if( nArg==2 ){
       if( booleanValue(azArg[1]) ){
@@ -8172,6 +8175,8 @@ static int do_meta_command(char *zLine, ShellState *p){
         setTextMode(p->out, 1);
       }
     }else{
+      raw_printf(stderr, "The \".binary\" command is deprecated."
+                         " Use \".crnl\" instead.\n");
       raw_printf(stderr, "Usage: .binary on|off\n");
       rc = 1;
     }
@@ -8299,6 +8304,22 @@ static int do_meta_command(char *zLine, ShellState *p){
     }
   }else
 
+  if( c=='c' && n==4 && cli_strncmp(azArg[0], "crnl", n)==0 ){
+    if( nArg==2 ){
+      if( booleanValue(azArg[1]) ){
+        setTextMode(p->out, 1);
+      }else{
+        setBinaryMode(p->out, 1);
+      }
+    }else{
+#if !defined(_WIN32) && !defined(WIN32)
+      raw_printf(stderr, "The \".crnl\" is a no-op on non-Windows machines.\n");
+#endif
+      raw_printf(stderr, "Usage: .crnl on|off\n");
+      rc = 1;
+    }
+  }else
+
   if( c=='d' && n>1 && cli_strncmp(azArg[0], "databases", n)==0 ){
     char **azName = 0;
     int nName = 0;