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/>.
33 int bla[6] = {0,0,11223344, 55667788,0,0};
34 int g_c[2] = {101, 111};
42 if (bla[2] != 11223344) return 1;
43 if (bla[3] != 55667788) return 2;
44 if (b[2] != 11223344) return 3;
45 if (b[3] != 55667788) return 4;
47 eputs ("g_c[0]="); eputs (itoa (g_c[0])); eputs ("\n");
48 eputs ("g_c[1]="); eputs (itoa (g_c[1])); eputs ("\n");
50 memcpy (&b[2], g_c, 2 * sizeof (int));
51 eputs ("b[2]:"); eputs (itoa (b[2])); eputs ("\n");
53 if (b[2] != 101) return 5;
54 eputs ("b[3]:"); eputs (itoa (b[3])); eputs ("\n");
55 if (b[3] != 111) return 6;
57 int c[2] = {201, 211};
58 eputs ("c[0]="); eputs (itoa (c[0])); eputs ("\n");
59 eputs ("c[1]="); eputs (itoa (c[1])); eputs ("\n");
61 memcpy (&b[4], c, 2 * sizeof (int));
62 eputs ("b[4]:"); eputs (itoa (b[4])); eputs ("\n");
64 if (b[4] != 201) return 7;
65 eputs ("b[5]:"); eputs (itoa (b[5])); eputs ("\n");
66 if (b[5] != 211) return 8;