"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "toc.c" between
discount-2.2.3a.tar.bz2 and discount-2.2.4.tar.bz2

About: Discount is an implementation of the "Markdown" markup language (written in C).

toc.c  (discount-2.2.3a.tar.bz2):toc.c  (discount-2.2.4.tar.bz2)
skipping to change at line 41 skipping to change at line 41
*doc = 0; *doc = 0;
if ( ! (p->ctx->flags & MKD_TOC) ) return 0; if ( ! (p->ctx->flags & MKD_TOC) ) return 0;
CREATE(res); CREATE(res);
RESERVE(res, 100); RESERVE(res, 100);
for ( tp = p->code; tp ; tp = tp->next ) { for ( tp = p->code; tp ; tp = tp->next ) {
if ( tp->typ == SOURCE ) { if ( tp->typ == SOURCE ) {
for ( srcp = tp->down; srcp; srcp = srcp->next ) { for ( srcp = tp->down; srcp; srcp = srcp->next ) {
if ( srcp->typ == HDR && srcp->text ) { if ( (srcp->typ == HDR) && srcp->text ) {
while ( last_hnumber > srcp->hnumber ) { while ( last_hnumber > srcp->hnumber ) {
if ( (last_hnumber - srcp->hnumber) > 1 ) if ( (last_hnumber - srcp->hnumber) > 1 )
Csprintf(&res, "\n"); Csprintf(&res, "\n");
Csprintf(&res, "</li>\n%*s</ul>\n%*s", Csprintf(&res, "</li>\n%*s</ul>\n%*s",
last_hnumber-1, "", last_hnumber-1, ""); last_hnumber-1, "", last_hnumber-1, "");
--last_hnumber; --last_hnumber;
} }
if ( last_hnumber == srcp->hnumber ) if ( last_hnumber == srcp->hnumber )
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)