Dragonfly Q&A

How to correctly check if "everything is successful" in Listing 4.61 on pages 99-100?

0 like 0 dislike

While working on Project 2b, I see that the book didn't mention on checking what the return values are for curses functions. I can only guess that they might return either TRUE or FALSE, or integer numbers.
 

Do I do:

int result = SomeCursesFunction();

Like that above? And what do I check for, negative numbers or 0 and 1?

asked Sep 18, 2014 in Engine Development by tom_mai78101
reshown Sep 18, 2014 by claypool
Found it, on page 96, at the very top.

1 Answer

0 like 0 dislike

The return values for most curses calls can be found in the man pages, accessible on the CCC Linux machines.  e.g., typing "man mvwaddch" will provide details on all the addch() type of Curses calls, including the return values when there are errors.  These same pages can be found on the Web, too, via a Google search.

answered Sep 18, 2014 by claypool
More information about Dragonfly can be found on the Dragonfly Home Page.
...