From owner-freebsd-current@FreeBSD.ORG Tue Oct 26 00:43:15 2010 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3559E1065670 for ; Tue, 26 Oct 2010 00:43:15 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id CA2EC8FC0C for ; Tue, 26 Oct 2010 00:43:13 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id C9C11A6895D; Tue, 26 Oct 2010 08:43:12 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id Nn4ALQ479qMx; Tue, 26 Oct 2010 08:43:06 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 1825CA68770; Tue, 26 Oct 2010 08:43:04 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:subject:x-enigmail-version:openpgp:content-type; b=oEWbhC1e/UNz87uJEjSQOtPicvBhW+M8lM+yCTrUYytr4Lqv+dNVk3kdQNm6Um0I3 KgfRfu9FOJFGtqEZwgq7A== Message-ID: <4CC62413.50703@delphij.net> Date: Mon, 25 Oct 2010 17:42:59 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.14) Gecko/20101020 Thunderbird/3.0.9 ThunderBrowse/3.3.2 MIME-Version: 1.0 To: FreeBSD Current X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: multipart/mixed; boundary="------------000908090201000405040400" Cc: Subject: [PATCH] top(1) inverse display of table header X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 00:43:15 -0000 This is a multi-part message in MIME format. --------------000908090201000405040400 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, Here is a patch that makes top(1) to inverse its table header (PID USERNAME THR, etc). Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQEcBAEBCAAGBQJMxiQSAAoJEATO+BI/yjfBbcgH/iy/y0MBHY++srGtZc5BqyWm Kh0jpRKdE1f7G708Zok501b3rbVqeXTqAHcBU/xA0JNRruTYn7ByU2kijsuMBeQC eB6LK8wurtLHu+kqBzbbgmyeUIonWht25RWrqXH1Hr1zSoTmpAOdQKz0RCoQu2W5 yeJyS9geQoZXaTTbxHrCpYbUjQ2vp6+gvBVhi5n7c4lT0wBZJ/7p1LJOu2DiGHVO TWlBh+SjKoZWrLt7LqxU/dyJ6kxpl3RVNBlRlIvL/jn/ICBBhgSfldzpckAQJ/Bt IgPTfiKjax+38RH3L62ob9B99nPF5V7Jc3JKTWdDCuJren8MH0zdtC1zM4KG8NA= =6RQi -----END PGP SIGNATURE----- --------------000908090201000405040400 Content-Type: text/plain; name="top.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="top.diff" SW5kZXg6IGNvbnRyaWIvdG9wL2Rpc3BsYXkuYwo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT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PSBFUkFTRSkKSW5kZXg6IGNvbnRyaWIvdG9wL3RvcC5oCj09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT0KLS0tIGNvbnRyaWIvdG9wL3RvcC5oCShyZXZpc2lvbiAyMTQzNTUpCisrKyBjb250 cmliL3RvcC90b3AuaAkod29ya2luZyBjb3B5KQpAQCAtMTQsNyArMTQsNyBAQAogZXh0ZXJu IGludCBIZWFkZXJfbGluZXM7CS8qIDcgKi8KIAogLyogTWF4aW11bSBudW1iZXIgb2YgY29s dW1ucyBhbGxvd2VkIGZvciBkaXNwbGF5ICovCi0jZGVmaW5lIE1BWF9DT0xTCTEyOAorI2Rl ZmluZSBNQVhfQ09MUwk1MTIKIAogLyogTG9nIGJhc2UgMiBvZiAxMDI0IGlzIDEwICgyXjEw ID09IDEwMjQpICovCiAjZGVmaW5lIExPRzEwMjQJCTEwCg== --------------000908090201000405040400--