| 229 | |
| 230 | |
| 231 | ILint XpmGetsInternal(ILubyte *Buffer, ILint MaxLen) |
| 232 | { |
| 233 | ILint i = 0, Current; |
| 234 | |
| 235 | if (ieof()) |
| 236 | return IL_EOF; |
| 237 | |
| 238 | while ((Current = igetc()) != IL_EOF && i < MaxLen - 1) { |
| 239 | if (Current == IL_EOF) |
| 240 | return 0; |
| 241 | if (Current == '\n') //unix line ending |
| 242 | break; |
| 243 | |
| 244 | if (Current == '\r') { //dos/mac line ending |
| 245 | Current = igetc(); |
| 246 | if (Current == '\n') //dos line ending |
| 247 | break; |
| 248 | |
| 249 | if (Current == IL_EOF) |
| 250 | break; |
| 251 | |
| 252 | Buffer[i++] = (ILubyte)Current; |
| 253 | continue; |
| 254 | } |
| 255 | Buffer[i++] = (ILubyte)Current; |
| 256 | } |
| 257 | |
| 258 | Buffer[i++] = 0; |
| 259 | |
| 260 | return i; |
| 261 | } |
| 262 | |
| 263 | |
| 264 | ILint XpmGets(ILubyte *Buffer, ILint MaxLen) |
no outgoing calls
no test coverage detected