From owner-svn-src-head@FreeBSD.ORG Thu Nov 15 17:06:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F56A4BD for ; Thu, 15 Nov 2012 17:06:11 +0000 (UTC) (envelope-from postmaster@mailpod.hostingplatform.com) Received: from atl4mhob12.myregisteredsite.com (atl4mhob12.myregisteredsite.com [209.17.115.50]) by mx1.freebsd.org (Postfix) with ESMTP id C39098FC0C for ; Thu, 15 Nov 2012 17:06:10 +0000 (UTC) Received: from mailpod1.hostingplatform.com (mailpod1.networksolutionsemail.com [206.188.198.65]) by atl4mhob12.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFH63rx010809 for ; Thu, 15 Nov 2012 12:06:03 -0500 Received: (qmail 6157 invoked by uid 0); 15 Nov 2012 16:03:10 -0000 Received: (qmail 22092 invoked by uid 0); 15 Nov 2012 15:09:50 -0000 Received: from unknown (HELO atl4mhib22.myregisteredsite.com) (209) by 0 with SMTP; 15 Nov 2012 15:09:50 -0000 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by atl4mhib22.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id qAFF7f7f023594 for ; Thu, 15 Nov 2012 10:07:41 -0500 Received: from hub.freebsd.org (hub.FreeBSD.org [8.8.178.136]) by mx2.freebsd.org (Postfix) with ESMTP id 8E54E3B7858; Thu, 15 Nov 2012 15:07:24 +0000 (UTC) Received: from hub.FreeBSD.org (hub.FreeBSD.org [8.8.178.136]) by hub.freebsd.org (Postfix) with ESMTP id C3962123F; Thu, 15 Nov 2012 15:07:24 +0000 (UTC) (envelope-from owner-svn-src-all@freebsd.org) Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D106627; Thu, 15 Nov 2012 15:06:12 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8EAFB8FC14; Thu, 15 Nov 2012 15:06:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAFF6C8k003990; Thu, 15 Nov 2012 15:06:12 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAFF6CQn003988; Thu, 15 Nov 2012 15:06:12 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201211151506.qAFF6CQn003988@svn.freebsd.org> From: Eitan Adler Date: Thu, 15 Nov 2012 15:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243079 - head/usr.bin/ministat X-SVN-Group: head MIME-Version: 1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: owner-svn-src-all@freebsd.org Sender: owner-svn-src-all@freebsd.org X-SpamScore: 0 X-MailHub-Apparently-To: mjm@michaelmeltzer.com X-MailHub-Forwarded: Yes X-BeenThere: svn-src-head@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 17:06:11 -0000 Author: eadler Date: Thu Nov 15 15:06:12 2012 New Revision: 243079 URL: http://svnweb.freebsd.org/changeset/base/243079 Log: Add option to suppress just the plot in ministat while still retaining the relative comparison (i.e., useful part). Approved by: cperciva MFC after: 3 days Modified: head/usr.bin/ministat/ministat.1 head/usr.bin/ministat/ministat.c Modified: head/usr.bin/ministat/ministat.1 ============================================================================== --- head/usr.bin/ministat/ministat.1 Thu Nov 15 15:06:09 2012 (r243078) +++ head/usr.bin/ministat/ministat.1 Thu Nov 15 15:06:12 2012 (r243079) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2010 +.Dd November 10, 2012 .Dt MINISTAT 1 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd statistics utility .Sh SYNOPSIS .Nm -.Op Fl ns +.Op Fl Ans .Op Fl C Ar column .Op Fl c Ar confidence_level .Op Fl d Ar delimiter @@ -47,6 +47,9 @@ in the specified files or, if no file is .Pp The options are as follows: .Bl -tag -width Fl +.It Fl A +Just report the statistics of the input and relative comparisons, +suppress the ASCII-art plot. .It Fl n Just report the raw statistics of the input, suppress the ASCII-art plot and the relative comparisons. Modified: head/usr.bin/ministat/ministat.c ============================================================================== --- head/usr.bin/ministat/ministat.c Thu Nov 15 15:06:09 2012 (r243078) +++ head/usr.bin/ministat/ministat.c Thu Nov 15 15:06:12 2012 (r243079) @@ -509,7 +509,7 @@ usage(char const *whine) fprintf(stderr, "%s\n", whine); fprintf(stderr, - "Usage: ministat [-C column] [-c confidence] [-d delimiter(s)] [-ns] [-w width] [file [file ...]]\n"); + "Usage: ministat [-C column] [-c confidence] [-d delimiter(s)] [-Ans] [-w width] [file [file ...]]\n"); fprintf(stderr, "\tconfidence = {"); for (i = 0; i < NCONF; i++) { fprintf(stderr, "%s%g%%", @@ -517,6 +517,7 @@ usage(char const *whine) studentpct[i]); } fprintf(stderr, "}\n"); + fprintf(stderr, "\t-A : print statistics only. suppress the graph.\n"); fprintf(stderr, "\t-C : column number to extract (starts and defaults to 1)\n"); fprintf(stderr, "\t-d : delimiter(s) string, default to \" \\t\"\n"); fprintf(stderr, "\t-n : print summary statistics only, no graph/test\n"); @@ -538,6 +539,7 @@ main(int argc, char **argv) int flag_s = 0; int flag_n = 0; int termwidth = 74; + int suppress_plot = 0; if (isatty(STDOUT_FILENO)) { struct winsize wsz; @@ -550,8 +552,11 @@ main(int argc, char **argv) } ci = -1; - while ((c = getopt(argc, argv, "C:c:d:snw:")) != -1) + while ((c = getopt(argc, argv, "AC:c:d:snw:")) != -1) switch (c) { + case 'A': + suppress_plot = 1; + break; case 'C': column = strtol(optarg, &p, 10); if (p != NULL && *p != '\0') @@ -610,7 +615,7 @@ main(int argc, char **argv) for (i = 0; i < nds; i++) printf("%c %s\n", symbol[i+1], ds[i]->name); - if (!flag_n) { + if (!flag_n && !suppress_plot) { SetupPlot(termwidth, flag_s, nds); for (i = 0; i < nds; i++) DimPlot(ds[i]); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"