pkgsrc - initial commit
[pkgsrc.git] / archivers / dar / patches / patch-ag
1 $NetBSD: patch-ag,v 1.3 2008/08/02 17:10:13 dholland Exp $
2
3 --- src/testing/test_libdar.cpp~        2007-07-22 12:35:01.000000000 -0400
4 +++ src/testing/test_libdar.cpp 2008-08-02 13:01:08.000000000 -0400
5 @@ -89,7 +89,7 @@ void f1()
6  
7  void warning(const string &x, void *context)
8  {
9 -    printf("[%d]%s\n", (U_I)context, x.c_str());
10 +    printf("[%p]%s\n", context, x.c_str());
11  }
12  
13  bool question(const string & x, void *context)
14 @@ -97,7 +97,7 @@ bool question(const string & x, void *co
15      bool rep = false;
16             char r;
17  
18 -           printf("[%d]%s\n", (U_I)context, x.c_str());
19 +           printf("[%p]%s\n", context, x.c_str());
20             scanf("%c", &r);
21             rep = r == 'y';
22  
23 @@ -120,7 +120,8 @@ void listing(const std::string & flag,
24              bool has_children,
25              void *context)
26  {
27 -    ui.printf("[[%d]][%S][%S][%S][%S][%S][%S][%S][%s][%s]\n", (U_I)context, &flag, &perm, &uid, &gid, &size, &date, &filename, is_dir ? "dir" : "not_dir", has_children ? "has children" : "no children");
28 +    /* note: ui.printf isn't printf and can't do %p */
29 +    ui.printf("[[%d]][%S][%S][%S][%S][%S][%S][%S][%s][%s]\n", (U_I)(uintptr_t)context, &flag, &perm, &uid, &gid, &size, &date, &filename, is_dir ? "dir" : "not_dir", has_children ? "has children" : "no children");
30  }
31  
32  void f2()