OLD | NEW |
1 /* | 1 /* |
2 ** 2010 September 31 | 2 ** 2010 September 31 |
3 ** | 3 ** |
4 ** The author disclaims copyright to this source code. In place of | 4 ** The author disclaims copyright to this source code. In place of |
5 ** a legal notice, here is a blessing: | 5 ** a legal notice, here is a blessing: |
6 ** | 6 ** |
7 ** May you do good and not evil. | 7 ** May you do good and not evil. |
8 ** May you find forgiveness for yourself and forgive others. | 8 ** May you find forgiveness for yourself and forgive others. |
9 ** May you share freely, never taking more than you give. | 9 ** May you share freely, never taking more than you give. |
10 ** | 10 ** |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 quotaGroupDeref(pGroup); | 882 quotaGroupDeref(pGroup); |
883 quotaLeave(); | 883 quotaLeave(); |
884 return SQLITE_OK; | 884 return SQLITE_OK; |
885 } | 885 } |
886 | 886 |
887 /* | 887 /* |
888 ** Bring the named file under quota management. Or if it is already under | 888 ** Bring the named file under quota management. Or if it is already under |
889 ** management, update its size. | 889 ** management, update its size. |
890 */ | 890 */ |
891 int sqlite3_quota_file(const char *zFilename){ | 891 int sqlite3_quota_file(const char *zFilename){ |
892 char *zFull; | 892 char *zFull = 0; |
893 sqlite3_file *fd; | 893 sqlite3_file *fd; |
894 int rc; | 894 int rc; |
895 int outFlags = 0; | 895 int outFlags = 0; |
896 sqlite3_int64 iSize; | 896 sqlite3_int64 iSize; |
897 int nAlloc = gQuota.sThisVfs.szOsFile + gQuota.sThisVfs.mxPathname+2; | 897 int nAlloc = gQuota.sThisVfs.szOsFile + gQuota.sThisVfs.mxPathname+2; |
898 | 898 |
899 /* Allocate space for a file-handle and the full path for file zFilename */ | 899 /* Allocate space for a file-handle and the full path for file zFilename */ |
900 fd = (sqlite3_file *)sqlite3_malloc(nAlloc); | 900 fd = (sqlite3_file *)sqlite3_malloc(nAlloc); |
901 if( fd==0 ){ | 901 if( fd==0 ){ |
902 rc = SQLITE_NOMEM; | 902 rc = SQLITE_NOMEM; |
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1963 }; | 1963 }; |
1964 int i; | 1964 int i; |
1965 | 1965 |
1966 for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){ | 1966 for(i=0; i<sizeof(aCmd)/sizeof(aCmd[0]); i++){ |
1967 Tcl_CreateObjCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0); | 1967 Tcl_CreateObjCommand(interp, aCmd[i].zName, aCmd[i].xProc, 0, 0); |
1968 } | 1968 } |
1969 | 1969 |
1970 return TCL_OK; | 1970 return TCL_OK; |
1971 } | 1971 } |
1972 #endif | 1972 #endif |
OLD | NEW |