$NetBSD: patch-ad,v 1.1 2003/08/25 20:23:08 fredb Exp $

--- rwpar.c.orig	Sat Nov 17 14:20:09 2001
+++ rwpar.c
@@ -165,6 +165,9 @@ static void
 dump_file(pfile_t *file)
 {
 	fprintf(stderr,
+		"    filename: %s\n",
+		stuni(file->filename));
+	fprintf(stderr,
 		"    status: 0x%llx\n"
 		"    file size: %lld\n"
 		"    hash: %s\n",
@@ -172,11 +175,8 @@ dump_file(pfile_t *file)
 		file->file_size,
 		stmd5(file->hash));
 	fprintf(stderr,
-		"    16k hash: %s\n",
-		stmd5(file->hash_16k));
-	fprintf(stderr,
-		"    filename: %s\n",
-		stuni(file->filename));
+		"    16k hash: %s\n\n",
+			stmd5(file->hash_16k));
 }
 
 void
@@ -184,38 +184,43 @@ dump_par(par_t *par)
 {
 	pfile_t *p;
 
-	fprintf(stderr,  "PAR file dump:\n"
-		"  filename: %s\n"
-		"  version: 0x%04x\n"
-		"  client: 0x%04x\n"
-		"  control hash: %s\n",
+	fprintf(stderr,  "\nPAR file dump:\n\n"
+		"    filename: %s\n"
+		"    version: 0x%04x\n"
+		"    client: 0x%04x\n"
+		"    control hash: %s\n"
+		"    set hash: %s\n"
+		"    volume number: %lld\n"
+		"    number of files: %lld\n",
 		stuni(par->filename),
 		par->version,
 		par->client,
-		stmd5(par->control_hash));
-	fprintf(stderr,
-		"  set hash: %s\n",
-		stmd5(par->set_hash));
-	fprintf(stderr,
-		"  volume number: %lld\n"
-		"  number of files: %lld\n"
-		"  file list: 0x%llx\n"
-		"  file list size: 0x%llx\n"
-		"  data: 0x%llx\n"
-		"  data size: 0x%llx\n",
+		stmd5(par->control_hash),
+		stmd5(par->set_hash),
 		par->vol_number,
-		par->num_files,
-		par->file_list,
-		par->file_list_size,
-		par->data,
-		par->data_size);
+		par->num_files);
+	if (cmd.loglevel > 0)
+		fprintf(stderr,
+			"    file list: 0x%llx\n"
+			"    file list size: 0x%llx\n"
+			"    data: 0x%llx\n"
+			"    data size: 0x%llx\n",
+			par->file_list,
+			par->file_list_size,
+			par->data,
+			par->data_size);
 	if (!par->vol_number)
 		fprintf(stderr,
-			"  comment: %s\n",
+			"    comment: %s\n",
 			stuni(par->comment));
 	fprintf(stderr, "\nFiles:\n\n");
 	for (p = par->files; p; p = p->next)
-		dump_file(p);
+		if (cmd.loglevel > 0)
+			dump_file(p);
+		else
+			fprintf(stderr,
+				"    %s\n",
+				stuni(p->filename));
 }
 
 /*\