diff options
author | joerg <joerg> | 2013-06-26 15:49:31 +0000 |
---|---|---|
committer | joerg <joerg> | 2013-06-26 15:49:31 +0000 |
commit | f273f592cb456873ae62797408fecd85173c9ca2 (patch) | |
tree | 150e20302cf177fd92dfa306cd3e2bd9c4a2842b /archivers/dar/patches | |
parent | e1d85c01bcadc862df67ef8cd9de694437945cc2 (diff) | |
download | pkgsrc-f273f592cb456873ae62797408fecd85173c9ca2.tar.gz |
deci and move are part of a C++11 STL implementation. Explicitly include
the namespace when using the former and rename the latter.
Diffstat (limited to 'archivers/dar/patches')
15 files changed, 458 insertions, 0 deletions
diff --git a/archivers/dar/patches/patch-src_dar__suite_command__line.cpp b/archivers/dar/patches/patch-src_dar__suite_command__line.cpp new file mode 100644 index 00000000000..ebfd1b14e9d --- /dev/null +++ b/archivers/dar/patches/patch-src_dar__suite_command__line.cpp @@ -0,0 +1,31 @@ +$NetBSD: patch-src_dar__suite_command__line.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/dar_suite/command_line.cpp.orig 2013-06-20 19:13:40.000000000 +0000 ++++ src/dar_suite/command_line.cpp +@@ -758,7 +758,7 @@ static bool get_args_recursive(recursive + try + { + // trying to read a simple integer +- deci tmp = string(optarg); ++ libdar::deci tmp = string(optarg); + p.fixed_date = tmp.computer(); + } + catch(Edeci & e) +@@ -845,7 +845,7 @@ static bool get_args_recursive(recursive + case 'p': + if(optarg != NULL) + { +- deci conv = string(optarg); ++ libdar::deci conv = string(optarg); + p.pause = conv.computer(); + } + else +@@ -1222,7 +1222,7 @@ static bool get_args_recursive(recursive + { + try + { +- p.hourshift = deci(string(optarg)).computer(); ++ p.hourshift = libdar::deci(string(optarg)).computer(); + } + catch(Edeci & e) + { diff --git a/archivers/dar/patches/patch-src_dar__suite_crit__action__cmd__line.cpp b/archivers/dar/patches/patch-src_dar__suite_crit__action__cmd__line.cpp new file mode 100644 index 00000000000..7838b7663b5 --- /dev/null +++ b/archivers/dar/patches/patch-src_dar__suite_crit__action__cmd__line.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-src_dar__suite_crit__action__cmd__line.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/dar_suite/crit_action_cmd_line.cpp.orig 2013-06-20 19:17:02.000000000 +0000 ++++ src/dar_suite/crit_action_cmd_line.cpp +@@ -413,7 +413,7 @@ static const criterium * criterium_creat + case 'r': + try + { +- deci tmp = sub_arg; ++ libdar::deci tmp = sub_arg; + date = tmp.computer(); + } + catch(Edeci & e) diff --git a/archivers/dar/patches/patch-src_dar__suite_dar__manager.cpp b/archivers/dar/patches/patch-src_dar__suite_dar__manager.cpp new file mode 100644 index 00000000000..260236335fd --- /dev/null +++ b/archivers/dar/patches/patch-src_dar__suite_dar__manager.cpp @@ -0,0 +1,76 @@ +$NetBSD: patch-src_dar__suite_dar__manager.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/dar_suite/dar_manager.cpp.orig 2013-06-20 19:21:17.000000000 +0000 ++++ src/dar_suite/dar_manager.cpp +@@ -78,7 +78,7 @@ using namespace libdar; + #define MISSING_ARG "Missing argument to -%c" + #define INVALID_ARG "Invalid argument given to -%c (requires integer)" + +-enum operation { none_op, create, add, listing, del, chbase, where, options, dar, restore, used, files, stats, move, interactive, check, batch }; ++enum operation { none_op, create, add, listing, del, chbase, where, options, dar, restore, used, files, stats, my_move, interactive, check, batch }; + + static S_I little_main(user_interaction & dialog, S_I argc, char *const argv[], const char **env); + static bool command_line(user_interaction & dialog, +@@ -183,7 +183,7 @@ S_I little_main(user_interaction & dialo + case used: + case files: + case stats: +- case move: ++ case my_move: + case interactive: + case check: + case batch: +@@ -386,7 +386,7 @@ static bool command_line(user_interactio + case 'm': + if(op != none_op) + throw Erange("command_line", tools_printf(gettext(ONLY_ONCE), char(lu))); +- op = move; ++ op = my_move; + if(optarg == NULL) + throw Erange("command_line", tools_printf(gettext(MISSING_ARG), char(lu))); + num = tools_str2int(optarg); +@@ -448,7 +448,7 @@ static bool command_line(user_interactio + { + try + { +- deci tmp = string(optarg); ++ libdar::deci tmp = string(optarg); + date = tmp.computer(); + } + catch(Edeci & e) +@@ -529,7 +529,7 @@ static bool command_line(user_interactio + break; + case options: + break; +- case move: ++ case my_move: + if(rest.size() != 1) + { + dialog.warning(gettext("Missing argument to command line, aborting")); +@@ -1068,7 +1068,7 @@ static void op_interactive(user_interact + saved = false; + break; + case 'm': +- input = dialog.get_string(gettext("Archive number to move: "), true); ++ input = dialog.get_string(gettext("Archive number to my_move: "), true); + num = tools_str2int(input); + input = dialog.get_string(gettext("In which position to insert this archive: "), true); + num2 = tools_str2int(input); +@@ -1298,7 +1298,7 @@ static void finalize(user_interaction & + case where: + case options: + case dar: +- case move: ++ case my_move: + case batch: + if(info_details) + dialog.warning(gettext("Compressing and writing back database to file...")); +@@ -1362,7 +1362,7 @@ static void action(user_interaction & di + case stats: + op_stats(dialog, dat, info_details); + break; +- case move: ++ case my_move: + op_move(dialog, dat, num, num2, info_details); + break; + case interactive: diff --git a/archivers/dar/patches/patch-src_dar__suite_dar__xform.cpp b/archivers/dar/patches/patch-src_dar__suite_dar__xform.cpp new file mode 100644 index 00000000000..2f816ac8dc7 --- /dev/null +++ b/archivers/dar/patches/patch-src_dar__suite_dar__xform.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-src_dar__suite_dar__xform.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/dar_suite/dar_xform.cpp.orig 2013-06-20 19:18:01.000000000 +0000 ++++ src/dar_suite/dar_xform.cpp +@@ -314,7 +314,7 @@ static bool command_line(user_interactio + case 'p': + if(optarg != NULL) + { +- deci conv = string(optarg); ++ libdar::deci conv = string(optarg); + pause = conv.computer(); + } + else diff --git a/archivers/dar/patches/patch-src_dar__suite_line__tools.cpp b/archivers/dar/patches/patch-src_dar__suite_line__tools.cpp new file mode 100644 index 00000000000..84bbd95bf60 --- /dev/null +++ b/archivers/dar/patches/patch-src_dar__suite_line__tools.cpp @@ -0,0 +1,56 @@ +$NetBSD: patch-src_dar__suite_line__tools.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/dar_suite/line_tools.cpp.orig 2013-06-20 19:14:58.000000000 +0000 ++++ src/dar_suite/line_tools.cpp +@@ -215,8 +215,8 @@ void line_tools_repeat_param(const strin + + try + { +- deci x1 = tmp1; +- deci x2 = tmp2; ++ libdar::deci x1 = tmp1; ++ libdar::deci x2 = tmp2; + + repeat_count = x1.computer(); + repeat_byte = x2.computer(); +@@ -514,14 +514,14 @@ void line_tools_get_min_digits(string th + it1 = tools_find_first_char_of(the_arg, ','); + if(it1 == the_arg.end()) // a single number is provided + { +- deci tmp = the_arg; ++ libdar::deci tmp = the_arg; + num = tmp.computer(); + } + else // at least two numbers are provided + { + if(the_arg.begin() != it1) + { +- deci convert = string(the_arg.begin(), it1); ++ libdar::deci convert = string(the_arg.begin(), it1); + num = convert.computer(); + } + // else we ignore the leading ',' +@@ -533,20 +533,20 @@ void line_tools_get_min_digits(string th + it2 = tools_find_first_char_of(tmp2, ','); + if(it2 == tmp2.end()) // just two number have been provided + { +- deci convert = tmp2; ++ libdar::deci convert = tmp2; + ref_num = convert.computer(); + } + else + { + if(tmp2.begin() != it2) + { +- deci convert = string(tmp2.begin(), it2); ++ libdar::deci convert = string(tmp2.begin(), it2); + ref_num = convert.computer(); + } + ++it2; + if(it2 != tmp2.end()) + { +- deci convert = string(it2, tmp2.end()); ++ libdar::deci convert = string(it2, tmp2.end()); + aux_num = convert.computer(); + } + } diff --git a/archivers/dar/patches/patch-src_examples_factoriel.cpp b/archivers/dar/patches/patch-src_examples_factoriel.cpp new file mode 100644 index 00000000000..6d73e47bc0e --- /dev/null +++ b/archivers/dar/patches/patch-src_examples_factoriel.cpp @@ -0,0 +1,31 @@ +$NetBSD: patch-src_examples_factoriel.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/examples/factoriel.cpp.orig 2013-06-20 19:26:28.000000000 +0000 ++++ src/examples/factoriel.cpp +@@ -85,7 +85,7 @@ static int little_main(user_interaction + exit(1); + + string s = argv[1]; +- deci f = s; ++ libdar::deci f = s; + infinint max = f.computer(); + infinint i = 2; + infinint p = 1; +@@ -97,7 +97,7 @@ static int little_main(user_interaction + } + + ui.warning("calcul finished, now computing the decimal representation ... "); +- f = deci(p); ++ f = libdar::deci(p); + ui.warning(f.human()); + if(argc == 3) + { +@@ -112,7 +112,7 @@ static int little_main(user_interaction + p.dump(fic); + fic.skip(0); + cp = infinint(fic); +- ui.warning(string("read from file: ") + deci(cp).human()); ++ ui.warning(string("read from file: ") + libdar::deci(cp).human()); + } + } + diff --git a/archivers/dar/patches/patch-src_examples_formula.cpp b/archivers/dar/patches/patch-src_examples_formula.cpp new file mode 100644 index 00000000000..89cb9682ff7 --- /dev/null +++ b/archivers/dar/patches/patch-src_examples_formula.cpp @@ -0,0 +1,22 @@ +$NetBSD: patch-src_examples_formula.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/examples/formula.cpp.orig 2013-06-20 19:27:22.000000000 +0000 ++++ src/examples/formula.cpp +@@ -60,7 +60,7 @@ int little_main(user_interaction & ui, S + else + { + string formula = crit_action_canonize_string(argv[1]); +- deci tmp = calculus(formula); ++ libdar::deci tmp = calculus(formula); + + cout << tmp.human() << endl; + +@@ -113,7 +113,7 @@ static infinint calculus(const string & + return calculus(string(formula.begin() + 1, formula.end() - 1)); + else // assuming an integer + { +- deci tmp = formula; ++ libdar::deci tmp = formula; + return tmp.computer(); + } + } diff --git a/archivers/dar/patches/patch-src_examples_prime.cpp b/archivers/dar/patches/patch-src_examples_prime.cpp new file mode 100644 index 00000000000..9996952ce8e --- /dev/null +++ b/archivers/dar/patches/patch-src_examples_prime.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-src_examples_prime.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/examples/prime.cpp.orig 2013-06-20 19:27:04.000000000 +0000 ++++ src/examples/prime.cpp +@@ -58,7 +58,7 @@ int little_main(user_interaction & ui, S + exit(1); + } + +- deci x = string(argv[1]); ++ libdar::deci x = string(argv[1]); + cout << "converting string to infinint... " << endl; + infinint num = x.computer(); + cout << "checking whether the number is a prime factor... " << endl; diff --git a/archivers/dar/patches/patch-src_libdar_mask__list.hpp b/archivers/dar/patches/patch-src_libdar_mask__list.hpp new file mode 100644 index 00000000000..22b143b176f --- /dev/null +++ b/archivers/dar/patches/patch-src_libdar_mask__list.hpp @@ -0,0 +1,13 @@ +$NetBSD: patch-src_libdar_mask__list.hpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/libdar/mask_list.hpp.orig 2013-06-20 19:11:02.000000000 +0000 ++++ src/libdar/mask_list.hpp +@@ -80,7 +80,7 @@ namespace libdar + class my_char + { + public: +- my_char() { val = 0; }; ++ my_char() = default; + my_char(const char x) : val(x) {}; + bool operator < (const my_char & x) const + { diff --git a/archivers/dar/patches/patch-src_testing_test__catalogue.cpp b/archivers/dar/patches/patch-src_testing_test__catalogue.cpp new file mode 100644 index 00000000000..0030fdb2516 --- /dev/null +++ b/archivers/dar/patches/patch-src_testing_test__catalogue.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-src_testing_test__catalogue.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/testing/test_catalogue.cpp.orig 2013-06-20 19:28:21.000000000 +0000 ++++ src/testing/test_catalogue.cpp +@@ -258,7 +258,7 @@ void f2() + if(i->is_more_recent_than(*w, 0)) + { + cout << "plus recent" << endl; +- cout << "new is " << deci(w->get_last_modif()).human() << " ref " << deci(i->get_last_modif()).human() << endl; ++ cout << "new is " << libdar::deci(w->get_last_modif()).human() << " ref " << libdar::deci(i->get_last_modif()).human() << endl; + } + else + cout << "pas plus recent" << endl; diff --git a/archivers/dar/patches/patch-src_testing_test__deci.cpp b/archivers/dar/patches/patch-src_testing_test__deci.cpp new file mode 100644 index 00000000000..ad510bf7865 --- /dev/null +++ b/archivers/dar/patches/patch-src_testing_test__deci.cpp @@ -0,0 +1,18 @@ +$NetBSD: patch-src_testing_test__deci.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/testing/test_deci.cpp.orig 2013-06-20 19:29:44.000000000 +0000 ++++ src/testing/test_deci.cpp +@@ -39,10 +39,10 @@ int main() + + static void f1() + { +- deci d1 = string("00001"); ++ libdar::deci d1 = string("00001"); + infinint t = 3; +- deci d2 = t; +- deci d3 = infinint(125); ++ libdar::deci d2 = t; ++ libdar::deci d3 = infinint(125); + U_I c; + + cout << d1.human() << endl; diff --git a/archivers/dar/patches/patch-src_testing_test__escape.cpp b/archivers/dar/patches/patch-src_testing_test__escape.cpp new file mode 100644 index 00000000000..0cf40702d18 --- /dev/null +++ b/archivers/dar/patches/patch-src_testing_test__escape.cpp @@ -0,0 +1,11 @@ +$NetBSD: patch-src_testing_test__escape.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/testing/test_escape.cpp.orig 2013-06-20 19:30:16.000000000 +0000 ++++ src/testing/test_escape.cpp +@@ -121,5 +121,5 @@ void f2() + cout << "OK" << endl; + else + cout << "NOK" << endl; +- cout << deci(tested.get_position()).human() << endl; ++ cout << libdar::deci(tested.get_position()).human() << endl; + } diff --git a/archivers/dar/patches/patch-src_testing_test__infinint.cpp b/archivers/dar/patches/patch-src_testing_test__infinint.cpp new file mode 100644 index 00000000000..75d3d62e286 --- /dev/null +++ b/archivers/dar/patches/patch-src_testing_test__infinint.cpp @@ -0,0 +1,122 @@ +$NetBSD: patch-src_testing_test__infinint.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/testing/test_infinint.cpp.orig 2013-06-20 19:28:49.000000000 +0000 ++++ src/testing/test_infinint.cpp +@@ -83,9 +83,9 @@ static void routine1() + infinint f2 = f1; + infinint f3 = 0; + +- deci d1 = f1; +- deci d2 = f2; +- deci d3 = f3; ++ libdar::deci d1 = f1; ++ libdar::deci d2 = f2; ++ libdar::deci d3 = f3; + + ui->warning(d1.human() + " " + d2.human() + " " + d3.human()); + +@@ -98,7 +98,7 @@ static void routine1() + if(fd >= 0) + { + f3 = infinint(*ui, fd); +- d3 = deci(f3); ++ d3 = libdar::deci(f3); + ui->warning(d3.human()); + } + close(fd); +@@ -106,33 +106,33 @@ static void routine1() + } + + f1 += 3; +- d1 = deci(f1); ++ d1 = libdar::deci(f1); + ui->warning(d1.human()); + + f1 -= 2; +- d1 = deci(f1); ++ d1 = libdar::deci(f1); + ui->warning(d1.human()); + + f1 *= 10; +- d1 = deci(f1); ++ d1 = libdar::deci(f1); + ui->warning(d1.human()); + + f2 = f1; + f1 /= 3; +- d1 = deci(f1); ++ d1 = libdar::deci(f1); + ui->warning(d1.human()); + + f2 %= 3; +- d2 = deci(f2); ++ d2 = libdar::deci(f2); + ui->warning(d2.human()); + + f2 >>= 12; +- d2 = deci(f2); ++ d2 = libdar::deci(f2); + ui->warning(d2.human()); + + f1 = 4; + f2 >>= f1; +- d2 = deci(f2); ++ d2 = libdar::deci(f2); + ui->warning(d2.human()); + + f1 = 4+12; +@@ -143,9 +143,9 @@ static void routine1() + cout << f3 << endl; + cout << (123 << 16) << endl; + f2 <<= 4+12; +- d2 = deci(f2); ++ d2 = libdar::deci(f2); + ui->warning(d2.human()); +- d3 = deci(f3); ++ d3 = libdar::deci(f3); + ui->warning(d3.human()); + + try +@@ -184,12 +184,12 @@ static void routine1() + { + for(f3 = 2; f3 <= f1; f3++) + { +- d1 = deci(f1); +- d2 = deci(f2); +- d3 = deci(f3); ++ d1 = libdar::deci(f1); ++ d2 = libdar::deci(f2); ++ d3 = libdar::deci(f3); + ui->warning(d1.human() + " " + d2.human() + " " + d3.human()); + f2 *= f3; +- d2 = deci(f2); ++ d2 = libdar::deci(f2); + ui->warning(d2.human()); + } + } +@@ -197,17 +197,17 @@ static void routine1() + { + ui->warning(e.get_message()); + } +- d2 = deci(f2); +- d1 = deci(f1); ++ d2 = libdar::deci(f2); ++ d1 = libdar::deci(f1); + ui->warning(string("factoriel(") + d1.human() + ") = " + d2.human()); + } + + static void routine2() + { +- ui->warning(deci(infinint(2).power((U_I)0)).human()); +- ui->warning(deci(infinint(2).power(infinint(0))).human()); +- ui->warning(deci(infinint(2).power((U_I)1)).human()); +- ui->warning(deci(infinint(2).power(infinint(1))).human()); +- ui->warning(deci(infinint(2).power((U_I)2)).human()); +- ui->warning(deci(infinint(2).power(infinint(2))).human()); ++ ui->warning(libdar::deci(infinint(2).power((U_I)0)).human()); ++ ui->warning(libdar::deci(infinint(2).power(infinint(0))).human()); ++ ui->warning(libdar::deci(infinint(2).power((U_I)1)).human()); ++ ui->warning(libdar::deci(infinint(2).power(infinint(1))).human()); ++ ui->warning(libdar::deci(infinint(2).power((U_I)2)).human()); ++ ui->warning(libdar::deci(infinint(2).power(infinint(2))).human()); + } diff --git a/archivers/dar/patches/patch-src_testing_test__terminateur.cpp b/archivers/dar/patches/patch-src_testing_test__terminateur.cpp new file mode 100644 index 00000000000..0f8fbe9d04b --- /dev/null +++ b/archivers/dar/patches/patch-src_testing_test__terminateur.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-src_testing_test__terminateur.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/testing/test_terminateur.cpp.orig 2013-06-20 19:28:01.000000000 +0000 ++++ src/testing/test_terminateur.cpp +@@ -83,7 +83,7 @@ static void f1() + for(S_I i=2;i<30;i++) + grand *= i; + +- deci conv = grand; ++ libdar::deci conv = grand; + cout << conv.human() << endl; + term.set_catalogue_start(grand); + term.dump(toto); diff --git a/archivers/dar/patches/patch-src_testing_testtools.cpp b/archivers/dar/patches/patch-src_testing_testtools.cpp new file mode 100644 index 00000000000..72830e541f7 --- /dev/null +++ b/archivers/dar/patches/patch-src_testing_testtools.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-src_testing_testtools.cpp,v 1.1 2013/06/26 15:49:31 joerg Exp $ + +--- src/testing/testtools.cpp.orig 2013-06-20 19:29:24.000000000 +0000 ++++ src/testing/testtools.cpp +@@ -35,7 +35,7 @@ using namespace std; + + void display(const infinint & x) + { +- deci vu = x; ++ libdar::deci vu = x; + cout << vu.human() << endl; + } + |