[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/08: [grohtml]: Delete or rename `debug` symbols.
From: |
G. Branden Robinson |
Subject: |
[groff] 01/08: [grohtml]: Delete or rename `debug` symbols. |
Date: |
Thu, 29 Jul 2021 05:29:27 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 81cf90b6bc31a70c099db4eed994d2c8e394b4a5
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Jul 28 14:52:14 2021 +1000
[grohtml]: Delete or rename `debug` symbols.
...to avoid clash with new `debug` function in libgroff.
* src/preproc/html/pre-html.cpp: Update a comment to refer to
"debugging" mode. Rename static global from `debug` to `debugging`.
(html_system, imageList::createPage, imageList::createImage,
print_args, char_buffer::do_html, char_buffer::do_image,
scanArguments): Update uses of static global.
* src/preproc/html/pushback.cpp:
* src/preproc/html/pushback.h: Delete unused `debug` member variable.
---
ChangeLog | 16 ++++++++++++++++
src/preproc/html/pre-html.cpp | 20 ++++++++++----------
src/preproc/html/pushback.cpp | 1 -
src/preproc/html/pushback.h | 1 -
4 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3fe08bb..5fc0124 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2021-07-28 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [grohtml]: Delete or rename `debug` symbols to avoid clash with
+ new `debug` function in libgroff.
+
+ * src/preproc/html/pre-html.cpp: Update a comment to refer to
+ "debugging" mode. Rename static global from `debug` to
+ `debugging`.
+ (html_system, imageList::createPage, imageList::createImage,
+ print_args, char_buffer::do_html, char_buffer::do_image,
+ scanArguments): Update uses of static global.
+
+ * src/preproc/html/pushback.cpp:
+ * src/preproc/html/pushback.h: Delete unused `debug` member
+ variable.
+
2021-07-27 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/roff/nroff/nroff.sh: Fix straggling use of `$1`, which
diff --git a/src/preproc/html/pre-html.cpp b/src/preproc/html/pre-html.cpp
index 501e90c..5a005b5 100644
--- a/src/preproc/html/pre-html.cpp
+++ b/src/preproc/html/pre-html.cpp
@@ -133,8 +133,8 @@
#ifdef DEBUGGING
// For a DEBUGGING version, we need some additional macros,
-// to direct the captured debug mode output to appropriately named files
-// in the specified DEBUG_FILE_DIR.
+// to direct the captured debugging mode output to appropriately named
+// files in the specified DEBUG_FILE_DIR.
# define DEBUG_TEXT(text) #text
# define DEBUG_NAME(text) DEBUG_TEXT(text)
@@ -205,7 +205,7 @@ static int show_progress = FALSE; // should we display
page numbers as
// they are processed?
static int currentPageNo = -1; // current image page number
#if defined(DEBUGGING)
-static int debug = FALSE;
+static int debugging = FALSE;
static char *troffFileName = NULL; // output of pre-html output which
// is sent to troff -Tps
static char *htmlFileName = NULL; // output of pre-html output which
@@ -317,7 +317,7 @@ static unsigned int get_resolution(void)
void html_system(const char *s, int redirect_stdout)
{
#if defined(DEBUGGING)
- if (debug) {
+ if (debugging) {
fprintf(stderr, "executing: ");
fwrite(s, sizeof(char), strlen(s), stderr);
fflush(stderr);
@@ -918,7 +918,7 @@ int imageList::createPage(int pageno)
}
#if defined(DEBUGGING)
- if (debug)
+ if (debugging)
fprintf(stderr, "creating page %d\n", pageno);
#endif
@@ -1037,7 +1037,7 @@ void imageList::createImage(imageItem *i)
#if defined(DEBUGGING)
}
else {
- if (debug) {
+ if (debugging) {
fprintf(stderr, "ignoring image as x1 coord is -1\n");
fflush(stderr);
}
@@ -1281,7 +1281,7 @@ void dump_args(int argc, char *argv[])
void print_args(int argc, char *argv[])
{
- if (debug) {
+ if (debugging) {
fprintf(stderr, "executing: ");
for (int i = 0; i < argc; i++)
fprintf(stderr, "%s ", argv[i]);
@@ -1483,7 +1483,7 @@ int char_buffer::do_html(int argc, char *argv[])
#if defined(DEBUGGING)
# define HTML_DEBUG_STREAM OUTPUT_STREAM(htmlFileName)
// slight security risk so only enabled if compiled with defined(DEBUGGING)
- if (debug) {
+ if (debugging) {
int saved_stdout = save_and_redirect(STDOUT_FILENO, HTML_DEBUG_STREAM);
emit_troff_output(DEVICE_FORMAT(HTML_OUTPUT_FILTER));
set_redirection(STDOUT_FILENO, saved_stdout);
@@ -1529,7 +1529,7 @@ int char_buffer::do_image(int argc, char *argv[])
#if defined(DEBUGGING)
# define IMAGE_DEBUG_STREAM OUTPUT_STREAM(troffFileName)
// slight security risk so only enabled if compiled with defined(DEBUGGING)
- if (debug) {
+ if (debugging) {
int saved_stdout = save_and_redirect(STDOUT_FILENO, IMAGE_DEBUG_STREAM);
emit_troff_output(DEVICE_FORMAT(IMAGE_OUTPUT_FILTER));
set_redirection(STDOUT_FILENO, saved_stdout);
@@ -1604,7 +1604,7 @@ static int scanArguments(int argc, char **argv)
break;
case 'd':
#if defined(DEBUGGING)
- debug = TRUE;
+ debugging = TRUE;
#endif
break;
case 'D':
diff --git a/src/preproc/html/pushback.cpp b/src/preproc/html/pushback.cpp
index 52f2a85..bc3940c 100644
--- a/src/preproc/html/pushback.cpp
+++ b/src/preproc/html/pushback.cpp
@@ -65,7 +65,6 @@ pushBackBuffer::pushBackBuffer (char *filename)
sys_fatal("malloc");
}
stackPtr = 0; /* index to push back stack */
- debug = 0;
verbose = 0;
eofFound = FALSE;
lineNo = 1;
diff --git a/src/preproc/html/pushback.h b/src/preproc/html/pushback.h
index f087ec8..263a6c5 100644
--- a/src/preproc/html/pushback.h
+++ b/src/preproc/html/pushback.h
@@ -30,7 +30,6 @@ class pushBackBuffer
private:
char *charStack;
int stackPtr; /* index to push back stack */
- int debug;
int verbose;
int eofFound;
char *fileName;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/08: [grohtml]: Delete or rename `debug` symbols.,
G. Branden Robinson <=