-#if 0 /* FIXME: this isn't used, can we remove it? */
-int yesno_s(char *question) {
- int a;
- char buf[4096];
- char tempfile[64];
- FILE *fp;
-
- sprintf(tempfile, "/tmp/setup.%d", getpid());
- switch (setup_type) {
-
- case UI_TEXT:
- a=yesno(question);
- if (a==1) a=yesno("Are you SURE you want to reinitialize this file? ");
- return(a);
- break;
-
- case UI_CURSES:
- a=yesno(question);
- if (a==1) a=yesno("Are you SURE you want to reinitialize this file? ");
- return(a);
- break;
-
- case UI_DIALOG:
- a = yesno(question);
- if (a==0) return(a);
- sprintf(buf, "dialog --title \"Confirm file overwrite\" --menu \"\nAre you SURE you want to reinitialize this file?\n\" 13 80 2 NO \"No, don't overwrite\" YES \"Yes, overwrite the existing file\" 2>%s", tempfile);
- a = system(buf);
- if (a != 0) return(0);
- fp = fopen(tempfile, "rb");
- fgets(buf, 4095, fp);
- fclose(fp);
- if (strlen(buf)>0)
- if (buf[strlen(buf)-1]==10)
- buf[strlen(buf)-1]=0;
- return( (!strcmp(buf, "YES")) ? 1 : 0 );
- break;
-
- }
-
- return(0); /* just in case */
- }
-#endif
-
-