change interface to Input::write_echo() to accept const std::string
This commit is contained in:
@ -309,11 +309,11 @@ char *Input::one(const std::string &single)
|
|||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
Send text to active echo file pointers
|
Send text to active echo file pointers
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
void Input::write_echo(const char *txt)
|
void Input::write_echo(const std::string &txt)
|
||||||
{
|
{
|
||||||
if (me == 0) {
|
if (me == 0) {
|
||||||
if (echo_screen && screen) fputs(txt,screen);
|
if (echo_screen && screen) fputs(txt.c_str(),screen);
|
||||||
if (echo_log && logfile) fputs(txt,logfile);
|
if (echo_log && logfile) fputs(txt.c_str(),logfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ class Input : protected Pointers {
|
|||||||
void substitute(char *&, char *&, int &, int &, int);
|
void substitute(char *&, char *&, int &, int &, int);
|
||||||
// substitute for variables in a string
|
// substitute for variables in a string
|
||||||
int expand_args(int, char **, int, char **&); // expand args due to wildcard
|
int expand_args(int, char **, int, char **&); // expand args due to wildcard
|
||||||
void write_echo(const char *); // send text to active echo file pointers
|
void write_echo(const std::string &); // send text to active echo file pointers
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
char *command; // ptr to current command
|
char *command; // ptr to current command
|
||||||
|
|||||||
Reference in New Issue
Block a user