From 7facfb5548409777278f3b146307468f0bb0bb77 Mon Sep 17 00:00:00 2001 From: BurnZeZ Date: Tue, 28 Jan 2020 00:44:44 +0000 Subject: [PATCH 1/5] walk: remove superfluous newline --- sys/src/cmd/walk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/walk.c b/sys/src/cmd/walk.c index 856cedc5f..12f42e5b1 100644 --- a/sys/src/cmd/walk.c +++ b/sys/src/cmd/walk.c @@ -240,7 +240,7 @@ main(int argc, char **argv) s_append(stfmt, EARGF(usage())); i = strspn(s_to_c(stfmt), "UGMamnpqsx"); if(i != s_len(stfmt)) - sysfatal("bad stfmt: %s\n", s_to_c(stfmt)); + sysfatal("bad stfmt: %s", s_to_c(stfmt)); break; default: usage(); From 0f1b442bc04c64dcc0709a6a060a0ed3ef4935e7 Mon Sep 17 00:00:00 2001 From: BurnZeZ Date: Tue, 28 Jan 2020 00:53:58 +0000 Subject: [PATCH 2/5] walk(1): formatting/corrections --- sys/man/1/walk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/man/1/walk b/sys/man/1/walk index ecb6522a8..6129b0a3d 100644 --- a/sys/man/1/walk +++ b/sys/man/1/walk @@ -10,7 +10,7 @@ walk \- walk a path .I mind,maxd ] [ .B -e -.I ststr +.I statfmt ] [ .I name ... ] @@ -18,7 +18,7 @@ walk \- walk a path .I Walk recursively descends any directory arguments, printing the name of each file on a separate line. -When no arguments are given, the current directory +When no arguments are given, the working directory is assumed. Non-directory arguments are checked for existence, then printed, if so. @@ -50,7 +50,7 @@ are optional. .TP .B -e statfmt Setting the statfmt string allows specifying the data -.B walk +.I walk should print. It takes a string of characters, each corresponding to some piece of information about the file being From 2c0ccff2864549e77e1fa3e27802eee429ff3886 Mon Sep 17 00:00:00 2001 From: BurnZeZ Date: Tue, 28 Jan 2020 01:27:41 +0000 Subject: [PATCH 3/5] walk: add D and T fmt characters (fileserver device/type) --- sys/man/1/walk | 6 ++++++ sys/src/cmd/walk.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/man/1/walk b/sys/man/1/walk index 6129b0a3d..f8e7a75e2 100644 --- a/sys/man/1/walk +++ b/sys/man/1/walk @@ -89,6 +89,12 @@ size in bytes .TP .B x permissions +.TP +.B D +server device +.TP +.B T +server type (kernel device rune) .PD .PP The default statfmt is simply, diff --git a/sys/src/cmd/walk.c b/sys/src/cmd/walk.c index 12f42e5b1..cd83acca7 100644 --- a/sys/src/cmd/walk.c +++ b/sys/src/cmd/walk.c @@ -71,6 +71,10 @@ dofile(char *path, Dir *f, int pathonly) case 'q': Bprint(bout, "%ullx.%uld.%.2uhhx", f->qid.path, f->qid.vers, f->qid.type); break; case 's': Bprint(bout, "%lld", f->length); break; case 'x': Bprint(bout, "%ulo", f->mode); break; + + /* These two are slightly different, as they tell us about the fileserver instead of the file */ + case 'D': Bprint(bout, "%ud", f->dev); break; + case 'T': Bprint(bout, "%C", f->type); break; default: abort(); } @@ -238,7 +242,7 @@ main(int argc, char **argv) if((stfmt = s_reset(stfmt)) == nil) sysfatal("s_reset: %r"); s_append(stfmt, EARGF(usage())); - i = strspn(s_to_c(stfmt), "UGMamnpqsx"); + i = strspn(s_to_c(stfmt), "UGMamnpqsxDT"); if(i != s_len(stfmt)) sysfatal("bad stfmt: %s", s_to_c(stfmt)); break; From efd4eb8933747d7df096d0abdea267f225153764 Mon Sep 17 00:00:00 2001 From: rgl Date: Wed, 29 Jan 2020 19:27:07 +0100 Subject: [PATCH 4/5] document common emulator keys --- sys/man/1/atari | 16 +++++++++++++++- sys/man/1/nintendo | 22 ++++++++++++++++++---- sys/man/1/sega | 14 ++++++++++++++ 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/sys/man/1/atari b/sys/man/1/atari index f18731316..934794a04 100644 --- a/sys/man/1/atari +++ b/sys/man/1/atari @@ -16,9 +16,23 @@ is an emulator for the Atari 2600. It exectues the romfile given as an argument, and controls as if using a regular 4-direction 1-button joystick, using \fBspace\fR button and directional keys. -The \fBq\fR, \fBw\fR, \fBe\fR, \fBr\fR keys correspond respectively to the reset, select, player 1 difficulty and color mode switches. +The \fBq\fR, \fBw\fR, \fBe\fR and \fBr\fR keys correspond respectively to the reset, select, player 1 difficulty and color mode switches. Other keys: .TP +F1 +Pause the emulator. If already paused it will step one video frame. +.TP +F12 +Toggle the emulator's speedometer. It shows in the upper left, +off-viewport corner, the ratio between the expected and observed time it +took to draw 60 frames. +.TP +t +Toggle tracing of the emulator. +.TP +` +It uncaps the 60fps frame rate and lets emulation go as fast as possible. +.TP Esc Pause the emulator. .TP diff --git a/sys/man/1/nintendo b/sys/man/1/nintendo index d820b8c9c..c1b6b29f5 100644 --- a/sys/man/1/nintendo +++ b/sys/man/1/nintendo @@ -4,7 +4,7 @@ gb, gba, nes, snes \- emulators .SH SYNOPSIS .B games/gb [ -.B -acdT +.B -acd ] [ .B -C @@ -17,7 +17,7 @@ gb, gba, nes, snes \- emulators .br .B games/gba [ -.B -aT +.B -a ] [ .B -b .I biosfile @@ -41,7 +41,7 @@ gb, gba, nes, snes \- emulators .br .B games/snes [ -.B -ahmsT +.B -ahms ] [ .B -x .I scale @@ -55,15 +55,29 @@ and .I snes are emulators for the Nintendo Game Boy and Game Boy Color (GB and GBC), Nintendo Game Boy Advance (GBA), Nintendo Entertainment System (NES), and Super Nintendo Entertainment System (SNES). They execute the romfile given as an argument. -The \fBz\fR, \fBx\fR, \fBa\fR, \fBs\fR, \fBq\fR, \fBw\fRreturn and shift keys correspond to B, A, Y, X, L1, L2, Start and Select, respectively. +The \fBz\fR, \fBx\fR, \fBa\fR, \fBs\fR, \fBq\fR, \fBw, \fRreturn and shift keys correspond to B, A, Y, X, L1, L2, Start and Select, respectively. Other keys: .TP +F1 +Pause the emulator. If already paused it will step one video frame. +.TP F5 Save the current state in \fBgb.save\fR / \fBgba.save\fR / \fBnes.save\fR / \fBsnes.save\fR. .TP F6 Load the current state from \fBgb.save\fR / \fBgba.save\fR / \fBnes.save\fR / \fBsnes.save\fR. .TP +F12 +Toggle the emulator's speedometer. It shows in the upper left, +off-viewport corner, the ratio between the expected and observed time it +took to draw 60 frames. +.TP +t +Toggle tracing of the emulator. +.TP +` +It uncaps the 60fps frame rate and lets emulation go as fast as possible. +.TP Esc Pause the emulator. .TP diff --git a/sys/man/1/sega b/sys/man/1/sega index 6aa086ac6..9e3dfd21a 100644 --- a/sys/man/1/sega +++ b/sys/man/1/sega @@ -17,6 +17,20 @@ It executes the romfile given as an argument. The \fBz\fR, \fBx\fR, \fBa\fR, return and shift keys correspond to A, B, C, Start and Select, respectively. Other keys: .TP +F1 +Pause the emulator. If already paused it will step one video frame. +.TP +F12 +Toggle the emulator's speedometer. It shows in the upper left, +off-viewport corner, the ratio between the expected and observed time it +took to draw 60 frames. +.TP +t +Toggle tracing of the emulator. +.TP +` +It uncaps the 60fps frame rate and lets emulation go as fast as possible. +.TP Esc Pause the emulator. .TP From 8ce18a6338b52a419841237e8f9b42847bdacba6 Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Fri, 31 Jan 2020 09:25:39 -0800 Subject: [PATCH 5/5] fix double free in acme. in acmerrorproc(): sendp(s); free(s); in waitthread(): recv(&err) free(err) We only want waitthread to free. --- sys/src/cmd/acme/acme.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/src/cmd/acme/acme.c b/sys/src/cmd/acme/acme.c index d5addedbd..608a28f71 100644 --- a/sys/src/cmd/acme/acme.c +++ b/sys/src/cmd/acme/acme.c @@ -316,7 +316,6 @@ acmeerrorproc(void *) buf[n] = '\0'; s = estrdup(buf); sendp(cerr, s); - free(s); } free(buf); }