Browse Source

Plan 9 from Bell Labs 2004-09-25

David du Colombier 19 years ago
parent
commit
d9a6e3b162
6 changed files with 39 additions and 33 deletions
  1. 5 3
      dist/replica/_plan9.db
  2. 5 5
      dist/replica/plan9.db
  3. 5 0
      dist/replica/plan9.log
  4. 1 1
      sys/man/8/ppp
  5. 0 1
      sys/src/cmd/ip/ppp/ppp.c
  6. 23 23
      sys/src/cmd/stats.c

+ 5 - 3
dist/replica/_plan9.db

@@ -5106,7 +5106,7 @@ sys/man/8/pem - 664 sys sys 1060263669 1189
 sys/man/8/ping - 664 sys sys 1084473185 3436
 sys/man/8/plan9.ini - 664 sys sys 1094650551 20806
 sys/man/8/pop3 - 664 sys sys 1063854676 2720
-sys/man/8/ppp - 664 sys sys 1050361032 4424
+sys/man/8/ppp - 664 sys sys 1096036494 4424
 sys/man/8/prep - 664 sys sys 1079705872 13820
 sys/man/8/qer - 664 sys sys 1067723129 4909
 sys/man/8/reboot - 664 sys sys 969499895 414
@@ -9477,7 +9477,7 @@ sys/src/cmd/ip/ppp/dotest - 775 sys sys 944961006 152
 sys/src/cmd/ip/ppp/ipaux.c - 664 sys sys 1015090266 2326
 sys/src/cmd/ip/ppp/mkfile - 664 sys sys 1063897576 352
 sys/src/cmd/ip/ppp/mppc.c - 664 sys sys 1015090267 16624
-sys/src/cmd/ip/ppp/ppp.c - 664 sys sys 1095775907 59692
+sys/src/cmd/ip/ppp/ppp.c - 664 sys sys 1096060213 59659
 sys/src/cmd/ip/ppp/ppp.h - 664 sys sys 1091904423 8284
 sys/src/cmd/ip/ppp/testppp.c - 664 sys sys 1045505281 3011
 sys/src/cmd/ip/ppp/thw.c - 664 sys sys 1015090268 5962
@@ -10399,7 +10399,7 @@ sys/src/cmd/ssh/ssh.h - 664 sys sys 1091904420 6086
 sys/src/cmd/ssh/sshnet.c - 664 sys sys 1078840016 17641
 sys/src/cmd/ssh/sshserve.c - 664 sys sys 1062091020 5786
 sys/src/cmd/ssh/util.c - 664 sys sys 1063858753 4478
-sys/src/cmd/stats.c - 664 sys sys 1087406219 27828
+sys/src/cmd/stats.c - 664 sys sys 1096061397 27827
 sys/src/cmd/strings.c - 664 sys sys 944961364 1216
 sys/src/cmd/strip.c - 664 sys sys 1014926661 3306
 sys/src/cmd/sum.c - 664 sys sys 1014926615 5548
@@ -12377,3 +12377,5 @@ usr/glenda/lib/profile - 664 glenda glenda 1021580005 847
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+386/bin/stats - 775 sys sys 1096081600 187903
+386/bin/ip/ppp - 775 sys sys 1096081599 216592

+ 5 - 5
dist/replica/plan9.db

@@ -279,7 +279,7 @@
 386/bin/ip/imap4d - 775 sys sys 1085077070 234217
 386/bin/ip/ipconfig - 775 sys sys 1089257533 135811
 386/bin/ip/ping - 775 sys sys 1089257533 75000
-386/bin/ip/ppp - 775 sys sys 1095825517 216624
+386/bin/ip/ppp - 775 sys sys 1096081599 216592
 386/bin/ip/pppoe - 775 sys sys 1089257534 75540
 386/bin/ip/pptp - 775 sys sys 1089257534 124731
 386/bin/ip/pptpd - 775 sys sys 1089257535 123832
@@ -389,7 +389,7 @@
 386/bin/srvold9p - 775 sys sys 1085077100 128139
 386/bin/ssh - 775 sys sys 1092539158 208978
 386/bin/sshnet - 775 sys sys 1092539158 280678
-386/bin/stats - 775 sys sys 1087442538 188279
+386/bin/stats - 775 sys sys 1096081600 187903
 386/bin/strings - 775 sys sys 1085077101 60090
 386/bin/strip - 775 sys sys 1085077101 59994
 386/bin/sum - 775 sys sys 1085077102 39447
