File: 52_debian_make_pal_manage_wake_up_less_often.patch

package info (click to toggle)
pal 0.4.3-11
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,164 kB
  • sloc: ansic: 5,038; makefile: 289; awk: 23
file content (16 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pal (0.4.3-3)  * pal -m used to wake up every tenth of a second. ncurses
                 enforces a maximum sleep time of 25.5 seconds, which is still
                 a lot better when you're running on battery

--- pal-0.4.3.orig/src/manage.c
+++ pal-0.4.3/src/manage.c
@@ -413,7 +413,8 @@
     keypad(stdscr, TRUE);  /* enable keyboard mapping */
     (void) nonl();         /* tell curses not to do NL->CR/NL on output */
     (void) cbreak();       /* take input chars one at a time, no wait for \n */
-    (void) halfdelay(1);   /* always return from getch() within a tenth of a second */
+    (void) halfdelay(255); /* try not to wake up. ncurses still forces a wakeup
+                              every 25.5 seconds when in non-linebuffered-mode */
     (void) noecho();       /* echo input - in color */
     
     signal(SIGINT, pal_manage_finish);   /* setup function to call on Ctrl+C */