Beispiel #1
0
int		main(int argv, char **argc)
{
	int		fd;

	if (argc != 2)
	{
		if (argc > 2)
			write(2,"too many arguments.\n", 20);
		if (argc < 2)
			write(2, "file name missing \n", 19);
		return (1);

	}
	fd = open(argv[1], O_RDONLY);
	disp_file(fd);
	close(fd);
	return (0);
}
Beispiel #2
0
int main()
{
    if (yyparse() == 0) {
        disp_file(1, ast_root);
    }
}