@@ -5106,7 +5106,7 @@ sys/man/8/pem - 664 sys sys 1060263669 1189
 sys/man/8/ping - 664 sys sys 1084473185 3436
 sys/man/8/plan9.ini - 664 sys sys 1094650551 20806
 sys/man/8/pop3 - 664 sys sys 1063854676 2720
-sys/man/8/ppp - 664 sys sys 1050361032 4424
+sys/man/8/ppp - 664 sys sys 1096036494 4424
 sys/man/8/prep - 664 sys sys 1079705872 13820
 sys/man/8/qer - 664 sys sys 1067723129 4909
 sys/man/8/reboot - 664 sys sys 969499895 414
@@ -9477,7 +9477,7 @@ sys/src/cmd/ip/ppp/dotest - 775 sys sys 944961006 152
 sys/src/cmd/ip/ppp/ipaux.c - 664 sys sys 1015090266 2326
 sys/src/cmd/ip/ppp/mkfile - 664 sys sys 1063897576 352
 sys/src/cmd/ip/ppp/mppc.c - 664 sys sys 1015090267 16624
-sys/src/cmd/ip/ppp/ppp.c - 664 sys sys 1095775907 59692
+sys/src/cmd/ip/ppp/ppp.c - 664 sys sys 1096060213 59659
 sys/src/cmd/ip/ppp/ppp.h - 664 sys sys 1091904423 8284
 sys/src/cmd/ip/ppp/testppp.c - 664 sys sys 1045505281 3011
 sys/src/cmd/ip/ppp/thw.c - 664 sys sys 1015090268 5962
@@ -10399,7 +10399,7 @@ sys/src/cmd/ssh/ssh.h - 664 sys sys 1091904420 6086
 sys/src/cmd/ssh/sshnet.c - 664 sys sys 1078840016 17641
 sys/src/cmd/ssh/sshserve.c - 664 sys sys 1062091020 5786
 sys/src/cmd/ssh/util.c - 664 sys sys 1063858753 4478
-sys/src/cmd/stats.c - 664 sys sys 1087406219 27828
+sys/src/cmd/stats.c - 664 sys sys 1096061397 27827
 sys/src/cmd/strings.c - 664 sys sys 944961364 1216
 sys/src/cmd/strip.c - 664 sys sys 1014926661 3306
 sys/src/cmd/sum.c - 664 sys sys 1014926615 5548

+ 5 - 0
dist/replica/plan9.log

@@ -16756,3 +16756,8 @@
 1095863509 0 c sys/man/8/ipserv - 664 sys sys 1095862383 4375
 1095863509 1 c sys/src/cmd/ip/ftpd.c - 664 sys sys 1095862384 32934
 1095910317 0 c 386/bin/ip/ftpd - 775 sys sys 1095910154 166038
+1096038141 0 c sys/man/8/ppp - 664 sys sys 1096036494 4424
+1096061546 0 c sys/src/cmd/ip/ppp/ppp.c - 664 sys sys 1096060213 59659
+1096061546 1 c sys/src/cmd/stats.c - 664 sys sys 1096061397 27827
+1096083150 0 c 386/bin/stats - 775 sys sys 1096081600 187903
+1096083150 1 c 386/bin/ip/ppp - 775 sys sys 1096081599 216592

+ 1 - 1
sys/man/8/ppp

@@ -130,7 +130,7 @@ communicate over
 instead of standard I/O
 .TP
 .B u
-before starting the PPP porotcol with the remote end, shuttle
+before starting the PPP protocol with the remote end, shuttle
 bytes between the device and standard I/O until an EOF on standard
 input.  This allows a user to start
 .I ppp

+ 0 - 1
sys/src/cmd/ip/ppp/ppp.c

@@ -1099,7 +1099,6 @@ rejopts(PPP *ppp, Pstate *p, Block *b, int code)
 			case Oipaddr:
 syslog(0, "ppp", "rejected addr %I with %V", ppp->local, o->data);
 				/* if we're a server, don't let other end change our addr */
