Revision: 55842
http://sourceforge.net/p/brlcad/code/55842
Author: carlmoore
Date: 2013-06-25 19:20:23 +0000 (Tue, 25 Jun 2013)
Log Message:
-----------
remove h,a ('a' was unused); h becomes, along with ? and no-arguments, a help
option
Modified Paths:
--------------
brlcad/trunk/doc/docbook/system/man1/en/fbframe.xml
brlcad/trunk/src/fb/fbframe.c
Modified: brlcad/trunk/doc/docbook/system/man1/en/fbframe.xml
===================================================================
--- brlcad/trunk/doc/docbook/system/man1/en/fbframe.xml 2013-06-25 17:43:46 UTC
(rev 55841)
+++ brlcad/trunk/doc/docbook/system/man1/en/fbframe.xml 2013-06-25 19:20:23 UTC
(rev 55842)
@@ -16,7 +16,6 @@
<refsynopsisdiv xml:id="synopsis">
<cmdsynopsis sepchar=" ">
<command>fbframe</command>
- <arg choice="opt" rep="norepeat">-h </arg>
<arg choice="opt" rep="norepeat">-F
<replaceable>framebuffer</replaceable></arg>
<arg choice="opt" rep="norepeat">-w
<replaceable>frame_width</replaceable></arg>
<arg choice="opt" rep="norepeat">-n
<replaceable>frame_height</replaceable></arg>
@@ -50,14 +49,11 @@
<para>By default, the dimensions of the frame will be taken from the
framebuffer
used. Alternatively, one or more of the options
-<option>-h -s -w -n</option>
+<option> -s -w -n</option>
may be used to set the dimensions of the frame drawn.</para>
<para>The
-<option>-h</option>
-option sets the frame dimensions to
-1024x1024.
-The options
+options
<option>-w </option><replaceable>frame_width</replaceable>
and
<option>-n </option><replaceable>frame_height</replaceable>
Modified: brlcad/trunk/src/fb/fbframe.c
===================================================================
--- brlcad/trunk/src/fb/fbframe.c 2013-06-25 17:43:46 UTC (rev 55841)
+++ brlcad/trunk/src/fb/fbframe.c 2013-06-25 19:20:23 UTC (rev 55842)
@@ -33,8 +33,7 @@
#include "bu.h"
#include "fb.h"
-char *Usage="[-h] [-F framebuffer]\n\
- [-s squareframesize] [-w frame_width] [-n frame_height]\n";
+char *Usage="[-F framebuffer] [-s squareframesize] [-w frame_width] [-n
frame_height]\n";
#define USAGE_EXIT(p) { fprintf(stderr, "Usage: %s %s\n", (p), Usage); \
bu_exit(-1, NULL); }
@@ -55,12 +54,8 @@
static RGBpixel blue = { 0, 0, 255 };
xsize = ysize = 0;
- while ((c = bu_getopt(argc, argv, "ahF:s:w:n:S:W:N:")) != -1) {
+ while ((c = bu_getopt(argc, argv, "F:s:w:n:S:W:N:h?")) != -1) {
switch (c) {
- case 'h':
- /* high-res */
- xsize = ysize = 1024;
- break;
case 'F':
framebuffer = bu_optarg;
break;
@@ -71,7 +66,6 @@
xsize = ysize = len;
else
USAGE_EXIT(*argv);
-
break;
case 'w':
case 'W':
@@ -93,6 +87,9 @@
}
}
+ if (argc == 1 && isatty(fileno(stdin)) && isatty(fileno(stdout)))
+ USAGE_EXIT(*argv);
+
if ((fbp = fb_open(framebuffer, xsize, ysize)) == FBIO_NULL)
bu_exit(1, NULL);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits