Skip to content

Instantly share code, notes, and snippets.

@norm
Last active June 27, 2022 13:05
Show Gist options
  • Save norm/1bce793b20c6f31f871cad330a35be91 to your computer and use it in GitHub Desktop.
Save norm/1bce793b20c6f31f871cad330a35be91 to your computer and use it in GitHub Desktop.
patch to cdparanoia
diff --git a/main.c b/main.c
index 5c4b701..20adfd5 100644
--- a/main.c
+++ b/main.c
@@ -384,7 +384,7 @@ static void callback(long inpos, int function){
static int slast=0;
static int stimeout=0;
static int cacheerr=0;
- char *smilie="= :-)";
+ char *smilie=":-)";
if(callscript)
fprintf(stderr,"##: %d [%s] @ %ld\n",
@@ -502,33 +502,33 @@ static void callback(long inpos, int function){
switch(slevel){
case 0: /* finished, or no jitter */
if(skipped_flag)
- smilie=" 8-X";
+ smilie="8-X";
else
- smilie=" :^D";
+ smilie=":^D";
break;
case 1: /* normal. no atom, low jitter */
- smilie=" :-)";
+ smilie=":-)";
break;
case 2: /* normal, overlap > 1 */
- smilie=" :-|";
+ smilie=":-|";
break;
case 4: /* drift */
- smilie=" :-/";
+ smilie=":-/";
break;
case 3: /* unreported loss of streaming */
- smilie=" :-P";
+ smilie=":-P";
break;
case 5: /* dropped/duped bytes */
- smilie=" 8-|";
+ smilie="8-|";
break;
case 6: /* scsi error */
- smilie=" :-0";
+ smilie=":-0";
break;
case 7: /* scratch */
- smilie=" :-(";
+ smilie=":-(";
break;
case 8: /* skip */
- smilie=" ;-(";
+ smilie=";-(";
skipped_flag=1;
break;
@@ -571,22 +571,22 @@ static void callback(long inpos, int function){
if(abort_on_skip && skipped_flag && function !=-1){
sprintf(buffer,
- "\r (== PROGRESS == [%s| %06ld %02d ] ==%s %c ==) ",
+ "\r %c [%s| %06ld %02d ] %s",
" ...aborting; please wait... ",
- v_sector,overlap/CD_FRAMEWORDS,smilie,heartbeat);
+ heartbeat,v_sector,overlap/CD_FRAMEWORDS,smilie);
}else{
if(v_sector==0)
sprintf(buffer,
- "\r (== PROGRESS == [%s| ...... %02d ] ==%s %c ==) ",
- dispcache,overlap/CD_FRAMEWORDS,smilie,heartbeat);
+ "\r %c [%s| ...... %02d ] %s",
+ heartbeat,dispcache,overlap/CD_FRAMEWORDS,smilie);
else
sprintf(buffer,
- "\r (== PROGRESS == [%s| %06ld %02d ] ==%s %c ==) ",
- dispcache,v_sector,overlap/CD_FRAMEWORDS,smilie,heartbeat);
+ "\r %c [%s| %06ld %02d ] %s",
+ heartbeat,dispcache,v_sector,overlap/CD_FRAMEWORDS,smilie);
if(aheadposition>=0 && aheadposition<graph && !(function==-1))
- buffer[aheadposition+19]='>';
+ buffer[aheadposition+6]='>';
}
fprintf(stderr,buffer);
diff --git a/paranoia/paranoia.c b/paranoia/paranoia.c
index 9a382f5..02c1abb 100644
--- a/paranoia/paranoia.c
+++ b/paranoia/paranoia.c
@@ -127,7 +127,7 @@ enum {
FLAGS_EDGE =0x1, /**< first/last N words of frame */
FLAGS_UNREAD =0x2, /**< unread, hence missing and unmatchable */
FLAGS_VERIFIED=0x4 /**< block read and verified */
-} paranoia_read_flags;
+} paranoia_read_flags=FLAGS_UNREAD;
/**** matching and analysis code *****************************************/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment