]>
Commit | Line | Data |
---|---|---|
6cfea11b TJ |
1 | // -*- c -*- c mode in emacs |
2 | ||
d7ee9f9f TJ |
3 | // Copyright (C) 2001, 2002 Free Software Foundation, Inc. |
4 | // This program is free software; you can redistribute it and/or modify it | |
5 | // under the terms of the GNU General Public License as published by the | |
6 | // Free Software Foundation; either version 2, or (at your option) any | |
7 | // later version. | |
8 | // | |
9 | // This program 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 | |
12 | // GNU General Public License for more details. | |
13 | // | |
14 | // You should have received a copy of the GNU General Public License | |
15 | // along with this program; if not, write to the Free Software | |
16 | // Foundation, 59 Temple Place - Suite 330, | |
17 | // Boston, MA 02111-1307, USA. | |
18 | // | |
19 | // In other words, you are welcome to use, share and improve this program. | |
20 | // You are forbidden to forbid anyone else to use, share and improve | |
21 | // what you give them. Help stamp out software-hoarding! | |
22 | ||
23 | ||
6cfea11b TJ |
24 | external_definition int add(int arg1, int arg2); |
25 | external_definition int subtract(int arg3, int arg4); | |
26 | external_definition int first_nonzero(int arg5, int arg6); | |
27 | external_definition int double_plus_one(int arg7); | |
28 | ||
29 | add | |
30 | { | |
31 | return arg1 + arg2; | |
32 | } | |
33 | ||
34 | ||
35 | subtract | |
36 | { | |
37 | return arg3 - arg4; | |
38 | } | |
39 | ||
40 | double_plus_one | |
41 | { | |
42 | automatic int aaa; | |
43 | aaa=add(arg7, arg7); | |
44 | aaa=add(aaa, aaa); | |
45 | aaa=subtract(subtract(aaa, arg7), arg7) + 1; | |
46 | return aaa; | |
47 | } | |
48 | ||
49 | first_nonzero | |
50 | { | |
51 | if (arg5) | |
52 | { | |
53 | return arg5; | |
54 | } | |
55 | else | |
56 | { | |
57 | } | |
58 | return arg6; | |
59 | } | |
60 |