test: Remove 30-test.i indirection.

* include/30-test.i: Remove.
* scaffold/tests/30-strlen.c: Remove 30-test.i indirection.
* scaffold/tests/31-eputs.c: Likewise.
* scaffold/tests/32-compare.c: Likewise.
* scaffold/tests/33-and-or.c: Likewise.
* scaffold/tests/34-pre-post.c: Likewise.
* scaffold/tests/35-compare-char.c: Likewise.
* scaffold/tests/36-compare-arithmetic.c: Likewise.
* scaffold/tests/37-compare-assign.c: Likewise.
* scaffold/tests/38-compare-call.c: Likewise.
* scaffold/tests/40-if-else.c: Likewise.
* scaffold/tests/41-?.c: Likewise.
* scaffold/tests/42-goto-label.c: Likewise.
* scaffold/tests/43-for-do-while.c: Likewise.
* scaffold/tests/44-switch.c: Likewise.
* scaffold/tests/45-void-call.c: Likewise.
* scaffold/tests/46-function-static.c: Likewise.
* scaffold/tests/50-assert.c: Likewise.
* scaffold/tests/51-strcmp.c: Likewise.
* scaffold/tests/52-itoa.c: Likewise.
* scaffold/tests/53-strcpy.c: Likewise.
* scaffold/tests/60-math.c: Likewise.
* scaffold/tests/63-struct-cell.c: Likewise.
* scaffold/tests/64-make-cell.c: Likewise.
* scaffold/tests/65-read.c: Likewise.
* scaffold/tests/66-local-char-array.c: Likewise.
* scaffold/tests/70-printf.c: Likewise.
* scaffold/tests/71-struct-array.c: Likewise.
* scaffold/tests/72-typedef-struct-def.c: Likewise.
* scaffold/tests/73-union.c: Likewise.
* scaffold/tests/74-multi-line-string.c: Likewise.
* scaffold/tests/75-struct-union.c: Likewise.
* scaffold/tests/76-pointer-arithmetic.c: Likewise.
* scaffold/tests/77-pointer-assign.c: Likewise.
* scaffold/tests/78-union-struct.c: Likewise.
* scaffold/tests/79-int-array.c: Likewise.
* scaffold/tests/7a-struct-char-array.c: Likewise.
* scaffold/tests/7b-struct-int-array.c: Likewise.
* scaffold/tests/7c-dynarray.c: Likewise.
* scaffold/tests/7d-cast-char.c: Likewise.
* scaffold/tests/7e-struct-array-access.c: Likewise.
* scaffold/tests/7f-struct-pointer-arithmetic.c: Likewise.
* scaffold/tests/7g-struct-byte-word-field.c: Likewise.
* scaffold/tests/7h-struct-assign.c: Likewise.
* scaffold/tests/7i-struct-struct.c: Likewise.
* scaffold/tests/7j-strtoull.c: Likewise.
* scaffold/tests/7k-for-each-elem.c: Likewise.
* scaffold/tests/7l-struct-any-size-array.c: Likewise.
* scaffold/tests/7m-struct-char-array-assign.c: Likewise.
* scaffold/tests/7n-struct-struct-array.c: Likewise.
* scaffold/tests/80-setjmp.c: Likewise.
* scaffold/tests/81-qsort.c: Likewise.
* scaffold/tests/86-strncpy.c: Likewise.
* scaffold/tests/87-sscanf.c: Likewise.
This commit is contained in:
Jan Nieuwenhuizen 2018-08-15 18:01:14 +02:00
parent 03e479e30a
commit 25047c7606
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
53 changed files with 104 additions and 134 deletions

View file

@ -1,30 +0,0 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU Mes is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or (at
* your option) any later version.
*
* GNU Mes is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libmes.h>
int test ();
int
main ()
{
int r = test ();
return r;
}

View file

