示例#1
0
文件: c_builtins.c 项目: adacher/sh1
int		yolo(char *s, int i)
{
	if (s[i] == ';' && s[i + 1] == ';')
	{
		ft_putcolorendl(RED, "minishell-1: parse error near `;;'");
		return (-1);
	}
	return (0);
}
示例#2
0
int			s_create_file(char *path)
{
	char			*good_path;
	int				fd;

	good_path = get_path(path);
	ft_putcolorendl(good_path, 95);
	if ((fd = open(good_path, O_RDONLY)) != -1)
		return (choose_stuff(good_path, fd));
	else
	{
		fd = open(good_path, O_CREAT | O_WRONLY);
		return (fd);
	}
	return (0);
}