annotate src/physfs-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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 *
8a6c466753e2 Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents: 2333
diff changeset
5 * This is a slightly modified version of:
8a6c466753e2 Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents: 2333
diff changeset
6 * test/physfs_test.c
8a6c466753e2 Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents: 2333
diff changeset
7 */
1615
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
8
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
9 #include "physfs.h"
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
10 #include <stdio.h>
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
11 #include <stdlib.h>
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
12
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
13 int main(int argc, char *argv[])
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
14 {
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
15 (void)argc;
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
16 (void)argv;
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
17
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
18 PHYSFS_Version compiled;
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
19 PHYSFS_VERSION(&compiled);
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
20
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
21 printf("Compiled against PhysicsFS version %d.%d.%d\n\n",
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
22 (int) compiled.major, (int) compiled.minor, (int) compiled.patch);
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
23
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
24 const PHYSFS_ArchiveInfo **rc;
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
25 const PHYSFS_ArchiveInfo **i;
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
26
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
27 rc = PHYSFS_supportedArchiveTypes();
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
28 printf("Supported archive types:\n");
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
29 if (*rc == NULL)
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
30 printf(" * Apparently, NONE!\n");
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
31 else
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
32 {
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
33 for (i = rc; *i != NULL; i++)
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
34 {
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
35 printf(" * %s: %s\n Written by %s.\n %s\n",
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
36 (*i)->extension, (*i)->description,
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
37 (*i)->author, (*i)->url);
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
38 } /* for */
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
39 } /* else */
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
40
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
41 return 0;
0ea7263be430 new package physfs
Tony Theodore <tonyt@logyst.com>
parents:
diff changeset
42 }