projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stdio.h defines BUFSIZ
[unix-history]
/
usr
/
src
/
usr.bin
/
window
/
lcmd1.c
diff --git
a/usr/src/usr.bin/window/lcmd1.c
b/usr/src/usr.bin/window/lcmd1.c
index
9b8c437
..
475d11d
100644
(file)
--- a/
usr/src/usr.bin/window/lcmd1.c
+++ b/
usr/src/usr.bin/window/lcmd1.c
@@
-2,16
+2,14
@@
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at Berkeley. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
+ * This code is derived from software contributed to Berkeley by
+ * Edward Wang at The University of California, Berkeley.
+ *
+ * %sccs.include.redist.c%
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)lcmd1.c 3.3
2
(Berkeley) %G%";
+static char sccsid[] = "@(#)lcmd1.c 3.3
6
(Berkeley) %G%";
#endif /* not lint */
#include "defs.h"
#endif /* not lint */
#include "defs.h"
@@
-45,7
+43,7
@@
register struct value *a;
char *label;
char haspty, hasframe, mapnl, keepopen, smooth;
char *shf, **sh;
char *label;
char haspty, hasframe, mapnl, keepopen, smooth;
char *shf, **sh;
- char *argv[sizeof
shell / sizeof *
shell];
+ char *argv[sizeof
default_shell / sizeof *default_
shell];
register char **pp;
if ((id = findid()) < 0)
register char **pp;
if ((id = findid()) < 0)
@@
-58,7
+56,7
@@
register struct value *a;
a++;
ncol = a->v_type == V_ERR ? wwncol - col : a->v_num;
a++;
a++;
ncol = a->v_type == V_ERR ? wwncol - col : a->v_num;
a++;
- nline = a->v_type == V_ERR ?
nbuf
line : a->v_num;
+ nline = a->v_type == V_ERR ?
default_n
line : a->v_num;
a++;
label = a->v_type == V_ERR ? 0 : a->v_str;
if ((haspty = vtobool(++a, 1, -1)) < 0)
a++;
label = a->v_type == V_ERR ? 0 : a->v_str;
if ((haspty = vtobool(++a, 1, -1)) < 0)
@@
-69,7
+67,7
@@
register struct value *a;
return;
if ((keepopen = vtobool(++a, 0, -1)) < 0)
return;
return;
if ((keepopen = vtobool(++a, 0, -1)) < 0)
return;
- if ((smooth = vtobool(++a,
1
, -1)) < 0)
+ if ((smooth = vtobool(++a,
default_smooth
, -1)) < 0)
return;
if ((++a)->v_type != V_ERR) {
for (pp = argv; a->v_type != V_ERR &&
return;
if ((++a)->v_type != V_ERR) {
for (pp = argv; a->v_type != V_ERR &&
@@
-82,8
+80,8
@@
register struct value *a;
else
*sh = shf;
} else {
else
*sh = shf;
} else {
- sh = shell;
- shf = shellfile;
+ sh =
default_
shell;
+ shf =
default_
shellfile;
}
if ((w = openwin(id, row, col, nrow, ncol, nline, label, haspty,
hasframe, shf, sh)) == 0)
}
if ((w = openwin(id, row, col, nrow, ncol, nline, label, haspty,
hasframe, shf, sh)) == 0)
@@
-95,18
+93,18
@@
register struct value *a;
v->v_num = id + 1;
}
v->v_num = id + 1;
}
-struct lcmd_arg arg_nline[] = {
+struct lcmd_arg arg_
def_
nline[] = {
{ "nlines", 1, ARG_NUM },
0
};
{ "nlines", 1, ARG_NUM },
0
};
-l_nline(v, a)
+l_
def_
nline(v, a)
register struct value *v, *a;
{
register struct value *v, *a;
{
- v->v_num =
nbuf
line;
+ v->v_num =
default_n
line;
v->v_type = V_NUM;
if (a->v_type != V_ERR)
v->v_type = V_NUM;
if (a->v_type != V_ERR)
-
nbuf
line = a->v_num;
+
default_n
line = a->v_num;
}
struct lcmd_arg arg_smooth[] = {
}
struct lcmd_arg arg_smooth[] = {
@@
-128,6
+126,19
@@
register struct value *v, *a;
w->ww_noupdate = !vtobool(a, v->v_num, v->v_num);
}
w->ww_noupdate = !vtobool(a, v->v_num, v->v_num);
}
+struct lcmd_arg arg_def_smooth[] = {
+ { "flag", 1, ARG_ANY },
+ 0
+};
+
+l_def_smooth(v, a)
+register struct value *v, *a;
+{
+ v->v_type = V_NUM;
+ v->v_num = default_smooth;
+ default_smooth = vtobool(a, v->v_num, v->v_num);
+}
+
struct lcmd_arg arg_select[] = {
{ "window", 1, ARG_NUM },
0
struct lcmd_arg arg_select[] = {
{ "window", 1, ARG_NUM },
0