/ Check-in [8083f616]
Login

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

Overview
Comment:Add assert to verify the number of characters to write in sqlite3_win32_write_debug.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | winrt
Files: files | file ages | folders
SHA1: 8083f6164f3308c1c1d4f4d84be1894e382fe2e6
User & Date: mistachkin 2012-03-13 03:38:22
Context
2012-03-14
00:44
Add experimental support for resolving relative database file paths using a fixed user-defined directory. check-in: 7354ae8f user: mistachkin tags: winrt
2012-03-13
03:38
Add assert to verify the number of characters to write in sqlite3_win32_write_debug. check-in: 8083f616 user: mistachkin tags: winrt
03:35
Defer creation of the sleep event object until it is needed. Added sqlite3_win32_write_debug and sqlite3_win32_sleep APIs to assist in portability to WinRT. check-in: 7af88ad3 user: mistachkin tags: winrt
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/os_win.c.

868
869
870
871
872
873
874

875
876
877
878
879
880
881
** (if available).
*/

void sqlite3_win32_write_debug(char *zBuf, int nBuf){
  char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
  int nMin = MIN(nBuf,SQLITE_WIN32_DBG_BUF_SIZE-1); /* may be negative. */
  if( nMin<-1 ) nMin = -1; /* all negative values become -1. */

#if defined(SQLITE_WIN32_HAS_ANSI)
  if( nMin>0 ){
    memset(zDbgBuf, 0, SQLITE_WIN32_DBG_BUF_SIZE);
    memcpy(zDbgBuf, zBuf, nMin);
    OutputDebugStringA(zDbgBuf);
  }else{
    OutputDebugStringA(zBuf);







>







868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
** (if available).
*/

void sqlite3_win32_write_debug(char *zBuf, int nBuf){
  char zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
  int nMin = MIN(nBuf,SQLITE_WIN32_DBG_BUF_SIZE-1); /* may be negative. */
  if( nMin<-1 ) nMin = -1; /* all negative values become -1. */
  assert( nMin==-1 || nMin==0 || nMin<SQLITE_WIN32_DBG_BUF_SIZE );
#if defined(SQLITE_WIN32_HAS_ANSI)
  if( nMin>0 ){
    memset(zDbgBuf, 0, SQLITE_WIN32_DBG_BUF_SIZE);
    memcpy(zDbgBuf, zBuf, nMin);
    OutputDebugStringA(zDbgBuf);
  }else{
    OutputDebugStringA(zBuf);