/ Check-in [4bdd040e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Mistake in help text. Spurious trailing whitespace removed. (CVS 532)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4bdd040e4810565c91bcbb5f065580520c5e3c45
User & Date: persicom 2002-04-18 02:53:05
Context
2002-04-18
02:53
Updated to match new shell.c functionality. (CVS 533) check-in: ff67ad40 user: persicom tags: trunk
02:53
Mistake in help text. Spurious trailing whitespace removed. (CVS 532) check-in: 4bdd040e user: persicom tags: trunk
02:46
General: o Added global static chars mainPrompt and continuePrompt. o Moved Argv0 declaration to head of file. Needed in do_meta_command, previously found below that. o Added struct previous_mode_data to support new .explain toggle functionality. o Added nullvalue, explainPrev and outfile members to struct callback_data. o Added modeDescr array for number/text translation ofdisplay modes. o Modified zHelp to match new functionality.

callback(): o Added support for .nullvalue

do_meta_command(): o Output filename is now saved to callback struct. If using stdout, then the string "stdout" is saved. o Explain is now a toggle. When it is turned on, the current values of mode, header and colWidth are saved if not already in explain mode. When turned off, those values are restored. o Allow .mode plurals columns and lines and dot command plural .headers. o Added processing for new keywords .quit, .nullvalue, .show, .prompt.

main(): o Added -init as an option to override .sqliterc. o Added -nullvalue as a command line option. o Processes .sqliterc.

main_init(): o Genesis. Moved some initialization code here from inside main() so that it can be called initially by main and again if -init is specified.

one_input_line(): o Now takes prompts from settable values.

process_sqliterc(): o Genesis. Read .sqliterc from user's home directory and pass it to process_input(). File should contain meta commands for setups. (CVS 531) check-in: e751338c user: persicom tags: trunk

Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/shell.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.51 2002/04/18 02:46:52 persicom Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "sqlite.h"
#include <ctype.h>
#include <pwd.h>
................................................................................
  ".nullvalue STRING      Print STRING instead of nothing for NULL data\n"
  ".output FILENAME       Send output to FILENAME\n"
  ".output stdout         Send output to the screen\n"
  ".prompt MAIN CONTINUE  Replace the standard prompts\n"
  "                       \"sqlite > \" and \"   ...> \"\n"
  "                       with the strings MAIN and CONTINUE\n"
  "                       CONTINUE is optional.\n"
  "                       Special characters are:\n"
  ".quit                  Exit this program\n"
  ".read FILENAME         Execute SQL in FILENAME\n"
  ".reindex ?TABLE?       Rebuild indices\n"
/*  ".rename OLD NEW        Change the name of a table or index\n" */
  ".schema ?TABLE?        Show the CREATE statements\n"
  ".separator STRING      Change separator string for \"list\" mode\n"
  ".show                  Show the current values for the following:\n"







|







 







<







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
484
485
486
487
488
489
490

491
492
493
494
495
496
497
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains code to implement the "sqlite" command line
** utility for accessing SQLite databases.
**
** $Id: shell.c,v 1.52 2002/04/18 02:53:05 persicom Exp $
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "sqlite.h"
#include <ctype.h>
#include <pwd.h>
................................................................................
  ".nullvalue STRING      Print STRING instead of nothing for NULL data\n"
  ".output FILENAME       Send output to FILENAME\n"
  ".output stdout         Send output to the screen\n"
  ".prompt MAIN CONTINUE  Replace the standard prompts\n"
  "                       \"sqlite > \" and \"   ...> \"\n"
  "                       with the strings MAIN and CONTINUE\n"
  "                       CONTINUE is optional.\n"

  ".quit                  Exit this program\n"
  ".read FILENAME         Execute SQL in FILENAME\n"
  ".reindex ?TABLE?       Rebuild indices\n"
/*  ".rename OLD NEW        Change the name of a table or index\n" */
  ".schema ?TABLE?        Show the CREATE statements\n"
  ".separator STRING      Change separator string for \"list\" mode\n"
  ".show                  Show the current values for the following:\n"