System.Data.SQLite
Check-in [f89ae9878e]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Automate fixing up of sqlite sources
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sourceforge
Files: files | file ages | folders
SHA1: f89ae9878e69224fc17d7c2501f139f90486850a
User & Date: rmsimpson 2006-01-12 20:53:13
Context
2006-01-12
20:53
Pre-build step updates check-in: 452dbe4827 user: rmsimpson tags: sourceforge
20:53
Automate fixing up of sqlite sources check-in: f89ae9878e user: rmsimpson tags: sourceforge
20:53
Fix memory leak with crypt keys check-in: 659d427be4 user: rmsimpson tags: sourceforge
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SQLite.Interop/fixsource.vbs.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

34







35





36
37
38
39
40

41
42
43
44
  Dim fso
  Set fso = WScript.CreateObject("Scripting.FileSystemObject")
  
  Dim srcFile
  Dim srcFileContents
  dim newFileContents
  
  Set srcFile = fso.OpenTextFile("src\select.c", 1)
  
  srcFileContents = srcFile.ReadAll()
  srcFile.Close()
  
  newFileContents = Replace(srcFileContents, "static void generateColumnNames(", "static void _generateColumnNames(")
  
  If (newFileContents <> srcFileContents) Then
    WScript.StdOut.WriteLine "Updating select.c"
    Set srcFile = fso.CreateTextFile("src\select.c", true)
    srcFile.Write(newFileContents)
    srcFile.Close()
  End If
  
  Set srcFile = fso.OpenTextFile("src\tokenize.c", 1)
  
  srcFileContents = srcFile.ReadAll()
  srcFile.Close()
  

  newFileContents = Replace(srcFileContents, "    case ':': {", "    case '@': case ':': {")













  If (newFileContents <> srcFileContents) Then
    WScript.StdOut.WriteLine "Updating tokenize.c"
    Set srcFile = fso.CreateTextFile("src\tokenize.c", true)
    srcFile.Write(newFileContents)
    srcFile.Close()

  End If

End Sub
  







|
<

|
<

<







|
<


<
>
|
>
>
>
>
>
>
>

>
>
>
>
>
|
|
|
|
|
>




8
9
10
11
12
13
14
15

16
17

18

19
20
21
22
23
24
25
26

27
28

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
  Dim fso
  Set fso = WScript.CreateObject("Scripting.FileSystemObject")
  
  Dim srcFile
  Dim srcFileContents
  dim newFileContents
  
  Set srcFile = fso.OpenTextFile("src\select.c", 1) 

  srcFileContents = srcFile.ReadAll()
  srcFile.Close()  

  newFileContents = Replace(srcFileContents, "static void generateColumnNames(", "static void _generateColumnNames(")

  If (newFileContents <> srcFileContents) Then
    WScript.StdOut.WriteLine "Updating select.c"
    Set srcFile = fso.CreateTextFile("src\select.c", true)
    srcFile.Write(newFileContents)
    srcFile.Close()
  End If
  
  Set srcFile = fso.OpenTextFile("src\tokenize.c", 1)  

  srcFileContents = srcFile.ReadAll()
  srcFile.Close()

  If InStr(1, srcFileContents, "    case '@':", 1) = 0 Then
    newFileContents = Replace(srcFileContents, "    case ':': {", "    case '@':" & Chr(10) & "    case ':': {")
    If (newFileContents <> srcFileContents) Then
      WScript.StdOut.WriteLine "Updating tokenize.c"
      Set srcFile = fso.CreateTextFile("src\tokenize.c", true)
      srcFile.Write(newFileContents)
      srcFile.Close()
    End If
  End If

  Set srcFile = fso.OpenTextFile("src\pager.c", 1)  
  srcFileContents = srcFile.ReadAll()
  srcFile.Close()
  If InStr(1, srcFileContents, "sqlite3pager_free_codecarg", 1) = 0 Then
    newFileContents = Replace(srcFileContents, Chr(10) & "  sqliteFree(pPager);", Chr(10) & "#ifdef SQLITE_HAS_CODEC" & Chr(10) & "  sqlite3pager_free_codecarg(pPager->pCodecArg);" & Chr(10) & "#endif" & Chr(10) & "  sqliteFree(pPager);")
    If (newFileContents <> srcFileContents) Then
      WScript.StdOut.WriteLine "Updating pager.c"
      Set srcFile = fso.CreateTextFile("src\pager.c", true)
      srcFile.Write(newFileContents)
      srcFile.Close()
    End If
  End If

End Sub