Changeset 262 for trunk/archive/pslib/src/Utils/trace.c
- Timestamp:
- Mar 19, 2004, 9:11:05 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/src/Utils/trace.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/src/Utils/trace.c
r177 r262 134 134 * No match; add cpt0 to this level. Ensure that subcomp is sorted 135 135 */ 136 if (comp->n == comp->dimen) {136 if (comp->n >= comp->dimen - 1) { 137 137 comp->dimen += 5; 138 comp->subcomp = psRealloc(comp->subcomp, comp->dimen );138 comp->subcomp = psRealloc(comp->subcomp, comp->dimen*sizeof(Component *)); 139 139 } 140 140 … … 146 146 comp->subcomp[j] = comp->subcomp[j - 1]; 147 147 } 148 break; 148 149 } 149 150 } … … 300 301 } 301 302 } 302 303 /*****************************************************************************/304 #if 0 // testing305 306 int main(void)307 {308 psSetLogFormat("NM"); // suppress some of the psLogMsg verbosity309 310 #if 0311 psSetTraceLevel("", 10);312 #else313 psSetTraceLevel("aaa.bbb.ccc.ddd", 9);314 psSetTraceLevel("aaa.bbb.ccc", 3);315 psSetTraceLevel("aaa.bbb.ddd", 4);316 psSetTraceLevel("aaa.BBB", 2);317 psSetTraceLevel("BBB", 2);318 psSetTraceLevel("BBB.XXX.YYY.ZZZ", 5);319 psSetTraceLevel("aaa.bbb", 2);320 psSetTraceLevel("aaa.bbb.ccc", 9);321 psSetTraceLevel("aaa", 1);322 #endif323 324 psPrintTraceLevels();325 printf("\n");326 327 psTrace("aaa.bbb.ddd", 2, "(aaa.bbb.ddd) Hello %s\n", "world");328 psTrace("aaa", 2, "aaa\n");329 psTrace("", 2, "\"\"\n");330 psTrace("aaa.bbb", 2, "aaa.bbb\n");331 psTrace("aaa.bbb.ddd", 2, "aaa.bbb.ddd\n");332 psTrace("aaa.bbb.ddd", 4, "aaa.bbb.ddd\n");333 psTrace("aaa.bbb.ddd", 2, "aaa.bbb.ddd\n");334 psTrace("aaa.bbb.ccc", 1, "aaa.bbb.ccc\n");335 psTrace("aaa.bbb.eee", 2, "aaa.bbb.eee\n");336 337 psTraceReset();338 fprintf(stderr,"Checking for memory leaks:\n");339 psMemCheckLeaks(0, NULL, stderr);340 341 342 return 0;343 }344 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
