Lines Matching +full:line +full:- +full:name
1 #!/usr/bin/awk -f
3 # Copyright 2010 Ben Dooks <ben-linux@fluff.org>
8 # ./clksrc-change-registers.awk arch/arm/plat-s5pc1xx/include/plat/regs-clock.h < src > dst
14 return substr(s, eqat+2, (comat-eqat)-2)
19 return substr(b, 2, length(b)-2)
69 while (getline line < ARGV[1] > 0) {
70 if (line ~ /\#define.*_MASK/ &&
71 !(line ~ /USB_SIG_MASK/)) {
72 splitdefine(line, fields)
73 name = fields[0]
75 printf "MASK " line "\n" > "/dev/stderr"
76 dmask[name,0] = find_length(fields[1])
77 dmask[name,1] = find_shift(fields[1])
79 printf "=> '" name "' LENGTH=" dmask[name,0] " SHIFT=" dmask[name,1] "\n" > "/dev/stderr"
98 if ((getline line) <= 0) {
103 if (line ~ /\.shift/) {
104 shift = extract_value(line)
105 } else if (line ~ /\.mask/) {
106 mask = extract_value(line)
107 } else if (line ~ /\.reg_divider/) {
108 reg_div = extract_value(line)
109 } else if (line ~ /\.reg_source/) {
110 reg_src = extract_value(line)
111 } else if (line ~ /\.divider_shift/) {
112 divshift = extract_value(line)
113 } else if (line ~ /{/) {
115 print line
116 } else if (line ~ /}/) {
117 indent--
156 print line
158 print line
162 printf indent ":" line "\n" > "/dev/stderr"