/*Copyright (C) 1992, 1996 by Thomas Glen Smith. All Rights Reserved.*/
/* strwrite APL2 V1.0.0 ************************************************
* Called to write a character string during a )save operation. *
***********************************************************************/
#define INCLUDES IO+STDIO+STRING
#include "includes.h"
int strwrite(fp,cp)
int fp; /* file handle */
char *cp; /* pointer to string to write */
{
int i,j;
j = (cp == NULL) ? 0 : strlen(cp) + 1; /* length of string */
i = write(fp, &j, sizeof(int));
if (j)
i += write(fp, cp, j);
return(i);
}