meta, C++


/* Module exe  j2h                                j2h.ic

   *****************************************************************************

   Authors     GRT

*/

#define __MAIN_PROG__

#define NOSORT

#include for_spu.h

#include rbuffer.cpp

#include btree.cpp

#include btree_ut.cpp

#include brcode.cpp

#include roseut.cpp

#include mshtm.cpp

#include java2htm.cpp

#include ut_web.cpp

#include st_htm.cpp

#include ut_htmst.cpp

#include ut_incs.cpp

#include scanner1.cpp

#include main.h

||   ( argc < 2 )

)    

    {

    printf(
// -----------------------------------------------------------------------------

    "\n"

    "\n    Syntax:  j2h    dir/see.j2h                 // create dir/j2h"

    "\n             j2h    dir=selector                // create dir/j2h"

    "\n             j2h    dir                         // create dir/j2h"

    "\n             j2h [s]dir                         // create dir/j2h"

    "\n             j2h    dir  t0  t1  t2  [ web ]"

    "\n             j2h   ?dir                         // first do: attrib -r /s"

    "\n                                                // then j2h, then check HTM"

    "\n             j2h   !dir                         // strip AutoComment"

    "\n             j2h   -dir                         // check import statements"

    "\n             j2h   +dir                         // copy packages to j:/"

    "\n             j2h  ++dir  ourRoot                // extract to ourRoot"

    "\n             j2h   =dir  ourRoot  e1  e2 ...    // create tree ourRoot/n"

    "\n             j2h  ==dir  ourRoot  e1  e2 ...    // create tree ourRoot/n/*e*"

    "\n"

    "\n    Effect:  Make 'dir/j2h the web site showing in HTML format alle *.java"

    "\n             files in the tree 'dir (based on the sources that are subject"

    "\n             to extraction in case ++...). If a selector is given, all files"

    "\n             not containing it as a substring in their path will be ignored."

    "\n"

    "\n             AutoComment is comment generated for the benefit of code"

    "\n             generators."

    "\n"

    "\n             If you want to create hot spots linking code to documentation"

    "\n             you need a file 'dir/index/to_docu created by projweb.exe."

    "\n             You may name it in 'dir/index/to_web."

    "\n"

    "\n    Ensure:  t0 = Any text directly above the Web's title"

    "\n             t1 = Web's title"

    "\n             t2 = Web's subtitle"

    "\n"

    "\n             These three parameters - and more - can also be specified via a"

    "\n             configuration file 'dir/aName.j2h (in which case the first"

    "\n             parameter must be the path to this file)."

    "\n"

    "\n             If you have a configuration file, it usually has the form"

    "\n"

    "\n                         -A URL"

    "\n                         -0"

    "\n                         -1 Web's title"

    "\n                         -2"

    "\n                         -s dir"

    "\n"

    "\n             to say that you want to see all code under 'dir (only packages"

    "\n             for which there is a -s command will be shown in the generated"

    "\n             web: If you want to browse only certain subpackages, name each"

    "\n             and only these packages in -s commands). The URL following -A is"

    "\n             to specify target ALL. Commands of the form"

    "\n"

    "\n                         -L URL"

    "\n"

    "\n             specify code documentation portals (usually pages in a Project"

    "\n             Web created by projweb.exe). Lines with a space in their first"

    "\n             column are not be seen by j2h.exe - they are comment."

    "\n"

    "\n    Author:  Gebhard.Greiter@softlab.de, 2019.08.29.1030"

    "\n"
//     Make  :  compile, dann:  type \ic\muster\patt_j2h >> j2j.exe
//
//              Es muss type, statt cat, verwendet werden (da sonst \n wie auf
//              Unix dargestellt wird).
//
// -----------------------------------------------------------------------------

    LA_

    BOOL noAutoComment = false ;

    BOOL archive       = false ;

    if At( par1, "++" )

        {

        archive = true ;  par1++ ;

        }

    char m = *par1 ;  if in_str( m, "-+!=?" )  par1 += 1 ;

    if ( m == '?' )  execAt( par1, 0 );

    unix_me( par1 );     // muss sein

    if ( m == '=' )

        {

        Btree ourNames ;  str_set store ;

        if ( argc < 4 )

            {

            m_errMess "User: not enough parameters, say j2h ?" m_

            ret_error

            }

        ;

        int i = 2 ;  while ( ++i < argc )  ourNames.StrIns( 'e', argv[i] );

        char * ourAbbr[ 8001 ] ;

        create_our_tree( stdout, par1, par2, ourNames, ourAbbr, 8000, store );

        exit( 0 );

        }

    Java2Htm u ;  if ( 2 < argc )  u.thisWeb_0 = par2 ;

    if ( 3 < argc )  u.thisWeb_t = par3 ;

    if ( 4 < argc )  u.thisWeb_s = par4 ;

    if ( 5 < argc )  u.docuWeb   = par5 ;

    u.noAutoComment = ( m == '!' );

    u.noAutoComment = true        ;

    ___

    u.make_htm_dir( par0, par1, m, (( archive )?  par2 : 0 ) );

    ___

    printf( "\nend of make_htm_dir" );

    if ( m == '-' )  u.check_imports();

    if not_is_dir( par1 )

        {

        m_errMess "User: no such folder: %s" m_

        par1, ret_error

        }

    char1000  root ;  s_( root, "%s/j2h", par1 );

    if    ( m == '?' )

    then   

        {

        Ut_htm_static  ust ;  ust.check_htm_dir( root, 0, 0 );

        }

    printf( "\nerrno = %i, now exit ...\n", errno );

    if    (1)

    then   

        {

        S_ "DEL x.*    " _Do

        S_ "DEL xx_*   " _Do

        S_ "DEL tmp_*  " _Do

        S_ "DEL *.xxx  " _Do

        Unlink( "incsMe"   );

        Unlink( "x_pretty" );

        Unlink( "__j1"     );

        S_ "dir .\\x*" _Do

        }

    if    is_dir( par1 )

    then   

        {

        S_ "rm %s/xx_*", par1 _Do

        S_ "rm %s/x1"  , par1 _Do

        }

    exit( 0 );

    char400 conf ; _searchenv( "jivelint.conf", "PATH", conf ); ok    _1(conf)

    if    ( *conf )

    then   

        {

        FILE * f = create( "11.bat" );

        fprintf( f, "\njivelint -config \"%s\" -projects check.jnt", conf );

        fprintf( f, "\nhtmcheck %s", par1 );

        close( f );

        printf( "\ncall 11.bat = jivelint + htmcheck\n" );

        }

    else  printf( "\nno jivelint.exe\n" );
// _1( errno+0 )

    LM_

    

    
top . C++
Include-structure of
todir / j2h.cpp

.   brcode.cpp
.   .   brcode.h
.   .   .   for_spu.h
.   .   .   .   for_all.h
.   .   .   .   .   exec_ut.h
.   .   .   .   .   .   exec_ut.h3
.   .   .   .   .   .   macros_1.h
.   .   .   .   .   .   traceco.h
.   .   .   .   .   precomp.h
.   .   .   .   .   .   basis.h
.   .   .   .   .   .   .   compiler.h
.   .   .   .   .   .   .   dmlerr.h
.   .   .   .   .   .   en.h
.   .   .   .   .   .   .   en_lec.h
.   .   .   .   .   .   limits.h
.   .   .   .   .   .   mt.h
.   .   .   .   .   .   obsolete.h
.   .   .   .   .   .   ot.h
.   .   .   .   .   .   st.h
.   .   .   .   .   .   trace.h
.   .   .   .   .   standard.h
.   .   .   .   .   toscreen.h
.   .   .   .   spu.h
.   .   .   .   .   help_gen.h
.   .   .   .   .   .   help_gen.h3
.   .   .   .   .   rbuffer.h
.   .   .   .   .   .   rbuffer.h3
.   .   .   .   .   .   str_set.h
.   .   .   .   .   .   .   str_set.h3
.   .   .   .   .   safe_uts.h
.   .   .   .   .   .   safe_uts.h3
.   .   .   .   .   ut_repl.h
.   .   .   brcode.h3
.   .   .   btree.h
.   .   .   .   btree.h3
.   java2htm.cpp
.   .   java2htm.c1
.   .   java2htm.h
.   .   .   java2htm.h3
.   .   .   scanner1.h
.   .   .   st_htm.h
.   .   .   ut_htmst.h
.   .   .   .   ut_htmst.h3
.   .   .   ut_incs.h
.   .   .   .   btree_ut.h
.   .   .   .   .   btree_ut.h3
.   .   .   ut_web.h
.   main.h
.   .   rest.cpp
.   .   .   exec_ut.cpp
.   .   .   .   ewinapp.h
.   .   .   .   .   ewinapp.h3
.   .   .   .   .   exceptns.h
.   .   .   .   exec_ut.c1
.   .   .   .   procnestoff
.   .   .   globals.cpp
.   .   .   rbuffer.cpp
.   .   .   .   rbuffer.c1
.   .   .   safe_uts.cpp
.   .   .   .   safe_uts.c1
.   .   .   standard.cpp
.   .   .   .   standard.c1
.   .   .   str_set.cpp
.   .   .   .   comp_mr.cpp
.   .   .   .   str_set.c1
.   .   .   toscreen.cpp
.   .   .   ut_repl.cpp
.   .   signals.cpp
.   mshtm.cpp
.   .   mshtm.h
.   btree.cpp
.   .   btree.c1
.   roseut.cpp
.   .   roseut.c1
.   .   roseut.h
.   .   .   roseut.h3
.   scanner1.cpp
.   st_htm.cpp
.   ut_htmst.cpp
.   .   ut_htmst.c1
.   btree_ut.cpp
.   ut_incs.cpp
.   ut_web.cpp

83 include files
top . C++