Overview
Comment: | Add cfw_std{in,out,err}. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
999088161e3266665f687275fb924fb8 |
User & Date: | js on 2012-09-29 22:50:49 |
Other Links: | manifest | tags |
Context
2012-09-29
| ||
23:17 | Add cfw_strndup(). check-in: 587d349f8d user: js tags: trunk | |
22:50 | Add cfw_std{in,out,err}. check-in: 999088161e user: js tags: trunk | |
22:41 | Add cfw_stream_write_string(). check-in: 2121a00059 user: js tags: trunk | |
Changes
Modified src/file.c from [6d77e77ea7] to [6570f4dc53].
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include <string.h> #include <fcntl.h> #include <unistd.h> #include "stream.h" #include "file.h" | > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include <string.h> #include <limits.h> #include <fcntl.h> #include <unistd.h> #include "stream.h" #include "file.h" |
︙ | ︙ | |||
167 168 169 170 171 172 173 | static CFWClass class = { .name = "CFWFile", .size = sizeof(CFWFile), .ctor = ctor, .dtor = dtor }; CFWClass *cfw_file = &class; | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | static CFWClass class = { .name = "CFWFile", .size = sizeof(CFWFile), .ctor = ctor, .dtor = dtor }; CFWClass *cfw_file = &class; static CFWFile cfw_stdin_ = { .stream = { .obj = { .cls = &class, .ref_cnt = INT_MAX }, .ops = &stream_ops }, .fd = 0, .eof = false }; static CFWFile cfw_stdout_ = { .stream = { .obj = { .cls = &class, .ref_cnt = INT_MAX }, .ops = &stream_ops }, .fd = 1, .eof = false }; static CFWFile cfw_stderr_ = { .stream = { .obj = { .cls = &class, .ref_cnt = INT_MAX }, .ops = &stream_ops }, .fd = 2, .eof = false }; CFWFile *cfw_stdin = &cfw_stdin_; CFWFile *cfw_stdout = &cfw_stdout_; CFWFile *cfw_stderr = &cfw_stderr_; |
Modified src/file.h from [35f892cd3b] to [65701a5f1d].
︙ | ︙ | |||
29 30 31 32 33 34 35 36 | #include "class.h" typedef struct CFWFile CFWFile; extern CFWClass *cfw_file; #endif | > > > > | 29 30 31 32 33 34 35 36 37 38 39 40 | #include "class.h" typedef struct CFWFile CFWFile; extern CFWClass *cfw_file; extern CFWFile *cfw_stdin; extern CFWFile *cfw_stdout; extern CFWFile *cfw_stderr; #endif |