Esempio n. 1
0
/*-------------------------------------------------------------------------
 * Function:	main
 *
 * Purpose:	Main entry point.
 *
 * Return:	Success:	exit(0)
 *
 *		Failure:	exit(1)
 *
 * Programmer:	Albert Cheng
 *		2010/4/1
 *
 *-------------------------------------------------------------------------
 */
int
main(void)
{
    print_header();

    /* Generate embedded library information variable definition */
    make_libinfo();

    print_footer();

    HDexit(0);
}
Esempio n. 2
0
/*-------------------------------------------------------------------------
 * Function:  main
 *
 * Purpose:   Main entry point.
 *
 * Return:    Success:    EXIT_SUCCESS
 *-------------------------------------------------------------------------
 */
int
main(int argc, char *argv[])
{
    char    *fname = NULL;
    FILE    *f;    /* temporary holding place for the stream pointer
                    * so that rawoutstream is changed only when succeeded
                    */

    if(argc > 1)
        fname = argv[1];

    /* First check if filename is string "NULL" */
    if(fname != NULL) {
        /* binary output */
        if((f = HDfopen(fname, "w")) != NULL)
            rawoutstream = f;
    }
    if(!rawoutstream)
        rawoutstream = stdout;

    print_header();

    /* Generate embedded library information variable definition */
    make_libinfo();

    print_footer();

    if(rawoutstream && rawoutstream != stdout) {
        if(HDfclose(rawoutstream))
            fprintf(stderr, "closing rawoutstream");
        else
            rawoutstream = NULL;
    }

    HDexit(EXIT_SUCCESS);
}