/**************************************************************************
 * LPRng IFHP Filter
 * Copyright 1994-1997 Patrick Powell, San Diego, CA <papowell@astart.com>
 *
 * Based on the CTI printer filters.
 *  See COPYRIGHT for details.
 *
 * $Id: write_check.c,v 2.2 1997/12/18 09:48:06 papowell Exp papowell $
 */

#include "portable.h"
#include "common.h"
#include "hp4.h"


void write_check(fd,str,msg,flg)
int  	 fd,   flg;
char	*str, *msg;
{
	int len;

	len = strlen(str);
	if ( writecn(fd, str, len) != len ){
		if ( flg==DIE ){
			logerr_die( 3, msg );
	 	} else {
			logerr( 3, msg );
		}
	}
}