@ -18,10 +18,10 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
int int
test () main ()
{ {
if (strlen ("mes") == 3) goto ok; if (strlen ("mes") == 3) goto ok;
return 1; return 1;

View file

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
int int
test () main ()
{ {
puts ("\n"); puts ("\n");
puts ("mes"); puts ("mes");

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
int isid(char c) { int isid(char c) {
@ -26,7 +26,7 @@ int isid(char c) {
} }
int int
test () main ()
{ {
int f = 0; int f = 0;
int t = 1; int t = 1;

View file

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
int int
test () main ()
{ {
int f = 0; int f = 0;
int t = 1; int t = 1;

View file

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
int int
test () main ()
{ {
int f = 0; int f = 0;
int t = 1; int t = 1;

View file

@ -18,14 +18,14 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
char g_arena[10]; char g_arena[10];
char *g_chars = g_arena; char *g_chars = g_arena;
int int
test () main ()
{ {
int i = 0; int i = 0;
char c = 'C'; char c = 'C';

View file

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
int int
test () main ()
{ {
puts ("\n"); puts ("\n");
puts ("t: 1 + 2\n"); puts ("t: 1 + 2\n");

View file

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
int int
test () main ()
{ {
int f = 0; int f = 0;
int t = 1; int t = 1;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -43,7 +43,7 @@ identity (int i)
} }
int int
test () main ()
{ {
int i = 0; int i = 0;
int f = 0; int f = 0;

View file

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
int int
test () main ()
{ {
int i = 0; int i = 0;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
union foo union foo
@ -27,7 +27,7 @@ union foo
}; };
int int
test () main ()
{ {
int f; int f;
int t = 1; int t = 1;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
int int
@ -32,7 +32,7 @@ label (int c)
} }
int int
test () main ()
{ {
int f; int f;
int t = 1; int t = 1;

View file

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
int int
test () main ()
{ {
int i = 0; int i = 0;
int f = 0; int f = 0;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
enum type_t {TCHAR, TCLOSURE, TCONTINUATION, TFUNCTION, TKEYWORD, TMACRO, TNUMBER, TPAIR, TREF, TSPECIAL, TSTRING, TSYMBOL, TVALUES, TVECTOR, TBROKEN_HEART}; enum type_t {TCHAR, TCLOSURE, TCONTINUATION, TFUNCTION, TKEYWORD, TMACRO, TNUMBER, TPAIR, TREF, TSPECIAL, TSTRING, TSYMBOL, TVALUES, TVECTOR, TBROKEN_HEART};
@ -88,7 +88,7 @@ default_first (int c)
} }
int int
test () main ()
{ {
puts ("\n"); puts ("\n");
puts ("t: switch 0\n"); puts ("t: switch 0\n");

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
void void
@ -27,7 +27,7 @@ void_func ()
} }
int int
test () main ()
{ {
puts ("\n"); puts ("\n");
puts ("void_func ()\n"); puts ("void_func ()\n");

View file

@ -18,12 +18,12 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
int int
test () main ()
{ {
int f; int f;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -40,7 +40,7 @@ strncmp (char const* a, char const* b, size_t size)
#endif #endif
int int
test () main ()
{ {
char *p = "mes"; char *p = "mes";

View file

@ -18,13 +18,13 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <libmes.h> #include <libmes.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
int int
test () main ()
{ {
char *p = "mes"; char *p = "mes";

View file

@ -18,12 +18,12 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
int int
test () main ()
{ {
puts ("\n"); puts ("\n");
puts ("t: strcpy (buf, \"mes\")\n"); puts ("t: strcpy (buf, \"mes\")\n");

View file

@ -22,7 +22,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "30-test.i" #include <libmes.h>
int int
add (int a, int b) add (int a, int b)
@ -37,7 +37,7 @@ inc (int i)
} }
int int
test () main ()
{ {
int i; int i;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
// #include <stdio.h> // #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -88,7 +88,7 @@ int g_function = 0;
int int
test () main ()
{ {
// puts ("\n"); // puts ("\n");
// puts ("t: g_cells[0] = g_cells[1]\n"); // puts ("t: g_cells[0] = g_cells[1]\n");

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -120,7 +120,7 @@ make_tmps_test (struct scm* cells)
} }
int int
test () main ()
{ {
puts ("\n"); puts ("\n");
make_tmps_test (g_cells); make_tmps_test (g_cells);

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -48,7 +48,7 @@ get ()
} }
int int
test () main ()
{ {
char *p = (char*)g_chars; char *p = (char*)g_chars;
int i = 0; int i = 0;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@ -81,7 +81,7 @@ char* LittleEndian(unsigned value, char* c, int Number_of_bytes)
} }
int int
test () main ()
{ {
char table[3] = {'0', '1', '2'}; char table[3] = {'0', '1', '2'};

View file

@ -18,13 +18,13 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdarg.h> #include <stdarg.h>
int int
test () main ()
{ {
char *s = "mes"; char *s = "mes";
char c = 'm'; char c = 'm';

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -49,7 +49,7 @@ typedef struct baz
} baz; } baz;
int int
test () main ()
{ {
foo_struct f; foo_struct f;
f.bar[0] = 0x22; f.bar[0] = 0x22;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
typedef struct foo typedef struct foo
@ -47,7 +47,7 @@ bar *list[2];
#endif #endif
int int
test () main ()
{ {
foo f = {1}; foo f = {1};
printf ("f.i=%d\n", f.i); printf ("f.i=%d\n", f.i);

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
typedef union foo typedef union foo
@ -37,7 +37,7 @@ typedef union
int int
test () main ()
{ {
union foo f = {48}; union foo f = {48};
printf ("f.i=%d\n", f.i); printf ("f.i=%d\n", f.i);

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -32,7 +32,7 @@ int global_i = 1;
int *global_p = &global_i; int *global_p = &global_i;
int int
test () main ()
{ {
if (printf ("belong to us\n"), strcmp (help, "All your base are")) return 1; if (printf ("belong to us\n"), strcmp (help, "All your base are")) return 1;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
union u { union u {
@ -41,7 +41,7 @@ struct anon
int int
test () main ()
{ {
struct foo f = {2}; struct foo f = {2};
printf ("f.u.bar=%d\n", f.u.bar); printf ("f.u.bar=%d\n", f.u.bar);

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
char *list[2] = {"foo\n", "bar\n"}; char *list[2] = {"foo\n", "bar\n"};
@ -31,7 +31,7 @@ struct foo {
}; };
int int
test () main ()
{ {
char *pc = 0; char *pc = 0;
void *pv = 0; void *pv = 0;

View file

@ -20,7 +20,7 @@
#include <string.h> #include <string.h>
#include "30-test.i" #include <libmes.h>
struct baz { struct baz {
int i; int i;
@ -58,7 +58,7 @@ add2 (void *ptab)
struct foo *hash_ident[10]; struct foo *hash_ident[10];
int int
test () main ()
{ {
int i = 1; int i = 1;
int *p = &i; int *p = &i;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdint.h> #include <stdint.h>
@ -34,7 +34,7 @@ union bar {
union bar bar; union bar bar;
int int
test () main ()
{ {
bar.foo.i = 2; bar.foo.i = 2;
bar.foo.p = "hallo"; bar.foo.p = "hallo";

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <libmes.h> #include <libmes.h>
#include <stdio.h> #include <stdio.h>
@ -34,7 +34,7 @@ int bla[6] = {0,0,11223344, 55667788,0,0};
int g_c[2] = {101, 111}; int g_c[2] = {101, 111};
int int
test () main ()
{ {
f.bar = bla; f.bar = bla;
struct foo *pf = &f; struct foo *pf = &f;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -37,7 +37,7 @@ char *buffer = "aaaaaaaaaaaa";
char *bufzor = "bbbbbbbbbbbb"; char *bufzor = "bbbbbbbbbbbb";
int int
test () main ()
{ {
char *p; char *p;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
struct foo { struct foo {
int a; int a;
@ -37,7 +37,7 @@ typedef struct bar bar_struct;
typedef struct bar foo_struct; typedef struct bar foo_struct;
int int
test () main ()
{ {
if (g_foo[0].a != 0) return 1; if (g_foo[0].a != 0) return 1;
if (g_foo[0].b != 1) return 2; if (g_foo[0].b != 1) return 2;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <libmes.h> #include <libmes.h>
#include <stdlib.h> #include <stdlib.h>
@ -71,7 +71,7 @@ struct state {
struct state g_s; struct state g_s;
int int
test () main ()
{ {
struct state *s = &g_s; struct state *s = &g_s;

View file

@ -18,10 +18,10 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
int int
test () main ()
{ {
char *s = "int"; char *s = "int";
char c = s[0]; char c = s[0];

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -69,7 +69,7 @@ find2 ()
} }
int int
test () main ()
{ {
char *s = find0 (); char *s = find0 ();
eputs (s); eputs ("\n"); eputs (s); eputs ("\n");

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <libmes.h> #include <libmes.h>
#include <stdio.h> #include <stdio.h>
@ -34,7 +34,7 @@ struct foo {
struct foo g_foo[2]; struct foo g_foo[2];
int int
test () main ()
{ {
struct foo foo; struct foo foo;
foo.foo = g_foo; foo.foo = g_foo;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <inttypes.h> #include <inttypes.h>
#include <string.h> #include <string.h>
@ -31,7 +31,7 @@ struct option {
}; };
int int
test () main ()
{ {
struct option h = {"help", 0, 10, 1}; struct option h = {"help", 0, 10, 1};
struct option o = {"output", 1, 11, 1}; struct option o = {"output", 1, 11, 1};

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <string.h> #include <string.h>
struct string { struct string {
@ -43,7 +43,7 @@ struct string g_t;
struct biggie tab[2]; struct biggie tab[2];
int int
test () main ()
{ {
struct string s = {"hallo"}; struct string s = {"hallo"};
s.len = strlen (s.str); s.len = strlen (s.str);

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
struct s struct s
@ -42,7 +42,7 @@ struct anon
int int
test () main ()
{ {
struct foo f = {1,2}; struct foo f = {1,2};
f.s.baz = 2; // FIXME f.s.baz = 2; // FIXME

View file

@ -18,14 +18,14 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <libmes.h> #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
int int
test () main ()
{ {
char *p = "42foo\n"; char *p = "42foo\n";
int n = abtoi (&p, 0); int n = abtoi (&p, 0);

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
struct section { struct section {
unsigned char *data; unsigned char *data;
@ -44,7 +44,7 @@ struct section section;
for (;elem < ((type *) (sec->data + sec->offset)); elem++) for (;elem < ((type *) (sec->data + sec->offset)); elem++)
int int
test () main ()
{ {
struct sym* p; struct sym* p;
p = tab3; p = tab3;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#if __MESC__ #if __MESC__
#define __attribute__(x) #define __attribute__(x)
@ -46,7 +46,7 @@ struct foo13 tab14[3];
struct foo16 tab16[3]; struct foo16 tab16[3];
int int
test () main ()
{ {
unsigned char *p; unsigned char *p;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
struct file { struct file {
char *ptr; char *ptr;
@ -26,7 +26,7 @@ struct file {
}; };
int int
test () main ()
{ {
struct file f; struct file f;
f.ptr = f.buffer; f.ptr = f.buffer;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <libmes.h> #include <libmes.h>
#include <stdlib.h> #include <stdlib.h>
@ -39,7 +39,7 @@ struct state {
}; };
int int
test () main ()
{ {
struct state s; struct state s;
struct state *ps; struct state *ps;

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@ -44,7 +44,7 @@ first ()
} }
int int
test () main ()
{ {
if (!setjmp (buf)) if (!setjmp (buf))
first (); // when executed, setjmp returned 0 first (); // when executed, setjmp returned 0

View file

@ -18,7 +18,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <string.h> #include <string.h>
@ -31,7 +31,7 @@ compare_int (void *a, void *b)
} }
int int
test () main ()
{ {
int lst[6] = {0, 5, 4, 3, 2, -1}; int lst[6] = {0, 5, 4, 3, 2, -1};
qsort (lst, 6, sizeof (int), compare_int); qsort (lst, 6, sizeof (int), compare_int);

View file

@ -18,12 +18,12 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
int int
test () main ()
{ {
puts ("\n"); puts ("\n");
char buf[10] = {0,0,0,0,0,0,0,0,0,0}; char buf[10] = {0,0,0,0,0,0,0,0,0,0};

View file

@ -18,11 +18,11 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "30-test.i" #include <libmes.h>
#include <stdio.h> #include <stdio.h>
int int
test () main ()
{ {
int i; int i;
int r = sscanf ("42", "%d", &i); int r = sscanf ("42", "%d", &i);