Code Reading on Plan9
Plan9のmanにはソースコードのパスが書いてある.
例えば,echo(1)のmanを見ると,SOURCEという項目があって,/sys/src/cmd/echo.cと書かれている.
cpu% man echo ECHO(1) ECHO(1) NAME echo - print arguments SYNOPSIS echo [ -n ] [ arg ... ] DESCRIPTION Echo writes its arguments separated by blanks and terminated by a newline on the standard output. Option -n suppresses the newline. SOURCE /sys/src/cmd/echo.c DIAGNOSTICS If echo draws an error while writing to standard output, the exit status is `write error'. Otherwise the exit status is empty. Page 1 Plan 9 (printed 3/13/06)
あとはacmeなりで開けばいい.何気ないことだけど,これってとっても素晴らしい.
先人の知恵の結晶であるソースを読んで勉強しよう.