Example #1
0
void if_display_help(void)
{
    char cgdb_help_file[MAXLINE];
    int ret_val = 0;

    fs_util_get_path(PKGDATADIR, "cgdb.txt", cgdb_help_file);
    ret_val = source_set_exec_line(src_win, cgdb_help_file, 1);
    if (ret_val == 0)
        if_draw();
    else if (ret_val == 5)      /* File does not exist */
        if_display_message("No such file: %s", 0, cgdb_help_file);
}
Example #2
0
void if_display_help(void)
{
    char cgdb_help_file[FSUTIL_PATH_MAX];
    int ret_val = 0;

    fs_util_get_path(PKGDATADIR, "cgdb.txt", cgdb_help_file);

    /* File doesn't exist. Try to find cgdb.txt in the build dir in case
     * the user is running a built cgdb binary directly. */
    if (!fs_verify_file_exists(cgdb_help_file))
        fs_util_get_path(TOPBUILDDIR, "doc/cgdb.txt", cgdb_help_file);

    ret_val = source_set_exec_line(src_viewer, cgdb_help_file, 1, 0);

    if (ret_val == 0)
    {
        src_viewer->cur->language = TOKENIZER_LANGUAGE_CGDBHELP;
        source_highlight(src_viewer->cur);
        if_draw();
    }
    else if (ret_val == 5)      /* File does not exist */
        if_display_message("No such file: ", WIN_REFRESH, 0, "%s", cgdb_help_file);
}
Example #3
0
void if_show_file(char *path, int line)
{
    if (source_set_exec_line(src_win, path, line) == 0)
        if_draw();
}
Example #4
0
void if_show_file(char *path, int sel_line, int exe_line)
{
    if (source_set_exec_line(src_viewer, path, sel_line, exe_line) == 0)
        if_draw();
}