Documentation formatting.
This commit is contained in:
parent
5ff6aa8a8b
commit
8d7e5f7f5a
|
@ -18,11 +18,9 @@
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
#else
|
#else
|
||||||
# ifdef DMALLOC
|
# 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
|
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
|
# ifdef valloc
|
||||||
# undef valloc
|
# undef valloc
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -93,7 +93,7 @@ void TY_(freeFileSource)( TidyInputSource* inp, Bool closeIt )
|
||||||
TY_(freeStdIOFileSource)( inp, closeIt );
|
TY_(freeStdIOFileSource)( inp, closeIt );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif /* SUPPORT_POSIX_MAPPED_FILES */
|
||||||
|
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
@ -102,7 +102,6 @@ void TY_(freeFileSource)( TidyInputSource* inp, Bool closeIt )
|
||||||
# endif
|
# endif
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
|
|
||||||
# include "streamio.h"
|
# include "streamio.h"
|
||||||
# include "tidy-int.h"
|
# include "tidy-int.h"
|
||||||
# include "message.h"
|
# include "message.h"
|
||||||
|
@ -309,7 +308,7 @@ int TY_(DocParseFileWithMappedFile)( TidyDocImpl* doc, ctmbstr filnam ) {
|
||||||
doc->filetimes.modtime =
|
doc->filetimes.modtime =
|
||||||
(time_t)( ( modtime - TY_I64(116444736000000000)) / 10000000 );
|
(time_t)( ( modtime - TY_I64(116444736000000000)) / 10000000 );
|
||||||
}
|
}
|
||||||
#endif
|
# endif /* PRESERVE_FILE_TIMES */
|
||||||
|
|
||||||
if ( fin != INVALID_HANDLE_VALUE )
|
if ( fin != INVALID_HANDLE_VALUE )
|
||||||
{
|
{
|
||||||
|
@ -330,14 +329,5 @@ int TY_(DocParseFileWithMappedFile)( TidyDocImpl* doc, ctmbstr filnam ) {
|
||||||
return status;
|
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:
|
|
||||||
*/
|
|
||||||
|
|
20
src/parser.c
20
src/parser.c
|
@ -401,24 +401,7 @@ static void TrimTrailingSpace( TidyDocImpl* doc, Node *element, Node *last )
|
||||||
{
|
{
|
||||||
c = (byte) lexer->lexbuf[ last->end - 1 ];
|
c = (byte) lexer->lexbuf[ last->end - 1 ];
|
||||||
|
|
||||||
if ( c == ' '
|
if ( c == ' ' )
|
||||||
#ifdef COMMENT_NBSP_FIX
|
|
||||||
|| c == 160
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
|
||||||
#ifdef COMMENT_NBSP_FIX
|
|
||||||
/* take care with <td> </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
|
|
||||||
{
|
{
|
||||||
last->end -= 1;
|
last->end -= 1;
|
||||||
if ( (element->tag->model & CM_INLINE) &&
|
if ( (element->tag->model & CM_INLINE) &&
|
||||||
|
@ -428,7 +411,6 @@ static void TrimTrailingSpace( TidyDocImpl* doc, Node *element, Node *last )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Only true for text nodes. */
|
/* Only true for text nodes. */
|
||||||
Bool TY_(IsBlank)(Lexer *lexer, Node *node)
|
Bool TY_(IsBlank)(Lexer *lexer, Node *node)
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include <stdio.h> /* fopen()... */
|
#include <stdio.h> /* fopen()... */
|
||||||
#include <string.h> /* strcpy */
|
#include <string.h> /* strcpy */
|
||||||
#include <stdarg.h> /* va_start, va_end, ... */
|
#include <stdarg.h> /* va_start, va_end, ... */
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# include <WinSock2.h>
|
# include <WinSock2.h>
|
||||||
# include <sys/timeb.h>
|
# include <sys/timeb.h>
|
||||||
|
@ -27,6 +28,7 @@
|
||||||
#else /* !_MSC_VER */
|
#else /* !_MSC_VER */
|
||||||
# include <sys/time.h> /* gettimeoday(), struct timeval,... */
|
# include <sys/time.h> /* gettimeoday(), struct timeval,... */
|
||||||
#endif /* _MSC_VER y/n */
|
#endif /* _MSC_VER y/n */
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdlib.h> /* for exit() in unix */
|
#include <stdlib.h> /* for exit() in unix */
|
||||||
#include "sprtf.h"
|
#include "sprtf.h"
|
||||||
|
|
Loading…
Reference in a new issue