annotate src/tinyxml-test.cpp @ 6213:5f64fb928091 release

build-gcc: Avoid library clash when calling msgfmt. * src/build-gcc-1-msgfmt.patch: Don't use libraries from the build tree when calling `msgfmt`. * dist-files.mk: Add patch to list.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 06 May 2022 19:36:10 +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 */
1391
ff977838d8b5 new package: tinyxml
Alexandre Bacquart <tek512@gmail.com>
parents:
diff changeset
5
ff977838d8b5 new package: tinyxml
Alexandre Bacquart <tek512@gmail.com>
parents:
diff changeset
6 #include <iostream>
ff977838d8b5 new package: tinyxml
Alexandre Bacquart <tek512@gmail.com>
parents:
diff changeset
7 #include <tinyxml.h>
ff977838d8b5 new package: tinyxml
Alexandre Bacquart <tek512@gmail.com>
parents:
diff changeset
8
ff977838d8b5 new package: tinyxml
Alexandre Bacquart <tek512@gmail.com>
parents:
diff changeset
9 int main(int argc, char *argv[])
ff977838d8b5 new package: tinyxml
Alexandre Bacquart <tek512@gmail.com>
parents:
diff changeset
10 {
1395
6e4fd771390f shortened test program for package tinyxml
Volker Grabsch <vog@notjusthosting.com>
parents: 1393
diff changeset
11 if (argc != 2) {
6e4fd771390f shortened test program for package tinyxml
Volker Grabsch <vog@notjusthosting.com>
parents: 1393
diff changeset
12 std::cerr << "Usage: tinyxml-test <xml-file>" << std::endl;
6e4fd771390f shortened test program for package tinyxml
Volker Grabsch <vog@notjusthosting.com>
parents: 1393
diff changeset
13 return 1;
1393
1d73365278e8 remove nasty tabs and trailing whitespaces from the test program for package tinyxml
Volker Grabsch <vog@notjusthosting.com>
parents: 1391
diff changeset
14 }
1395
6e4fd771390f shortened test program for package tinyxml
Volker Grabsch <vog@notjusthosting.com>
parents: 1393
diff changeset
15 std::string fpn = argv[1];
1391
ff977838d8b5 new package: tinyxml
Alexandre Bacquart <tek512@gmail.com>
parents:
diff changeset
16
1393
1d73365278e8 remove nasty tabs and trailing whitespaces from the test program for package tinyxml
Volker Grabsch <vog@notjusthosting.com>
parents: 1391
diff changeset
17 TiXmlDocument doc(fpn);
1d73365278e8 remove nasty tabs and trailing whitespaces from the test program for package tinyxml
Volker Grabsch <vog@notjusthosting.com>
parents: 1391
diff changeset
18 if (!doc.LoadFile()) {
1395
6e4fd771390f shortened test program for package tinyxml
Volker Grabsch <vog@notjusthosting.com>
parents: 1393
diff changeset
19 std::cerr << "failed to load " << fpn << std::endl;
6e4fd771390f shortened test program for package tinyxml
Volker Grabsch <vog@notjusthosting.com>
parents: 1393
diff changeset
20 return 1;
1393
1d73365278e8 remove nasty tabs and trailing whitespaces from the test program for package tinyxml
Volker Grabsch <vog@notjusthosting.com>
parents: 1391
diff changeset
21 }
1391
ff977838d8b5 new package: tinyxml
Alexandre Bacquart <tek512@gmail.com>
parents:
diff changeset
22
ff977838d8b5 new package: tinyxml
Alexandre Bacquart <tek512@gmail.com>
parents:
diff changeset
23 return 0;
ff977838d8b5 new package: tinyxml
Alexandre Bacquart <tek512@gmail.com>
parents:
diff changeset
24 }