annotate src/geos-test.c @ 2333:f653602a0500

Rebrand to new project name MXE
author Volker Grabsch <vog@notjusthosting.com>
date Wed, 28 Mar 2012 15:46:58 +0200
parents 04215d0b04a9
children 8a6c466753e2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
f653602a0500 Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents: 1828
diff changeset
1 /* This file is part of MXE. */
1828
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
2 /* See doc/index.html for further information. */
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
3
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
4 #include <stdarg.h>
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
5 #include <stdio.h>
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
6 #include <stdlib.h>
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
7
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
8 #include <geos_c.h>
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
9
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
10 static void notice(const char *fmt, ...)
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
11 {
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
12 va_list ap;
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
13 va_start(ap, fmt);
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
14 vprintf(fmt, ap);
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
15 va_end(ap);
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
16 printf("\n");
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
17 }
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
18
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
19 static void error(const char *fmt, ...)
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
20 {
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
21 va_list ap;
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
22 va_start(ap, fmt);
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
23 vprintf(fmt, ap);
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
24 va_end(ap);
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
25 printf("\n");
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
26
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
27 exit(1);
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
28 }
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
29
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
30 int main(int argc, char *argv[])
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
31 {
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
32 GEOSContextHandle_t handle;
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
33
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
34 (void)argc;
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
35 (void)argv;
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
36
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
37 handle = initGEOS_r(notice, error);
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
38
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
39 printf("GEOS version: %s\n", GEOSversion());
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
40
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
41 finishGEOS_r(handle);
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
42 return 0;
04215d0b04a9 test program for package geos
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
43 }