Changeset 408 for branches/guitools-1.0/shared
- Timestamp:
- Feb 19, 2010, 9:14:00 AM (16 years ago)
- Location:
- branches/guitools-1.0/shared
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/guitools-1.0/shared/nlv.vrs
r333 r408 1 /*:VRX NLVGetMessage 2 */ 3 NLVGetMessage: PROCEDURE EXPOSE settings. options. fs. 1 /*:VRX NLVSetup 2 */ 3 NLVSetup: PROCEDURE EXPOSE settings. options. 4 /* This subroutine is (c) by Alex Taylor, portions (c) Herwig Bauernfeind 5 * Sets all UI text from the message file. Any string that can't be loaded 6 * will default to the built-in English. 7 */ 4 8 5 msgfile = settings.!messages6 msgnum = ARG( 1 )7 8 IF msgnum == '' THEN RETURN ''9 10 SELECT11 WHEN ARG() == 2 THEN12 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2) )13 WHEN ARG() == 3 THEN14 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(3) )15 WHEN ARG() == 4 THEN16 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(3), ARG(4) )17 WHEN ARG() == 5 THEN18 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(3), ARG(4), ARG(5) )19 WHEN ARG() == 6 THEN20 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(3), ARG(4), ARG(5), ARG(6) )21 WHEN ARG() == 7 THEN22 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(3), ARG(4), ARG(5), ARG(6), ARG(7) )23 WHEN ARG() == 8 THEN24 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(2), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8) )25 WHEN ARG() == 9 THEN26 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(2), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8), ARG(9) )27 WHEN ARG() == 10 THEN28 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(2), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8), ARG(9), ARG(10) )29 OTHERWISE30 msgtxt = SysGetMessage( msgnum, msgfile )31 END32 33 PARSE VAR msgtxt message '0D'x .34 35 IF translate(SUBSTR( message, 1, 4 )) == 'SYS0' THEN message = ''36 37 RETURN message38 39 /*:VRX NLVSetText40 */41 /*42 * Sets the specified property of the specified control to the specified43 * message text.44 */45 NLVSetText: PROCEDURE EXPOSE settings. options. fs.46 PARSE ARG control, property, message, substitution47 48 success = 149 IF substitution == '' THEN50 text = NLVGetMessage( message )51 ELSE52 text = NLVGetMessage( message, substitution )53 54 IF text == '' THEN success = 055 ELSE CALL VRSet control, property, text56 57 RETURN success58 59 /*:VRX */60 NLVSetup: PROCEDURE EXPOSE settings. options.61 /* This subroutine is (c) by Alex Taylor, portions (c) Herwig Bauernfeind */62 9 IF options.!debug == 1 THEN SAY 'NLVSetup() started' 63 10 IF options.!debug == 1 THEN SAY ' NLVSetup() is (c) Alex Taylor, portions (c) Herwig Bauernfeind' 64 11 65 /* Sets all UI text from the message file. Any string that can't be loaded66 * will default to the built-in English.67 */68 12 execPath = VRGet("Application", "Program") 69 13 if execPath = "" then parse source . . execPath … … 132 76 IF options.!debug == 1 THEN SAY 'NLVSetup() done' 133 77 RETURN 78 79 /*:VRX NLVGetMessage 80 */ 81 NLVGetMessage: PROCEDURE EXPOSE settings. options. fs. 82 83 msgfile = settings.!messages 84 msgnum = ARG( 1 ) 85 86 IF msgnum == '' THEN RETURN '' 87 88 SELECT 89 WHEN ARG() == 2 THEN 90 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2) ) 91 WHEN ARG() == 3 THEN 92 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(3) ) 93 WHEN ARG() == 4 THEN 94 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(3), ARG(4) ) 95 WHEN ARG() == 5 THEN 96 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(3), ARG(4), ARG(5) ) 97 WHEN ARG() == 6 THEN 98 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(3), ARG(4), ARG(5), ARG(6) ) 99 WHEN ARG() == 7 THEN 100 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(3), ARG(4), ARG(5), ARG(6), ARG(7) ) 101 WHEN ARG() == 8 THEN 102 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(2), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8) ) 103 WHEN ARG() == 9 THEN 104 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(2), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8), ARG(9) ) 105 WHEN ARG() == 10 THEN 106 msgtxt = SysGetMessage( msgnum, msgfile, ARG(2), ARG(2), ARG(4), ARG(5), ARG(6), ARG(7), ARG(8), ARG(9), ARG(10) ) 107 OTHERWISE 108 msgtxt = SysGetMessage( msgnum, msgfile ) 109 END 110 111 PARSE VAR msgtxt message '0D'x . 112 113 IF translate(SUBSTR( message, 1, 4 )) == 'SYS0' THEN message = '' 114 115 RETURN message 116 117 /*:VRX NLVSetText 118 */ 119 /* 120 * Sets the specified property of the specified control to the specified 121 * message text. 122 */ 123 NLVSetText: PROCEDURE EXPOSE settings. options. fs. 124 PARSE ARG control, property, message, substitution 125 126 success = 1 127 IF substitution == '' THEN 128 text = NLVGetMessage( message ) 129 ELSE 130 text = NLVGetMessage( message, substitution ) 131 132 IF text == '' THEN success = 0 133 ELSE CALL VRSet control, property, text 134 135 RETURN success -
branches/guitools-1.0/shared/sambainit.vrs
r333 r408 71 71 end 72 72 73 if samba.!smbd = "" then call _ErrorBinaryNotFound "Could not find smbd.exe!"73 if samba.!smbd = "" then call _ErrorBinaryNotFound 'Could not find smbd.exe!' 74 74 75 75 samba.!bin = VRParseFileName(samba.!smbd,'DP') … … 80 80 if \VRFileExists(samba.!smbcmd) then do 81 81 samba.!smbcmd = samba.!bin'\smb.cmd' 82 if \VRFileExists(samba.!smbcmd) then call _ErrorBinaryNotFound "Could not find smb.cmd!"82 if \VRFileExists(samba.!smbcmd) then call _ErrorBinaryNotFound 'Could not find smb.cmd!' 83 83 end 84 84 IF options.!debug == 1 THEN say ' smb.cmd = "'samba.!smbcmd'"' … … 86 86 /* smbpasswd.exe */ 87 87 samba.!smbpasswdexe = samba.!bin'\smbpasswd.exe' 88 if \VRFileExists(samba.!smbpasswdexe) then call _ErrorBinaryNotFound "Could not find smbpasswd.exe!"88 if \VRFileExists(samba.!smbpasswdexe) then call _ErrorBinaryNotFound 'Could not find "'samba.!smbpasswdexe'"!' 89 89 IF options.!debug == 1 THEN say ' smbpasswd.exe = "'samba.!smbpasswdexe'"' 90 90 91 91 /* pdbedit.exe */ 92 92 samba.!pdbeditexe = samba.!bin'\pdbedit.exe' 93 if \VRFileExists(samba.!pdbeditexe) then call _ErrorBinaryNotFound "Could not find pdbedit.exe!"93 if \VRFileExists(samba.!pdbeditexe) then call _ErrorBinaryNotFound 'Could not find "'samba.!pdbeditexe'"!' 94 94 IF options.!debug == 1 THEN say ' pdbedit.exe = "'samba.!pdbeditexe'"' 95 95 96 96 /* net.exe */ 97 97 samba.!netexe = samba.!bin'\net.exe' 98 if \VRFileExists(samba.!netexe) then call _ErrorBinaryNotFound "Could not find net.exe!"98 if \VRFileExists(samba.!netexe) then call _ErrorBinaryNotFound 'Could not find "'samba.!netexe'"!' 99 99 IF options.!debug == 1 THEN say ' net.exe = "'samba.!netexe'"' 100 100 101 101 /* testparm.exe */ 102 102 samba.!testparmexe = samba.!bin'\testparm.exe' 103 if \VRFileExists(samba.!testparmexe) then call _ErrorBinaryNotFound "Could not find testparm.exe!"103 if \VRFileExists(samba.!testparmexe) then call _ErrorBinaryNotFound 'Could not find "'samba.!testparmexe'"!' 104 104 IF options.!debug == 1 THEN say ' testparm.exe = "'samba.!testparmexe'"' 105 105 106 106 /* smbtree.exe */ 107 107 samba.!smbtreeexe = samba.!bin'\smbtree.exe' 108 if \VRFileExists(samba.!smbtreeexe) then call _ErrorBinaryNotFound "Could not find smbtree.exe!"108 if \VRFileExists(samba.!smbtreeexe) then call _ErrorBinaryNotFound 'Could not find "'samba.!smbtreeexe'"!' 109 109 IF options.!debug == 1 THEN say ' smbtree.exe = "'samba.!smbtreeexe'"' 110 110 111 111 /* smbstatus.exe */ 112 112 samba.!smbstatusexe = samba.!bin'\smbstatus.exe' 113 if \VRFileExists(samba.!smbstatusexe) then call _ErrorBinaryNotFound "Could not find smbstatus.exe!"113 if \VRFileExists(samba.!smbstatusexe) then call _ErrorBinaryNotFound 'Could not find "'samba.!smbstatusexe'"!' 114 114 IF options.!debug == 1 THEN say ' smbstatus.exe = "'samba.!smbstatusexe'"' 115 115 116 116 /* smbcontrol.exe */ 117 117 samba.!smbcontrolexe = samba.!bin'\smbcontrol.exe' 118 if \VRFileExists(samba.!smbcontrolexe) then call _ErrorBinaryNotFound "Could not find smbcontrol.exe!"118 if \VRFileExists(samba.!smbcontrolexe) then call _ErrorBinaryNotFound 'Could not find "'samba.!smbcontrolexe'"!' 119 119 IF options.!debug == 1 THEN say ' smbcontrol.exe = "'samba.!smbcontrolexe'"' 120 120 121 121 /* smbclient.exe */ 122 122 samba.!smbclientexe = samba.!bin'\smbclient.exe' 123 if \VRFileExists(samba.!smbclientexe) then call _ErrorBinaryNotFound "Could not find smbclient.exe!"123 if \VRFileExists(samba.!smbclientexe) then call _ErrorBinaryNotFound 'Could not find "'samba.!smbclientexe'"!' 124 124 IF options.!debug == 1 THEN say ' smbclient.exe = "'samba.!smbclientexe'"' 125 125 126 126 /* nmblookup.exe */ 127 127 samba.!nmblookupexe = samba.!bin'\nmblookup.exe' 128 if \VRFileExists(samba.!nmblookupexe) then call _ErrorBinaryNotFound "Could not find nmblookup.exe!"128 if \VRFileExists(samba.!nmblookupexe) then call _ErrorBinaryNotFound 'Could not find "'samba.!nmblookupexe'"!' 129 129 IF options.!debug == 1 THEN say ' nmblookup.exe = "'samba.!nmblookupexe'"' 130 130 … … 151 151 end 152 152 153 if samba.!pwd_mkdb = "" then call _ErrorBinaryNotFound "Could not find pwd_mkdb.exe!"153 if samba.!pwd_mkdb = "" then call _ErrorBinaryNotFound 'Could not find "'samba.!pwd_mkdb'"!' 154 154 IF options.!debug == 1 THEN say ' pwd_mkdb.exe = "'samba.!pwd_mkdb'"' 155 155 … … 168 168 end 169 169 170 if samba.!log = "" then call _ErrorDataFileNotFound "Could not find logfiles!"170 if samba.!log = "" then call _ErrorDataFileNotFound 'Could not find logfiles!' 171 171 IF options.!debug == 1 THEN say ' Samba logfiles = "'samba.!log'"' 172 172 … … 180 180 /* the password files - we'll create them if they don't exist */ 181 181 samba.!masterpasswd = unixetc'\master.passwd' 182 if \VRFileExists(samba.!masterpasswd) then call _ErrorDataFileNotFound "Could not find master.passwd!"182 if \VRFileExists(samba.!masterpasswd) then call _ErrorDataFileNotFound 'Could not find "'samba.!masterpasswd'"!' 183 183 IF options.!debug == 1 THEN say ' master.passwd = "'samba.!masterpasswd'"' 184 184 185 185 samba.!pwddb = unixetc'\pwd.db' 186 if \VRFileExists(samba.!pwddb) then call _ErrorDataFileNotFound "Could not find pwd.db!"186 if \VRFileExists(samba.!pwddb) then call _ErrorDataFileNotFound 'Could not find "'samba.!pwddb'"!' 187 187 IF options.!debug == 1 THEN say ' pwd.db = "'samba.!pwddb'"' 188 188 189 189 samba.!spwddb = unixetc'\spwd.db' 190 if \VRFileExists(samba.!spwddb) then call _ErrorDataFileNotFound "Could not find spwd.db!"190 if \VRFileExists(samba.!spwddb) then call _ErrorDataFileNotFound 'Could not find "'samba.!spwddb'"!' 191 191 IF options.!debug == 1 THEN say ' spwd.db = "'samba.!spwddb'"' 192 192 193 193 samba.!group = unixetc'\group' 194 if \VRFileExists(samba.!group) then call _ErrorDataFileNotFound "Could not find "samba.!group"!"194 if \VRFileExists(samba.!group) then call _ErrorDataFileNotFound 'Could not find "'samba.!group'"!' 195 195 IF options.!debug == 1 THEN say ' group = "'samba.!group'"' 196 196 197 197 samba.!printcap = unixetc'\printcap' 198 if \VRFileExists(samba.! spwddb) then call _ErrorDataFileNotFound "Could not find printcap!"198 if \VRFileExists(samba.!printcap) then call _ErrorDataFileNotFound 'Could not find "'samba.!printcap'"!' 199 199 IF options.!debug == 1 THEN say ' printcap = "'samba.!printcap'"' 200 200
Note:
See TracChangeset
for help on using the changeset viewer.