[m-dev.] for review: use readline in the browser
Zoltan Somogyi
zs at cs.mu.OZ.AU
Wed May 12 12:33:01 AEST 1999
> +:- pragma c_code(call_trace_getline(Prompt::in, Line::out),
> + [will_not_call_mercury],
> + "
> + char *line;
> + char *mercury_string;
> +
> + line = MR_address_of_trace_getline((char *)Prompt);
The change looks good, except I would write the above as
line = (*MR_address_of_trace_getline)((char *) Prompt);
to make clear what is happening.
Being paranoid, I would also check beforehand whether the function pointer
is NULL.
Zoltan.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list