Overview
Comment: | Rename eof to at_end.
This is more fitting as end of file is not really true for a socket. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6893b9f5aba838c6b48d8b6b0ffbfe81 |
User & Date: | js on 2012-09-30 01:34:46 |
Other Links: | manifest | tags |
Context
2012-09-30
| ||
01:46 | Add a few new string functions. check-in: 499faa2771 user: js tags: trunk | |
01:34 | Rename eof to at_end. check-in: 6893b9f5ab user: js tags: trunk | |
01:10 | Make glibc happy. check-in: f1c55cc298 user: js tags: trunk | |
Changes
Modified src/file.c from [8363b05eea] to [7ba5522f8b].
︙ | |||
53 54 55 56 57 58 59 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + | #endif #define DEFAULT_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH struct CFWFile { CFWStream stream; int fd; |
︙ | |||
94 95 96 97 98 99 100 | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + - + - + - + - + | static ssize_t file_read(void *ptr, void *buf, size_t len) { CFWFile *file = ptr; ssize_t ret; if ((ret = read(file->fd, buf, len)) == 0) |
︙ | |||
180 181 182 183 184 185 186 | 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 212 213 | - + - + - + | .obj = { .cls = &class, .ref_cnt = INT_MAX }, .ops = &stream_ops }, .fd = 0, |
Modified src/stream.c from [c9268ffce9] to [316847ca63].
︙ | |||
137 138 139 140 141 142 143 | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | - + | /* Read and see if we get a newline or \0 */ if ((buf = malloc(BUFFER_SIZE)) == NULL) return NULL; for (;;) { |
︙ | |||
270 271 272 273 274 275 276 | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | - + - + | } free(tmp); return true; } bool |
︙ |
Modified src/stream.h from [677d5c6a56] to [bcb155f507].
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + - + | #include "class.h" #include "object.h" #include "string.h" struct cfw_stream_ops { ssize_t (*read)(void*, void*, size_t); bool (*write)(void*, const void*, size_t); |
Modified src/tcpsocket.c from [cad757af38] to [ba08fae5df].
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + - + - + - + - + - + | #include "stream.h" #include "tcpsocket.h" struct CFWTCPSocket { CFWStream stream; int fd; |
︙ |