Debian bug report logs - #1713
procps: manpage doesn't tell the truth

Package: procps; Reported by: joey@finlandia.Infodrom.North.DE (Martin Schulze); 11 days old.

Message received at debian-bugs:


From olis.north.de!indrom!joey Fri Oct 20 08:07:24 1995
Return-Path: <indrom!joey@olis.north.de>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t6J2Z-0002qNC; Fri, 20 Oct 95 08:07 PDT
Received: from gimli.Informatik.Uni-Oldenburg.DE by pixar.com with SMTP id AA24247
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Fri, 20 Oct 1995 08:06:56 -0700
Received: by gimli.Informatik.Uni-Oldenburg.DE (Smail3.1.22.1)
	id <m0t6HPh-00003rC>; Fri, 20 Oct 95 14:23 CET
Received: by olis.north.de (/\==/\ Smail3.1.28.1 #28.13)
	id <m0t6Fiu-0005Y1C@olis.north.de>; Fri, 20 Oct 95 12:34 MEZ
Received: at Infodrom Oldenburg (/\##/\ Smail3.1.29.1 #29.10 Joey)
	by finlandia.Infodrom.North.DE from joey (Martin Schulze) 
	id m0t6Fjt-000K0ZC; Fri, 20 Oct 95 12:35 MET
Message-Id: <m0t6Fjt-000K0ZC@finlandia.Infodrom.North.DE>
Date: Fri, 20 Oct 95 12:35 MET
From: joey@finlandia.Infodrom.North.DE (Martin Schulze)
To: debian-bugs@pixar.com
Subject: procps: manpage doesn't tell the truth


Package: procps
Version: 0.97
Package_Revision: 4

The manpage ps(1) tells us:

------------------------------- happs 8<------------------------------
COMMAND-LINE OPTIONS
       Command line arguments may optionally be  preceeded  by  a
       '-',  but  there  is  no need for it.  There are also some
       "long options" in GNU style; see below for those.

       (..)

       w    wide  output:  don't truncate command lines to fit on
            one line.
------------------------------- happs 8<------------------------------

But ps does something else. You may specify up to three 'w's in the
command line and you'll only understand the behaviour if you look at
the code:

------------------------------- happs 8<------------------------------
int set_maxcmd(int w_opts)
{
    struct winsize win;

    maxcols = 80;
    if (ioctl(1, TIOCGWINSZ, &win) != -1 && win.ws_col > 0)
        maxcols = win.ws_col;

    switch (w_opts) {
        case 0: break;
        case 1: maxcols += 52; break;
        case 2: maxcols *= 2; break;
        default: maxcols = MAXCMD;
    }
    return maxcols - strlen(hdrs[CL_fmt]) + 7;
}
------------------------------- happs 8<------------------------------

I would recommend a) change the manpage entry or b) change the whole
handling of 'w'-processing. If the maintainer is interested, I can
send him a patch for the latter

Regards,

	Joey

--
   / Martin Schulze  *  joey@infodrom.north.de  *  26129 Oldenburg /
  / +49-441-777884  *  Login&Passwd: nuucp  *  Index: ~/ls-lR.gz  /
 /                                     http://home.pages.de/~joey/
/ Linux - the choice of a GNU generation                        /
----------------------------------------------------------------
30.10.95: Oldenburger Linux-Stammtisch, ab 20h im DaCapo

Acknowledgement sent to joey@finlandia.Infodrom.North.DE (Martin Schulze):
New bug report received and forwarded. Full text available.
Report forwarded to debian-devel@pixar.com:
Bug#1713; Package procps. Full text available.
Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov