> On Oct 19, 2018, at 3:30 AM, Graham Hardman <[email protected]> wrote:
>
> Hi,
>
> I am curious about what this option does. It is not discussed in the
> documentation and my own testing with the shell program has not aided my
> understanding. A simple example would be nice.
It controls how data is output to files/stdout.
Only relevant on Windows; does absolutely nothing on all other platforms.
sqlite-amalgamation-3250200/shell.c:200:
/* On Windows, we normally run with output mode of TEXT so that \n characters
** are automatically translated into \r\n. However, this behavior needs
** to be disabled in some cases (ex: when generating CSV output and when
** rendering quoted strings that contain \n characters). The following
** routines take care of that.
*/
#if defined(_WIN32) || defined(WIN32)
static void setBinaryMode(FILE *file, int isOutput){
if( isOutput ) fflush(file);
_setmode(_fileno(file), _O_BINARY);
}
static void setTextMode(FILE *file, int isOutput){
if( isOutput ) fflush(file);
_setmode(_fileno(file), _O_TEXT);
}
#else
# define setBinaryMode(X,Y)
# define setTextMode(X,Y)
#endif
>
> regards,
>
> Graham
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users