aboutsummaryrefslogtreecommitdiff
path: root/vendor/voclient/libvoclient/examples/resolver.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /vendor/voclient/libvoclient/examples/resolver.c
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'vendor/voclient/libvoclient/examples/resolver.c')
-rw-r--r--vendor/voclient/libvoclient/examples/resolver.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/vendor/voclient/libvoclient/examples/resolver.c b/vendor/voclient/libvoclient/examples/resolver.c
new file mode 100644
index 00000000..83fedbfa
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/resolver.c
@@ -0,0 +1,37 @@
+/************************************************************************
+ * Call the Sesame name resolver with the specified target.
+ *
+ * Usage: resolver <target>
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, July 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+
+char *target = "m31";
+
+int main (int argc, char *argv[])
+{
+ Sesame sr = (Sesame) NULL;
+
+ /* Process command line arguments.
+ */
+ target = (argc <= 1 ? "m31" : argv[1]);
+
+ /* Now call the Resolver Service and summarize the results. We'll
+ * let the interface initialize the VO Client server and simply call
+ * the procedure we need.
+ */
+ sr = voc_nameResolver (target);
+
+ printf ("target: %s ra=%f dec=%f (%s)\n",
+ target, voc_resolverRA(sr), voc_resolverDEC(sr), voc_resolverPos(sr) );
+
+ return (0);
+}