mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Split the "-ds" debug flag into "-ds" and "-dh"
-ds prints parsed expressions -dh dumps hash-table statistics on exit.
This commit is contained in:
@@ -315,6 +315,9 @@ Trace the reading of reminder files
|
||||
Trace expression parsing and display the internal expression node
|
||||
tree. This is unlikely to be useful unless you are working on
|
||||
\fBRemind\fR's expression evaluation engine.
|
||||
.TP
|
||||
.B h
|
||||
Dump hash-table statistics on exit.
|
||||
.RE
|
||||
.TP
|
||||
\fB\-g\fR[\fBa|d\fR[\fBa|d\fR[\fBa|d\fR[\fBa|d\fR]]]]
|
||||
|
||||
@@ -634,6 +634,7 @@ void InitRemind(int argc, char const *argv[])
|
||||
while (*arg) {
|
||||
switch(*arg++) {
|
||||
case 's': case 'S': DebugFlag |= DB_PARSE_EXPR; break;
|
||||
case 'h': case 'H': DebugFlag |= DB_HASHSTATS; break;
|
||||
case 'e': case 'E': DebugFlag |= DB_ECHO_LINE; break;
|
||||
case 'x': case 'X': DebugFlag |= DB_PRTEXPR; break;
|
||||
case 't': case 'T': DebugFlag |= DB_PRTTRIG; break;
|
||||
|
||||
@@ -60,7 +60,7 @@ exitfunc(void)
|
||||
/* Kill any execution-time-limiter process */
|
||||
unlimit_execution_time();
|
||||
|
||||
if (DebugFlag & DB_PARSE_EXPR) {
|
||||
if (DebugFlag & DB_HASHSTATS) {
|
||||
fflush(stdout);
|
||||
fflush(ErrFp);
|
||||
fprintf(ErrFp, "Variable hash table statistics:\n");
|
||||
@@ -1273,6 +1273,12 @@ int DoDebug(ParsePtr p)
|
||||
else DebugFlag &= ~DB_PARSE_EXPR;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
case 'H':
|
||||
if (val) DebugFlag |= DB_HASHSTATS;
|
||||
else DebugFlag &= ~DB_HASHSTATS;
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
case 'X':
|
||||
if (val) DebugFlag |= DB_PRTEXPR;
|
||||
|
||||
@@ -207,6 +207,7 @@ typedef Parser *ParsePtr; /* Pointer to parser structure */
|
||||
#define DB_ECHO_LINE 16
|
||||
#define DB_TRACE_FILES 32
|
||||
#define DB_PARSE_EXPR 64
|
||||
#define DB_HASHSTATS 128
|
||||
|
||||
/* Enumeration of the tokens */
|
||||
enum TokTypes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
debug +sx
|
||||
debug +hsx
|
||||
|
||||
set a 1
|
||||
|
||||
|
||||
@@ -1440,7 +1440,7 @@ do "with space.rem"
|
||||
DEBUG -e
|
||||
|
||||
# Output expression-node stats
|
||||
DEBUG +s
|
||||
DEBUG +h
|
||||
|
||||
# Don't want Remind to queue reminders
|
||||
EXIT
|
||||
|
||||
@@ -600001,4 +600001,4 @@ TRANSLATE "99999"
|
||||
SET BOOGIE 1
|
||||
FSET QUUX(x) x*2
|
||||
TRANSLATE "A" "B"
|
||||
DEBUG +s
|
||||
DEBUG +h
|
||||
|
||||
Reference in New Issue
Block a user