/**/
/* run with 1 argument = ini file to look at */
/* for example: showini c:\mptn\etc\tcpos2.ini          - Internet 
'Other' dialer info. */
/* for example: showini d:\spllmstr\spllmstr.ini */

showapp = ''

parse arg inifile showapp

say 'inifile ='inifile'='
say 'showapp ='showapp'='

if ( showapp = 'all' ) then
    showapp = 'ALL'

if ( inifile = '' ) then
    Do
    say 'Run with 1 argument (name of an *.ini file) to show'
    say 'or 2 arg.s (name of an *.ini file) to show and app name to show'
    exit
    End

call sysini inifile, 'ALL:', 'apps.'
say "apps.0 ="apps.0
if ( result \= 'ERROR:' ) then
    Do i = 1 to apps.0
    call sysini inifile, apps.i, 'ALL:', 'keys'
    say "app ="apps.i   "keys.0 ="keys.0
    if ( showapp = '' | ( showapp \= 'ALL' & apps.i \= showapp ) ) then
        iterate i
    else
        Do
        do c = 1 to keys.0
            say apps.i"["i"]"keys.c"["c"] =" sysini( inifile, apps.i, keys.c )"="
        End
    end /* do */

/** Uncommenting out the lines below will let you delete ini file items!
      VERY DANGEROUS unless you know what you are doing
**/
/**    say 'Delete whole app.' apps.i '?'**/

/**
    say 'hit return'
    parse pull ans
**/

/**
    if ( ans ='Y' ) then
        Do
        say 'Deleting whole app.'
        call sysini inifile, apps.i, 'DELETE:'
        End
**/
    end

RETURN


