dialog

Модератор: Модераторы разделов

Аватара пользователя
polachok
Бывший модератор
Сообщения: 2199
Статус: главный форумный маргинал
ОС: gnu/linux

dialog

Сообщение polachok »

есть ли утилита dialog и библиотека ldialog в linux? я вот написал свою вторую (после helloworld)
программу с ней...

Код: Выделить всё

#include <dialog.h>
#include <stdio.h>
#include <string.h>
int main ()
{
        init_dialog();
        unsigned char stroka[20] = "polachok" , buffstr[100];
        unsigned char *pstroka, *pbuffstr;
        pstroka = &stroka[0];
        pbuffstr = &buffstr[0];
        if (dialog_yesno("The locate GUI", "This is an ncurses GUI for the locate utility. Do you need it?", 20, 40) == FALSE )
         {
                 dialog_inputbox("Locating", "What do you want to find?", 40, 40, pstroka);
                 strcat(pbuffstr, "locate ");
                 strcat(pbuffstr, pstroka);
                 dialog_prgbox("In progress..",buffstr, 40, 40, 1, 1);
                 end_dialog();
         }
        else
        end_dialog();
        return 0;
}

gcc -ldialog ./loc.c -o loc
а для linux есть реализация ее?
И немедленно выпил.
Спасибо сказали:
Аватара пользователя
Sergey T
Сообщения: 250
ОС: Debian

Re: dialog

Сообщение Sergey T »

Попробовал у себя прогнать вышеприведеный код и вот что получил:
[sergey@localhost c]$ gcc -c dialog.c
dialog.c:1:20: dialog.h: No such file or directory
dialog.c: In function `main':
dialog.c:11: error: `FALSE' undeclared (first use in this function)
dialog.c:11: error: (Each undeclared identifier is reported only once
dialog.c:11: error: for each function it appears in.)
dialog.c:22:2: warning: no newline at end of file

И что с этим надо делать?
Спасибо сказали: