|
NAMEreadcons - prompt console for inputSYNOPSIS#include <u.h>#include <libc.h> char *readcons(char *prompt, char *def, int secret) DESCRIPTIONReadcons prompts at the console for input. It returns a NUL-terminated buffer containing the input without a final newline. The buffer should be freed (and perhaps cleared first) when no longer needed.If the user types an empty string (just a newline) and def is non-zero, then a copy of def is returned instead of the empty string. If secret is non-zero, the input is not echoed to the screen. EXAMPLEA stripped-down version of netkey (see
SOURCE/src/lib9/readcons.c Visit the GSP FreeBSD Man Page Interface. |