Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2001 15:22:49 +0500 (YEKT)
From:      Belousov Oleg <strijar@urai.ru>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   gnu/31772: New option in dialog(1)
Message-ID:  <200111051022.fA5AMnd79717@ws.urai.ru>

next in thread | raw e-mail | index | archive | help


>Number:         31772
>Category:       gnu
>Synopsis:       New option in dialog(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 05 02:30:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Belousov Oleg
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD ws 4.4-STABLE FreeBSD 4.4-STABLE #2: Fri Oct 5 09:01:24 YEKST 2001 root@ws:/usr/src/sys/compile/WS i386


	
>Description:
	I'm add new option --file for dialog(1)
>How-To-Repeat:
	
>Fix:
--- dialog.c.orig	Thu May 10 10:23:01 2001
+++ dialog.c	Mon Nov  5 15:09:28 2001
@@ -384,6 +384,26 @@
     end_dialog();
     return retval;
   }    
+  else if (!strcmp(argv[offset+1], "--file")) {
+  	unsigned char *tresult;
+    if (argc-offset != 4) {
+      Usage(argv[0]);
+      exit(-1);
+    }
+    init_dialog();
+    tresult = dialog_fselect(argv[offset+2], argv[offset+3]);
+    dialog_update();
+    if (tresult) {
+    	fputs(tresult, stderr);
+	retval = 0;
+    } else {
+	retval = 1;
+    }
+    if (clear_screen)   /* clear screen before exit */
+      dialog_clear();
+    end_dialog();
+    return retval;
+  }    
 
   Usage(argv[0]);
   exit(-1);
@@ -421,6 +441,7 @@
 \n  --checklist <text> <height> <width> <list height> <tag1> <item1> <status1>...\
 \n  --radiolist <text> <height> <width> <list height> <tag1> <item1> <status1>...\
 \n  --ftree     <file> <FS> <text> <height> <width> <menu height>\
-\n  --tree      <FS> <text> <height> <width> <menu height> <item1>...\n", VERSION, name, name, name);
+\n  --tree      <FS> <text> <height> <width> <menu height> <item1>...\
+\n  --file      <directory> <file mask>\n", VERSION, name, name, name);
 }
 /* End of Usage() */
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111051022.fA5AMnd79717>