(getstring, getstarg): Use plain char * instead of s_char *.

This commit is contained in:
Markus Armbruster 2004-04-08 17:56:12 +00:00
parent 8f007f7095
commit 48175e9beb
3 changed files with 16 additions and 6 deletions

View file

@ -142,8 +142,8 @@ extern s_char *esplur(int n);
extern s_char *splur(int n); extern s_char *splur(int n);
extern s_char *iesplur(int n); extern s_char *iesplur(int n);
extern s_char *plur(int n, s_char *no, s_char *yes); extern s_char *plur(int n, s_char *no, s_char *yes);
extern s_char *getstarg(s_char *input, s_char *prompt, s_char buf[]); extern char *getstarg(char *input, char *prompt, char buf[]);
extern s_char *getstring(s_char *prompt, s_char buf[]); extern char *getstring(char *prompt, char buf[]);
extern s_char *prbuf(s_char *format, ...) extern s_char *prbuf(s_char *format, ...)
ATTRIBUTE((format (printf, 1, 2))); ATTRIBUTE((format (printf, 1, 2)));

View file

@ -34,8 +34,14 @@
#include "misc.h" #include "misc.h"
#include "gen.h" #include "gen.h"
s_char * /*
getstarg(s_char *input, s_char *prompt, s_char *buf) * Get string argument.
* If INPUT is not empty, use it, else prompt for more input using PROMPT.
* Copy input to BUF[1024].
* Return BUF on success, else NULL.
*/
char *
getstarg(char *input, char *prompt, char *buf)
{ {
*buf = '\0'; *buf = '\0';
if (input == 0 || *input == 0) { if (input == 0 || *input == 0) {

View file

@ -35,8 +35,12 @@
#include "gen.h" #include "gen.h"
#include "subs.h" #include "subs.h"
s_char * /*
getstring(s_char *prompt, s_char *buf) * Print sub-prompt PROMPT, receive a line of input into BUF[1024].
* Return BUF on success, else NULL.
*/
char *
getstring(char *prompt, char *buf)
{ {
*buf = '\0'; *buf = '\0';
if (prmptrd(prompt, buf, 1024) < 0) if (prmptrd(prompt, buf, 1024) < 0)