comparison 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
comparison
equal deleted inserted replaced
1042:cbc467592b2e 1043:acf7bb2b99e2
111 int exithelp; // Should error_exit print a usage message first? 111 int exithelp; // Should error_exit print a usage message first?
112 int old_umask; // Old umask preserved by TOYFLAG_UMASK 112 int old_umask; // Old umask preserved by TOYFLAG_UMASK
113 jmp_buf *rebound; // longjmp here instead of exit when do_rebound set 113 jmp_buf *rebound; // longjmp here instead of exit when do_rebound set
114 } toys; 114 } toys;
115 115
116 // One big temporary buffer, for use by commands (not library functions). 116 // Two big temporary buffers: one for use by commands, one for library functions
117 117
118 extern char toybuf[4096]; 118 extern char toybuf[4096], libbuf[4096];
119 119
120 extern char **environ; 120 extern char **environ;
121 121
122 #define GLOBALS(...) 122 #define GLOBALS(...)
123 123