trm_lookchr()

Purpose

Inspects the input buffer

Old name

#define _lookchr trm_lookchr

Syntax

int trm_lookchr(take)

Parameters

int take

Indicates whether character should be removed from the buffer

Description

The trm_lookchr() function returns the next character in the input buffer. If the buffer is empty, GR_NOCHAR or NULL+INT is returned.

If the parameter take is TRUE, the character is removed from the input buffer. Otherwise it remains there and another call to trm_lookchr() returns the same character.

Return values

Returns next character in input buffer

See also

trm_ctrls()