chiark / gitweb /
multiprogress.c: Provide the obvious default for `cr'.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 6 Mar 2022 01:04:42 +0000 (01:04 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 6 Mar 2022 01:05:08 +0000 (01:05 +0000)
multiprogress.c

index efad38d4d3d7cb65bbf9158effb3619cdebd7a3b..aa8e8907a6dbbc36b9cfc0411ccc7c1cca26bd5a 100644 (file)
@@ -128,7 +128,8 @@ int progress_init(struct progress_state *progress)
 
 #undef SETDIM
 
-  if (!tty->cap.cr || !tty->cap.up || !tty->cap.ce || !tty->cap.cd)
+  if (!tty->cap.cr) tty->cap.cr = "\r";
+  if (!tty->cap.up || !tty->cap.ce || !tty->cap.cd)
     { fclose(tty->fp); tty->fp = 0; return (-1); }
   if (!tty->cap.af || !tty->cap.ab || !tty->cap.op) tty->cap.op = 0;
   if (!tty->cap.me) tty->cap.mr = tty->cap.md = 0;