• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonrubyphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

Demonstration of groff .psbb request handling code, for EPS and PDF input files


Commit MetaInfo

修訂72ebbc3a28d810a12d685bfa2d00b6a56d882127 (tree)
時間2021-10-20 05:52:07
作者Keith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

Simplify building with debugging diagnostics enabled.

* psbblex.l [DEBUG || DEBUGGING || EBUG || EBUGGING]: Accept...
[-D DEBUG, -D DEBUGGING, -DEBUG, -DEBUGGING]: ...as equivalents, when
specified as compile-time options.

* GNUmakefile (all): Remove dependency on...
(state.map): ...build of this, but preserve it within...
(all-debug): ...this new target; it reproduces original "all", and...
(CPPFLAGS) [-DEBUG]: ...adds this compile-time option.

Change Summary

差異

--- a/GNUmakefile
+++ b/GNUmakefile
@@ -21,7 +21,9 @@
2121 # You should have received a copy of the GNU General Public License
2222 # along with this program. If not, see <http://www.gnu.org/licenses/>.
2323 #
24-all: psbb state.map
24+all: psbb
25+all-debug: psbb state.map
26+all-debug: CPPFLAGS += -DEBUG
2527
2628 srcdir = .
2729 vpath %.l ${srcdir}
--- a/psbblex.l
+++ b/psbblex.l
@@ -32,7 +32,11 @@
3232 #include "psbb.h"
3333 #include "psbb.tab.h"
3434
35-#if DEBUGGING
35+#if DEBUG || DEBUGGING || EBUG || EBUGGING
36+ /* Enable tracing diagnostics, when compiled with the "-D DEBUG" option;
37+ * (accept "-D DEBUGGING", "-DEBUG", or "-DEBUGGING" as equivalent).
38+ */
39+# undef DEBUG
3640 # define DEBUG(FOO) FOO
3741 # define DEBUG_ECHO debug_msg( "%d: %s\n", YYSTATE, yytext )
3842
@@ -61,6 +65,10 @@ static void debug_msg (const char *fmt, ...)
6165 { va_list av; va_start(av, fmt); vfprintf(stderr, fmt, av); va_end(av); }
6266
6367 #else
68+ /* No "-D DEBUG" (or equivalent) option specified; we will still use the
69+ * debugging macros, but we define them without tracing diagnostics.
70+ */
71+# undef DEBUG
6472 # define DEBUG(FOO)
6573 # define DEBUG_ECHO
6674 # define DEBUG_MSG(ARGLIST)