Date: Tue, 22 May 2018 11:18:16 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> To: =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= <dumbbell@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333995 - head/sys/teken Message-ID: <20180522110110.H1292@besplex.bde.org> In-Reply-To: <201805212035.w4LKZH0e091649@repo.freebsd.org> References: <201805212035.w4LKZH0e091649@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 21 May 2018, [UTF-8] Jean-S=C3=A9bastien P=C3=A9dron wrote: > Log: > teken: Rename the "Set Cursor Style" sequence to match vt100.net docs > > This fixes inconsistencies with the rest of the `sequences` file. > > No functional changes. > > Requested by:=09ed >=20 > Modified: head/sys/teken/sequences > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/teken/sequences=09Mon May 21 20:23:04 2018=09(r333994) > +++ head/sys/teken/sequences=09Mon May 21 20:35:16 2018=09(r333995) > @@ -48,7 +48,7 @@ CUF=09Cursor Forward=09=09=09=09^[ [ a=09=09n > CUP=09Cursor Position=09=09=09=09^[ [ H=09=09n n > CUP=09Cursor Position=09=09=09=09^[ [ f=09=09n n > CUU=09Cursor Up=09=09=09=09^[ [ A=09=09n > -CS=09Cursor style=09=09=09=09^[ [ SP q=09r > +DECSCUSR=09Set Cursor Style=09=09^[ [ SP q=09r > DA1=09Primary Device Attributes=09=09^[ [ c=09=09r > DA2=09Secondary Device Attributes=09=09^[ [ > c=09r > DC=09Delete character=09=09=09^[ [ P=09=09n Any chance of keeping this file sorted? DECSCUSR is a verbose yet cryptic abbreviation which is not even expanded its name. It is the only abbreviation longer than 7 characters. This mess= es up the souce formatting. Not expanding DEC in the name is normal, but other letters are normally expanded. I don't know what USR is. It looks like a bad abbreviation for "user". 'S' in it might mean style. > Modified: head/sys/teken/teken_subr.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/teken/teken_subr.h=09Mon May 21 20:23:04 2018=09(r333994) > +++ head/sys/teken/teken_subr.h=09Mon May 21 20:35:16 2018=09(r333995) > @@ -372,7 +372,7 @@ teken_subr_cursor_up(teken_t *t, unsigned int nrows) > } > > static void > -teken_subr_cursor_style(teken_t *t, unsigned int style) > +teken_subr_set_cursor_style(teken_t *t, unsigned int style) > { > > =09/* TODO */ Names must be chosen carefully since they become function names which tend to be long and ugly. This one is not long but is a bit to generic. The worst function name double_height_double_width_line_bottom() has one of the best abbreviations (DECDHL). DEC is mercifully not spelled out in the function name, and Double Width Bottom is omitted from the abbreviation. Bruce From owner-svn-src-head@freebsd.org Tue May 22 02:13:06 2018 Return-Path: <owner-svn-src-head@freebsd.org> Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67205EB1EDA; Tue, 22 May 2018 02:13:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1375B7CBE1; Tue, 22 May 2018 02:13:06 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDF985B1C; Tue, 22 May 2018 02:13:05 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4M2D5LC063915; Tue, 22 May 2018 02:13:05 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4M2D5Kr063911; Tue, 22 May 2018 02:13:05 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201805220213.w4M2D5Kr063911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler <eadler@FreeBSD.org> Date: Tue, 22 May 2018 02:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334010 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 334010 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 22 May 2018 02:13:06 -0000 Author: eadler Date: Tue May 22 02:13:04 2018 New Revision: 334010 URL: https://svnweb.freebsd.org/changeset/base/334010 Log: top(1): unbreak build with gcc7; fix varargs - use correct function for varargs argument - allow build to complete with gcc7 at current WARNS Reported by: jhibbits, ian Modified: head/usr.bin/top/commands.c head/usr.bin/top/display.c head/usr.bin/top/machine.c head/usr.bin/top/top.c Modified: head/usr.bin/top/commands.c ============================================================================== --- head/usr.bin/top/commands.c Tue May 22 00:45:00 2018 (r334009) +++ head/usr.bin/top/commands.c Tue May 22 02:13:04 2018 (r334010) @@ -129,11 +129,7 @@ next_field(char *str) } static int -scanint(str, intp) - -char *str; -int *intp; - +scanint(char *str, int *intp) { int val = 0; char ch; Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Tue May 22 00:45:00 2018 (r334009) +++ head/usr.bin/top/display.c Tue May 22 02:13:04 2018 (r334010) @@ -1011,7 +1011,7 @@ new_message(int type, char *msgfmt, ...) va_start(args, msgfmt); /* first, format the message */ - snprintf(next_msg, sizeof(next_msg), msgfmt, args); + vsnprintf(next_msg, sizeof(next_msg), msgfmt, args); va_end(args); Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Tue May 22 00:45:00 2018 (r334009) +++ head/usr.bin/top/machine.c Tue May 22 02:13:04 2018 (r334010) @@ -762,7 +762,6 @@ get_process_info(struct system_info *si, struct proces int show_self; int show_system; int show_uid; - int show_command; int show_kidle; /* @@ -832,7 +831,6 @@ get_process_info(struct system_info *si, struct proces show_self = sel->self == -1; show_system = sel->system; show_uid = sel->uid[0] != -1; - show_command = sel->command != NULL; show_kidle = sel->kidle; /* count up process states and get pointers to interesting procs */ @@ -984,8 +982,7 @@ format_next_process(caddr_t xhandle, char *(*get_useri break; default: - if (state >= 0 && - state < sizeof(state_abbrev) / sizeof(*state_abbrev)) + if (state < sizeof(state_abbrev) / sizeof(*state_abbrev)) sprintf(status, "%.6s", state_abbrev[state]); else sprintf(status, "?%5zu", state); Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Tue May 22 00:45:00 2018 (r334009) +++ head/usr.bin/top/top.c Tue May 22 02:13:04 2018 (r334010) @@ -94,7 +94,7 @@ static void (*d_process)(int line, char *thisline) = i static void reset_display(void); static void -reset_uids() +reset_uids(void) { for (size_t i = 0; i < TOP_MAX_UIDS; ++i) ps.uid[i] = -1; @@ -198,11 +198,7 @@ end: } int -main(argc, argv) - -int argc; -char *argv[]; - +main(int argc, char *argv[]) { int i; int active_procs;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180522110110.H1292>