|
| |||||||||||||
#include "libjwgc_types.h"Go to the source code of this file.
Defines | |
| #define | _LIBJWGC_DEBUG_H_ 1 |
Typedefs | |
| typedef enum dZones | dZone |
Enumerations | |
| enum | dZones { dJWG, dParser, dJAB, dOutput, dEval, dPoll, dExecution, dVars, dMatch, dXML, dGPG, dNumZones } |
Functions | |
| void | dclear () |
| void | dflagon (dZone zone) |
| void | dflagoff (dZone zone) |
| void | dprintf (dZone zone, const char *msgfmt,...) |
| void | dprinttypes () |
| void | dparseflags (char *flags) |
| char * | dzoneitos (dZone zone) |
| dZone | dzonestoi (char *zone) |
Variables | |
| int | errno |
|
|
Definition at line 4 of file libjwgc_debug.h. |
|
|
Referenced by dinit(), dparseflags(), dprinttypes(), and dzonestoi(). |
|
|
Definition at line 15 of file libjwgc_debug.h. 00015 {
00016 dJWG,
00017 dParser,
00018 dJAB,
00019 dOutput,
00020 dEval,
00021 dPoll,
00022 dExecution,
00023 dVars,
00024 dMatch,
00025 dXML,
00026 dGPG,
00027 dNumZones
00028 } dZone;
|
|
|
|
|
|
Definition at line 42 of file JDebug.c. References debug_enabled. Referenced by dparseflags(). 00043 {
00044 #ifndef NODEBUG
00045 debug_enabled[zone] = 0;
00046 #endif /* NODEBUG */
00047 }
|
|
|
Definition at line 34 of file JDebug.c. References debug_enabled. Referenced by dparseflags(). 00035 {
00036 #ifndef NODEBUG
00037 debug_enabled[zone] = 1;
00038 #endif /* NODEBUG */
00039 }
|
|
|
Definition at line 113 of file JDebug.c. References debug_enabled, dflagoff(), dflagon(), dZone, dzonestoi(), and NULL. Referenced by jwg_on_event_handler(), and main(). 00114 {
00115 #ifndef NODEBUG
00116 char *ptr;
00117 int retval;
00118 dZone i;
00119
00120 if (!flags) { return; }
00121
00122 ptr = strtok(flags, ",");
00123 while (ptr != NULL) {
00124 if (!strcmp(ptr, "-all")) {
00125 for (i = 0; i < dNumZones; i++) {
00126 debug_enabled[i] = 0;
00127 }
00128 }
00129 else if (!strcmp(ptr, "all")) {
00130 for (i = 0; i < dNumZones; i++) {
00131 debug_enabled[i] = 1;
00132 }
00133 }
00134 else {
00135 if (*ptr == '-') {
00136 retval = dzonestoi(++ptr);
00137 if (retval != -1) {
00138 dflagoff(retval);
00139 }
00140 }
00141 else {
00142 retval = dzonestoi(ptr);
00143 if (retval != -1) {
00144 dflagon(retval);
00145 }
00146 }
00147 }
00148
00149 ptr = strtok(NULL, ",");
00150 }
00151 #endif /* NODEBUG */
00152 }
|
|
||||||||||||||||
|
|
Definition at line 67 of file JDebug.c. References debug_zones, and dZone. Referenced by main(). 00068 {
00069 #ifndef NODEBUG
00070 dZone i;
00071
00072 fprintf(stderr, "\
00073 Debugging usage:\n\
00074 <flags> can contain any number of the following flags, separated by commas.\n\
00075 If you wish to use 'all' to enable all flags, and then disable a couple,\n\
00076 you can prepend the flag with a - (Ex: all,-poll,-eval). The available\n\
00077 flags are as follows:\n\
00078 \n\
00079 ");
00080 for (i = 0; i < dNumZones; i++) {
00081 printf(" %s\n", debug_zones[i]);
00082 }
00083
00084 exit(1);
00085 #endif /* NODEBUG */
00086 }
|
|
|
Definition at line 89 of file JDebug.c. References debug_zones. Referenced by dprintf(). 00090 {
00091 #ifndef NODEBUG
00092 return debug_zones[zone];
00093 #endif /* NODEBUG */
00094 }
|
|
|
Definition at line 97 of file JDebug.c. References debug_zones, and dZone. Referenced by dparseflags(). 00098 {
00099 #ifndef NODEBUG
00100 dZone i;
00101
00102 for (i = 0; i < dNumZones; i++) {
00103 if (!strcmp(zone, debug_zones[i])) {
00104 return i;
00105 }
00106 }
00107
00108 return -1;
00109 #endif /* NODEBUG */
00110 }
|
|
| Last updated at Tue Dec 18 21:07:42 PST 2007. | This site and project hosted by... |