Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: third_party/sqlite/src/src/test_devsym.c

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/src/test_demovfs.c ('k') | third_party/sqlite/src/src/test_fs.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ** 2008 Jan 22 2 ** 2008 Jan 22
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 int iDeviceChar; 126 int iDeviceChar;
127 int iSectorSize; 127 int iSectorSize;
128 }; 128 };
129 struct DevsymGlobal g = {0, 0, 512}; 129 struct DevsymGlobal g = {0, 0, 512};
130 130
131 /* 131 /*
132 ** Close an devsym-file. 132 ** Close an devsym-file.
133 */ 133 */
134 static int devsymClose(sqlite3_file *pFile){ 134 static int devsymClose(sqlite3_file *pFile){
135 devsym_file *p = (devsym_file *)pFile; 135 devsym_file *p = (devsym_file *)pFile;
136 return sqlite3OsClose(p->pReal); 136 sqlite3OsClose(p->pReal);
137 return SQLITE_OK;
137 } 138 }
138 139
139 /* 140 /*
140 ** Read data from an devsym-file. 141 ** Read data from an devsym-file.
141 */ 142 */
142 static int devsymRead( 143 static int devsymRead(
143 sqlite3_file *pFile, 144 sqlite3_file *pFile,
144 void *zBuf, 145 void *zBuf,
145 int iAmt, 146 int iAmt,
146 sqlite_int64 iOfst 147 sqlite_int64 iOfst
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 }else{ 389 }else{
389 g.iDeviceChar = 0; 390 g.iDeviceChar = 0;
390 } 391 }
391 if( iSectorSize>=0 ){ 392 if( iSectorSize>=0 ){
392 g.iSectorSize = iSectorSize; 393 g.iSectorSize = iSectorSize;
393 }else{ 394 }else{
394 g.iSectorSize = 512; 395 g.iSectorSize = 512;
395 } 396 }
396 } 397 }
397 398
399 void devsym_unregister(){
400 sqlite3_vfs_unregister(&devsym_vfs);
401 g.pVfs = 0;
402 g.iDeviceChar = 0;
403 g.iSectorSize = 0;
404 }
405
398 #endif 406 #endif
OLDNEW
« no previous file with comments | « third_party/sqlite/src/src/test_demovfs.c ('k') | third_party/sqlite/src/src/test_fs.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698