home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / programm / 3992 < prev    next >
Encoding:
Text File  |  1992-07-29  |  1.4 KB  |  47 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!usc!sdd.hp.com!caen!hellgate.utah.edu!lanl!simvax.meediv.lanl.gov!reed
  3. From: reed@eagle.agps.lanl.gov (Reed_Kevin)
  4. Subject: Curses Doesn't Use Terminal Features?????
  5. Message-ID: <29JUL199210425254@simvax.meediv.lanl.gov>
  6. News-Software: VAX/VMS VNEWS 1.41    
  7. Sender: reed@simvax.meediv.lanl.gov (Reed_Kevin)
  8. Organization: Los Alamos National Laboratory, Mech. and Elec. Eng
  9. Date: Wed, 29 Jul 1992 17:42:00 GMT
  10. Lines: 35
  11.  
  12. I was using some code t that uses Curses, and I was curious how
  13. it preformed a scroll.  I slowed the vt220 terminal I was using
  14. down to 300baud and watched what happened when I called scroll()
  15. To my amazement, it completely rewrote the entire screen, rather
  16. then sending the escape sequence to cause the terminal to scroll.
  17. Does curses really generate all this extra noise on the network
  18. or did I observe something else?  Included is the code I used to
  19. test it.
  20.  
  21. #include    <curses.h>
  22. main()
  23. {
  24.     int    i;
  25.     
  26.     initscr();
  27.     scrollok(stdscr,TRUE);
  28.     for(i=0;i<10;i++) {
  29.         printw("Greetings\n\r");
  30.         printw("all you people\n\r");
  31.         printw("out there in netland\n\r");
  32.         printw("Are we having fun yet?\n\r");
  33.     }
  34.     refresh();
  35.     scroll(stdscr);
  36.     printw("Yes, we are!\n\r");
  37.     refresh();
  38.     endwin();
  39. }
  40.  
  41.  
  42. Thanks, email responses to me, I post a summary if anyone is interested.
  43.  
  44. Kevin Reed
  45. Los Alamos National Laboratory
  46. reed@eagle.agps.lanl.gov
  47.