示例#1
0
void on_tooltip_error(GArray *nodes)
{
	if (atoi(parse_grab_token(nodes)) == scid_gen)
	{
		if (pref_tooltips_fail_action == 1)
			tooltip_set(parse_get_error(nodes));
		else
		{
			tooltip_set(NULL);
			if (pref_tooltips_fail_action)
				plugin_blink();
		}
	}
}
示例#2
0
文件: parse.c 项目: LeSpocky/eis
int execute_all_extended_checks (char * check_dir)
{
    int i;
    int         error = OK;

    /* parse all packages and build parse tree */
    log_info (INFO, "parsing extended check files\n\n");
    inc_log_indent_level ();

    /* prepare version string, we can't have it in the source because
     * it would be replaced by th svn version tag */
    strcpy (fli4l_version_tag, "__FLI4L");
    strcat (fli4l_version_tag, "VER__");

    for (i=0; i<n_packages; i++)
    {
        if (parse_check_file (packages[i], check_dir))
        {
            return ERR;
        }
    }
    dec_log_indent_level ();
    log_info (INFO, "\nfinished parsing extended check files\n");


    /* actually execute scripts */
    parse_pass = 1;
    while (1)
    {
        if (final_pass)
        {
            log_info (INFO, "executing extended checks, final pass\n\n");
        }
        else
        {
            log_info (INFO, "executing extended checks, pass %d\n\n",
                      parse_pass);
        }
        inc_log_indent_level ();
        walk_tree ();
        error = parse_get_error ();
        if (error)
        {
            return error;
        }
        dec_log_indent_level ();
        if (final_pass)
        {
            if (package_provider_added)
            {
                fatal_exit ("package provided during final check pass, "
                            "bad extended check file\n");
            }
            log_info (INFO, "\nfinished final pass\n");
            break;
        }
        log_info (INFO, "\nfinished pass %d\n", parse_pass);

        if (package_provider_added)
        {
            package_provider_added = 0;
        }
        else
        {
            final_pass = 1;
        }

        parse_pass++;

        if (parse_pass > 99)
        {
            fatal_exit ("bad extended check files, aborting after pass 99");
        }
    }
    return OK;
}