Logo Search packages:      
Sourcecode: t1utils version File versions  Download package

void Clp_RestoreParser ( Clp_Parser clp,
const Clp_ParserState *  state 
)

Restore parser state from state into clp.

Parameters:
clp the parser
state parser state
The parser state in state is restored into clp. The next call to Clp_Next() will return the same result as it would have at the time state was saved (probably by Clp_SaveParser(clp, state)).

A parser state contains information about arguments (argc and argv; see Clp_SetArguments()) and option processing (Clp_SetOptionProcessing()), but not about options (Clp_SetOptions()). Changes to options and value types are preserved across Clp_RestoreParser().

See also:
Clp_NewParserState, Clp_SaveParser

Definition at line 1487 of file clp.c.

References Clp_Parser::internal.

{
    Clp_Internal *cli = clp->internal;
    cli->argv = state->argv;
    cli->argc = state->argc;
    memcpy(cli->option_chars, state->option_chars, Clp_OptionCharsSize);
    cli->xtext = state->xtext;
    cli->option_processing = state->option_processing;
    cli->is_short = state->is_short;
    cli->whole_negated = state->whole_negated;
    cli->current_short = state->current_short;
    cli->negated_by_no = state->negated_by_no;
    if (cli->opt_generation == state->opt_generation)
      cli->current_option = state->current_option;
    else
      cli->current_option = -1;
}


Generated by  Doxygen 1.6.0   Back to index