Home | History | Annotate | Download | only in tools

Lines Matching refs:lines

36 def ExtractCopyrightAt(lines, i):
37 hash = lines[i].startswith("#")
43 if "/*" in lines[start - 1]:
47 # Read comment lines until we hit something that terminates a
49 while i < len(lines):
50 if "*/" in lines[i]:
52 if hash and len(lines[i]) == 0:
54 if "\t@(#)" in lines[i] or "\tfrom: @(#)" in lines[i] or "From: @(#)" in lines[i] or "from OpenBSD:" in lines[i]:
56 if "\tcitrus Id: " in lines[i]:
58 if "\t$OpenBSD: " in lines[i] or " $FreeBSD: " in lines[i] or "\t$NetBSD: " in lines[i]:
60 if "$FreeBSD$" in lines[i] or "$Citrus$" in lines[i]:
68 if lines[end - 1] != " *" and lines[end - 1] != " * ====================================================":
74 for line in lines[start:end]:
84 # These come last and take care of "blank" comment lines.
89 # Trim blank lines from head and tail.
125 lines = content.split("\n")
127 if len(lines) <= 4:
139 sys.stderr.write('warning: no copyright notice found in "%s" (%d lines)\n' % (path, len(lines)))
143 while i < len(lines):
144 if "Copyright" in lines[i]:
145 i = ExtractCopyrightAt(lines, i)