• Home
  • Raw
  • Download

Lines Matching full:if

17 pod2usage(1) if $help;
18 pod2usage(-exitstatus => 0, -verbose => 2) if $man;
19 pod2usage(2) if (scalar @ARGV < 2 || scalar @ARGV > 3);
31 require Data::Dumper if ($debug);
44 if (!$is_comment) {
47 $is_comment = 1 if ($ln =~ s,/\*.*,,);
49 if ($ln =~ s,^(.*\*/),,) {
56 if ($is_enum && $ln =~ m/^\s*([_\w][\w\d_]+)\s*[\,=]?/) {
64 $is_enum = 0 if ($is_enum && m/\}/);
67 $is_enum = 0 if ($is_enum && m/\}/);
69 if ($ln =~ m/^\s*#\s*define\s+([_\w][\w\d_]+)\s+_IO/) {
78 if ($ln =~ m/^\s*#\s*define\s+([_\w][\w\d_]+)\s+/) {
88 if ($ln =~ m/^\s*typedef\s+([_\w][\w\d_]+)\s+(.*)\s+([_\w][\w\d_]+);/) {
95 if ($ln =~ m/^\s*enum\s+([_\w][\w\d_]+)\s+\{/
106 if ($ln =~ m/^\s*struct\s+([_\w][\w\d_]+)\s+\{/
133 # Handle exceptions, if any
145 if ($file_exceptions) {
148 next if (m/^\s*$/ || m/^\s*#/);
152 if (m/^ignore\s+ioctl\s+(\S+)/) {
153 delete $ioctls{$1} if (exists($ioctls{$1}));
156 if (m/^ignore\s+define\s+(\S+)/) {
157 delete $defines{$1} if (exists($defines{$1}));
160 if (m/^ignore\s+typedef\s+(\S+)/) {
161 delete $typedefs{$1} if (exists($typedefs{$1}));
164 if (m/^ignore\s+enum\s+(\S+)/) {
165 delete $enums{$1} if (exists($enums{$1}));
168 if (m/^ignore\s+struct\s+(\S+)/) {
169 delete $structs{$1} if (exists($structs{$1}));
172 if (m/^ignore\s+symbol\s+(\S+)/) {
173 delete $enum_symbols{$1} if (exists($enum_symbols{$1}));
180 if (m/^replace\s+(\S+)\s+(\S+)\s+(\S+)/) {
188 if ($new =~ m/^\:c\:(data|func|macro|type)\:\`(.+)\`/) {
199 if ($type eq "ioctl") {
200 $ioctls{$old} = $new if (exists($ioctls{$old}));
203 if ($type eq "define") {
204 $defines{$old} = $new if (exists($defines{$old}));
207 if ($type eq "symbol") {
208 $enum_symbols{$old} = $new if (exists($enum_symbols{$old}));
211 if ($type eq "typedef") {
212 $typedefs{$old} = $new if (exists($typedefs{$old}));
215 if ($type eq "enum") {
216 $enums{$old} = $new if (exists($enums{$old}));
219 if ($type eq "struct") {
220 $structs{$old} = $new if (exists($structs{$old}));
228 if ($debug) {
229 print Data::Dumper->Dump([\%ioctls], [qw(*ioctls)]) if (%ioctls);
230 print Data::Dumper->Dump([\%typedefs], [qw(*typedefs)]) if (%typedefs);
231 print Data::Dumper->Dump([\%enums], [qw(*enums)]) if (%enums);
232 print Data::Dumper->Dump([\%structs], [qw(*structs)]) if (%structs);
233 print Data::Dumper->Dump([\%defines], [qw(*defines)]) if (%defines);
234 print Data::Dumper->Dump([\%enum_symbols], [qw(*enum_symbols)]) if (%enum_symbols);
265 print "$r -> $s\n" if ($debug);
275 print "$r -> $s\n" if ($debug);
285 print "$r -> $s\n" if ($debug);
295 print "$r -> $s\n" if ($debug);
305 print "$r -> $s\n" if ($debug);
315 print "$r -> $s\n" if ($debug);