|
| |||||||||||||
#include <sysdep.h>#include "include/libjwgc.h"Go to the source code of this file.
Functions | |
| void | dinit () |
| void | dflagon (dZone zone) |
| void | dflagoff (dZone zone) |
| void | dprintf (dZone zone, const char *msgfmt,...) |
| void | dprinttypes () |
| char * | dzoneitos (dZone zone) |
| dZone | dzonestoi (char *zone) |
| void | dparseflags (char *flags) |
Variables | |
| int | debug_enabled [dNumZones] |
| char * | debug_zones [dNumZones] |
|
|
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 10 of file JDebug.c. References debug_enabled, debug_zones, and dZone. Referenced by main(). 00011 {
00012 #ifndef NODEBUG
00013 dZone i;
00014
00015 for (i = 0; i < dNumZones; i++) {
00016 debug_enabled[i] = 0;
00017 }
00018
00019 debug_zones[dJWG] = "jwg";
00020 debug_zones[dParser] = "parser";
00021 debug_zones[dJAB] = "jab";
00022 debug_zones[dOutput] = "output";
00023 debug_zones[dEval] = "eval";
00024 debug_zones[dPoll] = "poll";
00025 debug_zones[dExecution] = "execution";
00026 debug_zones[dVars] = "vars";
00027 debug_zones[dMatch] = "match";
00028 debug_zones[dXML] = "xml";
00029 debug_zones[dGPG] = "gpg";
00030 #endif /* NODEBUG */
00031 }
|
|
|
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 }
|
|
|
Definition at line 6 of file JDebug.c. Referenced by dflagoff(), dflagon(), dinit(), dparseflags(), and dprintf(). |
|
|
Definition at line 7 of file JDebug.c. Referenced by dinit(), dprinttypes(), dzoneitos(), and dzonestoi(). |
| Last updated at Tue Dec 18 21:07:42 PST 2007. | This site and project hosted by... |