home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / linux / 10152 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.3 KB  |  53 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!mcsun!sun4nl!fwi.uva.nl!gene.fwi.uva.nl!vesseur
  3. From: vesseur@fwi.uva.nl (Joep Vesseur)
  4. Subject: problems with curses
  5. Message-ID: <1992Sep8.071332.16774@fwi.uva.nl>
  6. Summary: curses kills me
  7. Sender: news@fwi.uva.nl
  8. Nntp-Posting-Host: gene.fwi.uva.nl
  9. Organization: FWI, University of Amsterdam
  10. Date: Tue, 8 Sep 1992 07:13:32 GMT
  11. Lines: 40
  12.  
  13. hi,
  14.  
  15. i've got problems with curses. running the following program (with
  16. mcc's gcc2.2.2d + linus' 097.4)
  17.     
  18.     #include <curses.h>
  19.     #include <stdio.h>
  20.     
  21.     main(int argc, char *argv[])
  22.     {
  23.         WINDOW    *stdscr;
  24.         int    i;
  25.         int    until= 0;
  26.     
  27.         stdscr= initscr();
  28.         idlok(stdscr, TRUE);
  29.         scrollok(stdscr, TRUE);
  30.         if (argc > 1)
  31.             sscanf(argv[1], "%d", &until);
  32.     
  33.         for (i= 0; i < until; i++) {
  34.             wprintw(stdscr, "dit is regel %d\n", i);
  35.             wrefresh(stdscr);
  36.         }
  37.         endwin();
  38.     }
  39.  
  40. when run with a number, it should print that many lines, while
  41. scrolling the screen if it gets filled. this works fine on other
  42. unix systems, but on linux it
  43.     - doesn't scroll (well, it does, but only one line. it then
  44.       goes to the top of the screen (not printing one line) and 
  45.       resumes)
  46.     - gives a segmentation fault and illegal adres errors.
  47. i have to admit that i don't have extensive documentation on curses
  48. (just the man page), but then, it works on other systems.
  49.  
  50. thanx for any info.
  51.  
  52. joep.
  53.