Lines Matching +full:is +full:- +full:path +full:- +full:inside
5 # avoid making substitutions inside strings or comments.
6 # Inside strings, substitutions are never made; inside comments,
7 # it is a user option (off by default).
14 # The option -r reverses the sense of the substitutions (this may be
17 # If the old identifier is prefixed with a '*' (with no intervening
18 # whitespace), then it will not be substituted inside comments.
22 # like a C file (ends in .h or .c). The special filename '-' means
28 # The original files are kept as back-up with a "~" suffix.
30 # Changes made are reported to stdout in a diff-like format.
50 ' [-c] [-r] [-s file] ... file-or-directory ...\n')
52 err('-c : substitute inside comments\n')
53 err('-r : reverse direction for following -s options\n')
54 err('-s substfile : add a file of substitutions\n')
56 err('Each non-empty non-comment line in a substitution file must\n')
59 err('If an identifier is preceded with a *, it is not substituted\n')
60 err('inside a comment even when -c is specified.\n')
74 if opt == '-c':
76 if opt == '-r':
78 if opt == '-s':
81 if os.path.isdir(arg):
83 elif os.path.islink(arg):
91 Wanted = r'^[a-zA-Z0-9_]+\.[ch]$'
107 fullname = os.path.join(dirname, name)
108 if os.path.islink(fullname): pass
109 elif os.path.isdir(fullname):
119 if filename == '-':
130 head, tail = os.path.split(filename)
131 tempname = os.path.join(head, '@' + tail)
141 while line[-2:] == '\\\n':
148 if g is None:
164 if g is not None:
168 if filename == '-': return 0 # Done in filter mode
173 # Finishing touch -- move files
197 Identifier = '(struct )?[a-zA-Z_][a-zA-Z0-9_]+'
203 Hexnumber = '0[xX][0-9a-fA-F]*[uUlL]*'
204 Octnumber = '0[0-7]*[uUlL]*'
205 Decnumber = '[1-9][0-9]*[uUlL]*'
207 Exponent = '[eE][-+]?[0-9]+'
208 Pointfloat = r'([0-9]+\.[0-9]*|\.[0-9]+)(' + Exponent + r')?'
209 Expfloat = '[0-9]+' + Exponent
213 # Anything else is an operator -- don't list this explicitly because of '/*'
229 ## print('-->', repr(line))
233 if match is None: break
236 ## if Program is InsideCommentProgram: print(end='... ')
247 if Program is InsideCommentProgram:
254 ## print(found, '-->', subst)
259 ## print(found, '-->', subst)
293 i = -1 # Happens to delete trailing \n