diff toys.h @ 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 a55854bde872
children 1c15ba60aa64
line wrap: on
line diff
--- a/toys.h	Tue Sep 03 08:30:47 2013 -0500
+++ b/toys.h	Tue Sep 03 17:56:28 2013 -0500
@@ -113,9 +113,9 @@
   jmp_buf *rebound;        // longjmp here instead of exit when do_rebound set
 } toys;
-// One big temporary buffer, for use by commands (not library functions).
+// Two big temporary buffers: one for use by commands, one for library functions
-extern char toybuf[4096];
+extern char toybuf[4096], libbuf[4096];
 extern char **environ;