Changeset 990 for trunk/guitools/shared


Ignore:
Timestamp:
Dec 9, 2016, 11:06:20 AM (9 years ago)
Author:
Herwig Bauernfeind
Message:

GUITools: All changes that have built over time.

Location:
trunk/guitools/shared
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/shared/inittempdir.vrs

    r638 r990  
    77    HaveNoTMPDIR  = 0
    88    TempDir       = translate(value('TMPDIR',,'OS2ENVIRONMENT'),'\','/')
    9     IF options.!debug == 1 THEN say '  TMPDIR="'TempDir'"'
     9    IF options.!debug == 1 THEN say '  TMPDIR = "'TempDir'"'
    1010    if TempDir = '' then do
    1111        HaveNoTMPDIR  = 1
    1212        TempDir = translate(value('TEMP',,'OS2ENVIRONMENT'),'\','/')
    13         IF options.!debug == 1 THEN say '  TEMP="'TempDir'"'
     13        IF options.!debug == 1 THEN say '  TEMP = "'TempDir'"'
    1414    end
    1515    if TempDir = '' then do
    1616        TempDir = translate(value('TMP',,'OS2ENVIRONMENT'),'\','/')
    17         IF options.!debug == 1 THEN say '  TMP="'TempDir'"'
     17        IF options.!debug == 1 THEN say '  TMP = "'TempDir'"'
    1818    end
    1919    if TempDir = '' then do
  • trunk/guitools/shared/nlv.vrs

    r924 r990  
    3131        when settings.!nlv8dot3 = 0 then filestem = filestem||'_'
    3232        when translate(filestem) = "EVFSGUI" then filestem = "evfsi_"
    33         otherwise filestem = SUBSTR( filestem, 1, 5 )||'_'
     33        otherwise filestem = strip(SUBSTR( filestem, 1, 5 ))||'_'
    3434    end
    3535    say '  NLV filestem   = "'filestem'"'
     
    6060    Suffix  = arg(3)
    6161    PathVar = arg(4)
    62     say time()" NLVSearch() started"
    6362    NLVSrchDone = 0
    6463    NLVFile = ""
     
    6766        say '  NLV 'Suffix' file   = "'filestem||nlv'.'Suffix'"'
    6867        select
     68            when VRFileExists(execdir'\'filestem||nlv'.'Suffix) then do
     69                say "  Attempt1: NLV "Suffix" file found directly!"
     70                NLVFile = strip(execdir'\'filestem||nlv'.'Suffix,'L','\')
     71                NLVSrchDone = 1
     72            end
    6973            when VRFileExists(srchRoot'\'SubDir'\'filestem||nlv'.'Suffix) then do
    70                 say "  NLV "Suffix" file found directly!"
     74                say "  Attempt2: NLV "Suffix" file found directly!"
    7175                NLVFile = strip(srchRoot'\'SubDir'\'filestem||nlv'.'Suffix,'L','\')
     76                NLVSrchDone = 1
     77            end
     78            when SysSearchPath(PathVar, filestem||nlv'.'Suffix) \= '' then do
     79                execDir = VRParseFileName(SysSearchPath(PathVar, filestem||nlv'.'Suffix),"DP")
     80                say "  Attempt3: NLV "Suffix" file found via "PathVar
     81                NLVFile = strip(execdir'\'filestem||nlv'.'Suffix,'L','\')
    7282                NLVSrchDone = 1
    7383            end
     
    7585                ok = SysFileTree(UnixRoot||'\usr\share\os2\'filestem||nlv'.'Suffix,nlvmsg.,'FOS')
    7686                if nlvmsg.0 = 1 then do
    77                     say "  Found  NLV "Suffix" file in rpm/yum subdirectory"
     87                    say "  Attempt4: Found  NLV "Suffix" file in rpm/yum subdirectory"
    7888                    NLVFile = VRParseFilename(nlvmsg.1,"DPN")'.'Suffix
    7989                    say "  Adding NLV "Suffix" path to "PathVar
     
    8292                    NLVSrchDone = 1
    8393                end
    84                 else say "  NLV "Suffix" file NOT in rpm/yum subdirectory."
     94                else say "  NLV "Suffix" file NOT in rpm/yum "UnixRoot||'\usr\share\os2\'filestem||nlv'.'Suffix"subdirectory."
    8595            end
    86             when SysSearchPath(PathVar, filestem||nlv'.'Suffix) \= '' then do
    87                 execDir = VRParseFileName(SysSearchPath(PathVar, filestem||nlv'.'Suffix),"DP")
    88                 say "  NLV "Suffix" file found via "PathVar
    89                 NLVFile = strip(execdir'\'filestem||nlv'.'Suffix,'L','\')
    90                 NLVSrchDone = 1
    91             end
     96           
    9297            otherwise do
    9398                say "  Searching subdirectories"
  • trunk/guitools/shared/sambainit.vrs

    r908 r990  
    207207    if \VRFileExists(samba.!smbconf) then call _ErrorDataFileNotFound samba.!smbconf' is not present.'
    208208    IF options.!debug == 1 then say '  Samba smb.conf = "'samba.!smbconf'"'
     209
     210    /* complete shadow copy of smb.conf in temporary directory - should always be created on the fly */
     211    /* before reading from it */
     212    samba.!shadowsmbconf = TempDir||'smb.conf'
    209213
    210214    /* find all datafiles - their locations are fixed */
  • trunk/guitools/shared/smbtree.vrs

    r925 r990  
    55    say time()' _RefreshTree() started'
    66    FirstRun = 0
    7     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", "Refreshing network")
     7    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", " Refreshing network")
    88    ok = SysFileDelete(samba.!msg)
    99    parse var debuglevel .'='level
     
    5454    if errstat = "READY:" then do
    5555        if file2stem(samba.!error,"treeError.") > 1 then do
    56             ok = VRSet("DT_STATUSBAR","Caption", treeError.2)
     56            ok = VRSet("DT_STATUSBAR","Caption", " "||treeError.2)
    5757        end
    5858    end
     
    458458    if UserCred = '-N' then UserCred = ''
    459459
    460     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", "Ready.")
     460    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", " Ready.")
    461461    say time()' _AddSharesDisplay() loop end'
    462462return
     
    501501    address cmd 'detach 'samba.!smbtreeexe' 'BroadCast' -D 'UserCred' 'debuglevel' >'samba.!msg
    502502
    503     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Enumerating workgroups")
     503    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Enumerating workgroups")
    504504    do while stream(samba.!msg,'c','open read') <> "READY:"
    505505        ok = SysSleep(1)
     
    563563    address cmd 'detach 'samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg
    564564
    565     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Obtaining IP from "machine)
     565    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Obtaining IP from "machine)
    566566    do while stream(samba.!msg,'c','open read') <> "READY:"
    567567        ok = SysSleep(0.33)
     
    590590    address cmd 'detach 'samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg
    591591
    592     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Obtaining capabilities from "machine)
     592    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Obtaining capabilities from "machine)
    593593    do while stream(samba.!msg,'c','open read') <> "READY:"
    594594        ok = SysSleep(0.33)
     
    625625    address cmd 'detach 'samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg
    626626
    627     if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Querying "machine" for roles")
     627    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption"," Querying "machine" for roles")
    628628    do while stream(samba.!msg,'c','open read') <> "READY:"
    629629        ok = SysSleep(0.33)
     
    665665file2stem:
    666666    say time()' file2stem() started'
    667     msgfile = arg(1)
    668     msgstem = arg(2)
    669     delmsgfile = translate(arg(3))
     667    msgfile = arg(1) /* file to create stem of */
     668    msgstem = arg(2) /* name of the stem */
    670669    if right(msgstem,1) <> '.' then msgstem = msgstem'.'
     670    delmsgfile = translate(arg(3)) /* erase file after transfer */
     671    skipwords = strip(arg(4)||' creating lame tdb( ***') /* skip lines with these words */
     672    do J = 1 to words(skipwords)
     673        skip.J = translate(word(skipWords,J))
     674    end
     675    skip.0 = J
     676   
    671677    say '  file2stem("'msgfile'","'msgstem'")'
    672678    dyn = 'drop 'msgstem
    673679    interpret dyn
    674680    stemcount = 0
     681    skipped = 0
    675682    do while lines(msgfile) > 0
    676683        stemcount = stemcount + 1
    677684        inline = linein(msgfile)
    678         if pos('creating lame',inline) > 0 | pos('tdb(',inline) > 0 then do
    679             stemcount = stemcount - 1
    680             iterate
    681         end
    682         dyn = msgstem||stemcount' = inline'
    683         interpret dyn
     685        SkipIt = 0
     686        do J = 1 to skip.0
     687        if pos(skip.J,translate(inline)) > 0 then do
     688                skipit = 1
     689                stemcount = stemcount - 1
     690                skipped = skipped + 1
     691                leave
     692            end
     693        end
     694        if \SkipIt then do
     695            dyn = msgstem||stemcount' = inline'
     696            interpret dyn
     697        end
    684698    end
    685699    dyn = msgstem||"0 = "stemcount
     
    689703   
    690704    drop msgfile msgstem
    691     say time()' file2stem() ['stemcount'] done'   
     705    say time()' file2stem() ['stemcount' added, 'skipped' skipped] done'   
    692706return stemcount
Note: See TracChangeset for help on using the changeset viewer.