summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
38e51db)
Author: noodles
Date: 2003/09/28 20:33:34
Fix stupid bug where we always read at least one byte from stdin, even if we
wanted none.
*
* Copyright 2002 Project Purple
*
*
* Copyright 2002 Project Purple
*
- * $Id: onak.c,v 1.14 2003/06/07 13:37:33 noodles Exp $
+ * $Id: onak.c,v 1.15 2003/09/28 20:33:34 noodles Exp $
int stdin_getchar(void *ctx, size_t count, unsigned char *c)
{
int stdin_getchar(void *ctx, size_t count, unsigned char *c)
{
+ while ((count > 0) && (ic != EOF)) {
ic = getchar();
*c = ic;
c++;
ic = getchar();
*c = ic;
c++;
- } while ((ic != EOF) && (--count > 0));