mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
move os2FullPathname() so that it can be used in os2Open() directly (CVS 5495)
FossilOrigin-Name: 2455e45484eff85bf9fd78dadd1e934f2bbe210a
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
||||
C Enhancements\sto\sthe\spagecache\smalloc\stest\sconfiguration.\s\sChanges\sto\sthe\nspeed\stest\sscripts\sto\suse\sthe\snew\stest\senhancements.\s(CVS\s5494)
|
||||
D 2008-07-29T14:29:07
|
||||
C move\sos2FullPathname()\sso\sthat\sit\scan\sbe\sused\sin\sos2Open()\sdirectly\s(CVS\s5495)
|
||||
D 2008-07-29T18:35:54
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in bbb62eecc851379aef5a48a1bf8787eb13e6ec06
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@@ -132,7 +132,7 @@ F src/mutex_w32.c f0d21ff1f6981e5aedc56796adf3a347423ef736
|
||||
F src/os.c 939ae7690a01d9401685ba124b4ba45fd4a7a2ad
|
||||
F src/os.h ef8abeb9afc694b82dbd169a91c9b7e26db3c892
|
||||
F src/os_common.h 24525d8b7bce66c374dfc1810a6c9043f3359b60
|
||||
F src/os_os2.c da14449fc210cd313eb56cf511ae05b350e323d6
|
||||
F src/os_os2.c 3f4383c493106ec777b242bc2eee5ef46838aba7
|
||||
F src/os_unix.c 1df6108efdb7957a9f28b9700600e58647c9c12d
|
||||
F src/os_win.c 50ec783403b418ddc9e6e05d541c6027dfd41070
|
||||
F src/pager.c a6ecad26297469a8a3d1fd7a7c3dc2d603955044
|
||||
@@ -612,7 +612,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
P ec09b551e8279e791070515e1f2413f44dc67ea5
|
||||
R f345ec71ab69d5e2a656c297e7e3014c
|
||||
U drh
|
||||
Z d20474b144bde5d5539e2012e207e0db
|
||||
P 0ce39c21f32958ae53c00dc8bbf8cdd453f2d90e
|
||||
R a9a0dc7d9673a9f296b12507bc3ba2c9
|
||||
U pweilbacher
|
||||
Z 4102ea838145bbe2d8042af7245b024f
|
||||
|
||||
@@ -1 +1 @@
|
||||
0ce39c21f32958ae53c00dc8bbf8cdd453f2d90e
|
||||
2455e45484eff85bf9fd78dadd1e934f2bbe210a
|
||||
51
src/os_os2.c
51
src/os_os2.c
@@ -12,7 +12,7 @@
|
||||
**
|
||||
** This file contains code that is specific to OS/2.
|
||||
**
|
||||
** $Id: os_os2.c,v 1.52 2008/07/18 05:36:28 pweilbacher Exp $
|
||||
** $Id: os_os2.c,v 1.53 2008/07/29 18:35:54 pweilbacher Exp $
|
||||
*/
|
||||
|
||||
#include "sqliteInt.h"
|
||||
@@ -711,6 +711,30 @@ static int getTempname(int nBuf, char *zBuf ){
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Turn a relative pathname into a full pathname. Write the full
|
||||
** pathname into zFull[]. zFull[] will be at least pVfs->mxPathname
|
||||
** bytes in size.
|
||||
*/
|
||||
static int os2FullPathname(
|
||||
sqlite3_vfs *pVfs, /* Pointer to vfs object */
|
||||
const char *zRelative, /* Possibly relative input path */
|
||||
int nFull, /* Size of output buffer in bytes */
|
||||
char *zFull /* Output buffer */
|
||||
){
|
||||
char *zRelativeCp = convertUtf8PathToCp( zRelative );
|
||||
char zFullCp[CCHMAXPATH] = "\0";
|
||||
char *zFullUTF;
|
||||
APIRET rc = DosQueryPathInfo( zRelativeCp, FIL_QUERYFULLNAME, zFullCp,
|
||||
CCHMAXPATH );
|
||||
free( zRelativeCp );
|
||||
zFullUTF = convertCpPathToUtf8( zFullCp );
|
||||
sqlite3_snprintf( nFull, zFull, zFullUTF );
|
||||
free( zFullUTF );
|
||||
return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Open a file.
|
||||
*/
|
||||
@@ -779,7 +803,7 @@ static int os2Open(
|
||||
char pathUtf8[CCHMAXPATH];
|
||||
/*ulFileAttribute = FILE_HIDDEN; //for debugging, we want to make sure it is deleted*/
|
||||
ulFileAttribute = FILE_NORMAL;
|
||||
sqlite3OsFullPathname( pVfs, zName, CCHMAXPATH, pathUtf8 );
|
||||
os2FullPathname( pVfs, zName, CCHMAXPATH, pathUtf8 );
|
||||
pFile->pathToDel = convertUtf8PathToCp( pathUtf8 );
|
||||
OSTRACE1( "OPEN hidden/delete on close file attributes\n" );
|
||||
}else{
|
||||
@@ -884,29 +908,6 @@ static int os2Access(
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Turn a relative pathname into a full pathname. Write the full
|
||||
** pathname into zFull[]. zFull[] will be at least pVfs->mxPathname
|
||||
** bytes in size.
|
||||
*/
|
||||
static int os2FullPathname(
|
||||
sqlite3_vfs *pVfs, /* Pointer to vfs object */
|
||||
const char *zRelative, /* Possibly relative input path */
|
||||
int nFull, /* Size of output buffer in bytes */
|
||||
char *zFull /* Output buffer */
|
||||
){
|
||||
char *zRelativeCp = convertUtf8PathToCp( zRelative );
|
||||
char zFullCp[CCHMAXPATH] = "\0";
|
||||
char *zFullUTF;
|
||||
APIRET rc = DosQueryPathInfo( zRelativeCp, FIL_QUERYFULLNAME, zFullCp,
|
||||
CCHMAXPATH );
|
||||
free( zRelativeCp );
|
||||
zFullUTF = convertCpPathToUtf8( zFullCp );
|
||||
sqlite3_snprintf( nFull, zFull, zFullUTF );
|
||||
free( zFullUTF );
|
||||
return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_LOAD_EXTENSION
|
||||
/*
|
||||
** Interfaces for opening a shared library, finding entry points
|
||||
|
||||
Reference in New Issue
Block a user