]> code.citadel.org Git - citadel.git/commitdiff
Implemented a nice way to do a status line that clings to the top of the screen witho...
authorArt Cancro <ajc@citadel.org>
Fri, 3 Sep 2010 20:05:07 +0000 (16:05 -0400)
committerArt Cancro <ajc@citadel.org>
Fri, 3 Sep 2010 20:05:07 +0000 (16:05 -0400)
curses or ncurses.  Currently commented out.

citadel/textclient/screen.c

index 1e0abb0283c898a1fda0ba2f4d676d6e444d6ab2..c8d9d56f20c485d22d124cef551f1122c6fdb4c6 100644 (file)
@@ -161,12 +161,7 @@ int scr_putc(int c)
                }
        }
 
-       //      if we want to do a top status line, this is a reasonable way to do it
-       //      printf("\033[s\033[0;70H");
-       //      printf("\033[K   %d/%d  %d/%d", cols_printed, screenwidth, lines_printed, screenheight);
-       //      printf("\033[u");
-
-       if ((screenheight > 0) && (lines_printed > (screenheight-2))) {
+       if ((screenheight > 0) && (lines_printed > (screenheight-2))) { /* -3 if we add status line */
                lines_printed = 0;
                hit_any_key();
                lines_printed = 0;
@@ -176,9 +171,36 @@ int scr_putc(int c)
        return c;
 }
 
+/*
+char status_line[1024] =
+       " This is the status line, status line, status line, this is "
+       "the status line, all day long. *****************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************"
+       "************************************************************";
+*/
 
 void scr_flush(void)
 {
+       /*
+       if ((enable_color) && (screenwidth > 0)) {
+               printf("\033[s\033[1;1H\033[K\033[7m");
+               fwrite(status_line, screenwidth, 1, stdout);
+               printf("\033[27m\033[u");
+       }
+       */
        fflush(stdout);
 }