Mercurial > mxe-octave
annotate src/libiberty-test.c @ 7207:9ed6500e56d3 default tip @
maint: Merge release to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Fri, 17 May 2024 20:16:41 +0200 |
parents | 99516e73b368 |
children |
rev | line source |
---|---|
2351
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
1 /* |
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
2 * This file is part of MXE. |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2351
diff
changeset
|
3 * See index.html for further information. |
2351
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
4 */ |
2292 | 5 |
6 #define _GNU_SOURCE | |
7 #include <stdio.h> | |
8 #include <stdlib.h> | |
9 #include <libiberty.h> | |
10 | |
11 int main(int argc, char *argv[]) | |
12 { | |
13 char *s; | |
14 | |
15 (void)argc; | |
16 (void)argv; | |
17 | |
18 if (asprintf(&s, "Test%i", 123) >= 0) { | |
19 printf("asprintf output: %s\n", s); | |
20 free(s); | |
21 return 0; | |
22 } else { | |
23 printf("asprintf() failed!\n"); | |
24 return 1; | |
25 } | |
26 } |