Documentation formatting.

This commit is contained in:
Jim Derry 2017-10-03 15:30:21 -04:00
parent 5ff6aa8a8b
commit 8d7e5f7f5a
14 changed files with 80 additions and 108 deletions

View file

@ -18,11 +18,9 @@
# include <io.h>
#else
# ifdef DMALLOC
/*
macro for valloc() in dmalloc.h may conflict with declaration for valloc()
/* macro for valloc() in dmalloc.h may conflict with declaration for valloc()
in unistd.h - we don't need (debugging for) valloc() here. dmalloc.h should
come last but it doesn't.
*/
come last but it doesn't.*/
# ifdef valloc
# undef valloc
# endif

View file

@ -93,7 +93,7 @@ void TY_(freeFileSource)( TidyInputSource* inp, Bool closeIt )
TY_(freeStdIOFileSource)( inp, closeIt );
}
#endif
#endif /* SUPPORT_POSIX_MAPPED_FILES */
#if defined(_WIN32)
@ -102,7 +102,6 @@ void TY_(freeFileSource)( TidyInputSource* inp, Bool closeIt )
# endif
# include <windows.h>
# include <errno.h>
# include "streamio.h"
# include "tidy-int.h"
# include "message.h"
@ -309,7 +308,7 @@ int TY_(DocParseFileWithMappedFile)( TidyDocImpl* doc, ctmbstr filnam ) {
doc->filetimes.modtime =
(time_t)( ( modtime - TY_I64(116444736000000000)) / 10000000 );
}
#endif
# endif /* PRESERVE_FILE_TIMES */
if ( fin != INVALID_HANDLE_VALUE )
{
@ -330,14 +329,5 @@ int TY_(DocParseFileWithMappedFile)( TidyDocImpl* doc, ctmbstr filnam ) {
return status;
}
#endif
#endif /* defined(_WIN32) */
/*
* local variables:
* mode: c
* indent-tabs-mode: nil
* c-basic-offset: 4
* eval: (c-set-offset 'substatement-open 0)
* end:
*/

View file

@ -401,24 +401,7 @@ static void TrimTrailingSpace( TidyDocImpl* doc, Node *element, Node *last )
{
c = (byte) lexer->lexbuf[ last->end - 1 ];
if ( c == ' '
#ifdef COMMENT_NBSP_FIX
|| c == 160
#endif
)
{
#ifdef COMMENT_NBSP_FIX
/* take care with <td>&nbsp;</td> */
if ( c == 160 &&
( element->tag == doc->tags.tag_td ||
element->tag == doc->tags.tag_th )
)
{
if (last->end > last->start + 1)
last->end -= 1;
}
else
#endif
if ( c == ' ' )
{
last->end -= 1;
if ( (element->tag->model & CM_INLINE) &&
@ -428,7 +411,6 @@ static void TrimTrailingSpace( TidyDocImpl* doc, Node *element, Node *last )
}
}
}
}
/* Only true for text nodes. */
Bool TY_(IsBlank)(Lexer *lexer, Node *node)

View file

@ -18,6 +18,7 @@
#include <stdio.h> /* fopen()... */
#include <string.h> /* strcpy */
#include <stdarg.h> /* va_start, va_end, ... */
#ifdef _MSC_VER
# include <WinSock2.h>
# include <sys/timeb.h>
@ -27,6 +28,7 @@
#else /* !_MSC_VER */
# include <sys/time.h> /* gettimeoday(), struct timeval,... */
#endif /* _MSC_VER y/n */
#include <time.h>
#include <stdlib.h> /* for exit() in unix */
#include "sprtf.h"