Testing If a Window Is Filled with Output

You can use cs_adj() to determine if a window buffer has been filled with output. For example, if you want to determine if a string written to the window has filled the window, you would write code like this:

int flag;



v_st("I'd like to find out if this string fills the window.", ex_wnp);

flag = cs_adj(ex_wnp);

You can determine if you wish to continue output by testing the value of flag. If flag is set to 0, then the buffer is filled; if it is set to 1, then the buffer is not yet filled with output.


Home Contents Previous Next