In file input.h:

char* inp_get

(int maxlen)

Mid-level input function.

Documentation

Mid-level input function.

You can call this function to receive a line of input from the system and parse it into a number of space-delimited arguments. The input length can be limited to an arbitrary number of characters, in which case the function will interactively block input until characters are deleted, making the length limitation plain to the user.

Parameters:
maxlen - the maximum number of characters to allow. Don't set this too low unless absolutely necessary. Even if you only need a single-character string, it's better to check the length and rebuff the user than to do this. You must always allow the user to enter long global commands. DO NOT SET THIS ARGUMENT TO VALUES GREATER THAN MAXINPLEN-1.
Returns:
a pointer to the first argument, margv[0]). The input string is automatically partitioned into space-delimited arguments. To restore the raw input line, call inp_raw() afterwards. You should not use inp_readstring() unless necessary, because it does not deal with reprompts and other aspects of the user interface.
See Also:
inp_raw(), inp_readstring().

Alphabetic index



This page was generated with the help of DOC++.