/ Check-in [6902fb1b]
Login

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

Overview
Comment:Remove the sqlite3_open_varargs() API. (CVS 1515)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6902fb1b49fdf0e38265fa26198690243cdc2f58
User & Date: danielk1977 2004-06-01 00:03:53
Context
2004-06-01
01:22
Add the capi3ref.html page to the website. (CVS 1516) check-in: 89f54f1f user: drh tags: trunk
00:03
Remove the sqlite3_open_varargs() API. (CVS 1515) check-in: 6902fb1b user: danielk1977 tags: trunk
2004-05-31
23:56
Remove the sqlite3_error_string() API. (CVS 1514) check-in: af8e2006 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.201 2004/05/31 23:56:43 danielk1977 Exp $
           17  +** $Id: main.c,v 1.202 2004/06/01 00:03:53 danielk1977 Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include "os.h"
    21     21   #include <ctype.h>
    22     22   
    23     23   /*
    24     24   ** A pointer to this structure is used to communicate information
................................................................................
  1104   1104       rc = openDatabase(zFilename8, ppDb, options, TEXT_Utf16le);
  1105   1105     }
  1106   1106   
  1107   1107     sqliteFree(zFilename8);
  1108   1108     return rc;
  1109   1109   }
  1110   1110   
  1111         -/*
  1112         -** Open a new database handle.
  1113         -*/
  1114         -int sqlite3_open_vararg(
  1115         -  const char *filename,   /* Database filename (UTF-8) */
  1116         -  sqlite3 **ppDb,         /* OUT: SQLite db handle */
  1117         -  ...                     /* Option strings */
  1118         -){
  1119         -  va_list ap;
  1120         -  const char **aOpts = 0;
  1121         -  int nOpts = 0;
  1122         -  int rc;
  1123         -
  1124         -  /* Count the arguments */
  1125         -  va_start(ap, ppDb);
  1126         -  while( va_arg(ap, const char *) ) nOpts++;
  1127         -  va_end(ap);
  1128         -
  1129         -  /* If there are more than zero arguments, construct an array */
  1130         -  if( nOpts ){
  1131         -    aOpts = (const char **)sqliteMalloc(sizeof(const char *)*nOpts+1);
  1132         -    if( !aOpts ){
  1133         -      *ppDb = 0;
  1134         -      return SQLITE_NOMEM;
  1135         -    }
  1136         -    va_start(ap, ppDb);
  1137         -    nOpts = 0;
  1138         -    while( va_arg(ap, const char *) ){
  1139         -      aOpts[nOpts] = va_arg(ap, const char *);
  1140         -      nOpts++;
  1141         -    }
  1142         -    aOpts[nOpts] = 0;
  1143         -    va_end(ap);
  1144         -  }
  1145         -  
  1146         -  /* Call the regular sqlite3_open() */
  1147         -  rc = sqlite3_open(filename, ppDb, aOpts);
  1148         -  if( aOpts ) sqliteFree(aOpts);
  1149         -  return rc;
  1150         -}
  1151         -
  1152         -/*
  1153         -** Open a new database handle.
  1154         -*/
  1155         -int sqlite3_open16_vararg(
  1156         -  const void *filename,   /* Database filename (UTF-16) */
  1157         -  sqlite3 **ppDb,         /* OUT: SQLite db handle */
  1158         -  ...                     /* Option strings */
  1159         -){
  1160         -  va_list ap;
  1161         -  const char **aOpts = 0;
  1162         -  int nOpts = 0;
  1163         -  int rc;
  1164         -
  1165         -  /* Count the arguments */
  1166         -  va_start(ap, ppDb);
  1167         -  while( va_arg(ap, const char *) ) nOpts++;
  1168         -  va_end(ap);
  1169         -
  1170         -  /* If there are more than zero arguments, construct an array */
  1171         -  if( nOpts ){
  1172         -    aOpts = (const char **)sqliteMalloc(sizeof(const char *)*nOpts+1);
  1173         -    if( !aOpts ){
  1174         -      *ppDb = 0;
  1175         -      return SQLITE_NOMEM;
  1176         -    }
  1177         -    va_start(ap, ppDb);
  1178         -    nOpts = 0;
  1179         -    while( va_arg(ap, const char *) ){
  1180         -      aOpts[nOpts] = va_arg(ap, const char *);
  1181         -      nOpts++;
  1182         -    }
  1183         -    aOpts[nOpts] = 0;
  1184         -    va_end(ap);
  1185         -  }
  1186         -  
  1187         -  /* Call the regular sqlite3_open16() */
  1188         -  rc = sqlite3_open16(filename, ppDb, aOpts);
  1189         -  if( aOpts ) sqliteFree(aOpts);
  1190         -  return rc;
  1191         -}
  1192         -
  1193   1111   /*
  1194   1112   ** The following routine destroys a virtual machine that is created by
  1195   1113   ** the sqlite3_compile() routine. The integer returned is an SQLITE_
  1196   1114   ** success/failure code that describes the result of executing the virtual
  1197   1115   ** machine.
  1198   1116   **
  1199   1117   ** This routine sets the error code and string returned by

Changes to src/sqlite.h.in.

     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 header file defines the interface that the SQLite library
    13     13   ** presents to client programs.
    14     14   **
    15         -** @(#) $Id: sqlite.h.in,v 1.88 2004/05/31 23:56:43 danielk1977 Exp $
           15  +** @(#) $Id: sqlite.h.in,v 1.89 2004/06/01 00:03:53 danielk1977 Exp $
    16     16   */
    17     17   #ifndef _SQLITE_H_
    18     18   #define _SQLITE_H_
    19     19   #include <stdarg.h>     /* Needed for the definition of va_list */
    20     20   
    21     21   /*
    22     22   ** Make sure we can call this stuff from C++.
................................................................................
   514    514   );
   515    515   int sqlite3_open16(
   516    516     const void *filename,   /* Database filename (UTF-16) */
   517    517     sqlite3 **ppDb,         /* OUT: SQLite db handle */
   518    518     const char **args       /* Null terminated array of option strings */
   519    519   );
   520    520   
   521         -/*
   522         -** The following two functions are identical to sqlite3_open() and
   523         -** sqlite3_open16(), except that any option strings are specified as the
   524         -** third and subsequent arguments, instead of as an array.  The final
   525         -** argument to either of the following two functions must be a NULL.
   526         -*/
   527         -int sqlite3_open_vararg(
   528         -  const char *filename,   /* Database filename (UTF-8) */
   529         -  sqlite3 **ppDb,         /* OUT: SQLite db handle */
   530         -  ...                     /* Option strings */
   531         -);
   532         -int sqlite3_open16_vararg(
   533         -  const void *filename,   /* Database filename (UTF-16) */
   534         -  sqlite3 **ppDb,         /* OUT: SQLite db handle */
   535         -  ...                     /* Option strings */
   536         -);
   537         -
   538    521   /*
   539    522   ** Return the error code for the most recent sqlite3_* API call associated
   540    523   ** with sqlite3 handle 'db'. SQLITE_OK is returned if the most recent 
   541    524   ** API call was successful.
   542    525   **
   543    526   ** Calls to many sqlite3_* functions set the error code and string returned
   544    527   ** by sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16()