Skip to content

Commit

Permalink
Big space and tab cleanup
Browse files Browse the repository at this point in the history
Remove all space before tabs and space and tabs at end of lines.
  • Loading branch information
veillard committed Sep 11, 2012
1 parent 429d3a0 commit f8e3db0
Show file tree
Hide file tree
Showing 103 changed files with 3,728 additions and 3,679 deletions.
12 changes: 6 additions & 6 deletions DOCBparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED,
/**
* docbParseDocument:
* @ctxt: an SGML parser context
*
*
* parse an SGML document (and build a tree if using the standard SAX
* interface).
*
Expand Down Expand Up @@ -163,12 +163,12 @@ docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
* @cur: a pointer to an array of xmlChar
* @encoding: a free form C string describing the SGML document encoding, or NULL
* @sax: the SAX handler block
* @userData: if using SAX, this pointer will be provided on callbacks.
* @userData: if using SAX, this pointer will be provided on callbacks.
*
* parse an SGML in-memory document and build a tree.
* It use the given SAX function block to handle the parsing callback.
* If sax is NULL, fallback to the default DOM tree building routines.
*
*
* Returns the resulting document tree
*/

Expand Down Expand Up @@ -196,7 +196,7 @@ docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
* @encoding: a free form C string describing the SGML document encoding, or NULL
*
* parse an SGML in-memory document and build a tree.
*
*
* Returns the resulting document tree
*/

Expand All @@ -221,7 +221,7 @@ docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
* @filename: the filename
* @encoding: the SGML document encoding, or NULL
*
* Create a parser context for a file content.
* Create a parser context for a file content.
* Automatic support for ZLIB/Compress compressed document is provided
* by default if found at compile-time.
*
Expand All @@ -247,7 +247,7 @@ docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED,
* @filename: the filename
* @encoding: a free form C string describing the SGML document encoding, or NULL
* @sax: the SAX handler block
* @userData: if using SAX, this pointer will be provided on callbacks.
* @userData: if using SAX, this pointer will be provided on callbacks.
*
* parse an SGML file and build a tree. Automatic support for ZLIB/Compress
* compressed document is provided by default if found at compile-time.
Expand Down
4 changes: 2 additions & 2 deletions HTMLparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -5162,13 +5162,13 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
* @stop: Array of chars, which stop the lookup.
* @stopLen: Length of stop-Array
*
* Try to find if any char of the stop-Array is available in the input
* Try to find if any char of the stop-Array is available in the input
* stream.
* This function has a side effect of (possibly) incrementing ctxt->checkIndex
* to avoid rescanning sequences of bytes, it DOES change the state of the
* parser, do not use liberally.
*
* Returns the index to the current parsing point if a stopChar
* Returns the index to the current parsing point if a stopChar
* is available, -1 otherwise.
*/
static int
Expand Down
36 changes: 18 additions & 18 deletions HTMLtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@

/************************************************************************
* *
* Getting/Setting encoding meta tags *
* Getting/Setting encoding meta tags *
* *
************************************************************************/

/**
* htmlGetMetaEncoding:
* @doc: the document
*
*
* Encoding definition lookup in the Meta tags
*
* Returns the current encoding as flagged in the HTML source
Expand Down Expand Up @@ -128,17 +128,17 @@ htmlGetMetaEncoding(htmlDocPtr doc) {

found_content:
encoding = xmlStrstr(content, BAD_CAST"charset=");
if (encoding == NULL)
if (encoding == NULL)
encoding = xmlStrstr(content, BAD_CAST"Charset=");
if (encoding == NULL)
if (encoding == NULL)
encoding = xmlStrstr(content, BAD_CAST"CHARSET=");
if (encoding != NULL) {
encoding += 8;
} else {
encoding = xmlStrstr(content, BAD_CAST"charset =");
if (encoding == NULL)
if (encoding == NULL)
encoding = xmlStrstr(content, BAD_CAST"Charset =");
if (encoding == NULL)
if (encoding == NULL)
encoding = xmlStrstr(content, BAD_CAST"CHARSET =");
if (encoding != NULL)
encoding += 9;
Expand Down Expand Up @@ -316,7 +316,7 @@ static const char* htmlBooleanAttrs[] = {
* @name: the name of the attribute to check
*
* Determine if a given attribute is a boolean attribute.
*
*
* returns: false if the attribute is not boolean, true otherwise.
*/
int
Expand All @@ -340,7 +340,7 @@ xmlOutputBufferPtr
xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
/************************************************************************
* *
* Output error handlers *
* Output error handlers *
* *
************************************************************************/
/**
Expand Down Expand Up @@ -389,7 +389,7 @@ htmlSaveErr(int code, xmlNodePtr node, const char *extra)

/************************************************************************
* *
* Dumping HTML tree content to a simple buffer *
* Dumping HTML tree content to a simple buffer *
* *
************************************************************************/

Expand Down Expand Up @@ -512,7 +512,7 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
if (handler == NULL)
handler = xmlFindCharEncodingHandler("ascii");

/*
/*
* save the content to a temp buffer.
*/
buf = xmlOutputBufferCreateFile(out, handler);
Expand Down Expand Up @@ -634,7 +634,7 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {

/************************************************************************
* *
* Dumping HTML tree content to an I/O output buffer *
* Dumping HTML tree content to an I/O output buffer *
* *
************************************************************************/

Expand All @@ -645,7 +645,7 @@ void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
* @buf: the HTML buffer output
* @doc: the document
* @encoding: the encoding string
*
*
* TODO: check whether encoding is needed
*
* Dump the HTML document DTD, if any.
Expand All @@ -667,7 +667,7 @@ htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
if (cur->SystemID != NULL) {
xmlOutputBufferWriteString(buf, " ");
xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
}
}
} else if (cur->SystemID != NULL) {
xmlOutputBufferWriteString(buf, " SYSTEM ");
xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
Expand Down Expand Up @@ -1123,7 +1123,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {

if ((cur == NULL) || (filename == NULL))
return(-1);

xmlInitParser();

encoding = (const char *) htmlGetMetaEncoding(cur);
Expand Down Expand Up @@ -1154,7 +1154,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
if (handler == NULL)
handler = xmlFindCharEncodingHandler("ascii");

/*
/*
* save the content to a temp buffer.
*/
buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
Expand All @@ -1174,7 +1174,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
* @encoding: the document encoding
*
* Dump an HTML document to a file using a given encoding.
*
*
* returns: the number of byte written or -1 in case of failure.
*/
int
Expand Down Expand Up @@ -1218,7 +1218,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
if (handler == NULL)
handler = xmlFindCharEncodingHandler("ascii");

/*
/*
* save the content to a temp buffer.
*/
buf = xmlOutputBufferCreateFilename(filename, handler, 0);
Expand All @@ -1238,7 +1238,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
*
* Dump an HTML document to a file using a given encoding
* and formatting returns/spaces are added.
*
*
* returns: the number of byte written or -1 in case of failure.
*/
int
Expand Down
2 changes: 1 addition & 1 deletion SAX.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
void
initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning)
{

if(hdlr->initialized == 1)
return;

Expand Down
Loading

0 comments on commit f8e3db0

Please sign in to comment.