The following commit has been merged in the master branch:
commit 051423d23c9d5580aaecf0a7c41c854566d40d76
Author: Guillem Jover <[email protected]>
Date: Sun Oct 17 05:57:45 2010 +0200
dselect: Use a function instead of a jump error handler
diff --git a/dselect/main.cc b/dselect/main.cc
index 38df1c5..601f40c 100644
--- a/dselect/main.cc
+++ b/dselect/main.cc
@@ -498,18 +498,21 @@ urqresult urq_quit(void) {
return urqr_quitmenu;
}
-int main(int, const char *const *argv) {
- jmp_buf ejbuf;
+static void
+dselect_catch_fatal_error()
+{
+ cursesoff();
+ catch_fatal_error();
+}
+int
+main(int, const char *const *argv)
+{
setlocale(LC_ALL, "");
bindtextdomain(DSELECT, LOCALEDIR);
textdomain(DSELECT);
- if (setjmp(ejbuf)) { /* expect warning about possible clobbering of argv */
- cursesoff();
- catch_fatal_error();
- }
- push_error_handler(&ejbuf, print_fatal_error, 0);
+ push_error_context_func(dselect_catch_fatal_error, print_fatal_error, 0);
loadcfgfile(DSELECT, cmdinfos);
myopt(&argv,cmdinfos);
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]