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 @@
1+20090728
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)
15 20090719
26 correct order of operands to memset(!), eg in ipif [mjl]
37 20090718
appl/lib/bufio.b+2−4
@@ -171,12 +171,10 @@ Iobuf.seek(b: self ref Iobuf, off: big, start: int): big · 170 unmodified lines
171171 return big ERROR;
172172 b.size = 0;
173173 b.index = 0;
174− if ((s := sys->seek(b.fd, off, start)) < big 0) {
175− b.filpos = b.bufpos = big 0;
174+ if ((s := sys->seek(b.fd, off, start)) < big 0)
176175 return big ERROR;
177− }
178176 b.bufpos = b.filpos = s;
179− return b.bufpos = b.filpos = s;
177+ return s;
180178 }
181179
182180 Iobuf.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
263263 emuinit(void *imod)
264264 {
265265 Osenv *e;
266+ char *wdir;
266267
267268 e = up->env;
268269 e->pgrp = newpgrp();
@@ -312,6 +313,12 @@ emuinit(void *imod) · 43 unmodified lines
312313 putenvqv("emuargs", rebootargv, rebootargc, 1);
313314 putenvq("emuroot", rootdir, 1);
314315 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+ }
315322
316323 kproc("main", disinit, imod, KPDUPFDG|KPDUPPG|KPDUPENVG);
317324
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
208208 option to the
209209 .I emu
210210 command itself.
211+.PP
212+.I Emu
213+sets several Inferno environment variables:
214+.TF emuwdirxxx
215+.PD
216+.TP
217+.B cputype
218+host 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 ,
226+and
227+.BR spim
228+(little-endian MIPS).
229+.TP
230+.B emuargs
231+arguments with which
232+.I emu
233+was invoked
234+.TP
235+.B emuhost
236+host 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
247+and
248+.BR Unixware .
249+.TP
250+.B emuroot
251+name of directory in host file system that acts as Inferno's root directory
252+.TP
253+.B emuwdir
254+name in host file system of directory where
255+.I emu
256+was invoked
257+.PD
211258 .SH EXAMPLE
212259 To start
213260 .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