In file input.h:

void inp_readstring

(int maxlen)

Low-level input function.

Documentation

Low-level input function.

Reads a string of a certain maximum length into inp_buffer. Does nothing else. 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.

You should not call this function directly. Use inp_get() instead. If you need raw strings, not margc/margv0-style parsing, use inp_raw() immediately afterwards.

The function waits for user input. If the user has entered nothing (or has deleted everything), inp_acceptinjoth() is called periodically to present any waiting injected messages. If any are shown, the function exits, setting INF_REPROMPT, so that the caller can re-issue the last prompt.

If a timeout set with inp_timeout() expires, the function issues a last call to inp_acceptinjoth(), sets the INF_TIMEOUT flag, and exits.

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.
See Also:
input, inp_get().

Alphabetic index



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