]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix for ticket #99: Added documentation on the sqlite_mprintf() API. (CVS 674)
authordrh <drh@noemail.net>
Sat, 13 Jul 2002 17:18:36 +0000 (17:18 +0000)
committerdrh <drh@noemail.net>
Sat, 13 Jul 2002 17:18:36 +0000 (17:18 +0000)
FossilOrigin-Name: d918de5f06d187c76aab0879b728c89a7d4ae55a

manifest
manifest.uuid
www/c_interface.tcl

index 225fc91c4fcf929211669a1e242fdfebc06ade71..f698d130b3ad6f7a8b063b38c55aecac00e11dfa 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Added\sa\sdocument\sdescribing\show\sto\sdo\sa\ssecurity\saudit.\s(CVS\s673)
-D 2002-07-13T16:52:35
+C Fix\sfor\sticket\s#99:\s\sAdded\sdocumentation\son\sthe\ssqlite_mprintf()\sAPI.\s(CVS\s674)
+D 2002-07-13T17:18:37
 F Makefile.in 6291a33b87d2a395aafd7646ee1ed562c6f2c28c
 F Makefile.template 4e11752e0b5c7a043ca50af4296ec562857ba495
 F README a4c0ba11354ef6ba0776b400d057c59da47a4cc0
@@ -125,7 +125,7 @@ F www/arch.fig d5f9752a4dbf242e9cfffffd3f5762b6c63b3bcf
 F www/arch.png 82ef36db1143828a7abc88b1e308a5f55d4336f4
 F www/arch.tcl 72a0c80e9054cc7025a50928d28d9c75c02c2b8b
 F www/audit.tcl 90e09d580f79c7efec0c7d6f447b7ec5c2dce5c0
-F www/c_interface.tcl 58cf4d128dcae08d91d0011c6d4d11de323f470f
+F www/c_interface.tcl 580c03f096a16c0cf7ce18e0483daace4a602b46
 F www/changes.tcl a6d732a78b451eab29a66a068dc07b359f32c5a8
 F www/conflict.tcl 81dd21f9a679e60aae049e9dd8ab53d59570cda2
 F www/crosscompile.tcl 3622ebbe518927a3854a12de51344673eb2dd060
@@ -141,7 +141,7 @@ F www/speed.tcl da8afcc1d3ccc5696cfb388a68982bc3d9f7f00f
 F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098
 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
-P 072fd2ad588332b1f1f725515bedfbc0cf035315
-R 0c58a47e130f778dc9990a3b129c0313
+P cff271837796d84471b09147c59cb7601d16b358
+R 63bf2a6bac15f02f44e75d7ed5641521
 U drh
-Z 87e130d886df3a6228f2f58c5ec9b87e
+Z a0fd29b0bbea80b4f97bf6c9c9b3443e
index 447662e73ef48d66ffde8775c050f891f0e5937b..fd81c923fab9b0d011f79c3df07a744b6a72d33b 100644 (file)
@@ -1 +1 @@
-cff271837796d84471b09147c59cb7601d16b358
\ No newline at end of file
+d918de5f06d187c76aab0879b728c89a7d4ae55a
\ No newline at end of file
index 8c0e67e1108062b5e2924fa5a5a3a09f5e57bfaa..0ef966b0614dff4fabe3b56e6ba62d173b537979 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Run this Tcl script to generate the sqlite.html file.
 #
-set rcsid {$Id: c_interface.tcl,v 1.30 2002/06/16 04:57:32 chw Exp $}
+set rcsid {$Id: c_interface.tcl,v 1.31 2002/07/13 17:18:37 drh Exp $}
 
 puts {<html>
 <head>
@@ -378,6 +378,12 @@ int sqlite_get_table_vprintf(
   va_list
 );
 
+char *sqlite_mprintf(const char *zFormat, ...);
+
+char *sqlite_vmprintf(const char *zFormat, va_list);
+
+void sqlite_freemem(char*);
+
 </pre></blockquote>
 
 <p>All of the above definitions are included in the "sqlite.h"
@@ -693,6 +699,22 @@ will look like the following:</p>
 INSERT INTO table1 VALUES(NULL)
 </pre></blockquote>
 
+<p>All of the _printf() routines above are built around the following
+two functions:</p>
+
+<blockquote><pre>
+char *sqlite_mprintf(const char *zFormat, ...);
+char *sqlite_vmprintf(const char *zFormat, va_list);
+</pre></blockquote>
+
+<p>The <b>sqlite_mprintf()</b> routine works like the the standard library
+<b>sprintf()</b> except that it writes its results into memory obtained
+from malloc() and returns a pointer to the malloced buffer.  
+<b>sqlite_mprintf()</b> also understands the %q and %Q extensions described
+above.  The <b>sqlite_vmprintf()</b> is a varargs version of the same
+routine.  The string pointer that these routines return should be freed
+by passing it to <b>sqlite_freemem()</b>.
+</p>
 
 <h2>Adding New SQL Functions</h2>