b2914f5652e6d762f467fd40c6e2eb9d1f759555
[p5sagit/p5-mst-13.2.git] / Porting / findvars
1 #!/usr/bin/perl -w
2
3 $pat = '';
4 # construct word list
5 while (<DATA>) {
6   chomp;
7   next unless $_;
8   $pat .= "$_|";
9 }
10 chop $pat if $pat =~ /\|$/;
11
12 # grep
13 while (<>) {
14     print "$ARGV\:$.\:$_" if s/\b($pat)\b/#$1#/og;
15 # this variant might useful if the transformation is more complicated
16 #    if (/^(.*?)\b($pat)\b(.*)$/o) {
17 #        my $head = "$1#$2#";
18 #        $_ = $3;
19 #        while (/^(.*?)\b($pat)\b(.*)$/o) {
20 #            $head .= "$1#$2#";
21 #            $_ = $3;
22 #        }
23 #       print "$ARGV\:$.\:$head$_\n";
24 #    }
25 }
26 continue {
27     close ARGV if eof;
28 }
29 __END__
30 Argv
31 Cmd
32 DBcv
33 DBgv
34 DBline
35 DBsignal
36 DBsingle
37 DBsub
38 DBtrace
39 No
40 Sv
41 Xpv
42 Yes
43 amagic_generation
44 ampergv
45 an
46 archpat_auto
47 argvgv
48 argvoutgv
49 av_fetch_sv
50 basetime
51 beginav
52 bodytarget
53 bostr
54 bufend
55 bufptr
56 cddir
57 chopset
58 collation_ix
59 collation_name
60 collation_standard
61 collxfrm_base
62 collxfrm_mult
63 colors
64 colorset
65 compcv
66 compiling
67 comppad
68 comppad_name
69 comppad_name_fill
70 comppad_name_floor
71 cop_seqmax
72 copline
73 cryptseen
74 cshlen
75 cshname
76 curcop
77 curcopdb
78 curinterp
79 curpad
80 curpm
81 curstack
82 curstackinfo
83 curstash
84 curstname
85 dbargs
86 debdelim
87 debname
88 debstash
89 debug
90 defgv
91 defoutgv
92 defstash
93 delaymagic
94 diehook
95 dirty
96 dlevel
97 dlmax
98 do_undump
99 doextract
100 doswitches
101 dowarn
102 dumplvl
103 e_script
104 egid
105 endav
106 envgv
107 errgv
108 error_count
109 euid
110 eval_root
111 eval_start
112 evalseq
113 exitlist
114 exitlistlen
115 expect
116 extralen
117 fdpid
118 filemode
119 firstgv
120 forkprocess
121 formfeed
122 formtarget
123 generation
124 gensym
125 gid
126 globalstash
127 he_root
128 hexdigit
129 hintgv
130 hints
131 hv_fetch_ent_mh
132 hv_fetch_sv
133 in_clean_all
134 in_clean_objs
135 in_eval
136 in_my
137 in_my_stash
138 incgv
139 initav
140 inplace
141 last_in_gv
142 last_lop
143 last_lop_op
144 last_proto
145 last_uni
146 lastfd
147 lastgotoprobe
148 lastscream
149 lastsize
150 lastspbase
151 laststatval
152 laststype
153 leftgv
154 lex_brackets
155 lex_brackstack
156 lex_casemods
157 lex_casestack
158 lex_defer
159 lex_dojoin
160 lex_expect
161 lex_fakebrack
162 lex_formbrack
163 lex_inpat
164 lex_inwhat
165 lex_op
166 lex_repl
167 lex_starts
168 lex_state
169 lex_stuff
170 lineary
171 linestart
172 linestr
173 localizing
174 localpatches
175 main_cv
176 main_root
177 main_start
178 mainstack
179 malloc_mutex
180 markstack
181 markstack_max
182 markstack_ptr
183 max_intro_pending
184 maxo
185 maxscream
186 maxsysfd
187 mess_sv
188 min_intro_pending
189 minus_F
190 minus_a
191 minus_c
192 minus_l
193 minus_n
194 minus_p
195 modcount
196 modglobal
197 multi_close
198 multi_end
199 multi_open
200 multi_start
201 multiline
202 mystrk
203 na
204 nexttoke
205 nexttype
206 nextval
207 nice_chunk
208 nice_chunk_size
209 ninterps
210 nomemok
211 numeric_local
212 numeric_name
213 numeric_standard
214 ofmt
215 ofs
216 ofslen
217 oldbufptr
218 oldlastpm
219 oldname
220 oldoldbufptr
221 op
222 op_mask
223 op_seqmax
224 opsave
225 origalen
226 origargc
227 origargv
228 origenviron
229 origfilename
230 ors
231 orslen
232 osname
233 pad_reset_pending
234 padix
235 padix_floor
236 patchlevel
237 patleave
238 pending_ident
239 perl_destruct_level
240 perldb
241 pidstatus
242 preambleav
243 preambled
244 preprocess
245 profiledata
246 reg_eval_set
247 reg_flags
248 reg_start_tmp
249 reg_start_tmpl
250 regbol
251 regcc
252 regcode
253 regcomp_parse
254 regcomp_rx
255 regcompp
256 regdata
257 regdummy
258 regendp
259 regeol
260 regexecp
261 regflags
262 regindent
263 reginput
264 reginterp_cnt
265 reglastparen
266 regnarrate
267 regnaughty
268 regnpar
269 regprecomp
270 regprev
271 regprogram
272 regsawback
273 regseen
274 regsize
275 regstartp
276 regtill
277 regxend
278 replgv
279 restartop
280 retstack
281 retstack_ix
282 retstack_max
283 rightgv
284 rs
285 rsfp
286 rsfp_filters
287 runops
288 savestack
289 savestack_ix
290 savestack_max
291 sawampersand
292 sawstudy
293 sawvec
294 scopestack
295 scopestack_ix
296 scopestack_max
297 screamfirst
298 screamnext
299 secondgv
300 seen_evals
301 seen_zerolen
302 sh_path
303 siggv
304 sighandlerp
305 sortcop
306 sortcxix
307 sortstash
308 specialsv_list
309 splitstr
310 stack_base
311 stack_max
312 stack_sp
313 start_env
314 statbuf
315 statcache
316 statgv
317 statname
318 statusvalue
319 statusvalue_vms
320 stdingv
321 strchop
322 strtab
323 sub_generation
324 sublex_info
325 subline
326 subname
327 sv_arenaroot
328 sv_count
329 sv_no
330 sv_objcount
331 sv_root
332 sv_undef
333 sv_yes
334 sys_intern
335 tainted
336 tainting
337 thisexpr
338 thr_key
339 timesbuf
340 tmps_floor
341 tmps_ix
342 tmps_max
343 tmps_stack
344 tokenbuf
345 top_env
346 toptarget
347 uid
348 unsafe
349 warnhook
350 xiv_arenaroot
351 xiv_root
352 xnv_root
353 xpv_root
354 xrv_root
355 piMem
356 piENV
357 piStdIO
358 piLIO
359 piDir
360 piSock
361 piProc