Commits


all: fix or silence various gcc warnings As usual, gcc finds some real problems but also reports a ton of noise. Fix the problems and quiet the noise.


Trivial changes: whitespace and modes. Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>


src: mv ../buildEnvironmentVariables mkhdr Also note that the file must be valid shell and mk input. For #321.


mkfile, mkmk.sh: update for new asm-free getcallerpc


lib9: add getcallerpc.c (fixes build)


libhtml: plug a memory leak in addtext Change-Id: I9b8a4430e7d26008ba9508095f8eb4b124a93b9b


libhtml: plug quite a few memory leaks Change-Id: I45bd62a590373669e90183cc2b2ee56570c007f5


mk: plan9 style. In general, no space after `if` etc, and no braces for a single statement inside of a loop or conditional. Signed-off-by: Dan Cross <cross@gajendra.net>


mk: fix out of bounds access A loop is added for each structure field instead of accessing the other fields through the first one in one loop. Updates #313 Change-Id: I0e27e15feacb77391bc1decee7cf720d64d14586


9c: Fix case patterns for DragonFly and other BSDs POSIX does not support grouping in case item patterns. Installing with a strict POSIX shell fails with: /usr/local/plan9/bin/9c: line 82: syntax error near unexpected token `(' /usr/local/plan9/bin/9c: line 82: `*(DragonFly|BSD)*gcc*) usegcc ;;' This change expands the patterns to work around the limitation. See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_10 (and search for case_clause)


lib9, libndb: exclude terminating null from strncpy bound GCC pointed this out with some "warning: ‘strncpy’ specified bound NUM equals destination size [-Wstringop-truncation]" warnings. Change-Id: Id8408b165f6e4ae82c96a77599d89f658d979b32


lib9: remove getcallerpc implementations These make no sense and are not really needed at all. Add a best-effort attempt to get at the gcc/clang macro in lib9.h, but if it fails, no big deal. Fixes #324.


libmach: plug another memory leak Change-Id: Ia5c888db1f0ded2aa92238d994239e46bf52667a


libmach: plug memory leak Change-Id: I08cb7227c071c7fc2e30f43e07bcf599fc1d174a


9term: add a "look" menu item (#299) Add a menu item which functions similar to acme's `Look` command. This is copied from 9front. See: https://code.9front.org/hg/plan9front/rev/1f1596dbca51 https://code.9front.org/hg/plan9front/rev/d2de1d2f7b48