/ Check-in [ceb3a07f]
Login

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

Overview
Comment:Work around incompatibilities in the windows printf() routine within the new I/O tracing logic. (CVS 3666)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ceb3a07f559b5160232c8bce5446f4d0e8aab92b
User & Date: drh 2007-02-28 06:14:25
Context
2007-03-01
00:29
Additional I/O Tracing support. (CVS 3667) check-in: ed915f57 user: drh tags: trunk
2007-02-28
06:14
Work around incompatibilities in the windows printf() routine within the new I/O tracing logic. (CVS 3666) check-in: ceb3a07f user: drh tags: trunk
04:47
Add the undocumented and experimental I/O tracing interface. This interface is likely to change and may be completely abandoned in the near future. (CVS 3665) check-in: 007ca283 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains code to implement the "sqlite" command line
    13     13   ** utility for accessing SQLite databases.
    14     14   **
    15         -** $Id: shell.c,v 1.159 2007/02/28 04:47:27 drh Exp $
           15  +** $Id: shell.c,v 1.160 2007/02/28 06:14:25 drh Exp $
    16     16   */
    17     17   #include <stdlib.h>
    18     18   #include <string.h>
    19     19   #include <stdio.h>
    20     20   #include <assert.h>
    21     21   #include "sqlite3.h"
    22     22   #include <ctype.h>
................................................................................
   107    107   ** This routine works like printf in that its first argument is a
   108    108   ** format string and subsequent arguments are values to be substituted
   109    109   ** in place of % fields.  The result of formatting this string
   110    110   ** is written to iotrace.
   111    111   */
   112    112   static void iotracePrintf(const char *zFormat, ...){
   113    113     va_list ap;
          114  +  char *z;
   114    115     if( iotrace==0 ) return;
   115    116     va_start(ap, zFormat);
   116         -  vfprintf(iotrace, zFormat, ap);
          117  +  z = sqlite3_vmprintf(zFormat, ap);
   117    118     va_end(ap);
          119  +  fprintf(iotrace, "%s", z);
          120  +  sqlite3_free(z);
   118    121   }
   119    122   
   120    123   
   121    124   /*
   122    125   ** Determines if a string is a number of not.
   123    126   */
   124    127   static int isNumber(const char *z, int *realnum){