istream& 
configpar< list<hostaddress> >::readValFromConfig(std::istream &in) {
	std::string tmp= parse_quoted_string(in);
	stringstream inputstr(tmp);

	bool success= false;
	while ( inputstr >> tmp ) {
		hostaddress addr(tmp.c_str(), &success);
		if ( success )
			value.push_back(addr);
		else
			throw configParExceptionParseError("invalid host address `" + tmp + "'");
	}
	return in;
}
Example #2
0
File: auth.c Project: knu/FDclone
char *authgetuser(VOID_A)
{
#ifdef	FD
	int wastty;
#endif
	char *cp;

#ifdef	FD
	if (!(wastty = isttyiomode)) ttyiomode(1);
	cp = inputstr(USER_K, 1, -1, NULL, -1);
	if (!wastty) stdiomode();
#else
	cp = gets2("User: ");
#endif

	if (cp && !*cp) {
		Xfree(cp);
		cp = NULL;
	}

	return(cp);
}