Esempio n. 1
0
int buffer_to_output(char *pBuffer, FILE *pOutput)
{
    int iRetval = 0;
    macro_list *pMacros = NULL;

    /*  Tokenize the macros and their corresponding values.
     */
    pMacros = extract_macros(pBuffer);
    if(pMacros != NULL) {
	/*  Perform forward to backslash conversion on those macros known to be
	 *      path information only.
	 */
	slash_convert(pMacros, "JBOOTDIRS");
	slash_convert(pMacros, "JDIRS");
	slash_convert(pMacros, "DEPTH");
	slash_convert(pMacros, "NS_DEPTH");
	slash_convert(pMacros, "PACKAGE");
	slash_convert(pMacros, "JMC_GEN_DIR");
	slash_convert(pMacros, "DIST_PUBLIC");

	/*  Process some of the macros, and convert them
	 *      into different macros with different data.
	 */
	morph_macro(&pMacros, "JMC_GEN", "JMC_HEADERS", "$(JMC_GEN_DIR)\\%s.h");
	morph_macro(&pMacros, "JMC_GEN", "JMC_STUBS", "$(JMC_GEN_DIR)\\%s.c");
	morph_macro(&pMacros, "JMC_GEN", "JMC_OBJS", ".\\$(OBJDIR)\\%s.obj");
	morph_macro(&pMacros, "CSRCS", "C_OBJS", ".\\$(OBJDIR)\\%s.obj");
	morph_macro(&pMacros, "CPPSRCS", "CPP_OBJS", ".\\$(OBJDIR)\\%s.obj");
	morph_macro(&pMacros, "REQUIRES", "LINCS", "-I$(XPDIST)\\public\\%s");

	create_classroot( &pMacros );

	/*  Output the Macros and the corresponding values.
	 */
	iRetval = write_macros(pMacros, pOutput);

	/*  Output rule file inclusion
	 */
	if(iRetval == 0)    {
	    iRetval = output_rules(pOutput);
	}

	/*  Output explicit build rules/dependencies for JMC_GEN.
	 */
	if(iRetval == 0)    {
	    iRetval = explicit_rules(pMacros, "JMC_GEN", pOutput);
	}

	if(iRetval == 0)    {
	    iRetval = output_end(pOutput);
	}
	/*  Free off the macro list.
	 */
	free_macro_list(pMacros);
	pMacros = NULL;
    }

    return(iRetval);
}
Esempio n. 2
0
  /*!
    @brief Adapter for SIMD read-only range

    Convert an existing range specified by two iterators into a SIMD aware
    read-only iterator returning SIMD pack of optimal cardinal for current
    architecture.

    @usage_output{memory/output_range.cpp,memory/output_range.out}

    @param r A Range addressing a contiguous memory block

    @return An instance of output_range
  **/
  template<class Iterator> inline
  boost::iterator_range< output_iterator<Iterator> >
  output_range( Iterator begin, Iterator end )
  {
    BOOST_ASSERT_MSG
    ( is_aligned(std::distance(begin,end) , output_iterator<Iterator>::cardinal)
    , "Range being adapted holds a non integral number of SIMD pack."
    );

    return boost::make_iterator_range( output_begin(begin), output_end(end) );
  }
Esempio n. 3
0
void html_output_file( void )
/***************************/
{
    ctx_def     *ctx;

    output_hdr();
    for( ctx = Ctx_list; ctx != NULL; ctx = ctx->next ) {
        if( !Remove_empty || !ctx->empty || ctx->req_by_link ) {
            if( !Exclude_special || !is_special_topic( ctx, FALSE ) ) {
                output_ctx_hdr( ctx );
                output_ctx_sections( ctx );
            }
        }
    }
    output_end();
}
Esempio n. 4
0
void ib_output_file( void )
/*************************/
{
    ctx_def                     *ctx;

    if( IB_def_topic != NULL ) {
        fprintf( Out_file, "DEFTOPIC::::\"%s\"\n", IB_def_topic );
        free( IB_def_topic );
    }
    if( IB_help_desc != NULL ) {
        fprintf( Out_file, "DESCRIPTION::::\"%s\"\n", IB_help_desc );
        free( IB_help_desc );
    }

    for( ctx = Ctx_list; ctx != NULL; ctx = ctx->next ) {
        if( !Remove_empty || !ctx->empty || ctx->req_by_link ) {
            output_ctx_hdr( ctx );
            output_ctx_sections( ctx );
        }
    }
    output_end();
}