Small. Fast. Reliable.
Choose any three.

SQLite Requirement Matrix Details
mprintf.html

Index Summary Markup Original


R-25638-20415-36003-28189-21007-56161-18481-25600 tcl slt th3 src

The sqlite3_mprintf() and sqlite3_vmprintf() routines write their results into memory obtained from sqlite3_malloc64().

/* IMP: R-25638-20415 */
# EVIDENCE-OF: R-25638-20415 The sqlite3_mprintf() and
# sqlite3_vmprintf() routines write their results into memory obtained
# from sqlite3_malloc64().

R-50083-49187-63509-30877-07462-63628-48341-23744 tcl slt th3 src

Both routines return a NULL pointer if sqlite3_malloc64() is unable to allocate enough memory to hold the resulting string.

/* IMP: R-50083-49187 */
# EVIDENCE-OF: R-50083-49187 Both routines return a NULL pointer if
# sqlite3_malloc64() is unable to allocate enough memory to hold the
# resulting string.

R-36610-45292-54097-28024-65527-46641-42678-27744 tcl slt th3 src

The sqlite3_snprintf() routine is similar to "snprintf()" from the standard C library. The result is written into the buffer supplied as the second parameter whose size is given by the first parameter. Note that the order of the first two parameters is reversed from snprintf().

th3/req1/malloc01.test:81

/* IMP: R-36610-45292 */
# EVIDENCE-OF: R-36610-45292 The sqlite3_snprintf() routine is similar
# to "snprintf()" from the standard C library. The result is written
# into the buffer supplied as the second parameter whose size is given
# by the first parameter. Note that the order of the first two
# parameters is reversed from snprintf().

R-45725-33143-49569-42045-56416-09972-18063-04229 tcl slt th3 src

Note also that sqlite3_snprintf() returns a pointer to its buffer instead of the number of characters actually written into the buffer.

th3/req1/malloc01.test:108

/* IMP: R-45725-33143 */
# EVIDENCE-OF: R-45725-33143 Note also that sqlite3_snprintf() returns a
# pointer to its buffer instead of the number of characters actually
# written into the buffer.

R-09798-06276-54780-63214-14309-15802-32530-00850 tcl slt th3 src

As long as the buffer size is greater than zero, sqlite3_snprintf() guarantees that the buffer is always zero-terminated.

th3/req1/malloc01.test:90

/* IMP: R-09798-06276 */
# EVIDENCE-OF: R-09798-06276 As long as the buffer size is greater than
# zero, sqlite3_snprintf() guarantees that the buffer is always
# zero-terminated.

R-04304-33529-02265-14363-24121-34151-06311-12119 tcl slt th3 src

The first parameter "n" is the total size of the buffer, including space for the zero terminator.

th3/req1/malloc01.test:87

/* IMP: R-04304-33529 */
# EVIDENCE-OF: R-04304-33529 The first parameter "n" is the total size
# of the buffer, including space for the zero terminator.

R-34407-33329-56662-13063-42233-50984-46328-08443 tcl slt th3 src

The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf().

th3/req1/malloc01.test:100

/* IMP: R-34407-33329 */
# EVIDENCE-OF: R-34407-33329 The sqlite3_vsnprintf() routine is a
# varargs version of sqlite3_snprintf().