Ondřej Vašík e9cb8d
Binary files bc-1.06.95-orig/dc/.dc.c.swp and bc-1.06.95/dc/.dc.c.swp differ
Ondřej Vašík e9cb8d
diff -urNp bc-1.06.95-orig/dc/eval.c bc-1.06.95/dc/eval.c
Ondřej Vašík e9cb8d
--- bc-1.06.95-orig/dc/eval.c	2006-06-04 13:04:40.000000000 +0200
Ondřej Vašík e9cb8d
+++ bc-1.06.95/dc/eval.c	2011-09-08 15:11:48.815060585 +0200
Ondřej Vašík e9cb8d
@@ -661,7 +661,9 @@ dc_evalfile DC_DECLARG((fp))
Ondřej Vašík e9cb8d
 	int next_negcmp = 0;
Ondřej Vašík e9cb8d
 	dc_data datum;
Ondřej Vašík e9cb8d
 
Ondřej Vašík e9cb8d
-	signal(SIGINT, dc_trap_interrupt);
Ondřej Vašík e9cb8d
+    /* Do not mask SIGINT when running from stdin */
Ondřej Vašík e9cb8d
+	if (fp != stdin)
Ondřej Vašík e9cb8d
+      signal(SIGINT, dc_trap_interrupt);
Ondřej Vašík e9cb8d
 	stdin_lookahead = EOF;
Ondřej Vašík e9cb8d
 	for (c=getc(fp); c!=EOF; c=peekc){
Ondřej Vašík e9cb8d
 		peekc = getc(fp);
Ondřej Vašík e9cb8d
diff -urNp bc-1.06.95-orig/doc/dc.texi bc-1.06.95/doc/dc.texi
Ondřej Vašík e9cb8d
--- bc-1.06.95-orig/doc/dc.texi	2006-06-11 10:15:54.000000000 +0200
Ondřej Vašík e9cb8d
+++ bc-1.06.95/doc/dc.texi	2011-09-08 15:09:37.032059798 +0200
Ondřej Vašík e9cb8d
@@ -126,6 +126,8 @@ To exit, use @samp{q}.
Ondřej Vašík e9cb8d
 (or whatever other keystroke your system uses to generate a @code{SIGINT})
Ondřej Vašík e9cb8d
 does not exit;
Ondřej Vašík e9cb8d
 it is used to abort macros that are looping, etc.
Ondřej Vašík e9cb8d
+This is not true if running on stdin to prevent accidental user confusion
Ondřej Vašík e9cb8d
+about @kbd{C-c} unfunctionality.
Ondřej Vašík e9cb8d
 
Ondřej Vašík e9cb8d
 A reverse-polish calculator stores numbers on a stack.
Ondřej Vašík e9cb8d
 Entering a number pushes it on the stack.