History

20090728-1744

forsyth committed 17 years ago

Commit 90f33ff1 parent f790dfd6 files · +60 −4Browse files

Unified · Split

6 files
  1. CHANGES +4 −0
  2. appl/lib/bufio.b +2 −4
  3. dis/lib/bufio.dis +0 −0
  4. emu/port/main.c +7 −0
  5. include/version.h +1 −1
  6. man/1/emu +47 −0
CHANGES+4−0
@@ -1,3 +1,7 @@
120090728
2 emu/port/main.c: put host's working directory name as emuwdir
3 document initial environment variables in emu(1)
4 appl/lib/bufio.b dis/lib/bufio.dis [issue 199] don't lose track of actual file seek offset (following second suggestion of mjl)
120090719520090719
2 correct order of operands to memset(!), eg in ipif [mjl]6 correct order of operands to memset(!), eg in ipif [mjl]
320090718720090718
appl/lib/bufio.b+2−4
@@ -171,12 +171,10 @@ Iobuf.seek(b: self ref Iobuf, off: big, start: int): big · 170 unmodified lines
171 return big ERROR;171 return big ERROR;
172 b.size = 0;172 b.size = 0;
173 b.index = 0;173 b.index = 0;
174 if ((s := sys->seek(b.fd, off, start)) < big 0) {174 if ((s := sys->seek(b.fd, off, start)) < big 0)
175 b.filpos = b.bufpos = big 0;
176 return big ERROR;175 return big ERROR;
177 }
178 b.bufpos = b.filpos = s;176 b.bufpos = b.filpos = s;
179 return b.bufpos = b.filpos = s;177 return s;
180}178}
181 179
182Iobuf.offset(b: self ref Iobuf): big180Iobuf.offset(b: self ref Iobuf): big
dis/lib/bufio.dis+0−0

Binary file not shown.

emu/port/main.c+7−0
@@ -263,6 +263,7 @@ void · 262 unmodified lines
263emuinit(void *imod)263emuinit(void *imod)
264{264{
265 Osenv *e;265 Osenv *e;
266 char *wdir;
266 267
267 e = up->env;268 e = up->env;
268 e->pgrp = newpgrp();269 e->pgrp = newpgrp();
@@ -312,6 +313,12 @@ emuinit(void *imod) · 43 unmodified lines
312 putenvqv("emuargs", rebootargv, rebootargc, 1);313 putenvqv("emuargs", rebootargv, rebootargc, 1);
313 putenvq("emuroot", rootdir, 1);314 putenvq("emuroot", rootdir, 1);
314 ksetenv("emuhost", hosttype, 1);315 ksetenv("emuhost", hosttype, 1);
316 wdir = malloc(1024);
317 if(wdir != nil){
318 if(getwd(wdir, 1024) != nil)
319 putenvq("emuwdir", wdir, 1);
320 free(wdir);
321 }
315 322
316 kproc("main", disinit, imod, KPDUPFDG|KPDUPPG|KPDUPENVG);323 kproc("main", disinit, imod, KPDUPFDG|KPDUPPG|KPDUPENVG);
317 324
include/version.h+1−1
@@ -1 +1 @@
1#define VERSION "Fourth Edition (20090725)"1#define VERSION "Fourth Edition (20090728)"
man/1/emu+47−0
@@ -208,6 +208,53 @@ set by a · 207 unmodified lines
208option to the208option to the
209.I emu209.I emu
210command itself.210command itself.
211.PP
212.I Emu
213sets several Inferno environment variables:
214.TF emuwdirxxx
215.PD
216.TP
217.B cputype
218host processor architecture:
219.B 386
220(for any x86),
221.BR arm ,
222.BR mips ,
223.B power
224(any Power or PowerPC),
225.BR sparc ,
226and
227.BR spim
228(little-endian MIPS).
229.TP
230.B emuargs
231arguments with which
232.I emu
233was invoked
234.TP
235.B emuhost
236host operating system type, such as:
237.BR FreeBSD ,
238.BR Irix ,
239.BR Linux ,
240.BR MacOSX ,
241.BR NetBSD ,
242.BR Nt
243(used for Windows generally),
244.BR OpenBSD ,
245.BR Plan9 ,
246.B Solaris
247and
248.BR Unixware .
249.TP
250.B emuroot
251name of directory in host file system that acts as Inferno's root directory
252.TP
253.B emuwdir
254name in host file system of directory where
255.I emu
256was invoked
257.PD
211.SH EXAMPLE258.SH EXAMPLE
212To start259To start
213.B wm/logon260.B wm/logon

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t