~ubuntu-branches/ubuntu/precise/netris/precise

« back to all changes in this revision

Viewing changes to debian/patches/03_staircase-effect-fix

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2008-05-30 08:34:31 UTC
  • Revision ID: james.westby@ubuntu.com-20080530083431-w21zcqel5tmobgqv
Tags: 0.52-7
* The "once every release" release.
* Moved patches to quilt, split them into:
  - multi-games-with-scoring: allow multiple games in a row without
    restarting.
  - line-count-patch: patch to display cleared line counts
  - staircase-effect-fix: fix displaying of error messages
  - robot-close-fixup: Small fix for CloseRobot function to close only if a
    robot is used.
  - init-static-vars: initialize lostConn and gotEndConn static var in
    InitNet function.
  - curses.c-include-term.h: patch to fix function call that otherwise use
    implicit pointer conversion.
  - curses.c-include-time.h: patch to fix segfault on amd64.
* New patches:
  - various-fixes: various small changes to fix compile warnings
* Linked to GPL-2 in copyright file directly, added hint for later versions.
* Added copyright informations into the debianization scripts.
* Added Homepage: control field.
* Updated package to Standards-Version 3.7.3, updating menu section for that.
* Don't ignore make clean errors anymore.
* Small cosmetic updates to the netris-sample-robot manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Per von Zweigbergk <pvz@e.kth.se>       vim:ft=diff:
 
2
Description: fix staircase effect in error message, BTS #83039
 
3
 
 
4
Index: netris-0.52/util.c
 
5
===================================================================
 
6
--- netris-0.52.orig/util.c
 
7
+++ netris-0.52/util.c
 
8
@@ -267,6 +267,7 @@ ExtFunc volatile void die(char *msg)
 
9
 
 
10
 ExtFunc volatile void fatal(char *msg)
 
11
 {
 
12
+       CleanupScreens ();
 
13
        fprintf(stderr, "%s\n", msg);
 
14
        exit(1);
 
15
 }
 
16
Index: netris-0.52/curses.c
 
17
===================================================================
 
18
--- netris-0.52.orig/curses.c
 
19
+++ netris-0.52/curses.c
 
20
@@ -57,6 +57,7 @@ static EventGenRec keyGen =
 
21
 static int boardYPos[MAX_SCREENS], boardXPos[MAX_SCREENS];
 
22
 static int statusYPos, statusXPos;
 
23
 static int haveColor;
 
24
+static int screens_dirty = 0;
 
25
 
 
26
 static char *term_vi;  /* String to make cursor invisible */
 
27
 static char *term_ve;  /* String to make cursor visible */
 
28
@@ -98,6 +99,7 @@ ExtFunc void InitScreens(void)
 
29
 #endif
 
30
 
 
31
        AtExit(CleanupScreens);
 
32
+       screens_dirty = 1;
 
33
        RestoreSignals(NULL, &oldMask);
 
34
 
 
35
        cbreak();
 
36
@@ -116,9 +118,12 @@ ExtFunc void InitScreens(void)
 
37
 
 
38
 ExtFunc void CleanupScreens(void)
 
39
 {
 
40
-       RemoveEventGen(&keyGen);
 
41
-       endwin();
 
42
-       OutputTermStr(term_ve, 1);
 
43
+       if (screens_dirty) {
 
44
+               RemoveEventGen(&keyGen);
 
45
+               endwin();
 
46
+               OutputTermStr(term_ve, 1);
 
47
+               screens_dirty = 0;
 
48
+       }
 
49
 }
 
50
 
 
51
 ExtFunc void GetTermcapInfo(void)