예제 #1
0
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);
	}
예제 #2
0
파일: bss_file.c 프로젝트: Ana06/openssl
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;
}
예제 #3
0
파일: b_dump.c 프로젝트: millken/zhuxianB30
static int write_fp(const void *data, size_t len, void *fp)
	{
	return UP_fwrite(data, len, 1, fp);
	}