Changeset 1055 for trunk


Ignore:
Timestamp:
Jun 12, 2018, 5:01:06 PM (7 years ago)
Author:
Herwig Bauernfeind
Message:

Unify debug formatting

Location:
trunk/guitools/shared
Files:
5 edited

Legend:

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

    r1053 r1055  
    320320
    321321    if browsepath = '' then browsepath = '\'
     322    if pos(" ",browsepath)> 0 then browsepath = '"'browsepath'"'
    322323    if UserCred = "" then UserCred = "-N"
    323324
  • trunk/guitools/shared/cltinit.vrs

    r1027 r1055  
    111111    end
    112112
    113     if samba.!smbclientexe = "" then call _ErrorBinaryNotFound " could not find smbclient.exe!"
     113    if samba.!smbclientexe = "" then call _ErrorBinaryNotFound "Could not find \smbclient.exe!"
    114114
    115115    samba.!bin = VRParseFileName(samba.!smbclientexe,'DP')
     
    118118    /* net.exe */
    119119    samba.!netexe = samba.!bin'\net.exe'
    120     if \VRFileExists(samba.!netexe) then call _ErrorBinaryNotFound " could not find net.exe!"
     120    if \VRFileExists(samba.!netexe) then call _ErrorBinaryNotFound "Could not find \net.exe!"
    121121    IF options.!debug == 1 THEN say '  net.exe        = "'samba.!netexe'"'
    122122
    123123    /* testparm.exe */
    124124    samba.!testparmexe = samba.!bin'\testparm.exe'
    125     if \VRFileExists(samba.!testparmexe) then call _ErrorBinaryNotFound " could not find testparm.exe!"
     125    if \VRFileExists(samba.!testparmexe) then call _ErrorBinaryNotFound "Could not find \testparm.exe!"
    126126    IF options.!debug == 1 THEN say '  testparm.exe   = "'samba.!testparmexe'"'
    127127
    128128    /* smbtree.exe */
    129129    samba.!smbtreeexe = samba.!bin'\smbtree.exe'
    130     if \VRFileExists(samba.!smbtreeexe) then call _ErrorBinaryNotFound " could not find smbtree.exe!"
     130    if \VRFileExists(samba.!smbtreeexe) then call _ErrorBinaryNotFound "Could not find \smbtree.exe!"
    131131    IF options.!debug == 1 THEN say '  smbtree.exe    = "'samba.!smbtreeexe'"'
    132132
    133133    /* nmblookup.exe */
    134134    samba.!nmblookupexe = samba.!bin'\nmblookup.exe'
    135     if \VRFileExists(samba.!nmblookupexe) then call _ErrorBinaryNotFound " could not find nmblookup.exe!"
     135    if \VRFileExists(samba.!nmblookupexe) then call _ErrorBinaryNotFound "Could not find \nmblookup.exe!"
    136136    IF options.!debug == 1 THEN say '  nmblookup.exe  = "'samba.!nmblookupexe'"'
    137137
    138138    /* smbspool.exe */
    139139    samba.!smbspoolexe = samba.!bin'\smbspool.exe'
    140     if \VRFileExists(samba.!smbspoolexe) then call _ErrorBinaryNotFound " could not find smbspool.exe!"
     140    if \VRFileExists(samba.!smbspoolexe) then call _ErrorBinaryNotFound "Could not find \smbspool.exe!"
    141141    IF options.!debug == 1 THEN say '  smbspool.exe   = "'samba.!smbspoolexe'"'
    142142
    143143    /* rpcclient.exe */
    144144    samba.!rpcclientexe = samba.!bin'\rpcclient.exe'
    145     if \VRFileExists(samba.!rpcclientexe) then call _ErrorBinaryNotFound " could not find rpcclient.exe!"
     145    if \VRFileExists(samba.!rpcclientexe) then call _ErrorBinaryNotFound "Could not find \rpcclient.exe!"
    146146    IF options.!debug == 1 THEN say '  rpcclient.exe  = "'samba.!rpcclientexe'"'
    147147
    148148    /* smbcacls.exe */
    149149    samba.!smbcaclsexe = samba.!bin'\smbcacls.exe'
    150     if \VRFileExists(samba.!smbcaclsexe) then call _ErrorBinaryNotFound " could not find smbcacls.exe!"
     150    if \VRFileExists(samba.!smbcaclsexe) then call _ErrorBinaryNotFound "Could not find \smbcacls.exe!"
    151151    IF options.!debug == 1 THEN say '  smbcacls.exe  = "'samba.!smbcaclsexe'"'
    152152
  • trunk/guitools/shared/nlv.vrs

    r990 r1055  
    2424    parse var execDir srchroot '\BIN'
    2525
    26     say '  NLV execDir    = "'execDir'"'
    27     say '  NLV srchroot   = "'srchRoot'"'
     26    if options.!debug = 1 then say '  NLV execDir    = "'execDir'"'
     27    if options.!debug = 1 then say '  NLV srchroot   = "'srchRoot'"'
    2828
    2929    filestem = VRParseFileName( execPath, "N")
     
    3333        otherwise filestem = strip(SUBSTR( filestem, 1, 5 ))||'_'
    3434    end
    35     say '  NLV filestem   = "'filestem'"'
     35    if options.!debug = 1 then say '  NLV filestem   = "'filestem'"'
    3636
    3737    /* First, figure out what language/message file to use */
     
    5555/*:VRX         NLVSearch
    5656*/
    57 NLVSearch: procedure expose filestem execdir srchroot
     57NLVSearch: procedure expose filestem execdir srchroot options.
    5858    nlv     = arg(1)
    5959    SubDir  = arg(2)
     
    6464    UnixRoot = value("UNIXROOT",,"OS2ENVIRONMENT")
    6565    do until NLVSrchDone = 1
    66         say '  NLV 'Suffix' file   = "'filestem||nlv'.'Suffix'"'
     66        IF options.!debug == 1 then say '  NLV 'Suffix' file   = "'filestem||nlv'.'Suffix'"'
    6767        select
    6868            when VRFileExists(execdir'\'filestem||nlv'.'Suffix) then do
    69                 say "  Attempt1: NLV "Suffix" file found directly!"
     69                IF options.!debug == 1 then say "  Attempt1: NLV "Suffix" file found directly!"
    7070                NLVFile = strip(execdir'\'filestem||nlv'.'Suffix,'L','\')
    7171                NLVSrchDone = 1
    7272            end
    7373            when VRFileExists(srchRoot'\'SubDir'\'filestem||nlv'.'Suffix) then do
    74                 say "  Attempt2: NLV "Suffix" file found directly!"
     74                IF options.!debug == 1 then say "  Attempt2: NLV "Suffix" file found directly!"
    7575                NLVFile = strip(srchRoot'\'SubDir'\'filestem||nlv'.'Suffix,'L','\')
    7676                NLVSrchDone = 1
     
    7878            when SysSearchPath(PathVar, filestem||nlv'.'Suffix) \= '' then do
    7979                execDir = VRParseFileName(SysSearchPath(PathVar, filestem||nlv'.'Suffix),"DP")
    80                 say "  Attempt3: NLV "Suffix" file found via "PathVar
     80                IF options.!debug == 1 then say "  Attempt3: NLV "Suffix" file found via "PathVar
    8181                NLVFile = strip(execdir'\'filestem||nlv'.'Suffix,'L','\')
    8282                NLVSrchDone = 1
     
    8585                ok = SysFileTree(UnixRoot||'\usr\share\os2\'filestem||nlv'.'Suffix,nlvmsg.,'FOS')
    8686                if nlvmsg.0 = 1 then do
    87                     say "  Attempt4: Found  NLV "Suffix" file in rpm/yum subdirectory"
     87                    IF options.!debug == 1 then say "  Attempt4: Found  NLV "Suffix" file in rpm/yum subdirectory"
     88                    NLVFile = VRParseFilename(nlvmsg.1,"DPN")'.'Suffix
     89                    IF options.!debug == 1 then say "  Adding NLV "Suffix" path to "PathVar
     90                    OldPathVar = value(PathVar,,"OS2ENVIRONMENT")
     91                    ok = value(PathVar,VRParseFilename(nlvmsg.1,"DP")';'OldPathVar,"OS2ENVIRONMENT")
     92                    NLVSrchDone = 1
     93                end
     94                else IF options.!debug == 1 then say "  NLV "Suffix" file NOT in rpm/yum "UnixRoot||'\usr\share\os2\'filestem||nlv'.'Suffix"subdirectory."
     95            end
     96           
     97            otherwise do
     98                IF options.!debug == 1 then say "  Searching subdirectories"
     99                ok = SysFileTree(srchRoot'\'filestem||nlv'.'Suffix,nlvmsg.,'FOS')
     100                if nlvmsg.0 = 1 then do
     101                    IF options.!debug == 1 then say "  Found  NLV "Suffix" file in subdirectory"
    88102                    NLVFile = VRParseFilename(nlvmsg.1,"DPN")'.'Suffix
    89103                    say "  Adding NLV "Suffix" path to "PathVar
     
    92106                    NLVSrchDone = 1
    93107                end
    94                 else say "  NLV "Suffix" file NOT in rpm/yum "UnixRoot||'\usr\share\os2\'filestem||nlv'.'Suffix"subdirectory."
    95             end
    96            
    97             otherwise do
    98                 say "  Searching subdirectories"
    99                 ok = SysFileTree(srchRoot'\'filestem||nlv'.'Suffix,nlvmsg.,'FOS')
    100                 if nlvmsg.0 = 1 then do
    101                     say "  Found  NLV "Suffix" file in subdirectory"
    102                     NLVFile = VRParseFilename(nlvmsg.1,"DPN")'.'Suffix
    103                     say "  Adding NLV "Suffix" path to "PathVar
    104                     OldPathVar = value(PathVar,,"OS2ENVIRONMENT")
    105                     ok = value(PathVar,VRParseFilename(nlvmsg.1,"DP")';'OldPathVar,"OS2ENVIRONMENT")
    106                     NLVSrchDone = 1
    107                 end
    108                 else say "  NLV "Suffix" file not found in subdirectories!"
     108                else IF options.!debug == 1 then say "  NLV "Suffix" file not found in subdirectories!"
    109109            end
    110110        end
     
    116116            end
    117117            else do
    118                 say "  NLV "Suffix" File not found, falling back to EN."
     118                IF options.!debug == 1 then say "  NLV "Suffix" File not found, falling back to EN."
    119119                nlv = "EN"
    120120                /* Now we repeat the whole procedure to find the EN file */
     
    122122        end
    123123    end
    124     say time()' NLVSearch() done, returning "'NLVFile'"'
     124    IF options.!debug == 1 then say time()' NLVSearch() done, returning "'NLVFile'"'
    125125return NLVFile
    126126
  • trunk/guitools/shared/sambainit.vrs

    r1027 r1055  
    119119    end
    120120
    121     if samba.!smbd = "" then call _ErrorBinaryNotFound 'Could not find smbd.exe!'
    122 
     121    if samba.!smbd = "" then call _ErrorBinaryNotFound 'Could not find "\smbd.exe"!'
    123122
    124123    samba.!bin = VRParseFileName(samba.!smbd,'DP')
     
    130129    if \VRFileExists(samba.!smbcmd) then do
    131130        samba.!smbcmd = samba.!bin'\smb.cmd'
    132         if \VRFileExists(samba.!smbcmd) then call _ErrorBinaryNotFound 'Could not find smb.cmd!'
     131        if \VRFileExists(samba.!smbcmd) then call _ErrorBinaryNotFound 'Could not find "\smb.cmd"!'
    133132    end
    134133    IF options.!debug == 1 then say '  smb.cmd        = "'samba.!smbcmd'"'
     
    181180    /* smbspool.exe */
    182181    samba.!smbspoolexe = samba.!bin'\smbspool.exe'
    183     if \VRFileExists(samba.!smbspoolexe) then call _ErrorBinaryNotFound " could not find smbspool.exe!"
     182    if \VRFileExists(samba.!smbspoolexe) then call _ErrorBinaryNotFound 'Could not find "\smbspool.exe"!'
    184183    IF options.!debug == 1 THEN say '  smbspool.exe   = "'samba.!smbspoolexe'"'
    185184
    186185    /* rpcclient.exe */
    187186    samba.!rpcclientexe = samba.!bin'\rpcclient.exe'
    188     if \VRFileExists(samba.!rpcclientexe) then call _ErrorBinaryNotFound " could not find rpcclient.exe!"
     187    if \VRFileExists(samba.!rpcclientexe) then call _ErrorBinaryNotFound 'Could not find "\rpcclient.exe"!'
    189188    IF options.!debug == 1 THEN say '  rpcclient.exe  = "'samba.!rpcclientexe'"'
    190189
    191190    /* smbcacls.exe */
    192191    samba.!smbcaclsexe = samba.!bin'\smbcacls.exe'
    193     if \VRFileExists(samba.!smbcaclsexe) then call _ErrorBinaryNotFound " could not find smbcacls.exe!"
     192    if \VRFileExists(samba.!smbcaclsexe) then call _ErrorBinaryNotFound 'Could not find "\smbcacls.exe"!'
    194193    IF options.!debug == 1 THEN say '  smbcacls.exe  = "'samba.!smbcaclsexe'"'
    195194
  • trunk/guitools/shared/smbtree.vrs

    r1053 r1055  
    727727    StatusWText = arg(1)
    728728    if VRIsValidObject("DT_STATUSBAR") then do
     729        if VRGet("DT_STATUSBAR","BACKCOLOR") <> "<defaul>" then ok = VRSet("DT_STATUSBAR","BACKCOLOR","<default>")
    729730        if left(StatusWText,1) = "+" then do
    730731            ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||substr(StatusWText,2))
Note: See TracChangeset for help on using the changeset viewer.