1 /* -*-comment-start: "//";comment-end:""-*-
2 * Mes --- Maxwell Equations of Software
3 * Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
5 * This file is part of Mes.
7 * Mes is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or (at
10 * your option) any later version.
12 * Mes is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Mes. If not, see <http://www.gnu.org/licenses/>.
32 int bla[6] = {0,0,11223344, 55667788,0,0};
33 int g_c[2] = {101, 111};
41 if (bla[2] != 11223344) return 1;
42 if (bla[3] != 55667788) return 2;
43 if (b[2] != 11223344) return 3;
44 if (b[3] != 55667788) return 4;
46 eputs ("g_c[0]="); eputs (itoa (g_c[0])); eputs ("\n");
47 eputs ("g_c[1]="); eputs (itoa (g_c[1])); eputs ("\n");
49 memcpy (&b[2], g_c, 2 * sizeof (int));
50 eputs ("b[2]:"); eputs (itoa (b[2])); eputs ("\n");
52 if (b[2] != 101) return 5;
53 eputs ("b[3]:"); eputs (itoa (b[3])); eputs ("\n");
54 if (b[3] != 111) return 6;
56 int c[2] = {201, 211};
57 eputs ("c[0]="); eputs (itoa (c[0])); eputs ("\n");
58 eputs ("c[1]="); eputs (itoa (c[1])); eputs ("\n");
60 memcpy (&b[4], c, 2 * sizeof (int));
61 eputs ("b[4]:"); eputs (itoa (b[4])); eputs ("\n");
63 if (b[4] != 201) return 5;
64 eputs ("b[5]:"); eputs (itoa (b[5])); eputs ("\n");
65 if (b[5] != 211) return 6;