-				v4tov6(ppp->local, o->data);
 				if(ppp->localfrozen){
 					dropoption(p, o);
 					break;

+ 23 - 23
sys/src/cmd/stats.c

@@ -8,7 +8,7 @@
 
 #define	MAXNUM	10	/* maximum number of numbers on data line */
 
-typedef struct Graph		Graph;
+typedef struct Graph	Graph;
 typedef struct Machine	Machine;
 
 struct Graph
@@ -20,9 +20,9 @@ struct Graph
 	char		*label;
 	void		(*newvalue)(Machine*, ulong*, ulong*, int);
 	void		(*update)(Graph*, ulong, ulong);
-	Machine	*mach;
+	Machine		*mach;
 	int		overflow;
-	Image	*overtmp;
+	Image		*overtmp;
 };
 
 enum
@@ -85,13 +85,13 @@ enum
 
 enum
 {
-	Ncolor	= 6,
+	Ncolor		= 6,
 	Ysqueeze	= 2,	/* vertical squeezing of label text */
 	Labspace	= 2,	/* room around label */
 	Dot		= 2,	/* height of dot */
-	Opwid	= 5,	/* strlen("add  ") or strlen("drop ") */
+	Opwid		= 5,	/* strlen("add  ") or strlen("drop ") */
 	Nlab		= 3,	/* max number of labels on y axis */
-	Lablen	= 16,	/* max length of label */
+	Lablen		= 16,	/* max length of label */
 	Lx		= 4,	/* label tick length */
 };
 
@@ -158,8 +158,8 @@ void	contextval(Machine*, ulong*, ulong*, int),
 	signalval(Machine*, ulong*, ulong*, int);
 
 Menu	menu2 = {menu2str, nil};
-int		present[Nmenu2];
-void		(*newvaluefn[Nmenu2])(Machine*, ulong*, ulong*, int init) = {
+int	present[Nmenu2];
+void	(*newvaluefn[Nmenu2])(Machine*, ulong*, ulong*, int init) = {
 	batteryval,
 	contextval,
 	etherval,
@@ -182,20 +182,20 @@ void		(*newvaluefn[Nmenu2])(Machine*, ulong*, ulong*, int init) = {
 Image	*cols[Ncolor][3];
 Graph	*graph;
 Machine	*mach;
-Font		*mediumfont;
-char		*mysysname;
-char		argchars[] = "8bceEfiImlnpstw";
-int		pids[NPROC];
-int 		parity;	/* toggled to avoid patterns in textured background */
-int		nmach;
-int		ngraph;	/* totaly number is ngraph*nmach */
+Font	*mediumfont;
+char	*mysysname;
+char	argchars[] = "8bceEfiImlnpstw";
+int	pids[NPROC];
+int 	parity;	/* toggled to avoid patterns in textured background */
+int	nmach;
+int	ngraph;	/* totaly number is ngraph*nmach */
 double	scale = 1.0;
-int		logscale = 0;
-int		ylabels = 0;
-int		oldsystem = 0;
+int	logscale = 0;
+int	ylabels = 0;
+int	oldsystem = 0;
 int 	sleeptime = 1000;
 
-char		*procnames[NPROC] = {"main", "mouse"};
+char	*procnames[NPROC] = {"main", "mouse"};
 
 void
 killall(char *s)
@@ -377,7 +377,7 @@ drawdatum(Graph *g, int x, ulong prev, ulong v, ulong vmax)
 }
 
 void
-redraw(Graph *g, int vmax)
+redraw(Graph *g, ulong vmax)
 {
 	int i, c;
 
@@ -392,7 +392,7 @@ redraw(Graph *g, int vmax)
 void
 update1(Graph *g, ulong v, ulong vmax)
 {
-	char buf[32];
+	char buf[48];
 	int overflow;
 
 	if(g->overflow && g->overtmp!=nil)
@@ -409,7 +409,7 @@ update1(Graph *g, ulong v, ulong vmax)
 	if(overflow && g->overtmp!=nil){
 		g->overflow = 1;
 		draw(g->overtmp, g->overtmp->r, screen, nil, g->overtmp->r.min);
-		sprint(buf, "%ld", v);
+		sprint(buf, "%lud", v);
 		string(screen, g->overtmp->r.min, display->black, ZP, mediumfont, buf);
 	}
 }
@@ -1128,7 +1128,7 @@ resize(void)
 			g->overflow = 0;
 			r = g->r;
 			r.max.y = r.min.y+mediumfont->height;
-			r.max.x = r.min.x+stringwidth(mediumfont, "9999999");
+			r.max.x = r.min.x+stringwidth(mediumfont, "999999999999");
 			freeimage(g->overtmp);
 			g->overtmp = nil;
 			if(r.max.x <= g->r.max.x)