Mercurial > hg > toybox
comparison main.c @ 1043:acf7bb2b99e2 draft
Introduce libbuf analogous to toybuf but for use by lib/*.c. Change readfile() semantics to be able to read into an existing buffer, or malloc its own if that's NULL.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 03 Sep 2013 17:56:28 -0500 |
parents | 40d0c96a8e89 |
children | ac4a0cde89c2 |
comparison
equal
deleted
inserted
replaced
1042:cbc467592b2e | 1043:acf7bb2b99e2 |
---|---|
18 | 18 |
19 // global context for this command. | 19 // global context for this command. |
20 | 20 |
21 struct toy_context toys; | 21 struct toy_context toys; |
22 union global_union this; | 22 union global_union this; |
23 char toybuf[4096]; | 23 char toybuf[4096], libbuf[4096]; |
24 | 24 |
25 struct toy_list *toy_find(char *name) | 25 struct toy_list *toy_find(char *name) |
26 { | 26 { |
27 int top, bottom, middle; | 27 int top, bottom, middle; |
28 | 28 |