Пример #1
0
int _execute(char args[][ACOLS])
{
	char* cfgpath = NULL;

	if(!strcmp(EXIT, args[0]))
		run = 0;
	else if(!strcmp(EXPORT, args[0]))
		expenv(args);
	else if(!strcmp(ECHO, args[0]))
		echo_text(args);
	else if(!strcmp(ETIME, args[0]))
		etime(args);
	else if(!strcmp(LIMITS, args[0]))
		compute_limits(args);
	else if(!strcmp(CD, args[0]))
		chgdir(args);
	else if(!findexec(args, &cfgpath))
		otroexec(args, &cfgpath);

	if(cfgpath != NULL) free(cfgpath);

	return 0;
}
Пример #2
0
Файл: f8c.hpp Проект: fix8/fix8
	~push_dir() { chgdir(_cwd); }
Пример #3
0
Файл: f8c.hpp Проект: fix8/fix8
	explicit push_dir(const char *to) : _cwd() { getdir(); chgdir(to); }
Пример #4
0
Файл: f8c.hpp Проект: fix8/fix8
	explicit push_dir(const std::string& to) : _cwd() { getdir(); chgdir(to.c_str()); }