SQLite

Check-in [94eac140f2]
Login

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

Overview
Comment:Terminate the va_start in the getDigits function of date.c. (CVS 2931)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 94eac140f2363c7c3df68fa6f46728abfbfee1e6
User & Date: drh 2006-01-13 01:17:21.000
Context
2006-01-13
01:25
Add tests to make sure "PRAGMA table_info" works using sqlite3_prepare16. Ticket #1606. (CVS 2932) (check-in: ace8ba8177 user: drh tags: trunk)
01:17
Terminate the va_start in the getDigits function of date.c. (CVS 2931) (check-in: 94eac140f2 user: drh tags: trunk)
2006-01-12
22:17
Add support for the TOTAL() aggregate function - works like SUM() except that it returns 0 instead of NULL when presented with an empty list. (CVS 2930) (check-in: a7f528ff34 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/date.c.
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This file contains the C functions that implement date and time
** functions for SQLite.  
**
** There is only one exported symbol in this file - the function
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.49 2006/01/09 00:18:03 drh Exp $
**
** NOTES:
**
** SQLite processes all times and dates as Julian Day numbers.  The
** dates and times are stored as the number of days since noon
** in Greenwich on November 24, 4714 B.C. according to the Gregorian
** calendar system.







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
** This file contains the C functions that implement date and time
** functions for SQLite.  
**
** There is only one exported symbol in this file - the function
** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
** All other code has file scope.
**
** $Id: date.c,v 1.50 2006/01/13 01:17:21 drh Exp $
**
** NOTES:
**
** SQLite processes all times and dates as Julian Day numbers.  The
** dates and times are stored as the number of days since noon
** in Greenwich on November 24, 4714 B.C. according to the Gregorian
** calendar system.
113
114
115
116
117
118
119

120
121
122
123
124
125
126
    if( val<min || val>max || (nextC!=0 && nextC!=*zDate) ){
      return cnt;
    }
    *pVal = val;
    zDate++;
    cnt++;
  }while( nextC );

  return cnt;
}

/*
** Read text from z[] and convert into a floating point number.  Return
** the number of digits converted.
*/







>







113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
    if( val<min || val>max || (nextC!=0 && nextC!=*zDate) ){
      return cnt;
    }
    *pVal = val;
    zDate++;
    cnt++;
  }while( nextC );
  va_end(ap);
  return cnt;
}

/*
** Read text from z[] and convert into a floating point number.  Return
** the number of digits converted.
*/