Exemple #1
0
static void
proc_line(
	const char *ln, const char *const *fmt, size_t nfmt,
	const char *ofmt,
	int quietp)
{
	struct tm tm = __tm_initialiser();

	if (pars_line(&tm, fmt, nfmt, ln) < 0) {
		if (!quietp) {
			dt_io_warn_strpdt(ln);
		}
	} else {
		prnt_line(ofmt, &tm);
	}
	return;
}
Exemple #2
0
static void	pars_scene(int file)
{
	char	*line;
	t_pars	pars;
	int	nb_line;

	nb_line = 0;
	init_pars_scene(&parser);
	parser.last_type = LAST_NONE;
	while (get_next_line(file, &line))
	{
		remove_com(line);
		if (!is_empty(line))
			pars_line(&pars, count_indent(line, nb_line), \
				line, nb_line);
		nb_line++;
		free(line);
	}
}