"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "htmldoc/htmlsep.cxx" between
htmldoc-1.9.11-source.tar.gz and htmldoc-1.9.12-source.tar.gz

About: HTMLDOC converts HTML and Markdown source files into indexed HTML, EPUB, PostScript, or PDF files (but doesn’t support CSS).

htmlsep.cxx  (htmldoc-1.9.11-source):htmlsep.cxx  (htmldoc-1.9.12-source)
/* /*
* Separated HTML export functions for HTMLDOC, a HTML document processing * Separated HTML export functions for HTMLDOC, a HTML document processing
* program. * program.
* *
* Copyright 2011-2019 by Michael R Sweet. * Copyright 2011-2021 by Michael R Sweet.
* Copyright 1997-2010 by Easy Software Products. All rights reserved. * Copyright 1997-2010 by Easy Software Products. All rights reserved.
* *
* This program is free software. Distribution and use rights are outlined in * This program is free software. Distribution and use rights are outlined in
* the file "COPYING". * the file "COPYING".
*/ */
/* /*
* Include necessary headers. * Include necessary headers.
*/ */
skipping to change at line 579 skipping to change at line 579
{ {
case MARKUP_NONE : case MARKUP_NONE :
if (t->data == NULL) if (t->data == NULL)
break; break;
if (t->preformatted) if (t->preformatted)
{ {
for (ptr = t->data; *ptr; ptr ++) for (ptr = t->data; *ptr; ptr ++)
fputs((char *)iso8859(*ptr), out); fputs((char *)iso8859(*ptr), out);
if (t->data[strlen((char *)t->data) - 1] == '\n') if (t->data[0] && t->data[strlen((char *)t->data) - 1] == '\n')
col = 0; col = 0;
else else
col += strlen((char *)t->data); col += strlen((char *)t->data);
} }
else else
{ {
if ((col + (int)strlen((char *)t->data)) > 72 && col > 0) if ((col + (int)strlen((char *)t->data)) > 72 && col > 0)
{ {
putc('\n', out); putc('\n', out);
col = 0; col = 0;
skipping to change at line 897 skipping to change at line 897
count; // Count of headings with this name count; // Count of headings with this name
uchar *heading, // Heading text for this node uchar *heading, // Heading text for this node
*ptr, // Pointer into text *ptr, // Pointer into text
*ptr2, // Second pointer into text *ptr2, // Second pointer into text
s[1024], // New text if we have a conflict s[1024], // New text if we have a conflict
**temp; // New heading array pointer **temp; // New heading array pointer
// Start by getting the heading text... // Start by getting the heading text...
heading = htmlGetText(t->child); heading = htmlGetText(t->child);
if (!heading || !*heading) if (!heading || !*heading)
{
free(heading);
return; // Nothing to do! return; // Nothing to do!
}
// Sanitize the text... // Sanitize the text...
for (ptr = heading; *ptr;) for (ptr = heading; *ptr;)
if (!isalnum(*ptr)) if (!isalnum(*ptr))
{ {
// Remove anything but letters and numbers from the filename // Remove anything but letters and numbers from the filename
for (ptr2 = ptr; *ptr2; ptr2 ++) for (ptr2 = ptr; *ptr2; ptr2 ++)
*ptr2 = ptr2[1]; *ptr2 = ptr2[1];
*ptr2 = '\0'; *ptr2 = '\0';
 End of changes. 4 change blocks. 
2 lines changed or deleted 5 lines changed or added

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