/**********************************************************************
 * ti library's routine for sending a file from memory
 *
 * $Author: brlewis $
 * $Source: /afs/net.mit.edu/project/net_dev/brlewis/src/lib/RCS/sendbuf.c,v $
 * $Header: /afs/net.mit.edu/project/net_dev/brlewis/src/lib/RCS/sendbuf.c,v 0.2 92/04/01 16:17:52 brlewis Exp $
 *
 * Copyright 1991 by the Massachusetts Institute of Technology.
 *
 * For copying and distribution information, please see the file
 * <mit-copyright.h>.
 **********************************************************************/

#include <mit-copyright.h>

#ifndef lint
static char rcsid_ti_sendbuf_c[] = "$Header: /afs/net.mit.edu/project/net_dev/brlewis/src/lib/RCS/sendbuf.c,v 0.2 92/04/01 16:17:52 brlewis Exp $";
#endif /* lint */

#include <ti/ti.h>

/**********************************************************************
 * ti_sendbuf(TI_H hti, ti_node_H hnode, LPSTR buf, int size)
 *	hnode must be a node that has been created with TI_NSYSGEN_FN set
 *
 * - sends contents of buf to server
 * - returns error code
 **********************************************************************/

/* jms 7/24/92 -- windows-izing completed, pending approval */

long
ti_sendbuf(hti, hnode, buf, size)
     TI_H hti;
     ti_node_H hnode;
     LPSTR buf;
     int size;
{
  long code;

  if (code=ti_sendfirst(hti, hnode)) return(code);
  if (code=ti_sendmiddle(hti, buf, size)) return(code);
  return(ti_sendlast(hti));
}
