From: drh Date: Fri, 8 Jun 2007 18:27:03 +0000 (+0000) Subject: Use C-sylte comments exclusively, never C++ comments. Ticket #2406. (CVS 4052) X-Git-Tag: version-3.6.10~2122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b62b2fa8b950b05ab6bc61da94f3cc4329265f4;p=thirdparty%2Fsqlite.git Use C-sylte comments exclusively, never C++ comments. Ticket #2406. (CVS 4052) FossilOrigin-Name: 8f5b789fea23d76128c10b37158de2525a54ce20 --- diff --git a/manifest b/manifest index 5ab72ce8d0..2ed8dd51f6 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Additional\stest\scases\sfor\scomparisons\sagainst\sNULL\sin\sthe\sWHERE\sclause\nand\selsewhere\sin\sa\sSELECT.\s(CVS\s4051) -D 2007-06-08T08:43:10 +C Use\sC-sylte\scomments\sexclusively,\snever\sC++\scomments.\s\sTicket\s#2406.\s(CVS\s4052) +D 2007-06-08T18:27:03 F Makefile.in a42354804b50c2708ce72cf79e4daa30f50191b5 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -89,7 +89,7 @@ F src/os_os2.c 2ce97909b926a598823f97338027dbec1dcf4165 F src/os_os2.h e5f17dd69333632bbc3112881ea407c37d245eb3 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3 -F src/os_unix.c cb1fb044b84870c7b1b8b2902e9d7be779f8b7ce +F src/os_unix.c f2ccf2e9a925fc679faf7a8fe85700e0f13cf0e1 F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e F src/os_win.c d868d5f9e95ec9c1b9e2a30c54c996053db6dddd F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b @@ -501,7 +501,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 11ee8ea43f20f6146f4e4fcd9299468b3a99f998 -R 05a9a5f63d57dfcd13c111df92ba4c0c +P 72612a0373c7abf8aadfdeb46358c0b0ae7b07a0 +R 4a0de78da8c062d2f4e8738bd1c4d8d0 U drh -Z 2f14a325dddcad80036ac767af210cc8 +Z c63d7a71f7409006622c28c29603bd15 diff --git a/manifest.uuid b/manifest.uuid index 07dbb3bd7b..0b6a1eec93 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -72612a0373c7abf8aadfdeb46358c0b0ae7b07a0 \ No newline at end of file +8f5b789fea23d76128c10b37158de2525a54ce20 \ No newline at end of file diff --git a/src/os_unix.c b/src/os_unix.c index 4d0b617985..873fc041e8 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -619,7 +619,7 @@ static sqlite3LockingStyle sqlite3DetectLockingStyle(const char *filePath, return unsupportedLockingStyle; return sqlite3TestLockingStyle(filePath, fd); -#endif // SQLITE_FIXED_LOCKING_STYLE +#endif /* SQLITE_FIXED_LOCKING_STYLE */ } #endif /* SQLITE_ENABLE_LOCKING_STYLE */ @@ -1733,7 +1733,7 @@ static int _AFPFSSetLock(const char *path, int fd, unsigned long long offset, if ( err==-1 ) { OSTRACE4("AFPLOCK failed to fsctl() '%s' %d %s\n", path, errno, strerror(errno)); - return 1; // error + return 1; /* error */ } else { return 0; } @@ -1760,7 +1760,7 @@ static int afpUnixCheckReservedLock(OsFile *id){ /* Otherwise see if some other process holds it. */ if ( !r ) { - // lock the byte + /* lock the byte */ int failed = _AFPFSSetLock(context->filePath, pFile->h, RESERVED_BYTE, 1,1); if (failed) { /* if we failed to get the lock then someone else must have it */ @@ -2015,36 +2015,36 @@ static int flockUnixCheckReservedLock(OsFile *id) { unixFile *pFile = (unixFile*)id; if (pFile->locktype == RESERVED_LOCK) { - return 1; // already have a reserved lock + return 1; /* already have a reserved lock */ } else { - // attempt to get the lock + /* attempt to get the lock */ int rc = flock(pFile->h, LOCK_EX | LOCK_NB); if (!rc) { - // got the lock, unlock it + /* got the lock, unlock it */ flock(pFile->h, LOCK_UN); - return 0; // no one has it reserved + return 0; /* no one has it reserved */ } - return 1; // someone else might have it reserved + return 1; /* someone else might have it reserved */ } } static int flockUnixLock(OsFile *id, int locktype) { unixFile *pFile = (unixFile*)id; - // if we already have a lock, it is exclusive. - // Just adjust level and punt on outta here. + /* if we already have a lock, it is exclusive. + ** Just adjust level and punt on outta here. */ if (pFile->locktype > NO_LOCK) { pFile->locktype = locktype; return SQLITE_OK; } - // grab an exclusive lock + /* grab an exclusive lock */ int rc = flock(pFile->h, LOCK_EX | LOCK_NB); if (rc) { - // didn't get, must be busy + /* didn't get, must be busy */ return SQLITE_BUSY; } else { - // got it, set the type and return ok + /* got it, set the type and return ok */ pFile->locktype = locktype; return SQLITE_OK; } @@ -2055,18 +2055,18 @@ static int flockUnixUnlock(OsFile *id, int locktype) { assert( locktype<=SHARED_LOCK ); - // no-op if possible + /* no-op if possible */ if( pFile->locktype==locktype ){ return SQLITE_OK; } - // shared can just be set because we always have an exclusive + /* shared can just be set because we always have an exclusive */ if (locktype==SHARED_LOCK) { pFile->locktype = locktype; return SQLITE_OK; } - // no, really, unlock. + /* no, really, unlock. */ int rc = flock(pFile->h, LOCK_UN); if (rc) return SQLITE_IOERR_UNLOCK; @@ -2117,14 +2117,14 @@ static int dotlockUnixCheckReservedLock(OsFile *id) { (dotlockLockingContext *) pFile->lockingContext; if (pFile->locktype == RESERVED_LOCK) { - return 1; // already have a reserved lock + return 1; /* already have a reserved lock */ } else { struct stat statBuf; if (lstat(context->lockPath,&statBuf) == 0) - // file exists, someone else has the lock + /* file exists, someone else has the lock */ return 1; else - // file does not exist, we could have it if we want it + /* file does not exist, we could have it if we want it */ return 0; } } @@ -2134,8 +2134,8 @@ static int dotlockUnixLock(OsFile *id, int locktype) { dotlockLockingContext *context = (dotlockLockingContext *) pFile->lockingContext; - // if we already have a lock, it is exclusive. - // Just adjust level and punt on outta here. + /* if we already have a lock, it is exclusive. + ** Just adjust level and punt on outta here. */ if (pFile->locktype > NO_LOCK) { pFile->locktype = locktype; @@ -2144,21 +2144,21 @@ static int dotlockUnixLock(OsFile *id, int locktype) { return SQLITE_OK; } - // check to see if lock file already exists + /* check to see if lock file already exists */ struct stat statBuf; if (lstat(context->lockPath,&statBuf) == 0){ - return SQLITE_BUSY; // it does, busy + return SQLITE_BUSY; /* it does, busy */ } - // grab an exclusive lock + /* grab an exclusive lock */ int fd = open(context->lockPath,O_RDONLY|O_CREAT|O_EXCL,0600); if (fd < 0) { - // failed to open/create the file, someone else may have stolen the lock + /* failed to open/create the file, someone else may have stolen the lock */ return SQLITE_BUSY; } close(fd); - // got it, set the type and return ok + /* got it, set the type and return ok */ pFile->locktype = locktype; return SQLITE_OK; } @@ -2170,18 +2170,18 @@ static int dotlockUnixUnlock(OsFile *id, int locktype) { assert( locktype<=SHARED_LOCK ); - // no-op if possible + /* no-op if possible */ if( pFile->locktype==locktype ){ return SQLITE_OK; } - // shared can just be set because we always have an exclusive + /* shared can just be set because we always have an exclusive */ if (locktype==SHARED_LOCK) { pFile->locktype = locktype; return SQLITE_OK; } - // no, really, unlock. + /* no, really, unlock. */ unlink(context->lockPath); pFile->locktype = NO_LOCK; return SQLITE_OK; @@ -2496,7 +2496,7 @@ static int allocateUnixFile( return SQLITE_NOMEM; } } else { - // pLock and pOpen are only used for posix advisory locking + /* pLock and pOpen are only used for posix advisory locking */ f.pLock = NULL; f.pOpen = NULL; }