nsCRT::memcpy(p_bh_encode_obj->name,
memcpy(p_bh_encode_obj->name,
int binhex_encode_next(	binhex_encode_object* p_bh_encode_obj, 	char	*in_buff,	int32	in_size,	char 	*out_buff, 	int32	buff_size,	int32	*real_size){	int status = 0;	/*	** setup the buffer information.	*/	p_bh_encode_obj->outbuff 	 = out_buff;	p_bh_encode_obj->s_outbuff 	 = buff_size;	p_bh_encode_obj->pos_outbuff = 0;		/*	** copy over the left over from last time.	*/	if (p_bh_encode_obj->s_overflow)	{		nsCRT::memcpy(p_bh_encode_obj->overflow, 				p_bh_encode_obj->outbuff, 				p_bh_encode_obj->s_overflow);						p_bh_encode_obj->pos_outbuff = p_bh_encode_obj->s_overflow;		p_bh_encode_obj->s_overflow = 0;	} 		/*	** 	Jump to the right state.	*/	if ( p_bh_encode_obj->state < BINHEX_STATE_DONE)	{		if (in_buff == NULL && in_size == 0)		{			/* this is our special token of end of a part, time to append crc codes	*/			if (p_bh_encode_obj->state != BINHEX_STATE_FINISH)							status = binhex_encode_end_a_part(p_bh_encode_obj);			else				status = binhex_encode_finishing(p_bh_encode_obj);						p_bh_encode_obj->state += 2;		/* so we can jump to the next state.*/		}		else		{			if  (p_bh_encode_obj->state == BINHEX_STATE_START)			{				PL_strcpy(p_bh_encode_obj->outbuff + p_bh_encode_obj->pos_outbuff,							"\r\n(This file must be converted with BinHex 4.0)\r\n\r\n:");				p_bh_encode_obj->pos_outbuff += 52;							p_bh_encode_obj->state = BINHEX_STATE_HEADER;								nsCRT::memcpy(p_bh_encode_obj->name,							in_buff, 							in_size);				}			else if  (p_bh_encode_obj->state == BINHEX_STATE_HEADER)			{				nsCRT::memcpy(&(p_bh_encode_obj->head),							in_buff, 							sizeof(binhex_header));								if (in_size == 20)	/* in the platform that alignment is 4-bytes. */					in_size = 18;											p_bh_encode_obj->head.dlen = 0;		/* we just can't trust the dlen from 	*/													/* apple double decoder told us. 		*/													/* do our own counting.					*/							}						else if  (p_bh_encode_obj->state == BINHEX_STATE_DFORK)			{				if (p_bh_encode_obj->head.dlen == 0)				{					p_bh_encode_obj->c[0] = in_buff[0];	/* save the first 2 bytes, in case  */					p_bh_encode_obj->c[1] = in_buff[1]; /* head and data share 1 code block */				}				p_bh_encode_obj->head.dlen += in_size;			}						status 	= binhex_encode_buff(p_bh_encode_obj, 							(unsigned char *)in_buff, 							in_size);		}	}					*real_size = p_bh_encode_obj->pos_outbuff;	return status;}