8000 normalize license statements, ifdefs, and wrapper comments · magic-coder/sqlcipher@a828432 · GitHub
[go: up one dir, main page]

Skip to content

Commit a828432

Browse files
committed
normalize license statements, ifdefs, and wrapper comments
1 parent 8b243d5 commit a828432

File tree

10 files changed

+128
-21
lines changed

10 files changed

+128
-21
lines changed

src/crypto.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/*
22
** SQLCipher
3-
** crypto.c developed by Stephen Lombardo (Zetetic LLC)
4-
** sjlombardo at zetetic dot net
5-
** http://zetetic.net
3+
** http://sqlcipher.net
64
**
7-
** Copyright (c) 2009, ZETETIC LLC
5+
** Copyright (c) 2008 - 2013, ZETETIC LLC
86
** All rights reserved.
97
**
108
** Redistribution and use in source and binary forms, with or without
@@ -30,7 +28,7 @@
3028
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3129
**
3230
*/
33-
/* BEGIN CRYPTO */
31+
/* BEGIN SQLCIPHER */
3432
#ifdef SQLITE_HAS_CODEC
3533

3634
#include <assert.h>
@@ -626,5 +624,5 @@ void sqlcipher_exportFunc(sqlite3_context *context, int argc, sqlite3_value **ar
626624

627625
#endif
628626

629-
/* END CRYPTO */
627+
/* END SQLCIPHER */
630628
#endif

src/crypto.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3131
**
3232
*/
33-
/* BEGIN CRYPTO */
33+
/* BEGIN SQLCIPHER */
3434
#ifdef SQLITE_HAS_CODEC
3535
#ifndef CRYPTO_H
3636
#define CRYPTO_H
@@ -198,4 +198,4 @@ int sqlcipher_codec_ctx_get_flag(codec_ctx *ctx, unsigned int flag, int for_ctx)
198198
const char* sqlcipher_codec_get_cipher_provider(codec_ctx *ctx);
199199
#endif
200200
#endif
201-
/* END CRYPTO */
201+
/* END SQLCIPHER */

src/crypto_cc.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
/*
2+
** SQLCipher
3+
** http://sqlcipher.net
4+
**
5+
** Copyright (c) 2008 - 2013, ZETETIC LLC
6+
** All rights reserved.
7+
**
8+
** Redistribution and use in source and binary forms, with or without
9+
** modification, are permitted provided that the following conditions are met:
10+
** * Redistributions of source code must retain the above copyright
11+
** notice, this list of conditions and the following disclaimer.
12+
** * Redistributions in binary form must reproduce the above copyright
13+
** notice, this list of conditions and the following disclaimer in the
14+
** documentation and/or other materials provided with the distribution.
15+
** * Neither the name of the ZETETIC LLC nor the
16+
** names of its contributors may be used to endorse or promote products
17+
** derived from this software without specific prior written permission.
18+
**
19+
** THIS SOFTWARE IS PROVIDED BY ZETETIC LLC ''AS IS'' AND ANY
20+
** EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
** DISCLAIMED. IN NO EVENT SHALL ZETETIC LLC BE LIABLE FOR ANY
23+
** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24+
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26+
** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28+
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
**
30+
*/
31+
/* BEGIN SQLCIPHER */
32+
#ifdef SQLITE_HAS_CODEC
133
#ifdef SQLCIPHER_CRYPTO_CC
234
#include "crypto.h"
335
#include "sqlcipher.h"
@@ -104,3 +136,5 @@ int sqlcipher_cc_setup(sqlcipher_provider *p) {
104136
}
105137

106138
#endif
139+
#endif
140+
/* END SQLCIPHER */

src/crypto_impl.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/*
22
** SQLCipher
3-
** crypto_impl.c developed by Stephen Lombardo (Zetetic LLC)
4-
** sjlombardo at zetetic dot net
5-
** http://zetetic.net
3+
** http://sqlcipher.net
64
**
7-
** Copyright (c) 2011, ZETETIC LLC
5+
** Copyright (c) 2008 - 2013, ZETETIC LLC
86
** All rights reserved.
97
**
108
** Redistribution and use in source and binary forms, with or without
@@ -30,7 +28,7 @@
3028
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3129
**
3230
*/
33-
/* BEGIN CRYPTO */
31+
/* BEGIN SQLCIPHER */
3432
#ifdef SQLITE_HAS_CODEC
3533

3634
#include "sqliteInt.h"
@@ -802,3 +800,4 @@ const char* sqlcipher_codec_get_cipher_provider(codec_ctx *ctx) {
802800
}
803801

804802
#endif
803+
/* END SQLCIPHER */

src/crypto_libtomcrypt.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
/*
2+
** SQLCipher
3+
** http://sqlcipher.net
4+
**
5+
** Copyright (c) 2008 - 2013, ZETETIC LLC
6+
** All rights reserved.
7+
**
8+
** Redistribution and use in source and binary forms, with or without
9+
** modification, are permitted provided that the following conditions are met:
10+
** * Redistributions of source code must retain the above copyright
11+
** notice, this list of conditions and the following disclaimer.
12+
** * Redistributions in binary form must reproduce the above copyright
13+
** notice, this list of conditions and the following disclaimer in the
14+
** documentation and/or other materials provided with the distribution.
15+
** * Neither the name of the ZETETIC LLC nor the
16+
** names of its contributors may be used to endorse or promote products
17+
** derived from this software without specific prior written permission.
18+
**
19+
** THIS SOFTWARE IS PROVIDED BY ZETETIC LLC ''AS IS'' AND ANY
20+
** EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
** DISCLAIMED. IN NO EVENT SHALL ZETETIC LLC BE LIABLE FOR ANY
23+
** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24+
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26+
** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28+
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
**
30+
*/
31+
/* BEGIN SQLCIPHER */
32+
#ifdef SQLITE_HAS_CODEC
133
#ifdef SQLCIPHER_CRYPTO_LIBTOMCRYPT
234
#include "sqliteInt.h"
335
#include "sqlcipher.h"
@@ -179,3 +211,5 @@ int sqlcipher_ltc_setup(sqlcipher_provider *p) {
179211
}
180212

181213
#endif
214+
#endif
215+
/* END SQLCIPHER */

src/crypto_openssl.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
/*
2+
** SQLCipher
3+
** http://sqlcipher.net
4+
**
5+
** Copyright (c) 2008 - 2013, ZETETIC LLC
6+
** All rights reserved.
7+
**
8+
** Redistribution and use in source and binary forms, with or without
9+
** modification, are permitted provided that the following conditions are met:
10+
** * Redistributions of source code must retain the above copyright
11+
** notice, this list of conditions and the following disclaimer.
12+
** * Redistributions in binary form must reproduce the above copyright
13+
** notice, this list of conditions and the following disclaimer in the
14+
** documentation and/or other materials provided with the distribution.
15+
** * Neither the name of the ZETETIC LLC nor the
16+
** names of its contributors may be used to endorse or promote products
17+
** derived from this software without specific prior written permission.
18+
**
19+
** THIS SOFTWARE IS PROVIDED BY ZETETIC LLC ''AS IS'' AND ANY
20+
** EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22+
** DISCLAIMED. IN NO EVENT SHALL ZETETIC LLC BE LIABLE FOR ANY
23+
** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24+
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25+
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26+
** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28+
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
**
30+
*/
31+
/* BEGIN SQLCIPHER */
32+
#ifdef SQLITE_HAS_CODEC
133
#ifdef SQLCIPHER_CRYPTO_OPENSSL
234
#include "sqliteInt.h"
335
#include "crypto.h"
@@ -178,3 +210,5 @@ int sqlcipher_openssl_setup(sqlcipher_provider *p) {
178210
}
179211

180212
#endif
213+
#endif
214+
/* END SQLCIPHER */

src/func.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,16 +1544,24 @@ static void groupConcatFinalize(sqlite3_context *context){
15441544
*/
15451545
void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
15461546
int rc = sqlite3_overload_function(db, "MATCH", 2);
1547+
/* BEGIN SQLCIPHER */
1548+
#ifdef SQLITE_HAS_CODEC
15471549
#ifndef OMIT_EXPORT
15481550
extern void sqlcipher_exportFunc(sqlite3_context *, int, sqlite3_value **);
15491551
#endif
1552+
#endif
1553+
/* END SQLCIPHER */
15501554
assert( rc==SQLITE_NOMEM || rc==SQLITE_OK );
15511555
if( rc==SQLITE_NOMEM ){
15521556
db->mallocFailed = 1;
15531557
}
1558+
/* BEGIN SQLCIPHER */
1559+
#ifdef SQLITE_HAS_CODEC
15541560
#ifndef OMIT_EXPORT
15551561
sqlite3CreateFunc(db, "sqlcipher_export", 1, SQLITE_TEXT, 0, sqlcipher_exportFunc, 0, 0, 0);
15561562
#endif
1563+
#endif
1564+
/* END SQLCIPHER */
15571565
}
15581566

15591567
/*

src/pager.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7161,7 +7161,7 @@ void *sqlite3PagerCodec(PgHdr *pPg){
71617161

71627162
#endif /* SQLITE_OMIT_DISKIO */
71637163

7164-
/* BEGIN CRYPTO */
7164+
/* BEGIN SQLCIPHER */
71657165
#ifdef SQLITE_HAS_CODEC
71667166
void sqlite3pager_get_codec(Pager *pPager, void **ctx) {
71677167
*ctx = pPager->pCodec;
@@ -7190,5 +7190,5 @@ void sqlite3pager_sqlite3PagerSetError( Pager *pPager, int error) {
71907190
}
71917191

71927192
#endif
7193-
/* END CRYPTO */
7193+
/* END SQLCIPHER */
71947194

src/pragma.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,11 @@ void sqlite3Pragma(
320320
sqlite3 *db = pParse->db; /* The database connection */
321321
Db *pDb; /* The specific database being pragmaed */
322322
Vdbe *v = sqlite3GetVdbe(pParse); /* Prepared statement */
323-
/** BEGIN CRYPTO **/
323+
/* BEGIN SQLCIPHER */
324324
#ifdef SQLITE_HAS_CODEC
325325
extern int codec_pragma(sqlite3*, int, Parse *, const char *, const char *);
326326
#endif
327-
/** END CRYPTO **/
327+
/* END SQLCIPHER */
328328

329329

330330
if( v==0 ) return;
@@ -386,13 +386,13 @@ void sqlite3Pragma(
386386
pParse->rc = rc;
387387
}else
388388

389-
/** BEGIN CRYPTO **/
389+
/* BEGIN SQLCIPHER */
390390
#ifdef SQLITE_HAS_CODEC
391391
if(codec_pragma(db, iDb, pParse, zLeft, zRight)) {
392392
/* codec_pragma executes internal */
393393
}else
394394
#endif
395-
/** END CRYPTO **/
395+
/* END SQLCIPHER */
396396

397397
#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) && !defined(SQLITE_OMIT_DEPRECATED)
398398
/*

src/sqlcipher.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3131
**
3232
*/
33-
/* BEGIN CRYPTO */
33+
/* BEGIN SQLCIPHER */
3434
#ifdef SQLITE_HAS_CODEC
3535
#ifndef SQLCIPHER_H
3636
#define SQLCIPHER_H
@@ -69,5 +69,5 @@ int sqlcipher_register_provider(sqlcipher_provider *p);
6969

7070
#endif
7171
#endif
72-
/* END CRYPTO */
72+
/* END SQLCIPHER */
7373

0 commit comments

Comments
 (0)
0