comparison src/gearsTools/update_context.pl @ 101:195cea4bb9c9

tweak
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Fri, 15 Nov 2019 14:12:05 +0900
parents 37a0df8b1889
children b84aac4ab529
comparison
equal deleted inserted replaced
100:37a0df8b1889 101:195cea4bb9c9
42 print "WARN! $data_gear_name struct already exists\n"; 42 print "WARN! $data_gear_name struct already exists\n";
43 exit 1; 43 exit 1;
44 } 44 }
45 push(@first_context_headers, $line); 45 push(@first_context_headers, $line);
46 } 46 }
47
48 close $fh; 47 close $fh;
49 48
50 #print "@first_context_headers\n";
51 #print "@last_context_headers\n";
52 return (\@first_context_headers,\@last_context_headers); 49 return (\@first_context_headers,\@last_context_headers);
53 } 50 }
54 51
55 sub parse_interface { 52 sub parse_interface {
56 my $file_name = shift; 53 my $file_name = shift;
86 83
87 sub dump_h2context { 84 sub dump_h2context {
88 my $h2context = shift; 85 my $h2context = shift;
89 my $context = ''; 86 my $context = '';
90 my $space = ' '; 87 my $space = ' ';
91 #print "${space}struct $h2context->{name} {\n";
92 $context = "${space}struct $h2context->{name} {\n"; 88 $context = "${space}struct $h2context->{name} {\n";
93 for my $datum (@{$h2context->{data}}) { 89 for my $datum (@{$h2context->{data}}) {
94 #print "${space}${space}$datum; \n";
95 $context .= "${space}${space}$datum;\n"; 90 $context .= "${space}${space}$datum;\n";
96 } 91 }
97 for my $code (@{$h2context->{codes}}) { 92 for my $code (@{$h2context->{codes}}) {
98 #print "${space}${space}enum Code $code;\n";
99 $context .= "${space}${space}enum Code $code;\n"; 93 $context .= "${space}${space}enum Code $code;\n";
100 } 94 }
101 #print "${space}} $h2context->{name};\n";
102 $context .= "${space}} $h2context->{name};\n"; 95 $context .= "${space}} $h2context->{name};\n";
103 return $context; 96 return $context;
104 } 97 }
105 98
106 sub context_dump { 99 sub context_dump {