Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ os:
- osx

install:
- wget 'https://googletest.googlecode.com/files/gtest-1.7.0.zip'
- unzip gtest-1.7.0.zip
- ln -s gtest-1.7.0 gtest
- git clone --branch release-1.7.0 --depth 1 https://github.com/google/googletest.git gtest
- touch gtest/build-aux/config.h.in
- cd gtest && ../autogen.sh && cd ..
- sudo pip install BeautifulSoup
- sudo pip install html5lib==0.95

Expand Down
12 changes: 0 additions & 12 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,3 @@ char* gumbo_copy_stringz(GumboParser* parser, const char* str) {
strcpy(buffer, str);
return buffer;
}

// Debug function to trace operation of the parser. Pass --copts=-DGUMBO_DEBUG
// to use.
void gumbo_debug(const char* format, ...) {
#ifdef GUMBO_DEBUG
va_list args;
va_start(args, format);
vprintf(format, args);
va_end(args);
fflush(stdout);
#endif
}
12 changes: 11 additions & 1 deletion src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,17 @@ void gumbo_parser_deallocate(struct GumboInternalParser* parser, void* ptr);

// Debug wrapper for printf, to make it easier to turn off debugging info when
// required.
void gumbo_debug(const char* format, ...);
// Debug function to trace operation of the parser. Pass --copts=-DGUMBO_DEBUG
// to use.
void inline gumbo_debug(const char* format, ...) {
#ifdef GUMBO_DEBUG
va_list args;
va_start(args, format);
vprintf(format, args);
va_end(args);
fflush(stdout);
#endif
}

#ifdef __cplusplus
}
Expand Down