CVS commit: src/usr.bin/window
Module Name:src Committed By: jakllsch Date: Sat Aug 13 14:02:48 UTC 2011 Modified Files: src/usr.bin/window: main.c window.1 Log Message: Sort (and synchronize) option list and `SYNOPSIS' section in manpage, as well as the program's `usage'-line; also some other minor changes. From Snader_LB. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/window/main.c cvs rdiff -u -r1.21 -r1.22 src/usr.bin/window/window.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/main.c diff -u src/usr.bin/window/main.c:1.15 src/usr.bin/window/main.c:1.16 --- src/usr.bin/window/main.c:1.15 Tue Apr 14 08:50:06 2009 +++ src/usr.bin/window/main.c Sat Aug 13 14:02:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.15 2009/04/14 08:50:06 lukem Exp $ */ +/* $NetBSD: main.c,v 1.16 2011/08/13 14:02:48 jakllsch Exp $ */ /* * Copyright (c) 1983, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)main.c 8.2 (Berkeley) 4/2/94; #else -__RCSID($NetBSD: main.c,v 1.15 2009/04/14 08:50:06 lukem Exp $); +__RCSID($NetBSD: main.c,v 1.16 2011/08/13 14:02:48 jakllsch Exp $); #endif #endif /* not lint */ @@ -194,7 +194,7 @@ usage(void) { (void) fprintf(stderr, - usage: %s [-e escape-char] [-c command] [-t] [-f] [-d]\n, + usage: %s [-d] [-f] [-t] [-c command] [-e escape-char]\n, getprogname()); exit(1); } Index: src/usr.bin/window/window.1 diff -u src/usr.bin/window/window.1:1.21 src/usr.bin/window/window.1:1.22 --- src/usr.bin/window/window.1:1.21 Thu Mar 10 13:23:41 2011 +++ src/usr.bin/window/window.1 Sat Aug 13 14:02:48 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: window.1,v 1.21 2011/03/10 13:23:41 jmmv Exp $ +.\ $NetBSD: window.1,v 1.22 2011/08/13 14:02:48 jakllsch Exp $ .\ .\ Copyright (c) 1985, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\ .\ @(#)window.1 8.2 (Berkeley) 12/30/93 .\ -.Dd March 10, 2011 +.Dd August 13, 2011 .Dt WINDOW 1 .Os .Sh NAME @@ -40,11 +40,11 @@ .Nd window environment .Sh SYNOPSIS .Nm -.Op Fl t -.Op Fl f .Op Fl d -.Op Fl e Ar escape-char +.Op Fl f +.Op Fl t .Op Fl c Ar command +.Op Fl e Ar escape-char .Sh DESCRIPTION .Nm implements a window environment on @@ -61,9 +61,7 @@ .Nm . Use .Xr tmux 1 -instead or install the -.Sq misc/window -package from +instead, or install the misc/window package from .Xr pkgsrc 7 . .Pp A window is a rectangular portion of the physical terminal @@ -90,20 +88,25 @@ If it does not exist, two equal sized windows spanning the terminal screen are created by default. .Pp -The command line options are +The command-line options are: .Bl -tag -width Fl -.It Fl t -Turn on terse mode (see -.Ic terse -command below). -.It Fl f -Fast. -Don't perform any startup action. .It Fl d Ignore .Pa .windowrc and create the two default windows instead. +.It Fl f +Fast. +Don't perform any startup action. +.It Fl t +Turn on terse mode (see +.Ic terse +command below). +.It Fl c Ar command +Execute the string +.Ar command +as a long command (see below) +before doing anything else. .It Fl e Ar escape-char Set the escape character to .Ar escape-char . @@ -114,11 +117,6 @@ .Ar X is any character, meaning .No control\- Ns Ar X . -.It Fl c Ar command -Execute the string -.Ar command -as a long command (see below) -before doing anything else. .El .Pp Windows can overlap and are framed as necessary.
CVS commit: src/usr.bin/window
Module Name:src Committed By: wiz Date: Sat Aug 13 14:11:16 UTC 2011 Modified Files: src/usr.bin/window: main.c window.1 Log Message: Sort options and option descriptions, and sync usage. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/window/main.c cvs rdiff -u -r1.22 -r1.23 src/usr.bin/window/window.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/main.c diff -u src/usr.bin/window/main.c:1.16 src/usr.bin/window/main.c:1.17 --- src/usr.bin/window/main.c:1.16 Sat Aug 13 14:02:48 2011 +++ src/usr.bin/window/main.c Sat Aug 13 14:11:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.16 2011/08/13 14:02:48 jakllsch Exp $ */ +/* $NetBSD: main.c,v 1.17 2011/08/13 14:11:16 wiz Exp $ */ /* * Copyright (c) 1983, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = @(#)main.c 8.2 (Berkeley) 4/2/94; #else -__RCSID($NetBSD: main.c,v 1.16 2011/08/13 14:02:48 jakllsch Exp $); +__RCSID($NetBSD: main.c,v 1.17 2011/08/13 14:11:16 wiz Exp $); #endif #endif /* not lint */ @@ -194,7 +194,7 @@ usage(void) { (void) fprintf(stderr, - usage: %s [-d] [-f] [-t] [-c command] [-e escape-char]\n, + usage: %s [-dft] [-c command] [-e escape-char]\n, getprogname()); exit(1); } Index: src/usr.bin/window/window.1 diff -u src/usr.bin/window/window.1:1.22 src/usr.bin/window/window.1:1.23 --- src/usr.bin/window/window.1:1.22 Sat Aug 13 14:02:48 2011 +++ src/usr.bin/window/window.1 Sat Aug 13 14:11:16 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: window.1,v 1.22 2011/08/13 14:02:48 jakllsch Exp $ +.\ $NetBSD: window.1,v 1.23 2011/08/13 14:11:16 wiz Exp $ .\ .\ Copyright (c) 1985, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -40,9 +40,7 @@ .Nd window environment .Sh SYNOPSIS .Nm -.Op Fl d -.Op Fl f -.Op Fl t +.Op Fl dft .Op Fl c Ar command .Op Fl e Ar escape-char .Sh DESCRIPTION @@ -61,7 +59,9 @@ .Nm . Use .Xr tmux 1 -instead, or install the misc/window package from +instead, or install the +.Pa pkgsrc/misc/window +package from .Xr pkgsrc 7 . .Pp A window is a rectangular portion of the physical terminal @@ -90,23 +90,16 @@ .Pp The command-line options are: .Bl -tag -width Fl -.It Fl d -Ignore -.Pa .windowrc -and create the two default -windows instead. -.It Fl f -Fast. -Don't perform any startup action. -.It Fl t -Turn on terse mode (see -.Ic terse -command below). .It Fl c Ar command Execute the string .Ar command as a long command (see below) before doing anything else. +.It Fl d +Ignore +.Pa .windowrc +and create the two default +windows instead. .It Fl e Ar escape-char Set the escape character to .Ar escape-char . @@ -117,6 +110,13 @@ .Ar X is any character, meaning .No control\- Ns Ar X . +.It Fl f +Fast. +Don't perform any startup action. +.It Fl t +Turn on terse mode (see +.Ic terse +command below). .El .Pp Windows can overlap and are framed as necessary.
CVS commit: src/usr.bin/window
Module Name:src Committed By: mrg Date: Wed Jun 22 06:23:07 UTC 2011 Modified Files: src/usr.bin/window: string.c Log Message: don't bother casting the return value of malloc. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/window/string.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/string.c diff -u src/usr.bin/window/string.c:1.10 src/usr.bin/window/string.c:1.11 --- src/usr.bin/window/string.c:1.10 Tue Apr 14 08:50:06 2009 +++ src/usr.bin/window/string.c Wed Jun 22 06:23:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: string.c,v 1.10 2009/04/14 08:50:06 lukem Exp $ */ +/* $NetBSD: string.c,v 1.11 2011/06/22 06:23:07 mrg Exp $ */ /* * Copyright (c) 1983, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)string.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: string.c,v 1.10 2009/04/14 08:50:06 lukem Exp $); +__RCSID($NetBSD: string.c,v 1.11 2011/06/22 06:23:07 mrg Exp $); #endif #endif /* not lint */ @@ -124,7 +124,7 @@ { struct string *s; - s = (struct string *) malloc(l + str_offset); + s = malloc(l + str_offset); if (s == 0) return 0; if (str_head.s_forw == 0)
CVS commit: src/usr.bin/window
Module Name:src Committed By: jmmv Date: Thu Mar 10 13:23:41 UTC 2011 Modified Files: src/usr.bin/window: window.1 Log Message: Note that window(1) will go away after netbsd-6 is branched. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/usr.bin/window/window.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/window.1 diff -u src/usr.bin/window/window.1:1.20 src/usr.bin/window/window.1:1.21 --- src/usr.bin/window/window.1:1.20 Fri Apr 23 22:04:37 2010 +++ src/usr.bin/window/window.1 Thu Mar 10 13:23:41 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: window.1,v 1.20 2010/04/23 22:04:37 joerg Exp $ +.\ $NetBSD: window.1,v 1.21 2011/03/10 13:23:41 jmmv Exp $ .\ .\ Copyright (c) 1985, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\ .\ @(#)window.1 8.2 (Berkeley) 12/30/93 .\ -.Dd June 25, 2009 +.Dd March 10, 2011 .Dt WINDOW 1 .Os .Sh NAME @@ -51,6 +51,21 @@ .Tn ASCII terminals. .Pp +Please note that +.Nm +is scheduled for removal on +.Nx 7.0 . +This is the last +.Nx +release that provides +.Nm . +Use +.Xr tmux 1 +instead or install the +.Sq misc/window +package from +.Xr pkgsrc 7 . +.Pp A window is a rectangular portion of the physical terminal screen associated with a set of processes. Its size and position can be changed by the user at any time. @@ -963,6 +978,8 @@ .Ed .Sh DIAGNOSTICS Should be self explanatory. +.Sh SEE ALSO +.Xr tmux 1 .Sh HISTORY The .Nm
CVS commit: src/usr.bin/window
Module Name:src Committed By: jmmv Date: Wed Mar 9 17:32:03 UTC 2011 Added Files: src/usr.bin/window: export.sh Log Message: Add a script to generate a distfile of window from the verbatim sources on cvs. This will be used for the upcoming pkgsrc package of window. I am not copying the code to othersrc because I want to keep things as simple as possible for now. When we remove window from src, the code will be moved to othersrc and any improvements (such as autoconfification) can be done there. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/usr.bin/window/export.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/usr.bin/window/export.sh diff -u /dev/null src/usr.bin/window/export.sh:1.1 --- /dev/null Wed Mar 9 17:32:03 2011 +++ src/usr.bin/window/export.sh Wed Mar 9 17:32:03 2011 @@ -0,0 +1,77 @@ +#! /bin/sh +# +# Copyright (c) 2011 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND +# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# +# This script exports a fresh copy of the window(1) sources from cvs and +# generates a distfile for them. You can later upload the resulting +# distfile to the NetBSD ftp site and update the pkgsrc/misc/window package. +# +# To generate a distfile, tag the sources in this directory with a tag of +# the form window-MMDD and then run this script providing the same tag +# name as the first argument and a target directory as the second argument. +# +# Example: +# src/usr.bin/window$ cvs tag window-20110309 +# src/usr.bin/window$ ./export.sh window-20110309 /tmp +# + +set -e + +ProgName=${0##*/} + +err() { + echo ${ProgName}: ${@} 12 + exit 1 +} + +usage_error() { + echo Usage: ${ProgName} tag-name target-directory + echo Example: ${ProgName} window-20110309 /tmp + exit 1 +} + +main() { + [ -f wwopen.c ] || err Must be run from window's source directory + + [ -d CVS ] || err Must be run from window's CVS source directory + local root=$(cat CVS/Root) + + [ ${#} -eq 2 ] || usage_error + local tag=${1}; shift + local directory=${1}; shift + + local distname=${tag} + + cd ${directory} + cvs -d ${root} export -r ${tag} -d ${distname} src/usr.bin/window + rm -f ${distname}/${ProgName} + tar czf ${distname}.tar.gz ${distname} + rm -rf ${distname} + cd - +} + +main ${@}
CVS commit: src/usr.bin/window
Module Name:src Committed By: joerg Date: Fri Apr 23 22:04:37 UTC 2010 Modified Files: src/usr.bin/window: window.1 Log Message: \\ - \e Drop redundant .Ic. Add explicit empty argument for intentionally empty bracket and parenthesis. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/window/window.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/window.1 diff -u src/usr.bin/window/window.1:1.19 src/usr.bin/window/window.1:1.20 --- src/usr.bin/window/window.1:1.19 Wed Aug 19 15:17:05 2009 +++ src/usr.bin/window/window.1 Fri Apr 23 22:04:37 2010 @@ -1,4 +1,4 @@ -.\ $NetBSD: window.1,v 1.19 2009/08/19 15:17:05 joerg Exp $ +.\ $NetBSD: window.1,v 1.20 2010/04/23 22:04:37 joerg Exp $ .\ .\ Copyright (c) 1985, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -401,7 +401,7 @@ .Dq \er a carriage return). For example, these are legal strings: -abcde01234, \*[Am]#$^*\*[Am]#, ab$#cd, ab\\$\\#cd, /usr/ucb/window. +abcde01234, \*[Am]#$^*\*[Am]#, ab$#cd, ab\e$\e#cd, /usr/ucb/window. .Pp A number is an integer value in one of three forms: a decimal number, an octal number preceded by @@ -480,7 +480,7 @@ .Aq Va expr2 . Returns the value of .Aq Va expr2 . -.It Ao Va expr1 Ac Ic \? Ao Va expr2 Ac Ic : Ao Va expr3 Ac +.It Ao Va expr1 Ac Ic \? Ao Va expr2 Ac : Ao Va expr3 Ac Returns the value of .Aq Va expr2 if @@ -628,7 +628,7 @@ .Ss Builtin Functions The arguments are listed by name in their natural order. Optional arguments are in square brackets -.Sq Op . +.Sq Op Arguments that have no names are in angle brackets .Sq \*[Lt]\*[Gt] . @@ -778,7 +778,7 @@ .Ar label is no change. To turn off a label, set it to an empty string (). -.It Ic list Ns Pq +.It Ic list Ns Pq No arguments. List the identifiers and labels of all windows. No value is returned. @@ -819,7 +819,7 @@ .Ar variable does not exist, 0 otherwise. -.It Ic variables Ns Pq +.It Ic variables Ns Pq No arguments. List all variables. No value is returned. @@ -958,7 +958,7 @@ the remaining two thirds of the screen and run the default shell: .Bd -literal -window r=1, nr=$nrow/3-1, l=tcpdump\\ pcn0, sh=tcpdump \\-ni pcn0 +window r=1, nr=$nrow/3-1, l=tcpdump\e pcn0, sh=tcpdump \e-ni pcn0 window r=$nrow/3, nr=2*$nrow/3+1 .Ed .Sh DIAGNOSTICS
CVS commit: src/usr.bin/window
Module Name:src Committed By: joerg Date: Wed Aug 19 15:17:05 UTC 2009 Modified Files: src/usr.bin/window: window.1 Log Message: Don't use .Xo/.Xc. Fix markup of alias command. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/window/window.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/window.1 diff -u src/usr.bin/window/window.1:1.18 src/usr.bin/window/window.1:1.19 --- src/usr.bin/window/window.1:1.18 Thu Jun 25 23:20:55 2009 +++ src/usr.bin/window/window.1 Wed Aug 19 15:17:05 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: window.1,v 1.18 2009/06/25 23:20:55 wiz Exp $ +.\ $NetBSD: window.1,v 1.19 2009/08/19 15:17:05 joerg Exp $ .\ .\ Copyright (c) 1985, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -471,11 +471,7 @@ .Pp The operators in order of increasing precedence: .Bl -tag -width Fl -.It Xo -.Aq Va expr1 -.Ic = -.Aq Va expr2 -.Xc +.It Ao Va expr1 Ac Ic = Ao Va expr2 Ac Assignment. The variable of name .Aq Va expr1 , @@ -484,13 +480,7 @@ .Aq Va expr2 . Returns the value of .Aq Va expr2 . -.It Xo -.Aq Va expr1 -.Ic \? -.Aq Va expr2 -.Ic : -.Aq Va expr3 -.Xc +.It Ao Va expr1 Ac Ic \? Ao Va expr2 Ac Ic : Ao Va expr3 Ac Returns the value of .Aq Va expr2 if @@ -507,11 +497,7 @@ .Aq Va Expr1 must be numeric. -.It Xo -.Aq Va expr1 -.Ic \|\| -.Aq Va expr2 -.Xc +.It Ao Va expr1 Ac Ic \|\| Ao Va expr2 Ac Logical or. Numeric values only. Short circuit evaluation is supported @@ -520,70 +506,33 @@ evaluates true, then .Aq Va expr2 is not evaluated). -.It Xo -.Aq Va expr1 -.Ic \\*[Am]\\*[Am] -.Aq Va expr2 -.Xc +.It Ao Va expr1 Ac Ic \\*[Am]\\*[Am] Ao Va expr2 Ac Logical and with short circuit evaluation. Numeric values only. -.It Xo -.Aq Va expr1 -.Ic \| -.Aq Va expr2 -.Xc +.It Ao Va expr1 Ac Ic \| Ao Va expr2 Ac Bitwise or. Numeric values only. -.It Xo -.Aq Va expr1 -.Ic ^ -.Aq Va expr2 -.Xc +.It Ao Va expr1 Ac Ic ^ Ao Va expr2 Ac Bitwise exclusive or. Numeric values only. -.It Xo -.Aq Va expr1 -.Ic \\*[Am] -.Aq Va expr2 -.Xc +.It Ao Va expr1 Ac Ic \\*[Am] Ao Va expr2 Ac Bitwise and. Numeric values only. -.It Xo -.Aq Va expr1 -.Ic == -.Aq Va expr2 , -.Aq Va expr1 -.Ic != -.Aq expr2 -.Xc +.It Ao Va expr1 Ac Ic == Ao Va expr2 Ac , Ao Va expr1 Ac Ic != Ao expr2 Ac Comparison (equal and not equal, respectively). The boolean result (either 1 or 0) of the comparison is returned. The operands can be numeric or string valued. One string operand forces the other to be converted to a string in necessary. -.It Xo -.Aq Va expr1 -.Ic \*[Lt] -.Aq Va expr2 , -.Aq Va expr1 -.Ic \*[Gt] -.Aq Va expr2 , -.Aq Va expr1 -.Ic \*[Le] -.Aq Va expr2 , -.Xc +.It Ao Va expr1 Ac Ic \*[Lt] Ao Va expr2 Ac , \ +Ao Va expr1 Ac Ic \*[Gt] Ao Va expr2 Ac , \ +Ao Va expr1 Ac Ic \*[Le] Ao Va expr2 Ac , Less than, greater than, less than or equal to, greater than or equal to. Both numeric and string values, with automatic conversion as above. -.It Xo -.Aq Va expr1 -.Ic \*[Lt]\*[Lt] -.Aq Va expr2 , -.Aq Va expr1 -.Ic \*[Gt]\*[Gt] -.Aq Va expr2 -.Xc +.It Ao Va expr1 Ac Ic \*[Lt]\*[Lt] Ao Va expr2 Ac , \ +Ao Va expr1 Ac Ic \*[Gt]\*[Gt] Ao Va expr2 Ac If both operands are numbers, .Aq Va expr1 is bit @@ -600,40 +549,19 @@ .Aq Va expr2 is also a string, then its length is used in place of its value). -.It Xo -.Aq Va expr1 -.Ic + -.Aq Va expr2 , -.Aq Va expr1 -.Ic - -.Aq Va expr2 -.Xc +.It Ao Va expr1 Ac Ic + Ao Va expr2 Ac , Ao Va expr1 Ac Ic - Ao Va expr2 Ac Addition and subtraction on numbers. For .Dq + , if one argument is a string, then the other is converted to a string, and the result is the concatenation of the two strings. -.It Xo -.Aq Va expr1 -.Ic \* -.Aq Va expr2 , -.Aq Va expr1 -.Ic \/ -.Aq Va expr2 , -.Aq Va expr1 -.Ic \% -.Aq Va expr2 -.Xc +.It Ao Va expr1 Ac Ic \* Ao Va expr2 Ac , \ +Ao Va expr1 Ac Ic \/ Ao Va expr2 Ac , Ao Va expr1 Ac Ic \% Ao Va expr2 Ac Multiplication, division, modulo. Numbers only. -.It Xo -.Ic \- Ns Aq Va expr , -.Ic ~ Ns Aq Va expr , -.Ic \! Ns Aq Va expr , -.Ic \$ Ns Aq Va expr , -.Ic \$? Ns Aq Va expr -.Xc +.It Ic \- Ns Ao Va expr Ac , Ic ~ Ns Ao Va expr Ac , \ +Ic \! Ns Ao Va expr Ac , Ic \$ Ns Ao Va expr Ac , Ic \$? Ns Ao Va expr Ac The first three are unary minus, bitwise complement and logical complement on numbers only. The operator, @@ -654,9 +582,7 @@ .Aq Va expr , and returns 1 if it exists or 0 otherwise. -.It Xo -.Ao Va expr Ac Ns Pq Aq Ar arglist -.Xc +.It Ao Va expr Ac Ns Pq Aq Ar arglist Function call. .Aq Va Expr must be a string that is the unique @@ -720,10 +646,7 @@ obvious meanings, or it can be a numeric expression, in which case a non-zero value is true. .Bl -tag -width Fl -.It Xo -.Ic alias Ns Po Bq Aq Ar string , -.Bq Aq Ar string\-list Pc -.Xc +.It Ic alias Ns Po Bo Ao Ar string Ac Bc , Bo Ao Ar string\-list Ac Bc Pc If no argument is
CVS commit: src/usr.bin/window
Module Name:src Committed By: wiz Date: Fri Aug 7 13:53:54 UTC 2009 Modified Files: src/usr.bin/window: wwterminfo.c Log Message: Add missing parenthesis in commented out code. From Henning Petersen in PR 41838. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/window/wwterminfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/wwterminfo.c diff -u src/usr.bin/window/wwterminfo.c:1.5 src/usr.bin/window/wwterminfo.c:1.6 --- src/usr.bin/window/wwterminfo.c:1.5 Thu Aug 7 11:17:45 2003 +++ src/usr.bin/window/wwterminfo.c Fri Aug 7 13:53:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: wwterminfo.c,v 1.5 2003/08/07 11:17:45 agc Exp $ */ +/* $NetBSD: wwterminfo.c,v 1.6 2009/08/07 13:53:54 wiz Exp $ */ /* * Copyright (c) 1982, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)wwterminfo.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: wwterminfo.c,v 1.5 2003/08/07 11:17:45 agc Exp $); +__RCSID($NetBSD: wwterminfo.c,v 1.6 2009/08/07 13:53:54 wiz Exp $); #endif #endif /* not lint */ @@ -73,7 +73,7 @@ /* make the directory */ (void) sprintf(wwterminfopath, %swwinXX, _PATH_TMP); - if (mkdtemp(wwterminfopath) == NULL) || + if ((mkdtemp(wwterminfopath) == NULL) || chmod(wwterminfopath, 0755) 0) { wwerrno = WWE_SYS; return -1;
CVS commit: src/usr.bin/window
Module Name:src Committed By: hubertf Date: Thu Jun 25 21:48:49 UTC 2009 Modified Files: src/usr.bin/window: window.1 Log Message: Add an example .windowrc To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/window/window.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/window.1 diff -u src/usr.bin/window/window.1:1.16 src/usr.bin/window/window.1:1.17 --- src/usr.bin/window/window.1:1.16 Tue Mar 10 21:18:35 2009 +++ src/usr.bin/window/window.1 Thu Jun 25 21:48:49 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: window.1,v 1.16 2009/03/10 21:18:35 joerg Exp $ +.\ $NetBSD: window.1,v 1.17 2009/06/25 21:48:49 hubertf Exp $ .\ .\ Copyright (c) 1985, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\ .\ @(#)window.1 8.2 (Berkeley) 12/30/93 .\ -.Dd December 30, 1993 +.Dd June 25, 2009 .Dt WINDOW 1 .Os .Sh NAME @@ -1048,6 +1048,18 @@ .It Pa /dev/[pt]ty[pq]? pseudo-terminal devices. .El +.Sh EXAMPLES +The following example +.Pa ~/.windowrc +will open two windows. +The upper one will take one third of the screen +and run tcpdump, the lower one will take +the remaining two thirds of the screen and run +the default shell: +.Bd -literal -offset +window r=1, nr=$nrow/3-1, l=tcpdump\\ pcn0, sh=tcpdump \\-ni pcn0 +window r=$nrow/3, nr=2*$nrow/3+1 +.Ed .Sh DIAGNOSTICS Should be self explanatory. .Sh HISTORY
CVS commit: src/usr.bin/window
Module Name:src Committed By: wiz Date: Thu Jun 25 23:20:55 UTC 2009 Modified Files: src/usr.bin/window: window.1 Log Message: Remove trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/window/window.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/window.1 diff -u src/usr.bin/window/window.1:1.17 src/usr.bin/window/window.1:1.18 --- src/usr.bin/window/window.1:1.17 Thu Jun 25 21:48:49 2009 +++ src/usr.bin/window/window.1 Thu Jun 25 23:20:55 2009 @@ -1,4 +1,4 @@ -.\ $NetBSD: window.1,v 1.17 2009/06/25 21:48:49 hubertf Exp $ +.\ $NetBSD: window.1,v 1.18 2009/06/25 23:20:55 wiz Exp $ .\ .\ Copyright (c) 1985, 1990, 1993 .\ The Regents of the University of California. All rights reserved. @@ -1051,12 +1051,12 @@ .Sh EXAMPLES The following example .Pa ~/.windowrc -will open two windows. -The upper one will take one third of the screen +will open two windows. +The upper one will take one third of the screen and run tcpdump, the lower one will take the remaining two thirds of the screen and run the default shell: -.Bd -literal -offset +.Bd -literal -offset window r=1, nr=$nrow/3-1, l=tcpdump\\ pcn0, sh=tcpdump \\-ni pcn0 window r=$nrow/3, nr=2*$nrow/3+1 .Ed
CVS commit: src/usr.bin/window
Module Name:src Committed By: christos Date: Fri Jun 12 15:19:52 UTC 2009 Modified Files: src/usr.bin/window: ttgeneric.c Log Message: PR/41581: Der mouse: window SEGV with certain terminals. does strcmp first and then checks for null pointer for underline and bold. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/window/ttgeneric.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/ttgeneric.c diff -u src/usr.bin/window/ttgeneric.c:1.10 src/usr.bin/window/ttgeneric.c:1.11 --- src/usr.bin/window/ttgeneric.c:1.10 Tue Apr 14 04:50:06 2009 +++ src/usr.bin/window/ttgeneric.c Fri Jun 12 11:19:52 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ttgeneric.c,v 1.10 2009/04/14 08:50:06 lukem Exp $ */ +/* $NetBSD: ttgeneric.c,v 1.11 2009/06/12 15:19:52 christos Exp $ */ /* * Copyright (c) 1983, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)ttgeneric.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: ttgeneric.c,v 1.10 2009/04/14 08:50:06 lukem Exp $); +__RCSID($NetBSD: ttgeneric.c,v 1.11 2009/06/12 15:19:52 christos Exp $); #endif #endif /* not lint */ @@ -169,8 +169,8 @@ } else if (gen_SE) { ttxputs(gen_SE); -if (!strcmp(gen_SE-ts_str, gen_UE-ts_str) -gen_UE gen_US new WWM_UL) +if (gen_UE gen_US new WWM_UL +!strcmp(gen_SE-ts_str, gen_UE-ts_str)) ttxputs(gen_US); } } @@ -181,8 +181,8 @@ } else if (gen_UE) { ttxputs(gen_UE); -if (!strcmp(gen_UE-ts_str, gen_SE-ts_str) -gen_SE gen_SO new WWM_REV) +if (gen_SE gen_SO new WWM_REV +!strcmp(gen_UE-ts_str, gen_SE-ts_str)) ttxputs(gen_SO); } }
CVS commit: src/usr.bin/window
Module Name:src Committed By: lukem Date: Tue Apr 14 08:50:06 UTC 2009 Modified Files: src/usr.bin/window: char.c char.h cmd2.c cmd3.c cmd6.c compress.c defs.h lcmd.c lcmd.h main.c parser.h parser2.c parser4.c parser5.c startup.c string.c tt.h ttgeneric.c tth19.c ttoutput.c tttermcap.c ttzapple.c var.c var.h win.c window_string.h ww.h wwinit.c wwiomux.c wwlabel.c wwputs.c wwwrite.c Log Message: Fix WARNS=4 issues (-Wcast-qual -Wshadow -Wsign-compare) To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/window/char.c cvs rdiff -u -r1.4 -r1.5 src/usr.bin/window/char.h cvs rdiff -u -r1.6 -r1.7 src/usr.bin/window/cmd2.c \ src/usr.bin/window/compress.c src/usr.bin/window/lcmd.h \ src/usr.bin/window/parser5.c src/usr.bin/window/tth19.c \ src/usr.bin/window/wwputs.c cvs rdiff -u -r1.7 -r1.8 src/usr.bin/window/cmd3.c src/usr.bin/window/cmd6.c \ src/usr.bin/window/defs.h src/usr.bin/window/parser.h \ src/usr.bin/window/startup.c src/usr.bin/window/var.h \ src/usr.bin/window/window_string.h src/usr.bin/window/wwlabel.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/window/lcmd.c \ src/usr.bin/window/parser4.c src/usr.bin/window/tt.h \ src/usr.bin/window/ttoutput.c src/usr.bin/window/tttermcap.c \ src/usr.bin/window/ttzapple.c src/usr.bin/window/wwwrite.c cvs rdiff -u -r1.14 -r1.15 src/usr.bin/window/main.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/window/parser2.c cvs rdiff -u -r1.9 -r1.10 src/usr.bin/window/string.c \ src/usr.bin/window/ttgeneric.c src/usr.bin/window/var.c cvs rdiff -u -r1.13 -r1.14 src/usr.bin/window/win.c \ src/usr.bin/window/wwiomux.c cvs rdiff -u -r1.17 -r1.18 src/usr.bin/window/ww.h cvs rdiff -u -r1.18 -r1.19 src/usr.bin/window/wwinit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/window/char.c diff -u src/usr.bin/window/char.c:1.5 src/usr.bin/window/char.c:1.6 --- src/usr.bin/window/char.c:1.5 Thu Aug 7 11:17:21 2003 +++ src/usr.bin/window/char.c Tue Apr 14 08:50:06 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: char.c,v 1.5 2003/08/07 11:17:21 agc Exp $ */ +/* $NetBSD: char.c,v 1.6 2009/04/14 08:50:06 lukem Exp $ */ /* * Copyright (c) 1983, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)char.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: char.c,v 1.5 2003/08/07 11:17:21 agc Exp $); +__RCSID($NetBSD: char.c,v 1.6 2009/04/14 08:50:06 lukem Exp $); #endif #endif /* not lint */ @@ -117,7 +117,7 @@ _C|_U, _C|_U, _C|_U, _C|_U }; -char *_unctrl[] = { +const char *_unctrl[] = { ^@, ^A, ^B, ^C, ^D, ^E, ^F, ^G, ^H, ^I, ^J, ^K, ^L, ^M, ^N, ^O, ^P, ^Q, ^R, ^S, ^T, ^U, ^V, ^W, Index: src/usr.bin/window/char.h diff -u src/usr.bin/window/char.h:1.4 src/usr.bin/window/char.h:1.5 --- src/usr.bin/window/char.h:1.4 Thu Aug 7 11:17:21 2003 +++ src/usr.bin/window/char.h Tue Apr 14 08:50:06 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: char.h,v 1.4 2003/08/07 11:17:21 agc Exp $ */ +/* $NetBSD: char.h,v 1.5 2009/04/14 08:50:06 lukem Exp $ */ /* * Copyright (c) 1983, 1993 @@ -47,7 +47,7 @@ * using unctrl() by wwwrite() if ww_unctrl is set. */ -extern char *_unctrl[]; +extern const char *_unctrl[]; extern char _cmap[]; #define ctrl(c) (c 0x1f) #define unctrl(c) (_unctrl[(unsigned char) (c)]) Index: src/usr.bin/window/cmd2.c diff -u src/usr.bin/window/cmd2.c:1.6 src/usr.bin/window/cmd2.c:1.7 --- src/usr.bin/window/cmd2.c:1.6 Thu Aug 7 11:17:22 2003 +++ src/usr.bin/window/cmd2.c Tue Apr 14 08:50:06 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cmd2.c,v 1.6 2003/08/07 11:17:22 agc Exp $ */ +/* $NetBSD: cmd2.c,v 1.7 2009/04/14 08:50:06 lukem Exp $ */ /* * Copyright (c) 1983, 1993 @@ -37,13 +37,13 @@ #if 0 static char sccsid[] = @(#)cmd2.c 8.1 (Berkeley) 6/6/93; #else -__RCSID($NetBSD: cmd2.c,v 1.6 2003/08/07 11:17:22 agc Exp $); +__RCSID($NetBSD: cmd2.c,v 1.7 2009/04/14 08:50:06 lukem Exp $); #endif #endif /* not lint */ #include defs.h -char *help_shortcmd[] = { +const char *help_shortcmd[] = { # Select window # and return to conversation mode, %# Select window # but stay in command mode, escape Return to conversation mode without changing window, @@ -75,7 +75,7 @@ 0 }; -char *help_longcmd[] = { +const char *help_longcmd[] = { :alias name string ... Make `name' an alias for `string ...', :alias Show all aliases, :close # ...Close windows, @@ -104,7 +104,7 @@ 0 }; -int help_print(struct ww *, char *, char **); +int help_print(struct ww *, const char *, const char **); void c_help(void) @@ -123,7 +123,7 @@ } int -help_print(struct ww *w, char *name, char **list) +help_print(struct ww *w, const char *name, const char **list) { wwprintf(w, %s:\n\n, name); while (*list) Index: src/usr.bin/window/compress.c diff -u src/usr.bin/window/compress.c:1.6 src/usr.bin/window/compress.c:1.7 ---