X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=share%2Fbinary.c;h=3ba6c3ecdab21fc8bd2d60d6f347bc78460e29c3;hb=90baa3b05af80b5996bb2eecebd58ca2ceb53acf;hp=2045f0635c38522be1d7d684da05655f3ea2a00f;hpb=8c8409b285e30ed096090fefdb1cb7abeff6260b;p=neverball diff --git a/share/binary.c b/share/binary.c index 2045f06..3ba6c3e 100644 --- a/share/binary.c +++ b/share/binary.c @@ -63,13 +63,6 @@ void put_array(FILE *fout, const float *v, size_t n) put_float(fout, v + i); } -void put_string(FILE *fp, char * str) -{ - int len = strlen(str) + 1; - fwrite(str, 1, len, fp); -} - - /*---------------------------------------------------------------------------*/ void get_float(FILE *fin, float *f) @@ -114,23 +107,4 @@ void get_array(FILE *fin, float *v, size_t n) get_float(fin, v + i); } -void get_string(FILE *fp, char * str, int len) - /* len include the room for the \0 */ - /* if len is too small, the string is truncated. */ -{ - char b; - while (1) - { - fread(&b, 1, 1, fp); - if (len > 0) - { - *(str++) = (len > 1 ? b : '\0'); - len--; - } - if (b == '\0') - return; - } -} - - /*---------------------------------------------------------------------------*/