Fossil

Check-in [9ab7122d]
Login

Check-in [9ab7122d]

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

Overview
Comment:Fix memory leak from previous commit
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | pending-review
Files: files | file ages | folders
SHA1: 9ab7122d6a00c7bd017727434983104a3997c181
User & Date: baruch 2016-01-21 10:32:32.234
Context
2016-01-21
21:40
Fix Older/Newer buttons if showing timeline before beginning or after end of existing timeline ... (check-in: aa867868 user: baruch tags: baruch_timeline_fixes)
10:32
Fix memory leak from previous commit ... (Closed-Leaf check-in: 9ab7122d user: baruch tags: pending-review)
2016-01-20
23:07
Fix "Newer" button in timeline when using "c" parameter ... (check-in: 28dd7c1d user: baruch tags: pending-review)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/timeline.c.
1750
1751
1752
1753
1754
1755
1756
1757
1758

1759
1760

1761
1762
1763

1764
1765
1766

1767
1768
1769
1770
1771
1772
1773
      if( zCirca && rCirca ){
        nBefore = db_int(0,
          "SELECT count(*) FROM timeline WHERE etype!='div'"
          "   AND sortby<=%f /*scan*/", rCirca);
        nAfter = db_int(0,
          "SELECT count(*) FROM timeline WHERE etype!='div'"
          "   AND sortby>=%f /*scan*/", rCirca);
        zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/");
        if( nBefore>=nEntry ){

          timeline_submenu(&url, "Older", "b", zDate, "c");
          zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "c", 0));

        }
        zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/");
        if( nAfter>=nEntry ){

          timeline_submenu(&url, "Newer", "a", zDate, "c");
        }
        free(zDate);

      }else{
        if( zAfter || n==nEntry ){
          zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/");
          timeline_submenu(&url, "Older", "b", zDate, "a");
          zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "a", 0));
          free(zDate);
        }







<

>


>

<

>

<
|
>







1750
1751
1752
1753
1754
1755
1756

1757
1758
1759
1760
1761
1762

1763
1764
1765

1766
1767
1768
1769
1770
1771
1772
1773
1774
      if( zCirca && rCirca ){
        nBefore = db_int(0,
          "SELECT count(*) FROM timeline WHERE etype!='div'"
          "   AND sortby<=%f /*scan*/", rCirca);
        nAfter = db_int(0,
          "SELECT count(*) FROM timeline WHERE etype!='div'"
          "   AND sortby>=%f /*scan*/", rCirca);

        if( nBefore>=nEntry ){
          zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/");
          timeline_submenu(&url, "Older", "b", zDate, "c");
          zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "c", 0));
          free(zDate);
        }

        if( nAfter>=nEntry ){
          zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/");
          timeline_submenu(&url, "Newer", "a", zDate, "c");

          free(zDate);
        }
      }else{
        if( zAfter || n==nEntry ){
          zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/");
          timeline_submenu(&url, "Older", "b", zDate, "a");
          zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "a", 0));
          free(zDate);
        }