aboutsummaryrefslogtreecommitdiff
path: root/basic_curses.c
diff options
context:
space:
mode:
authorache <ache@ache.one>2017-07-17 10:12:48 +0200
committerache <ache@ache.one>2017-07-17 10:12:48 +0200
commit49616db1faede67655d15172045eabb8ef1fa6ea (patch)
treed3f4625ab496f56717a2523a4898576562a12948 /basic_curses.c
parentFix Makefile installation (diff)
Debug and numerical tags year and track in regex mode
Diffstat (limited to 'basic_curses.c')
-rw-r--r--basic_curses.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/basic_curses.c b/basic_curses.c
index ce6a338..51bef2b 100644
--- a/basic_curses.c
+++ b/basic_curses.c
@@ -27,10 +27,14 @@ void printfc(char* fstrc, int max_length, ...) {
}else
attrset( COLOR_PAIR(fstrc[i+1]-'0') | A_NORMAL);
}else{
+#ifdef DEBUG
fprintf(stderr,"%c isn't a color, skipping", fstrc[i+1]);
+#endif
}
}else{
+#ifdef DEBUG
fprintf(stderr,"end of line by '$', expect a color after '$'");
+#endif
return;
}
i+=2;
@@ -41,7 +45,9 @@ void printfc(char* fstrc, int max_length, ...) {
char format[10] = "%";
while(j < 9 && !strchr("diouxXeEfFgGaAcsp%", format[j] = fstrc[i+j]) );
if( j == 9 ) {
+#ifdef DEBUG
fprintf(stderr,"format too long %s...",format);
+#endif
return;
}
if( strchr("di", format[j] ) ) {
@@ -104,10 +110,14 @@ void printc(char* fstrc, int max_length) {
}else
attrset( COLOR_PAIR(fstrc[i+1]-'0') | A_NORMAL);
}else{
+#ifdef DEBUG
fprintf(stderr,"%c isn't a color, skipping", fstrc[i+1]);
+#endif
}
}else{
+#ifdef DEBUG
fprintf(stderr,"end of line by '$', expect a color after '$'");
+#endif
return;
}
i+=2;