home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / aix / 12951 < prev    next >
Encoding:
Text File  |  1993-01-03  |  1.7 KB  |  76 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!mcsun!fuug!news.funet.fi!hydra!klaava!mvarila
  3. From: mvarila@klaava.Helsinki.FI (Mikael J Varila)
  4. Subject: Bug in wsetscrreg or scroll (aix 3.2.0) ?
  5. Message-ID: <1993Jan3.133553.5890@klaava.Helsinki.FI>
  6. Organization: University of Helsinki
  7. X-Newsreader: TIN [version 1.1 PL6]
  8. Date: Sun, 3 Jan 1993 13:35:53 GMT
  9. Lines: 65
  10.  
  11.  
  12.     Hi,
  13. We have run into a small (?) problem with our c-programs
  14. compiled in RS6000 AIX 3.2.0 conserning scrolling.
  15.  
  16. If anyone out there can spot the error in the following
  17. c-program ( or verify that it crashes ), I would be very
  18. grateful.
  19.  
  20. ========================================================
  21. #include <stdio.h>
  22. #include <curses.h>
  23.  
  24. main()
  25. {
  26.  
  27.         initscr();
  28.         cbreak();
  29.         noecho();
  30.         scrollok( stdscr, TRUE );
  31.  
  32.         wmove( stdscr, 23, 0 );
  33.         waddstr( stdscr, "1" );
  34.         wmove( stdscr, 22, 0 );
  35.         waddstr( stdscr, "2" );
  36.  
  37.         wrefresh( stdscr );
  38.  
  39.         wgetch( stdscr );
  40.  
  41.         wsetscrreg( stdscr, 22, 24 );
  42.         scroll( stdscr );
  43.  
  44.         wmove( stdscr, 23, 0 );
  45.         waddstr( stdscr, "3" );
  46.         wmove( stdscr, 24, 0 );
  47.         waddstr( stdscr, "4" );
  48.  
  49.         wrefresh( stdscr );
  50.  
  51.         wgetch( stdscr );
  52.  
  53.         nocbreak();
  54.         echo();
  55.         scrollok( stdscr, FALSE );
  56.         endwin();
  57.  
  58. }
  59.  
  60. ========================================================
  61.  
  62. When I run the code above, I get the error
  63. "Segmentation fault (core dumped)"
  64.  - but ONLY if the window where I run it is 24*80
  65. characters.
  66.  
  67. The compiler we use seems to be of version 1.2.0.8.
  68.  
  69. One more thing: the program does not crash on our
  70. ICL Mikko DRS6000 machine runnig SysVr4.
  71.  
  72. Thanks in advance,
  73.  
  74.                 Mikael Varila
  75.  
  76.