static int MS_CALLBACK file_write(BIO *b, const char *in, int inl) { int ret=0; if (b->init && (in != NULL)) { if (b->flags&BIO_FLAGS_UPLINK) ret=UP_fwrite(in,(int)inl,1,b->ptr); else ret=fwrite(in,(int)inl,1,(FILE *)b->ptr); if (ret) ret=inl; /* ret=fwrite(in,1,(int)inl,(FILE *)b->ptr); */ /* according to Tim Hudson <*****@*****.**>, the commented * out version above can cause 'inl' write calls under * some stupid stdio implementations (VMS) */ } return(ret); }
static int file_write(BIO *b, const char *in, int inl) { int ret = 0; if (b->init && (in != NULL)) { if (b->flags & BIO_FLAGS_UPLINK) ret = UP_fwrite(in, (int)inl, 1, b->ptr); else ret = fwrite(in, (int)inl, 1, (FILE *)b->ptr); if (ret) ret = inl; /* ret=fwrite(in,1,(int)inl,(FILE *)b->ptr); */ /* * according to Tim Hudson <*****@*****.**>, the commented out * version above can cause 'inl' write calls under some stupid stdio * implementations (VMS) */ } return ret; }
static int write_fp(const void *data, size_t len, void *fp) { return UP_fwrite(data, len, 1, fp); }