(getstring, getstarg): Use plain char * instead of s_char *.
This commit is contained in:
parent
8f007f7095
commit
48175e9beb
3 changed files with 16 additions and 6 deletions
|
@ -142,8 +142,8 @@ extern s_char *esplur(int n);
|
|||
extern s_char *splur(int n);
|
||||
extern s_char *iesplur(int n);
|
||||
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 s_char *getstring(s_char *prompt, s_char buf[]);
|
||||
extern char *getstarg(char *input, char *prompt, char buf[]);
|
||||
extern char *getstring(char *prompt, char buf[]);
|
||||
extern s_char *prbuf(s_char *format, ...)
|
||||
ATTRIBUTE((format (printf, 1, 2)));
|
||||
|
||||
|
|
|
@ -34,8 +34,14 @@
|
|||
#include "misc.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';
|
||||
if (input == 0 || *input == 0) {
|
||||
|
|
|
@ -35,8 +35,12 @@
|
|||
#include "gen.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';
|
||||
if (prmptrd(prompt, buf, 1024) < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue