[m-rev.] for review: fix library intialisers / finalisers

Julien Fischer juliensf at cs.mu.OZ.AU
Wed May 17 14:40:27 AEST 2006


On Wed, 17 May 2006, Julien Fischer wrote:

> > > -    if (need_initialization_code) {
> > > -        printf("#define MR_MAY_NEED_INITIALIZATION\n\n");
> > > +    if (num_errors > 0) {
> > > +        fputs("/* Force syntax error, since there were */\n", stdout);
> > > +        fputs("/* errors in the generation of this file */\n", stdout);
> > > +        fputs("#error \"You need to remake this file\"\n", stdout);
> > > +        if (output_file_name != NULL) {
> > > +            (void) fclose(stdout);
> > > +            (void) remove(output_file_name);
> > > +        }
> > > +        return EXIT_FAILURE;
> > > +    }
> > > +
> > > +    return EXIT_SUCCESS;
> >
> > How do you force a syntax error in a .init file?
>
> I didn't write that code, so I'm not sure what the original intention was.
>

Sorry, I must have been asleep when I wrote that.  You're right, that
code is in the wrong spot.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list