Changeset 305 for trunk/coverager.c
- Timestamp:
- 12/08/2006 04:11:19 PM (2 years ago)
- Files:
-
- 1 modified
-
trunk/coverager.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/coverager.c
r288 r305 27 27 { 28 28 coverager_t cov = *(coverager_t*) pDest; 29 #ifdef DEBUG 30 fprintf(stderr, "destroy %p\n", cov); 31 #endif 29 TRACE("destroy %p", cov); 32 30 zend_hash_destroy(cov); 33 31 efree(cov); … … 39 37 struct stat st; 40 38 41 #ifdef DEBUG 42 fprintf(stderr, "mkdirs %s %d %s %d\n", root, rootlen, path, pathlen); 43 #endif 39 TRACE("mkdirs %s %d %s %d", root, rootlen, path, pathlen); 44 40 fullpath = do_alloca(rootlen + pathlen + 1); 45 41 memcpy(fullpath, root, rootlen); … … 56 52 *chr = PHP_DIR_SEPARATOR; 57 53 } 58 #ifdef DEBUG 59 fprintf(stderr, "mkdir %s\n", fullpath); 60 #endif 54 TRACE("mkdir %s", fullpath); 61 55 #if PHP_MAJOR_VERSION > 5 62 56 php_stream_mkdir(fullpath, 0700, REPORT_ERRORS, NULL); … … 113 107 114 108 if (newfile) { 115 #ifdef DEBUG 116 fprintf(stderr, "new file\n"); 117 #endif 109 TRACE("%s", "new file"); 118 110 } 119 111 else if (outstat.st_size) { … … 123 115 goto bailout; 124 116 } 125 #ifdef DEBUG 126 fprintf(stderr, "oldsize %d\n", (int) len); 127 #endif 117 TRACE("oldsize %d", (int) len); 128 118 do { 129 119 p = (long *) contents; … … 133 123 } 134 124 if (*p++ != PCOV_HEADER_MAGIC) { 135 #ifdef DEBUG 136 fprintf(stderr, "wrong magic in file %s\n", outfilename); 137 #endif 125 TRACE("wrong magic in file %s", outfilename); 138 126 break; 139 127 } … … 290 278 strcpy(outfilename + dumpdir_len + size - 1, ".pcov"); 291 279 292 #ifdef DEBUG 293 fprintf(stderr, "outfilename %s\n", outfilename); 294 #endif 280 TRACE("outfilename %s", outfilename); 295 281 xc_coverager_save_cov(ZSTR_S(s), outfilename, *pcov TSRMLS_CC); 296 282 zend_hash_move_forward_ex(XG(coverages), &pos); … … 354 340 355 341 if (zend_hash_find(XG(coverages), filename, len, (void **) &pcov) == SUCCESS) { 356 #ifdef DEBUG 357 fprintf(stderr, "got coverage %s %p\n", filename, *pcov); 358 #endif 342 TRACE("got coverage %s %p", filename, *pcov); 359 343 return *pcov; 360 344 } … … 363 347 zend_hash_init(cov, 0, NULL, NULL, 0); 364 348 zend_hash_add(XG(coverages), filename, len, (void **) &cov, sizeof(cov), NULL); 365 #ifdef DEBUG 366 fprintf(stderr, "new coverage %s %p\n", filename, cov); 367 #endif 349 TRACE("new coverage %s %p", filename, cov); 368 350 return cov; 369 351 } … … 534 516 } 535 517 if (*p++ != PCOV_HEADER_MAGIC) { 536 #ifdef DEBUG 537 fprintf(stderr, "wrong magic in xcache_coverager_decode"); 538 #endif 518 TRACE("%s", "wrong magic in xcache_coverager_decode"); 539 519 return; 540 520 }

