Changeset 3070
- Timestamp:
- Jul 12, 2018, 10:11:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/netlabs/macros/dosutil.e ¶
r3069 r3070 151 151 --p3 = verify( Spec, '=', 'M', startp) 152 152 -- Better allow only standard env var names: 153 153 154 -- Check first char of env var name 154 p3 = pos( '[^A-Za-z!]', Spec, startp, 'x') 155 --dprintf( 'p3 = 'p3' = pos( [^A-Za-z!], 'Spec', 'startp', x)') 156 if p3 > 0 & p3 = startp then 155 CheckSpec = substr( Spec, startp, 1) 156 p3 = pos( '[^A-Za-z!]', CheckSpec, 1, 'x') 157 --dprintf( 'p3 = 'p3' = pos( [^A-Za-z!], 'CheckSpec', 1, x)') 158 if p3 > 0 then 157 159 -- 1st % char can't be the start of an env var. Set startp to 2nd % char. 158 160 startp = p2 159 --dprintf( 'p3 > 0 & p3 < p2')161 --dprintf( 'p3 > 0') 160 162 iterate 161 163 endif 164 162 165 -- Check rest of env var name 163 p4 = pos( '[^A-Za-z0-9_\-!]+', Spec, startp + 1, 'x') 164 --dprintf( 'p4 = 'p4' = pos( [^A-Za-z0-9_\-!]+, 'Spec', 'startp + 1', x)') 165 if p4 > 0 & p4 < p2 then 166 CheckSpec = substr( Spec, startp + 1, p2 - startp - 1) 167 p4 = pos( '[^A-Za-z0-9_\-!]+', CheckSpec, 1, 'x') 168 --dprintf( 'p4 = 'p4' = pos( [^A-Za-z0-9_\-!]+, 'CheckSpec', 1, x)') 169 if p4 > 0 then 166 170 -- 1st % char can't be the start of an env var. Set startp to 2nd % char. 167 171 startp = p2 168 --dprintf( 'p4 > 0 & p4 < p2')172 --dprintf( 'p4 > 0') 169 173 iterate 170 174 endif
Note:
See TracChangeset
for help on using the changeset viewer.