Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

curses



a recent post here inspired me to play with curses.

In xcode, is there a correct place to put the -lncurses flag? Currently
I have it in the project's "styles" tab under "Other linker flags". Is
that where it ought to go?

Second, when I try to run the project, I get
> [Session started at 2004-08-27 01:59:03 -0600.]
> Error opening terminal: unknown.
>
> Executable xcurs has exited with status 1.

I'm guessing I can't run curses inside apple's console window? Is there
an alternative (to just using emacs...)?  ie, can I use xcode for this?


Finally, if anyone would care to tell me why my code is acting funny,
I'd appreciate it! :)
(it's acting as though it only sees a character after the subsequent
character is pressed.)

#include <curses.h>
#include <stdio.h>

int main()
{
   char foo;
   WINDOW* thewindow;

   thewindow = initscr();
   cbreak();


   do
   {
     foo = getch();
     printf("Character was: %c\n",foo);
   }while (foo!='q');

   nocbreak();
   endwin();
   return 0;
}
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.