[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 01:11:46 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 1e96c19e519902599a420599bb6219a704edbb25
Author: Török Edvin <edwin at clamav.net>
Date:   Fri Dec 11 18:09:33 2009 +0200

    Output trace messages to stderr, to ensure its flushed.

diff --git a/clambc/bcrun.c b/clambc/bcrun.c
index b084b3b..596788e 100644
--- a/clambc/bcrun.c
+++ b/clambc/bcrun.c
@@ -71,16 +71,16 @@ static void tracehook(struct cli_bc_ctx *ctx, unsigned event)
 	return;
     switch (event) {
 	case trace_func:
-	    printf("[trace] %s:%u:%u -> %s:%u:%u Entered function %s\n",
+	    fprintf(stderr, "[trace] %s:%u:%u -> %s:%u:%u Entered function %s\n",
 		   dbg_state.file, dbg_state.line, dbg_state.col,
 		   ctx->file, ctx->line, ctx->col, ctx->scope);
 	    dbg_state.scope = ctx->scope;
 	    break;
 	case trace_param:
-	    printf("[trace] function parameter:\n");
+	    fprintf(stderr, "[trace] function parameter:\n");
 	    return;
 	case trace_scope:
-	    printf("[trace] %s:%u:%u -> %s:%u:%u\n",
+	    fprintf(stderr, "[trace] %s:%u:%u -> %s:%u:%u\n",
 		   dbg_state.file, dbg_state.line, dbg_state.col,
 		   ctx->file, ctx->line, ctx->col);
 	    dbg_state.scope = ctx->scope;
@@ -90,7 +90,7 @@ static void tracehook(struct cli_bc_ctx *ctx, unsigned event)
 	    if (dbg_state.showline)
 		cli_bytecode_debug_printsrc(ctx);
 	    else
-		printf("[trace] %s:%u:%u\n",
+		fprintf(stderr, "[trace] %s:%u:%u\n",
 		       dbg_state.file, dbg_state.line, dbg_state.col);
 	    break;
 	default:
@@ -103,12 +103,12 @@ static void tracehook(struct cli_bc_ctx *ctx, unsigned event)
 
 static void tracehook_op(struct cli_bc_ctx *ctx, const char *op)
 {
-    printf("[trace] %s\n", op);
+    fprintf(stderr, "[trace] %s\n", op);
 }
 
 static void tracehook_val(struct cli_bc_ctx *ctx, const char *name, uint32_t value)
 {
-    printf("[trace] %s = %u\n", name, value);
+    fprintf(stderr, "[trace] %s = %u\n", name, value);
 }
 
 int main(int argc, char *argv[])

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list