Ejemplo n.º 1
0
int CPROC KeyGetGatheredLine( PCHAT_LIST list, LOGICAL sendAlt, PUSER_INPUT_BUFFER pci )
{
	PTEXT tmp_input = GetUserInputLine( pci );
	PTEXT line = BuildLine( tmp_input );
	// input is in segments of 256 characters... collapse into a single line.
	list->input.command_mark_start = list->input.command_mark_end = 0;
	if( line && GetTextSize( line ) )
	{
		list->input.phb_Input->pBlock->pLines[0].flags.nLineLength = (int)LineLengthExEx( list->input.CommandInfo->CollectionBuffer, FALSE, 8, NULL );
		list->input.phb_Input->pBlock->pLines[0].pLine = list->input.CommandInfo->CollectionBuffer;
		list->input.phb_Input->flags.bUpdated = 1;
		BuildDisplayInfoLines( list->input.phb_Input, 0, list->input_font );
		if( line ) {
			if( sendAlt ) list->AltInputData( list->psvAltInputData, line );
			else list->InputData( list->psvInputData, line );
		}
	}
	else if( line )
		LineRelease( line );

	if( !line ) {
		if( sendAlt ) list->AltInputData( list->psvAltInputData, NULL );
		else list->InputData( list->psvInputData, NULL );
	}

	return UPDATE_COMMAND; 
}
Ejemplo n.º 2
0
void ReformatInput( PCHAT_LIST list )
{
		if( !list->input.phb_Input->pBlock )
		{
			list->input.phb_Input->pBlock = list->input.phb_Input->region->pHistory.root.next;
			list->input.phb_Input->pBlock->nLinesUsed = 1;
			list->input.phb_Input->pBlock->pLines[0].flags.deleted = 0;
			list->input.phb_Input->nLine = 1;
		}
		list->input.phb_Input->pBlock->pLines[0].pLine = list->input.CommandInfo->CollectionBuffer;
		SetStart( list->input.phb_Input->pBlock->pLines[0].pLine );
		{
			DECLTEXT( blank_eol, "" );
			list->input.phb_Input->pBlock->pLines[0].nLineLength = LineLengthExEx( list->input.phb_Input->pBlock->pLines[0].pLine, FALSE, 8, (PTEXT)&blank_eol );
		}
		//if( !pdp->flags.bDirect && pdp->flags.bWrapCommand )
		BuildDisplayInfoLines( list->input.phb_Input, list->input_font );
}