~ubuntu-branches/ubuntu/utopic/cdparanoia/utopic

« back to all changes in this revision

Viewing changes to debian/patches/cdparanoia-force-progress-bar.diff

  • Committer: Bazaar Package Importer
  • Author(s): Rogério Brito, Rogério Brito, TANIGUCHI Takaki
  • Date: 2010-11-06 14:53:55 UTC
  • mfrom: (3.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20101106145355-93nm5l8g6nq8viyw
Tags: 3.10.2+debian-10
[ Rogério Brito ]
* Preparation to format "3.0 (quilt)".
* Remove README.source (void effect with format 3.0).
* Refresh patches to avoid potential problems with the buildd's and
  dpkg's implementation of quilt.
* Include control on compilation and linking flags.
* Include extra fixes for spelling in the patch.
* Update 01-typos-and-spelling.patch to match DEP-3
* Add an option to not suppress progress bar when stderr is
  redirected. Closes: #589112.
* Split build-dependencies for VCS-friendliness
* Remove duplicate field in the binary packages
* Detail some of the long descriptions so that they are not equal
  anymore
* Update 01-typos-and-spelling.patch with some other spelling errors
* Fix some more typos. Closes: #552209, #572482.

[ TANIGUCHI Takaki ]
* debian/watch: add new control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Frank Heckenbach <f.heckenbach@fh-soft.de>
 
2
Reviewed-by: Rogério Theodoro de Brito <rbrito@ime.usp.br>
 
3
Bug-Debian: http://bugs.debian.org/589112
 
4
Forwarded: no
 
5
Subject: New option "--force-progress-bar"
 
6
Last-Update: 2010-11-06
 
7
 
 
8
--- a/main.c
 
9
+++ b/main.c
 
10
@@ -213,6 +213,8 @@
 
11
 "  -q --quiet                      : quiet operation\n"
 
12
 "  -e --stderr-progress            : force output of progress information to\n"
 
13
 "                                    stderr (for wrapper scripts)\n"
 
14
+"  -E --force-progress-bar         : force output of progress bar even if\n"
 
15
+"                                    stderr is not a terminal\n"
 
16
 "  -l --log-summary [<file>]       : save result summary to file, default\n"
 
17
 "                                    filename cdparanoia.log\n"
 
18
 "  -L --log-debug   [<file>]       : save detailed device autosense and\n"
 
19
@@ -341,6 +343,7 @@
 
20
 long callbegin;
 
21
 long callend;
 
22
 long callscript=0;
 
23
+long force_progress_bar=0;
 
24
 
 
25
 static char *callback_strings[16]={"wrote",
 
26
                                    "finished",
 
27
@@ -407,13 +410,13 @@
 
28
     }
 
29
   }
 
30
 
 
31
-  if(!quiet){
 
32
+  if(force_progress_bar || !quiet){
 
33
     long test;
 
34
     osector=inpos;
 
35
     sector=inpos/CD_FRAMEWORDS;
 
36
     
 
37
     if(printit==-1){
 
38
-      if(isatty(STDERR_FILENO)){
 
39
+      if(force_progress_bar || isatty(STDERR_FILENO)){
 
40
        printit=1;
 
41
       }else{
 
42
        printit=0;
 
43
@@ -607,10 +610,11 @@
 
44
     memset(dispcache,' ',graph);
 
45
 }
 
46
 
 
47
-const char *optstring = "escCn:o:O:d:g:k:S:prRwafvqVQhZz::YXWBi:Tt:l::L::A";
 
48
+const char *optstring = "eEscCn:o:O:d:g:k:S:prRwafvqVQhZz::YXWBi:Tt:l::L::A";
 
49
 
 
50
 struct option options [] = {
 
51
        {"stderr-progress",no_argument,NULL,'e'},
 
52
+       {"force-progress-bar",no_argument,NULL,'E'},
 
53
        {"search-for-drive",no_argument,NULL,'s'},
 
54
        {"force-cdrom-little-endian",no_argument,NULL,'c'},
 
55
        {"force-cdrom-big-endian",no_argument,NULL,'C'},
 
56
@@ -786,6 +790,9 @@
 
57
       callscript=1;
 
58
       fprintf(stderr,"Sending all callbacks to stderr for wrapper script\n");
 
59
       break;
 
60
+    case 'E':
 
61
+      force_progress_bar=1;
 
62
+      break;
 
63
     case 'V':
 
64
       fprintf(stderr,VERSION);
 
65
       fprintf(stderr,"\n");