Exemplo n.º 1
0
int
main()
{
    CELL file_cpy = {0};
    WINDOW *mainwin;

    mainwin = initscr();
    start_color();
    setup_colors();
    cbreak();
    noecho();
    keypad(mainwin, TRUE);
    meta(mainwin, TRUE);
    raw();

    leaveok(mainwin, TRUE);
    wbkgd(mainwin, COLOR_PAIR(COLOR_MAIN));
    wattron(mainwin, COLOR_PAIR(COLOR_MAIN));
    werase(mainwin);
    refresh();

    file_cpy.window = mainwin;

    main_dir(&file_cpy);

    wbkgd(mainwin, A_NORMAL);
    werase(mainwin);
    echo();
    nocbreak();
    noraw();
    refresh();
    endwin();
    return TRUE;
}
Exemplo n.º 2
0
char *prms_dir()
{
	_PRINT_DEPRECATED_ size_t slen;	// string length

	char *mdir = main_dir();
	char *pdir = (char *)_mol_malloc(MAXSLEN * sizeof(char));

	slen = strlen(mdir);
	if (slen > MAXSLEN - 20) {
		fprintf(stderr, "string %s is too long\n", mdir);
		exit(EXIT_FAILURE);
	}

	pdir = strcpy(pdir, mdir);
	free(mdir);
	pdir = strcat(pdir, "/prm");

	return pdir;
}