www.pudn.com > ASYNC13.rar > WRITE.C


/* A module of ASYNCx.LIB version 1.02 */ 
 
#include "asyncdef.h" 
 
/******************************************************* 
 Send n objects of size s to the port associated with p 
 starting with the one pointed to by buf. Return the 
 number of objects transmitted. If there is an error 
 during this process, return a short count. 
*******************************************************/ 
int a_write(void *buf,int s,int n,ASYNC *p) 
{byte *bp; 
 int i; 
 if (p) 
  {bp=(byte *)buf; 
   n*=s; 
   i=0; 
   while(i