Neven Sajko
26cae02da7
mk: fix hash function ( #315 )
...
Avoid signed integer overflow using ulong instead of long h.
2020-01-13 22:05:03 -05:00
Russ Cox
6c17f63090
mk: treat X= as empty list in rc shell
...
This brings mk's behavior when using rc in line with Plan 9's.
The existing code is for Unix environment data structures but
also was assuming Unix shell semantics where empty and missing
variables are mostly equivalent.
The Plan 9 code (/sys/src/cmd/mk/plan9.c in the distribution)
explicitly removes /env/name (creating an empty list) when the
value is missing or an empty string.
Fixes #255 .
2020-01-13 19:20:34 -05:00
Russ Cox
fafa622a5b
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.
2020-01-12 15:07:42 -05:00
Dan Cross
fa325e9b42
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>
2020-01-10 14:54:30 +00:00
Dan Cross
2738cc3cfc
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>
2020-01-08 01:37:44 +00:00
Neven Sajko
c65d179354
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
2020-01-07 20:25:18 -05:00
Russ Cox
44eb208829
mk: avoid infinite loop when targets are repeated
...
Fixes "mk -f /tmp/x.mk y x" or "mk -f /tmp/x.mk" where /tmp/x.mk is:
x y x: f
echo hi
Change-Id: I7fa87dc4750c04fdba010b990c190722b432b333
Reviewed-on: https://plan9port-review.googlesource.com/1361
Reviewed-by: Russ Cox <rsc@swtch.com>
2015-08-27 00:36:40 +00:00
Russ Cox
86ce4cedbf
mk: pass environment to P command
...
R=rsc
http://codereview.appspot.com/4977041
2011-08-27 23:06:15 -04:00
rsc
14b4a4702c
unix fix
2007-04-21 22:36:01 +00:00
rsc
6c4c5c5b95
fix empty string interpolation bugs (Michael Teichgräber)
2007-03-26 17:27:08 +00:00
rsc
314f5742af
better rc detection (Michael Teichgräber)
2007-03-26 13:38:36 +00:00
rsc
63b581e320
64-bit
2007-03-26 13:38:24 +00:00
rsc
dc6f9f033a
avoid broken print (Gabriel Diaz)
2006-10-12 03:18:22 +00:00
rsc
3fe9465ac9
64-bit
2006-04-20 22:54:18 +00:00
rsc
cbeb0b26e4
Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
2006-04-01 19:24:03 +00:00
rsc
96029e052b
undo debugging.
2005-10-31 16:43:00 +00:00
rsc
74374cc8a4
ctype sign fixes (Tom Miller)
2005-10-31 16:42:32 +00:00
rsc
2222020e22
Detect rc again.
2005-10-29 17:38:05 +00:00
rsc
fe4b07f194
Fix time race.
2005-08-10 17:14:34 +00:00
rsc
2b6040818e
use full prototypes
2005-05-07 22:42:14 +00:00
rsc
3842363abc
silence archive warning for .a files
2005-02-02 22:32:56 +00:00
rsc
0753502edf
avoid saying unsigned long, for unix port
2005-01-23 22:57:21 +00:00
rsc
3300f9cd89
Long-standing bug in syminit, tickled by placing
...
initshell before syminit. Don't understand why syminit
exists at all.
2005-01-15 20:54:41 +00:00
rsc
2d3f13df35
not reached
2005-01-14 17:57:32 +00:00
rsc
78e51a8c66
checkpoint
2005-01-14 03:45:44 +00:00
rsc
c8b6342d3c
Many small edits.
2005-01-13 04:49:19 +00:00
rsc
9aa1c92f74
add new | syntax.
...
syntax will change.
2005-01-04 22:41:27 +00:00
rsc
372e9667df
Goodbye SHORTLIB
2005-01-04 22:10:29 +00:00
rsc
22c7ebffda
more little compile fixes
2004-12-28 01:45:05 +00:00
rsc
2b9172c7d4
add readn to avoid need for plan9port libc
2004-12-27 00:36:40 +00:00
rsc
f1bfc54e12
More little bug fixes
2004-05-14 17:45:39 +00:00
rsc
92a0a8b69f
the lastbug fix?
2004-04-21 07:38:03 +00:00
rsc
d946e4dc5d
handle long names
2004-04-21 06:52:44 +00:00
rsc
a29753a17f
Who'd have guessed this was broken?
2004-04-21 06:20:19 +00:00
rsc
1b135a7805
clean up when finished.
...
don't set PLAN9
don't set PLAN9
2004-04-19 23:04:36 +00:00
rsc
4615bace42
Whoops.
2004-03-03 00:03:19 +00:00
rsc
8f314994db
More Mac tweaks.
2004-03-02 17:34:15 +00:00
rsc
d21d62e2fc
Various tweaks.
2004-02-29 23:20:28 +00:00
rsc
f063dad96e
Small tweaks to make things build again.
2004-02-29 22:42:33 +00:00
rsc
4fbfdd7acd
make -> mk
2003-11-23 17:54:24 +00:00
rsc
d8b652ae6f
print current directory in "don't know how to make" errors.
2003-11-23 17:48:53 +00:00
rsc
90026180d1
Use new directory structure.
2003-10-11 03:58:46 +00:00
rsc
00b80edb97
Licensing and various tweaks.
2003-10-11 02:59:10 +00:00
rsc
522b0689c3
Reorg
2003-09-30 19:05:50 +00:00
rsc
76193d7cb0
Initial revision
2003-09-30 17:47:42 +00:00
rsc
ed7c8e8d02
Initial import.
2003-09-30 17:47:42 +00:00