Added test for locale functions.
[wine.git] / tools / winapi / c_function.pm
blob9b82814d765974af99fb87b318071328d79886e6
2 # Copyright 1999, 2000, 2001 Patrik Stridvall
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 package c_function;
21 use strict;
23 sub new {
24 my $proto = shift;
25 my $class = ref($proto) || $proto;
26 my $self = {};
27 bless ($self, $class);
29 return $self;
32 sub file {
33 my $self = shift;
34 my $file = \${$self->{FILE}};
36 local $_ = shift;
38 if(defined($_)) { $$file = $_; }
40 return $$file;
43 sub begin_line {
44 my $self = shift;
45 my $begin_line = \${$self->{BEGIN_LINE}};
47 local $_ = shift;
49 if(defined($_)) { $$begin_line = $_; }
51 return $$begin_line;
54 sub begin_column {
55 my $self = shift;
56 my $begin_column = \${$self->{BEGIN_COLUMN}};
58 local $_ = shift;
60 if(defined($_)) { $$begin_column = $_; }
62 return $$begin_column;
65 sub end_line {
66 my $self = shift;
67 my $end_line = \${$self->{END_LINE}};
69 local $_ = shift;
71 if(defined($_)) { $$end_line = $_; }
73 return $$end_line;
76 sub end_column {
77 my $self = shift;
78 my $end_column = \${$self->{END_COLUMN}};
80 local $_ = shift;
82 if(defined($_)) { $$end_column = $_; }
84 return $$end_column;
87 sub linkage {
88 my $self = shift;
89 my $linkage = \${$self->{LINKAGE}};
91 local $_ = shift;
93 if(defined($_)) { $$linkage = $_; }
95 return $$linkage;
98 sub return_type {
99 my $self = shift;
100 my $return_type = \${$self->{RETURN_TYPE}};
102 local $_ = shift;
104 if(defined($_)) { $$return_type = $_; }
106 return $$return_type;
109 sub calling_convention {
110 my $self = shift;
111 my $calling_convention = \${$self->{CALLING_CONVENTION}};
113 local $_ = shift;
115 if(defined($_)) { $$calling_convention = $_; }
117 return $$calling_convention;
120 sub name {
121 my $self = shift;
122 my $name = \${$self->{NAME}};
124 local $_ = shift;
126 if(defined($_)) { $$name = $_; }
128 return $$name;
131 sub argument_types {
132 my $self = shift;
133 my $argument_types = \${$self->{ARGUMENT_TYPES}};
135 local $_ = shift;
137 if(defined($_)) { $$argument_types = $_; }
139 return $$argument_types;
142 sub argument_names {
143 my $self = shift;
144 my $argument_names = \${$self->{ARGUMENT_NAMES}};
146 local $_ = shift;
148 if(defined($_)) { $$argument_names = $_; }
150 return $$argument_names;
153 sub statements_line {
154 my $self = shift;
155 my $statements_line = \${$self->{STATEMENTS_LINE}};
157 local $_ = shift;
159 if(defined($_)) { $$statements_line = $_; }
161 return $$statements_line;
164 sub statements_column {
165 my $self = shift;
166 my $statements_column = \${$self->{STATEMENTS_COLUMN}};
168 local $_ = shift;
170 if(defined($_)) { $$statements_column = $_; }
172 return $$statements_column;
175 sub statements {
176 my $self = shift;
177 my $statements = \${$self->{STATEMENTS}};
179 local $_ = shift;
181 if(defined($_)) { $$statements = $_; }
183 return $$statements;