Revision: 55663
          http://sourceforge.net/p/brlcad/code/55663
Author:   carlmoore
Date:     2013-06-04 19:04:55 +0000 (Tue, 04 Jun 2013)
Log Message:
-----------
remove h for high-res ('s 1024' or 'S 1024' in its place), and implement -h,-?

Modified Paths:
--------------
    brlcad/trunk/src/util/dunnsnap.c

Modified: brlcad/trunk/src/util/dunnsnap.c
===================================================================
--- brlcad/trunk/src/util/dunnsnap.c    2013-06-04 14:59:42 UTC (rev 55662)
+++ brlcad/trunk/src/util/dunnsnap.c    2013-06-04 19:04:55 UTC (rev 55663)
@@ -51,8 +51,8 @@
 static int scr_width = 0;
 static int scr_height = 0;
 
-static char usage[] = "\
-Usage: dunnsnap [-h] [-F framebuffer]\n\
+static char usage[] =
+"Usage: dunnsnap [-F framebuffer]\n\
        [-{sS} squarescrsize] [-{wW} scr_width] [-{nN} scr_height]\n\
        [num_frames]\n";
 
@@ -61,12 +61,8 @@
 {
     int c;
 
-    while ((c = bu_getopt(argc, argv, "hF:s:S:w:W:n:N:")) != -1) {
+    while ((c = bu_getopt(argc, argv, "F:s:S:w:W:n:N:h?")) != -1) {
        switch (c) {
-           case 'h':
-               /* high-res */
-               scr_height = scr_width = 1024;
-               break;
            case 'F':
                framebuffer = bu_optarg;
                break;
@@ -109,6 +105,13 @@
        bu_exit (1, NULL);
     }
 
+    if (argc == 1 && isatty(fileno(stdin)) && isatty(fileno(stdout)) ) {
+       fprintf(stderr,"%s",usage);
+       fprintf(stderr,"       Program continues running:\n");
+    }
+    else if ( BU_STR_EQUAL(argv[1], "-h") ||  BU_STR_EQUAL(argv[1], "-?") )
+       bu_exit(25, "%s", usage);
+
     dunnopen();
 
     if (framebuffer != (char *)0) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to