aboutsummaryrefslogtreecommitdiff
path: root/vendor/voclient/libvoclient/examples
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/voclient/libvoclient/examples')
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/cone1.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/cone2.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/cone3.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/registry1.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/registry2.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/registry3.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/resolver.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/siap1.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/siap2.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/siap3.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/siap4.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/simple.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.deps/skybot.Po1
-rw-r--r--vendor/voclient/libvoclient/examples/.gdb_history5
-rw-r--r--vendor/voclient/libvoclient/examples/Makefile213
-rw-r--r--vendor/voclient/libvoclient/examples/Makefile.am62
-rw-r--r--vendor/voclient/libvoclient/examples/Makefile.in571
-rw-r--r--vendor/voclient/libvoclient/examples/Makefile.man192
-rw-r--r--vendor/voclient/libvoclient/examples/Makefile.orig191
-rw-r--r--vendor/voclient/libvoclient/examples/README2
-rw-r--r--vendor/voclient/libvoclient/examples/cone1.c156
-rw-r--r--vendor/voclient/libvoclient/examples/cone2.c111
-rw-r--r--vendor/voclient/libvoclient/examples/cone3.c97
-rw-r--r--vendor/voclient/libvoclient/examples/datascope.cl124
-rw-r--r--vendor/voclient/libvoclient/examples/f77cone.f108
-rw-r--r--vendor/voclient/libvoclient/examples/f77registry.f45
-rw-r--r--vendor/voclient/libvoclient/examples/f77sesame.f23
-rw-r--r--vendor/voclient/libvoclient/examples/f77siap.f118
-rw-r--r--vendor/voclient/libvoclient/examples/f77skybot.f38
-rw-r--r--vendor/voclient/libvoclient/examples/messier.cl22
-rw-r--r--vendor/voclient/libvoclient/examples/registry1.c140
-rw-r--r--vendor/voclient/libvoclient/examples/registry2.c151
-rw-r--r--vendor/voclient/libvoclient/examples/registry3.c132
-rw-r--r--vendor/voclient/libvoclient/examples/resolver.c37
-rw-r--r--vendor/voclient/libvoclient/examples/resolver.java32
-rw-r--r--vendor/voclient/libvoclient/examples/siap1.c159
-rw-r--r--vendor/voclient/libvoclient/examples/siap2.c95
-rw-r--r--vendor/voclient/libvoclient/examples/siap3.c94
-rw-r--r--vendor/voclient/libvoclient/examples/siap4.c146
-rw-r--r--vendor/voclient/libvoclient/examples/siap5.c133
-rw-r--r--vendor/voclient/libvoclient/examples/simple.c81
-rw-r--r--vendor/voclient/libvoclient/examples/simple.java23
-rwxr-xr-xvendor/voclient/libvoclient/examples/simple.pl6
-rwxr-xr-xvendor/voclient/libvoclient/examples/simple.py6
-rwxr-xr-xvendor/voclient/libvoclient/examples/simple.tcl5
-rw-r--r--vendor/voclient/libvoclient/examples/skybot.c59
-rw-r--r--vendor/voclient/libvoclient/examples/skyportal1_java85
-rw-r--r--vendor/voclient/libvoclient/examples/spptest.x471
-rw-r--r--vendor/voclient/libvoclient/examples/ssap1.c156
-rw-r--r--vendor/voclient/libvoclient/examples/ssap2.c95
-rw-r--r--vendor/voclient/libvoclient/examples/ssap3.c94
-rw-r--r--vendor/voclient/libvoclient/examples/ssap4.c141
-rw-r--r--vendor/voclient/libvoclient/examples/ssap5.c135
53 files changed, 4567 insertions, 0 deletions
diff --git a/vendor/voclient/libvoclient/examples/.deps/cone1.Po b/vendor/voclient/libvoclient/examples/.deps/cone1.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/cone1.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/cone2.Po b/vendor/voclient/libvoclient/examples/.deps/cone2.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/cone2.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/cone3.Po b/vendor/voclient/libvoclient/examples/.deps/cone3.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/cone3.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/registry1.Po b/vendor/voclient/libvoclient/examples/.deps/registry1.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/registry1.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/registry2.Po b/vendor/voclient/libvoclient/examples/.deps/registry2.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/registry2.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/registry3.Po b/vendor/voclient/libvoclient/examples/.deps/registry3.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/registry3.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/resolver.Po b/vendor/voclient/libvoclient/examples/.deps/resolver.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/resolver.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/siap1.Po b/vendor/voclient/libvoclient/examples/.deps/siap1.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/siap1.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/siap2.Po b/vendor/voclient/libvoclient/examples/.deps/siap2.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/siap2.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/siap3.Po b/vendor/voclient/libvoclient/examples/.deps/siap3.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/siap3.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/siap4.Po b/vendor/voclient/libvoclient/examples/.deps/siap4.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/siap4.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/simple.Po b/vendor/voclient/libvoclient/examples/.deps/simple.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/simple.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.deps/skybot.Po b/vendor/voclient/libvoclient/examples/.deps/skybot.Po
new file mode 100644
index 00000000..9ce06a81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.deps/skybot.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/vendor/voclient/libvoclient/examples/.gdb_history b/vendor/voclient/libvoclient/examples/.gdb_history
new file mode 100644
index 00000000..01b62df9
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/.gdb_history
@@ -0,0 +1,5 @@
+run
+where
+quit
+run
+quit
diff --git a/vendor/voclient/libvoclient/examples/Makefile b/vendor/voclient/libvoclient/examples/Makefile
new file mode 100644
index 00000000..54e888ca
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/Makefile
@@ -0,0 +1,213 @@
+#///////////////////////////////////////////////////////////////////////////////
+#//
+#//
+#///////////////////////////////////////////////////////////////////////////////
+
+# primary dependencies
+
+NAME = VOClient
+VERSION = 1.0
+PLATFORM := $(shell uname -s)
+#PLATFORM = LINUX
+#PLATFORM = MACOSX
+#PLATFORM = CYGWIN
+HERE := $(shell /bin/pwd)
+
+
+# secondary dependencies
+
+LIBBASE = lib$(NAME)
+STATICLIB = $(HERE)/$(LIBBASE).a
+SHAREDLIB = $(HERE)/$(LIBBASE).so.$(VERSION)
+
+
+# stuff that's precious to keep
+
+.PRECIOUS: $(STATICLIB) $(SHAREDLIB)
+.KEEP_STATE:
+
+
+# includes, flags and libraries
+CC = gcc
+CINCS = -I$(HERE) -I../
+CFLAGS = -g -Wall -D$(PLATFORM) $(CINCS)
+
+F77 = g77
+FFLAGS = -g -Wall
+
+XC = xc
+XFLAGS =
+
+
+# list of source and include files
+
+SRCS = cone1.c cone2.c cone3.c \
+ siap1.c siap2.c siap3.c siap4.c siap5.c \
+ ssap1.c ssap2.c ssap3.c ssap4.c ssap5.c \
+ simple.c resolver.c skybot.c \
+ spptext.x \
+ registry1.c registry2.c registry3.c \
+ f77cone.f f77siap.f f77sesame.f f77registry.f
+OBJS = cone1.o cone2.o cone3.o \
+ siap1.o siap2.o siap3.o siap4.o siap4.o \
+ ssap1.o ssap2.o ssap3.o ssap4.o ssap4.o \
+ simple.o resolver.o skybot.o \
+ spptest.o \
+ registry1.o registry2.o registry3.o \
+ f77cone.o f77siap.o f77sesame.o f77registry.o
+INCS = ../VOClient.h
+
+
+# targets
+
+all: demo
+
+clean:
+ /bin/rm -rf .make.state .nse_depinfo
+ /bin/rm -rf simple cone1 cone2 cone3
+ /bin/rm -rf siap1 siap2 siap3 siap4 siap5
+ /bin/rm -rf ssap1 ssap2 ssap3 ssap4 ssap5
+ /bin/rm -rf f77cone f77siap f77sesame f77registry spptest.e
+ /bin/rm -rf resolver registry1 registry2 registry3 skybot
+ /bin/rm -rf dataset*.fits *.o
+
+everything:
+ make clean
+ make all
+ make install
+
+help: HELP
+
+install: all
+
+
+
+###############################################################################
+# Unit test programs to be built.
+###############################################################################
+
+demo: simple resolver skybot spptest \
+ cone1 cone2 cone3 \
+ siap1 siap2 siap3 siap4 siap5 \
+ ssap1 ssap2 ssap3 ssap4 ssap5 \
+ f77cone f77siap f77sesame f77registry f77skybot \
+ registry1 registry2 registry3
+
+
+###########################
+# C Test programs.
+###########################
+
+simple: simple.c
+ $(CC) $(CFLAGS) -o simple simple.c -L../ -lVOClient -lm -lc
+
+cone1: cone1.c
+ $(CC) $(CFLAGS) -o cone1 cone1.c -L../ -lVOClient -lm -lc
+
+cone2: cone2.c
+ $(CC) $(CFLAGS) -o cone2 cone2.c -L../ -lVOClient -lm -lc
+
+cone3: cone3.c
+ $(CC) $(CFLAGS) -o cone3 cone3.c -L../ -lVOClient -lm -lc
+
+siap1: siap1.c
+ $(CC) $(CFLAGS) -o siap1 siap1.c -L../ -lVOClient -lm -lc
+
+siap2: siap2.c
+ $(CC) $(CFLAGS) -o siap2 siap2.c -L../ -lVOClient -lm -lc
+
+siap3: siap3.c
+ $(CC) $(CFLAGS) -o siap3 siap3.c -L../ -lVOClient -lm -lc
+
+siap4: siap4.c
+ $(CC) $(CFLAGS) -o siap4 siap4.c -L../ -lVOClient -lm -lc
+
+siap5: siap5.c
+ $(CC) $(CFLAGS) -o siap5 siap5.c -L../ -lVOClient -lm -lc
+
+ssap1: ssap1.c
+ $(CC) $(CFLAGS) -o ssap1 ssap1.c -L../ -lVOClient -lm -lc
+
+ssap2: ssap2.c
+ $(CC) $(CFLAGS) -o ssap2 ssap2.c -L../ -lVOClient -lm -lc
+
+ssap3: ssap3.c
+ $(CC) $(CFLAGS) -o ssap3 ssap3.c -L../ -lVOClient -lm -lc
+
+ssap4: ssap4.c
+ $(CC) $(CFLAGS) -o ssap4 ssap4.c -L../ -lVOClient -lm -lc
+
+ssap5: ssap5.c
+ $(CC) $(CFLAGS) -o ssap5 ssap5.c -L../ -lVOClient -lm -lc
+
+
+registry1: registry1.c
+ $(CC) $(CFLAGS) -o registry1 registry1.c -L../ -lVOClient -lm -lc
+
+registry2: registry2.c
+ $(CC) $(CFLAGS) -o registry2 registry2.c -L../ -lVOClient -lm -lc
+
+registry3: registry3.c
+ $(CC) $(CFLAGS) -o registry3 registry3.c -L../ -lVOClient -lm -lc
+
+
+resolver: resolver.c
+ $(CC) $(CFLAGS) -o resolver resolver.c -L../ -lVOClient -lm -lc
+
+skybot: skybot.c
+ $(CC) $(CFLAGS) -o skybot skybot.c -L../ -lVOClient -lm -lc
+
+
+
+###########################
+# Fortran Test programs.
+###########################
+
+f77cone: f77cone.f
+ $(F77) $(FFLAGS) -o f77cone f77cone.f -L../ -lVOClient -lm -lc
+
+f77siap: f77siap.f
+ $(F77) $(FFLAGS) -o f77siap f77siap.f -L../ -lVOClient -lm -lc
+
+f77sesame: f77sesame.f
+ $(F77) $(FFLAGS) -o f77sesame f77sesame.f -L../ -lVOClient -lm -lc
+
+f77skybot: f77skybot.f
+ $(F77) $(FFLAGS) -o f77skybot f77skybot.f -L../ -lVOClient -lm -lc
+
+f77registry: f77registry.f
+ $(F77) $(FFLAGS) -o f77registry f77registry.f -L../ -lVOClient -lm -lc
+
+
+
+###########################
+# IRAF Test programs.
+###########################
+
+spptest: spptest.x
+ $(XC) $(XFLAGS) -o spptest.e spptest.x -L../ -lVOClient
+
+
+
+
+
+
+###############################################################################
+# Leave this stuff alone.
+###############################################################################
+
+$(STATICLIB): $(SRCS:%.c=Static/%.o)
+ /usr/bin/ar rv $@ $?
+Static/%.o: %.c $(INCS)
+ /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
+Static:
+ /bin/mkdir $@
+ chmod 777 $@
+
+$(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
+ /usr/bin/ld -shared -o $@ $? -lc -ldl
+Shared/%.o: %.c $(INCS)
+ /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
+Shared:
+ /bin/mkdir $@
+ chmod 777 $@
diff --git a/vendor/voclient/libvoclient/examples/Makefile.am b/vendor/voclient/libvoclient/examples/Makefile.am
new file mode 100644
index 00000000..80e1a3e8
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/Makefile.am
@@ -0,0 +1,62 @@
+## VOClient example/unit test programs
+## Process this file with automake to produce Makefile.in
+
+bin_PROGRAMS = cone1 cone2 cone3 registry1 registry2 \
+ registry3 resolver siap1 siap2 siap3 siap4 \
+ simple skybot
+
+VOCLIBS = $(top_builddir)/clientapi/libvoclient.la
+INCLUDES = -I$(top_srcdir)/clientapi
+
+cone1_SOURCES = cone1.c
+cone1_LDADD = $(VOCLIBS)
+cone1_DEPENDENCIES = $(VOCLIBS)
+
+cone2_SOURCES = cone2.c
+cone2_LDADD = $(VOCLIBS)
+cone2_DEPENDENCIES = $(VOCLIBS)
+
+cone3_SOURCES = cone3.c
+cone3_LDADD = $(VOCLIBS)
+cone3_DEPENDENCIES = $(VOCLIBS)
+
+registry1_SOURCES = registry1.c
+registry1_LDADD = $(VOCLIBS)
+registry1_DEPENDENCIES = $(VOCLIBS)
+
+registry2_SOURCES = registry2.c
+registry2_LDADD = $(VOCLIBS)
+registry2_DEPENDENCIES = $(VOCLIBS)
+
+registry3_SOURCES = registry3.c
+registry3_LDADD = $(VOCLIBS)
+registry3_DEPENDENCIES = $(VOCLIBS)
+
+resolver_SOURCES = resolver.c
+resolver_LDADD = $(VOCLIBS)
+resolver_DEPENDENCIES = $(VOCLIBS)
+
+siap1_SOURCES = siap1.c
+siap1_LDADD = $(VOCLIBS)
+siap1_DEPENDENCIES = $(VOCLIBS)
+
+siap2_SOURCES = siap2.c
+siap2_LDADD = $(VOCLIBS)
+siap2_DEPENDENCIES = $(VOCLIBS)
+
+siap3_SOURCES = siap3.c
+siap3_LDADD = $(VOCLIBS)
+siap3_DEPENDENCIES = $(VOCLIBS)
+
+siap4_SOURCES = siap4.c
+siap4_LDADD = $(VOCLIBS)
+siap4_DEPENDENCIES = $(VOCLIBS)
+
+simple_SOURCES = simple.c
+simple_LDADD = $(VOCLIBS)
+simple_DEPENDENCIES = $(VOCLIBS)
+
+skybot_SOURCES = skybot.c
+skybot_LDADD = $(VOCLIBS)
+skybot_DEPENDENCIES = $(VOCLIBS)
+
diff --git a/vendor/voclient/libvoclient/examples/Makefile.in b/vendor/voclient/libvoclient/examples/Makefile.in
new file mode 100644
index 00000000..7a352419
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/Makefile.in
@@ -0,0 +1,571 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = cone1$(EXEEXT) cone2$(EXEEXT) cone3$(EXEEXT) \
+ registry1$(EXEEXT) registry2$(EXEEXT) registry3$(EXEEXT) \
+ resolver$(EXEEXT) siap1$(EXEEXT) siap2$(EXEEXT) siap3$(EXEEXT) \
+ siap4$(EXEEXT) simple$(EXEEXT) skybot$(EXEEXT)
+subdir = clientapi/examples
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/config/ac_pkg_swig.m4 \
+ $(top_srcdir)/config/ac_python_devel.m4 \
+ $(top_srcdir)/config/ac_python_module.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_cone1_OBJECTS = cone1.$(OBJEXT)
+cone1_OBJECTS = $(am_cone1_OBJECTS)
+am__DEPENDENCIES_1 = $(top_builddir)/clientapi/libvoclient.la
+am_cone2_OBJECTS = cone2.$(OBJEXT)
+cone2_OBJECTS = $(am_cone2_OBJECTS)
+am_cone3_OBJECTS = cone3.$(OBJEXT)
+cone3_OBJECTS = $(am_cone3_OBJECTS)
+am_registry1_OBJECTS = registry1.$(OBJEXT)
+registry1_OBJECTS = $(am_registry1_OBJECTS)
+am_registry2_OBJECTS = registry2.$(OBJEXT)
+registry2_OBJECTS = $(am_registry2_OBJECTS)
+am_registry3_OBJECTS = registry3.$(OBJEXT)
+registry3_OBJECTS = $(am_registry3_OBJECTS)
+am_resolver_OBJECTS = resolver.$(OBJEXT)
+resolver_OBJECTS = $(am_resolver_OBJECTS)
+am_siap1_OBJECTS = siap1.$(OBJEXT)
+siap1_OBJECTS = $(am_siap1_OBJECTS)
+am_siap2_OBJECTS = siap2.$(OBJEXT)
+siap2_OBJECTS = $(am_siap2_OBJECTS)
+am_siap3_OBJECTS = siap3.$(OBJEXT)
+siap3_OBJECTS = $(am_siap3_OBJECTS)
+am_siap4_OBJECTS = siap4.$(OBJEXT)
+siap4_OBJECTS = $(am_siap4_OBJECTS)
+am_simple_OBJECTS = simple.$(OBJEXT)
+simple_OBJECTS = $(am_simple_OBJECTS)
+am_skybot_OBJECTS = skybot.$(OBJEXT)
+skybot_OBJECTS = $(am_skybot_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/config
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(cone1_SOURCES) $(cone2_SOURCES) $(cone3_SOURCES) \
+ $(registry1_SOURCES) $(registry2_SOURCES) $(registry3_SOURCES) \
+ $(resolver_SOURCES) $(siap1_SOURCES) $(siap2_SOURCES) \
+ $(siap3_SOURCES) $(siap4_SOURCES) $(simple_SOURCES) \
+ $(skybot_SOURCES)
+DIST_SOURCES = $(cone1_SOURCES) $(cone2_SOURCES) $(cone3_SOURCES) \
+ $(registry1_SOURCES) $(registry2_SOURCES) $(registry3_SOURCES) \
+ $(resolver_SOURCES) $(siap1_SOURCES) $(siap2_SOURCES) \
+ $(siap3_SOURCES) $(siap4_SOURCES) $(simple_SOURCES) \
+ $(skybot_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_LIB = @SWIG_LIB@
+VERSION = @VERSION@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+VOCLIBS = $(top_builddir)/clientapi/libvoclient.la
+INCLUDES = -I$(top_srcdir)/clientapi
+cone1_SOURCES = cone1.c
+cone1_LDADD = $(VOCLIBS)
+cone1_DEPENDENCIES = $(VOCLIBS)
+cone2_SOURCES = cone2.c
+cone2_LDADD = $(VOCLIBS)
+cone2_DEPENDENCIES = $(VOCLIBS)
+cone3_SOURCES = cone3.c
+cone3_LDADD = $(VOCLIBS)
+cone3_DEPENDENCIES = $(VOCLIBS)
+registry1_SOURCES = registry1.c
+registry1_LDADD = $(VOCLIBS)
+registry1_DEPENDENCIES = $(VOCLIBS)
+registry2_SOURCES = registry2.c
+registry2_LDADD = $(VOCLIBS)
+registry2_DEPENDENCIES = $(VOCLIBS)
+registry3_SOURCES = registry3.c
+registry3_LDADD = $(VOCLIBS)
+registry3_DEPENDENCIES = $(VOCLIBS)
+resolver_SOURCES = resolver.c
+resolver_LDADD = $(VOCLIBS)
+resolver_DEPENDENCIES = $(VOCLIBS)
+siap1_SOURCES = siap1.c
+siap1_LDADD = $(VOCLIBS)
+siap1_DEPENDENCIES = $(VOCLIBS)
+siap2_SOURCES = siap2.c
+siap2_LDADD = $(VOCLIBS)
+siap2_DEPENDENCIES = $(VOCLIBS)
+siap3_SOURCES = siap3.c
+siap3_LDADD = $(VOCLIBS)
+siap3_DEPENDENCIES = $(VOCLIBS)
+siap4_SOURCES = siap4.c
+siap4_LDADD = $(VOCLIBS)
+siap4_DEPENDENCIES = $(VOCLIBS)
+simple_SOURCES = simple.c
+simple_LDADD = $(VOCLIBS)
+simple_DEPENDENCIES = $(VOCLIBS)
+skybot_SOURCES = skybot.c
+skybot_LDADD = $(VOCLIBS)
+skybot_DEPENDENCIES = $(VOCLIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign clientapi/examples/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --foreign clientapi/examples/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+ done
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+cone1$(EXEEXT): $(cone1_OBJECTS) $(cone1_DEPENDENCIES)
+ @rm -f cone1$(EXEEXT)
+ $(LINK) $(cone1_LDFLAGS) $(cone1_OBJECTS) $(cone1_LDADD) $(LIBS)
+cone2$(EXEEXT): $(cone2_OBJECTS) $(cone2_DEPENDENCIES)
+ @rm -f cone2$(EXEEXT)
+ $(LINK) $(cone2_LDFLAGS) $(cone2_OBJECTS) $(cone2_LDADD) $(LIBS)
+cone3$(EXEEXT): $(cone3_OBJECTS) $(cone3_DEPENDENCIES)
+ @rm -f cone3$(EXEEXT)
+ $(LINK) $(cone3_LDFLAGS) $(cone3_OBJECTS) $(cone3_LDADD) $(LIBS)
+registry1$(EXEEXT): $(registry1_OBJECTS) $(registry1_DEPENDENCIES)
+ @rm -f registry1$(EXEEXT)
+ $(LINK) $(registry1_LDFLAGS) $(registry1_OBJECTS) $(registry1_LDADD) $(LIBS)
+registry2$(EXEEXT): $(registry2_OBJECTS) $(registry2_DEPENDENCIES)
+ @rm -f registry2$(EXEEXT)
+ $(LINK) $(registry2_LDFLAGS) $(registry2_OBJECTS) $(registry2_LDADD) $(LIBS)
+registry3$(EXEEXT): $(registry3_OBJECTS) $(registry3_DEPENDENCIES)
+ @rm -f registry3$(EXEEXT)
+ $(LINK) $(registry3_LDFLAGS) $(registry3_OBJECTS) $(registry3_LDADD) $(LIBS)
+resolver$(EXEEXT): $(resolver_OBJECTS) $(resolver_DEPENDENCIES)
+ @rm -f resolver$(EXEEXT)
+ $(LINK) $(resolver_LDFLAGS) $(resolver_OBJECTS) $(resolver_LDADD) $(LIBS)
+siap1$(EXEEXT): $(siap1_OBJECTS) $(siap1_DEPENDENCIES)
+ @rm -f siap1$(EXEEXT)
+ $(LINK) $(siap1_LDFLAGS) $(siap1_OBJECTS) $(siap1_LDADD) $(LIBS)
+siap2$(EXEEXT): $(siap2_OBJECTS) $(siap2_DEPENDENCIES)
+ @rm -f siap2$(EXEEXT)
+ $(LINK) $(siap2_LDFLAGS) $(siap2_OBJECTS) $(siap2_LDADD) $(LIBS)
+siap3$(EXEEXT): $(siap3_OBJECTS) $(siap3_DEPENDENCIES)
+ @rm -f siap3$(EXEEXT)
+ $(LINK) $(siap3_LDFLAGS) $(siap3_OBJECTS) $(siap3_LDADD) $(LIBS)
+siap4$(EXEEXT): $(siap4_OBJECTS) $(siap4_DEPENDENCIES)
+ @rm -f siap4$(EXEEXT)
+ $(LINK) $(siap4_LDFLAGS) $(siap4_OBJECTS) $(siap4_LDADD) $(LIBS)
+simple$(EXEEXT): $(simple_OBJECTS) $(simple_DEPENDENCIES)
+ @rm -f simple$(EXEEXT)
+ $(LINK) $(simple_LDFLAGS) $(simple_OBJECTS) $(simple_LDADD) $(LIBS)
+skybot$(EXEEXT): $(skybot_OBJECTS) $(skybot_DEPENDENCIES)
+ @rm -f skybot$(EXEEXT)
+ $(LINK) $(skybot_LDFLAGS) $(skybot_OBJECTS) $(skybot_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cone1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cone2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cone3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/registry1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/registry2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/registry3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siap1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siap2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siap3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/siap4.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skybot.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/vendor/voclient/libvoclient/examples/Makefile.man b/vendor/voclient/libvoclient/examples/Makefile.man
new file mode 100644
index 00000000..9e3b6846
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/Makefile.man
@@ -0,0 +1,192 @@
+#///////////////////////////////////////////////////////////////////////////////
+#//
+#//
+#///////////////////////////////////////////////////////////////////////////////
+
+# primary dependencies
+
+NAME = voclient
+VERSION = 1.0
+PLATFORM := $(shell uname -s)
+#PLATFORM = LINUX
+#PLATFORM = MACOSX
+#PLATFORM = CYGWIN
+HERE := $(shell /bin/pwd)
+
+
+# secondary dependencies
+
+LIBBASE = lib$(NAME)
+STATICLIB = $(HERE)/$(LIBBASE).a
+SHAREDLIB = $(HERE)/$(LIBBASE).so.$(VERSION)
+
+
+# stuff that's precious to keep
+
+.PRECIOUS: $(STATICLIB) $(SHAREDLIB)
+.KEEP_STATE:
+
+
+# includes, flags and libraries
+CC = gcc
+CINCS = -I$(HERE) -I../
+CFLAGS = -g -Wall -D$(PLATFORM) $(CINCS)
+
+F77 = g77
+FFLAGS = -g -Wall
+
+XC = xc
+XFLAGS =
+
+
+# list of source and include files
+
+SRCS = cone1.c cone2.c cone3.c \
+ siap1.c siap2.c siap3.c siap4.c \
+ simple.c resolver.c skybot.c \
+ spptext.x \
+ registry1.c registry2.c registry3.c \
+ f77cone.f f77siap.f f77sesame.f f77registry.f
+OBJS = cone1.o cone2.o cone3.o \
+ siap1.o siap2.o siap3.o siap4.o \
+ simple.o resolver.o skybot.o \
+ spptest.o \
+ registry1.o registry2.o registry3.o \
+ f77cone.o f77siap.o f77sesame.o f77registry.o
+INCS = ../VOClient.h
+
+
+# targets
+
+all: demo
+
+clean:
+ /bin/rm -rf .make.state .nse_depinfo
+ /bin/rm -rf simple cone1 cone2 cone3
+ /bin/rm -rf siap1 siap2 siap3 siap4
+ /bin/rm -rf f77cone f77siap f77sesame f77registry spptest.e
+ /bin/rm -rf resolver registry1 registry2 registry3
+ /bin/rm -rf skybot f77skybot
+ /bin/rm -rf dataset*.fits *.o
+
+everything:
+ make clean
+ make all
+ make install
+
+help: HELP
+
+install: all
+
+
+
+###############################################################################
+# Unit test programs to be built.
+###############################################################################
+
+demo: simple resolver skybot spptest \
+ cone1 cone2 cone3 \
+ siap1 siap2 siap3 siap4 \
+ f77cone f77siap f77sesame f77registry f77skybot \
+ registry1 registry2 registry3
+
+
+###########################
+# C Test programs.
+###########################
+
+simple: simple.c
+ $(CC) $(CFLAGS) -o simple simple.c -L../ -lvoclient -lm -lc
+
+cone1: cone1.c
+ $(CC) $(CFLAGS) -o cone1 cone1.c -L../ -lvoclient -lm -lc
+
+cone2: cone2.c
+ $(CC) $(CFLAGS) -o cone2 cone2.c -L../ -lvoclient -lm -lc
+
+cone3: cone3.c
+ $(CC) $(CFLAGS) -o cone3 cone3.c -L../ -lvoclient -lm -lc
+
+siap1: siap1.c
+ $(CC) $(CFLAGS) -o siap1 siap1.c -L../ -lvoclient -lm -lc
+
+siap2: siap2.c
+ $(CC) $(CFLAGS) -o siap2 siap2.c -L../ -lvoclient -lm -lc
+
+siap3: siap3.c
+ $(CC) $(CFLAGS) -o siap3 siap3.c -L../ -lvoclient -lm -lc
+
+siap4: siap4.c
+ $(CC) $(CFLAGS) -o siap4 siap4.c -L../ -lvoclient -lm -lc
+
+
+registry1: registry1.c
+ $(CC) $(CFLAGS) -o registry1 registry1.c -L../ -lvoclient -lm -lc
+
+registry2: registry2.c
+ $(CC) $(CFLAGS) -o registry2 registry2.c -L../ -lvoclient -lm -lc
+
+registry3: registry3.c
+ $(CC) $(CFLAGS) -o registry3 registry3.c -L../ -lvoclient -lm -lc
+
+
+resolver: resolver.c
+ $(CC) $(CFLAGS) -o resolver resolver.c -L../ -lvoclient -lm -lc
+
+skybot: skybot.c
+ $(CC) $(CFLAGS) -o skybot skybot.c -L../ -lvoclient -lm -lc
+
+
+
+###########################
+# Fortran Test programs.
+###########################
+
+f77cone: f77cone.f
+ $(F77) $(FFLAGS) -o f77cone f77cone.f -L../ -lvoclient -lm -lc
+
+f77siap: f77siap.f
+ $(F77) $(FFLAGS) -o f77siap f77siap.f -L../ -lvoclient -lm -lc
+
+f77sesame: f77sesame.f
+ $(F77) $(FFLAGS) -o f77sesame f77sesame.f -L../ -lvoclient -lm -lc
+
+f77skybot: f77skybot.f
+ $(F77) $(FFLAGS) -o f77skybot f77skybot.f -L../ -lvoclient -lm -lc
+
+f77registry: f77registry.f
+ $(F77) $(FFLAGS) -o f77registry f77registry.f -L../ -lvoclient -lm -lc
+
+
+
+###########################
+# IRAF Test programs.
+###########################
+
+spptest: spptest.x
+ $(XC) $(XFLAGS) -o spptest.e spptest.x -L../ -lvoclient
+
+
+
+
+
+
+###############################################################################
+# Leave this stuff alone.
+###############################################################################
+
+$(STATICLIB): $(SRCS:%.c=Static/%.o)
+ /usr/bin/ar rv $@ $?
+Static/%.o: %.c $(INCS)
+ /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
+Static:
+ /bin/mkdir $@
+ chmod 777 $@
+
+$(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
+ /usr/bin/ld -shared -o $@ $? -lc -ldl
+Shared/%.o: %.c $(INCS)
+ /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
+Shared:
+ /bin/mkdir $@
+ chmod 777 $@
diff --git a/vendor/voclient/libvoclient/examples/Makefile.orig b/vendor/voclient/libvoclient/examples/Makefile.orig
new file mode 100644
index 00000000..0e239af5
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/Makefile.orig
@@ -0,0 +1,191 @@
+#///////////////////////////////////////////////////////////////////////////////
+#//
+#//
+#///////////////////////////////////////////////////////////////////////////////
+
+# primary dependencies
+
+NAME = voclient
+VERSION = 1.0
+PLATFORM := $(shell uname -s)
+#PLATFORM = LINUX
+#PLATFORM = MACOSX
+#PLATFORM = CYGWIN
+HERE := $(shell /bin/pwd)
+
+
+# secondary dependencies
+
+LIBBASE = lib$(NAME)
+STATICLIB = $(HERE)/$(LIBBASE).a
+SHAREDLIB = $(HERE)/$(LIBBASE).so.$(VERSION)
+
+
+# stuff that's precious to keep
+
+.PRECIOUS: $(STATICLIB) $(SHAREDLIB)
+.KEEP_STATE:
+
+
+# includes, flags and libraries
+CC = gcc
+CINCS = -I$(HERE) -I../
+CFLAGS = -g -Wall -D$(PLATFORM) $(CINCS)
+
+F77 = g77
+FFLAGS = -g -Wall
+
+XC = xc
+XFLAGS =
+
+
+# list of source and include files
+
+SRCS = cone1.c cone2.c cone3.c \
+ siap1.c siap2.c siap3.c siap4.c \
+ simple.c resolver.c skybot.c \
+ spptext.x \
+ registry1.c registry2.c registry3.c \
+ f77cone.f f77siap.f f77sesame.f f77registry.f
+OBJS = cone1.o cone2.o cone3.o \
+ siap1.o siap2.o siap3.o siap4.o \
+ simple.o resolver.o skybot.o \
+ spptest.o \
+ registry1.o registry2.o registry3.o \
+ f77cone.o f77siap.o f77sesame.o f77registry.o
+INCS = ../VOClient.h
+
+
+# targets
+
+all: demo
+
+clean:
+ /bin/rm -rf .make.state .nse_depinfo
+ /bin/rm -rf simple cone1 cone2 cone3
+ /bin/rm -rf siap1 siap2 siap3 siap4 skybot
+ /bin/rm -rf f77cone f77siap f77sesame f77registry spptest.e
+ /bin/rm -rf resolver registry1 registry2 registry3
+ /bin/rm -rf dataset*.fits *.o
+
+everything:
+ make clean
+ make all
+ make install
+
+help: HELP
+
+install: all
+
+
+
+###############################################################################
+# Unit test programs to be built.
+###############################################################################
+
+demo: simple resolver skybot spptest \
+ cone1 cone2 cone3 \
+ siap1 siap2 siap3 siap4 \
+ f77cone f77siap f77sesame f77registry f77skybot \
+ registry1 registry2 registry3
+
+
+###########################
+# C Test programs.
+###########################
+
+simple: simple.c
+ $(CC) $(CFLAGS) -o simple simple.c -L../ -lvoclient -lm -lc
+
+cone1: cone1.c
+ $(CC) $(CFLAGS) -o cone1 cone1.c -L../ -lvoclient -lm -lc
+
+cone2: cone2.c
+ $(CC) $(CFLAGS) -o cone2 cone2.c -L../ -lvoclient -lm -lc
+
+cone3: cone3.c
+ $(CC) $(CFLAGS) -o cone3 cone3.c -L../ -lvoclient -lm -lc
+
+siap1: siap1.c
+ $(CC) $(CFLAGS) -o siap1 siap1.c -L../ -lvoclient -lm -lc
+
+siap2: siap2.c
+ $(CC) $(CFLAGS) -o siap2 siap2.c -L../ -lvoclient -lm -lc
+
+siap3: siap3.c
+ $(CC) $(CFLAGS) -o siap3 siap3.c -L../ -lvoclient -lm -lc
+
+siap4: siap4.c
+ $(CC) $(CFLAGS) -o siap4 siap4.c -L../ -lvoclient -lm -lc
+
+
+registry1: registry1.c
+ $(CC) $(CFLAGS) -o registry1 registry1.c -L../ -lvoclient -lm -lc
+
+registry2: registry2.c
+ $(CC) $(CFLAGS) -o registry2 registry2.c -L../ -lvoclient -lm -lc
+
+registry3: registry3.c
+ $(CC) $(CFLAGS) -o registry3 registry3.c -L../ -lvoclient -lm -lc
+
+
+resolver: resolver.c
+ $(CC) $(CFLAGS) -o resolver resolver.c -L../ -lvoclient -lm -lc
+
+skybot: skybot.c
+ $(CC) $(CFLAGS) -o skybot skybot.c -L../ -lvoclient -lm -lc
+
+
+
+###########################
+# Fortran Test programs.
+###########################
+
+f77cone: f77cone.f
+ $(F77) $(FFLAGS) -o f77cone f77cone.f -L../ -lvoclient -lm -lc
+
+f77siap: f77siap.f
+ $(F77) $(FFLAGS) -o f77siap f77siap.f -L../ -lvoclient -lm -lc
+
+f77sesame: f77sesame.f
+ $(F77) $(FFLAGS) -o f77sesame f77sesame.f -L../ -lvoclient -lm -lc
+
+f77skybot: f77skybot.f
+ $(F77) $(FFLAGS) -o f77skybot f77skybot.f -L../ -lvoclient -lm -lc
+
+f77registry: f77registry.f
+ $(F77) $(FFLAGS) -o f77registry f77registry.f -L../ -lvoclient -lm -lc
+
+
+
+###########################
+# IRAF Test programs.
+###########################
+
+spptest: spptest.x
+ $(XC) $(XFLAGS) -o spptest.e spptest.x -L../ -lvoclient
+
+
+
+
+
+
+###############################################################################
+# Leave this stuff alone.
+###############################################################################
+
+$(STATICLIB): $(SRCS:%.c=Static/%.o)
+ /usr/bin/ar rv $@ $?
+Static/%.o: %.c $(INCS)
+ /usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
+Static:
+ /bin/mkdir $@
+ chmod 777 $@
+
+$(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
+ /usr/bin/ld -shared -o $@ $? -lc -ldl
+Shared/%.o: %.c $(INCS)
+ /usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
+Shared:
+ /bin/mkdir $@
+ chmod 777 $@
diff --git a/vendor/voclient/libvoclient/examples/README b/vendor/voclient/libvoclient/examples/README
new file mode 100644
index 00000000..b2308316
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/README
@@ -0,0 +1,2 @@
+EXAMPLES - Simple sample client applications, illustrating the use of
+VOClient in various languages or environments.
diff --git a/vendor/voclient/libvoclient/examples/cone1.c b/vendor/voclient/libvoclient/examples/cone1.c
new file mode 100644
index 00000000..8547bd80
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/cone1.c
@@ -0,0 +1,156 @@
+/************************************************************************
+ * Call a cone search service and print a summary selected fields of the
+ * results.
+ *
+ * Usage: cone1 ra dec sr [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+
+double ra = 12.0; /* default values */
+double dec = 12.0;
+double sr = 0.1;
+
+#ifdef USNOB
+char *service = \
+ "http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1&";
+#else
+ char *service = "http://chart.stsci.edu/GSCVO/GSC22VO.jsp?";
+#endif
+
+char *server = "6200:localhost";
+
+static void callConeService (char *url, double ra, double dec, double sr);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ sr = atof (argv[arg++]);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: cone1 [-ds server] ra dec sr [coneURL]\n");
+ exit(1);
+ }
+
+ /* Now call the Cone Service and summarize the results.
+ */
+ callConeService (service, ra, dec, sr);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a Cone search service and summarize results.
+ */
+static void
+callConeService (char *service_url, double ra, double dec, double sr)
+{
+ char *voc_opts = NULL;
+ int i=0, nrec=0, nattr=0;
+ char *attrList = NULL, *ip;
+
+ DAL cone; /* DAL Connection */
+ Query query; /* query handle */
+ QResponse qr; /* query response handle */
+ QRecord rec; /* result record handle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ cone = voc_openConeConnection (service_url); /* open a connection */
+
+ query = voc_getConeQuery (cone, ra, dec, sr); /* form a query */
+
+ printf ("Executing Query:\n %s\n\n",
+ voc_getQueryString (query, CONE_CONN, 0));
+ qr = voc_executeQuery (query); /* execute the query */
+
+
+ if ((nrec = voc_getRecordCount (qr)) <= 0) { /* summarize response */
+ fprintf (stderr, "no records matched");
+ exit (1);
+
+ } else {
+ rec = voc_getRecord (qr, 0);
+ nattr = (rec != ERR) ? voc_getAttrCount (rec) : 0;
+
+
+ printf ("# returns %d records containing %d attributes each\n#\n",
+ nrec, nattr);
+ printf ("# --- Summary output ---\n#\n");
+
+ attrList = voc_getAttrList (rec);
+ printf ("# Attribute List:\n# ");
+ for (ip = attrList; *ip; ip++)
+ if (isspace (*ip))
+ printf ("\n# ");
+ else
+ putchar (*ip);
+ printf ("\n#\n");
+ }
+
+ /* Summarize and print selected query results.
+ */
+ for (i = 0; i < nrec; i++) {
+ char *s_id, *s_ra, *s_dec, *s_class;
+
+ rec = voc_getRecord (qr, i); /* get a row in the table */
+
+ /* The getStringAttr method returns an allocated pointer to a string
+ * we'll need to free below, however we can use a NULL pointer to
+ * know when no data were found.
+ */
+ s_id = voc_getStringAttr (rec, "ID_MAIN");
+ s_ra = voc_getStringAttr (rec, "POS_EQ_RA_MAIN");
+ s_dec = voc_getStringAttr (rec, "POS_EQ_DEC_MAIN");
+ s_class = voc_getStringAttr (rec, "CLASS_OBJECT");
+
+
+ printf ("id=%-16s ra=%s\tdec=%s\tclass=%s\n",
+ (s_id ? s_id : "<null>"),
+ (s_ra ? s_ra : "<null>"),
+ (s_dec ? s_dec : "<null>"),
+ (s_class ? s_class : "<null>"));
+
+ if (s_id) free ((void *) s_id); /* clean up temp pointers */
+ if (s_ra) free ((void *) s_ra);
+ if (s_dec) free ((void *) s_dec);
+ if (s_class) free ((void *) s_class);
+ }
+
+ free ((void *) attrList);
+
+ voc_closeConnection (cone); /* close the cone connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/cone2.c b/vendor/voclient/libvoclient/examples/cone2.c
new file mode 100644
index 00000000..58126507
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/cone2.c
@@ -0,0 +1,111 @@
+/************************************************************************
+ * Call a cone search service and print the results as a CSV file.
+ *
+ * Usage: cone2 ra dec sr [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 12.0; /* default values */
+double dec = 12.0;
+double sr = 0.1;
+
+#ifdef USNOB
+char *service = \
+ "http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1&";
+#else
+ char *service = "http://chart.stsci.edu/GSCVO/GSC22VO.jsp?";
+#endif
+
+char *fmt = "ascii";
+char *server = "6200:localhost";
+
+static void callConeService (char *url, double ra, double dec, double sr,
+ char *fmt);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ sr = atof (argv[arg++]);
+ if (arg < argc)
+ fmt = argv[arg++];
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr,
+ "Usage: cone1 [-ds server] ra dec sr [fmt [coneURL] ]\n");
+ exit(1);
+ }
+
+ /* Now call the Cone Service and summarize the results.
+ */
+ callConeService (service, ra, dec, sr, fmt);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a Cone search service and summarize results.
+ */
+static void
+callConeService (char *service_url, double ra, double dec, double sr, char *fmt)
+{
+ char *voc_opts = NULL;
+ char *res = NULL;
+
+ DAL cone; /* DAL Connection */
+ Query query; /* query handle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ cone = voc_openConeConnection (service_url); /* open a connection */
+
+ query = voc_getConeQuery (cone, ra, dec, sr); /* form a query */
+
+ switch (fmt[0]) {
+ case 'c': res = voc_executeCSV (query); break;
+ case 't': res = voc_executeTSV (query); break;
+ case 'a': res = voc_executeASCII (query); break;
+ case 'v': res = voc_executeVOTable (query); break;
+ default:
+ fprintf (stderr, "Invalid format specification '%s'\n", fmt);
+ exit (1);
+ }
+ write (fileno(stdout), res, strlen (res));
+ printf ("\n");
+
+ free ((void *) res); /* free local storage */
+
+ voc_closeConnection (cone); /* close the cone connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/cone3.c b/vendor/voclient/libvoclient/examples/cone3.c
new file mode 100644
index 00000000..f8eb33db
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/cone3.c
@@ -0,0 +1,97 @@
+/************************************************************************
+ * Call a cone search service and dump the raw VOTable result.
+ *
+ * Usage: cone3 ra dec sr [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 12.0; /* default values */
+double dec = 12.0;
+double sr = 0.1;
+
+#ifdef USNOB
+char *service = \
+ "http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1&";
+#else
+ char *service = "http://chart.stsci.edu/GSCVO/GSC22VO.jsp?";
+#endif
+
+char *server = "6200:localhost";
+
+static void callConeService (char *url, double ra, double dec, double sr);
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ sr = atof (argv[arg++]);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: cone1 [-ds server] ra dec sr [coneURL]\n");
+ exit(1);
+ }
+
+ /* Now call the Cone Service and summarize the results.
+ */
+ callConeService (service, ra, dec, sr);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a Cone search service and summarize results.
+ */
+static void
+callConeService (char *service_url, double ra, double dec, double sr)
+{
+ char *voc_opts = NULL;
+ char *vot = NULL;
+
+ DAL cone; /* DAL Connection */
+ Query query; /* query handle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ cone = voc_openConeConnection (service_url); /* open a connection */
+
+ query = voc_getConeQuery (cone, ra, dec, sr); /* form a query */
+
+ vot = voc_executeVOTable (query);
+ write (fileno(stdout), vot, strlen (vot));
+ printf ("\n\n");
+
+ free ((void *) vot); /* free local storage */
+
+ voc_closeConnection (cone); /* close the cone connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/datascope.cl b/vendor/voclient/libvoclient/examples/datascope.cl
new file mode 100644
index 00000000..51cbaa81
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/datascope.cl
@@ -0,0 +1,124 @@
+#{ DATASCOPE -- Toy DataScope task that returns a table of data services
+# and the number of results that can be expected for each given either an
+# input image or object name. For image input, the WCS footprint is computed
+# and used as the search parameters; For an object name the coordinates are
+# resolved and the search radius specified by the user is used.
+#
+# Examples:
+# 1) Query a specific set of services, finding how many hits would
+# be returned against the dev$wpix test image
+#
+# cl> datascope dev$wpix service="GSC2.2,USNO-B1,DSS2"
+# #Num ShortName Count IVO Identifier
+# #--- --------- ----- --------------
+# 1 GSC2.2 50 ivo://archive.stsci.edu/gsc/gsc2.2
+# 2 USNO-B1 344 ivo://fs.usno/cat/usnob
+# 3 DSS2 1 ivo://archive.stsci.edu/dss/dss2
+#
+# 2) Query all Cone Services offering Infrared data against our image
+#
+# cl> datascope dev$wpis service="cone" bandpass="infrared"
+#
+# REQUIRES: NVO package and VO-CL builtin functions.
+#
+# M. Fitzpatrick, Aug 2006
+
+
+procedure datascope (what)
+
+string what { prompt = "Object Name or Image" }
+string service = "cone" { prompt = "Service Type or list" }
+string bandpass = "optical" { prompt = "Bandpass of search" }
+real sr = 0.25 { prompt = "search radius" }
+
+bool verbose = yes { prompt = "Verbose output?" }
+int status = 0 { prompt = "Service status code" }
+
+begin
+ string url, tname, stype, this, bpass
+ string sname, ivorn, regResults, junk, svctyp
+ real ra, dec, size
+ bool verb
+ int dal, index, count
+
+ this = what
+ bpass = bandpass
+ verb = verbose
+ stype = service
+
+ if (imaccess (this)) {
+ iferr { wcsinfo (this) } then {
+ error (0, "Cannot determine image coords for `"//this//"'")
+ } else {
+ ra = wcsinfo.midx
+ dec = wcsinfo.midy
+ size = max (wcsinfo.width, wcsinfo.height) / 60.0
+ }
+
+ } else {
+ # Assume it's an object name, resolve to coords.
+ sesame (this)
+ if (sesame.status < 0)
+ error (0, "Cannot resolve object `"//this//"'")
+ ra = sesame.ra
+ dec = sesame.dec
+ size = sr
+ }
+
+
+ # Now do a Registry query for the given service type and bandpass.
+ regResults = mktemp ("tmp$reg")
+ if (stype == "cone" || stype == "siap") {
+ registry ("", svc=stype, bandpass=bpass, verb-, header-,
+ >& regResults)
+
+ } else {
+ s1 = mktemp ("tmp$reg")
+ print (stype) | translit ("STDIN",",","\n",del-, > s1)
+ list = s1
+ i = 1
+
+ # Convert the list of specific services to a table we use below to
+ # query each.
+ while (fscan (list, s2) != EOF) {
+ printf ("%4d %s\n", i,
+ regResolver (s2,"","ShortName,ServiceType,Identifier"),
+ >> regResults)
+ i = i + 1
+ }
+ delete (s1, verify-)
+ }
+
+
+ if (verbose) {
+ printf ("#\n")
+ printf ("# Search Terms: RA=%H Dec=%h SR=%.3f\n", ra, dec, size)
+ printf ("# Service Type: %s\n", stype)
+ printf ("#\n#\n")
+ printf ("#Num ShortName Count IVO Identifier\n")
+ printf ("#--- --------- ----- --------------\n")
+ }
+
+ # Loop over the registry and query by service type.
+ list = regResults
+ while (fscan (list, index, sname, svctyp, ivorn) != EOF) {
+ printf ("%4d %-14.14s ", index, sname)
+
+ if (substr (svctyp,1,4) == "CONE")
+ count = dalRecordCount (\
+ dalConeSvc(\
+ regResolver(ivorn), ra, dec, size))
+ else if (substr (svctyp,1,4) == "SIAP")
+ count = dalRecordCount (\
+ dalSiapSvc(\
+ regResolver(ivorn), ra, dec, size, size))
+
+ if (count < 0)
+ printf (" Error %s\n", ivorn)
+ else
+ printf ("%6d %s\n", count, ivorn)
+ }
+
+ # Clean up.
+ delete (regResults, verify-)
+end
diff --git a/vendor/voclient/libvoclient/examples/f77cone.f b/vendor/voclient/libvoclient/examples/f77cone.f
new file mode 100644
index 00000000..5a4eeff2
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/f77cone.f
@@ -0,0 +1,108 @@
+C
+C F77CONE -- Fortran example task of VOClient interface
+C
+C M.Fitzpatrick, NOAO, Jul 2006
+
+ program f77cone
+
+ double precision ra, dec, sr
+ character service*80
+
+C Initialize values. Note the VOClient library assumes all floating
+C point values are double precision.
+ ra = 12.0d0
+ dec = 12.0d0
+ sr = 0.1d0
+ service = "http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1&"
+
+ call coneservice (service, ra, dec, sr)
+
+ stop
+ end
+
+
+C Simple test routine to call a Cone search service and summarize results.
+
+ subroutine coneservice (service, ra, dec, sr)
+
+ character*80 service, fmt, sid, sra, sdec
+ character*160 attrlist, qstring
+ integer nrec, nattr, len, ier, index
+ integer cone, query, qr, rec
+ double precision ra, dec, sr
+
+
+C Initialize the VOClient
+ call vfinitvoclient ("", ier)
+
+C Get a new connection to the named service and form a query.
+ call vfopenconeconnection (service, cone, ier)
+ call vfgetconequery (cone, ra, dec, sr, query)
+
+C Print the query string we're about to execute.
+ index = 1
+ call vfgetquerystring (query, 3, index, qstring, len)
+ print *, "Executing Query: "
+ print *, qstring
+ print *, ""
+
+
+C Execute the query, get back a response handle 'qr'.
+ call vfexecquery (query, qr)
+
+C Now summarize the response.
+ call vfgetrecordcount (qr, nrec)
+ if (nrec <= 0) then
+ print *, "No records matched"
+ return
+ endif
+
+C Get a sample record so we can summarize columns.
+ call vfgetrecord (qr, 1, rec)
+ if (rec > 0) then
+ call vfgetattrcount (rec, nattr)
+ endif
+
+ print *, "# returns ", nrec, " records of ", nattr, " attrs"
+ print *, "#"
+ print *, "# --- Summary output ---"
+ print *, "#"
+
+C Get the list of attributes. Note that when receiving a string value
+C the interface requires you specify the max length of the string and
+C will return the actual length of the string.
+ call vfgetattrlist (rec, attrlist, len)
+ print *, "# ", attrlist
+ print *, "#"
+
+
+C Summarize and print selected query results. Note the results table
+C is one-indexed in this interface. We also show how to catch an invalid
+C record descriptor. To try this, change the starting index to 0 instead
+C of 1.
+
+ do i = 1, nrec, 1
+
+C Get the row in the table and then select values to print
+ call vfgetrecord (qr, i, rec)
+ if (rec > 0) then
+ call vfgetstringattr (rec, "ID_MAIN", sid, len)
+ call vfgetstringattr (rec, "POS_EQ_RA_MAIN", sra, len)
+ call vfgetstringattr (rec, "POS_EQ_DEC_MAIN", sdec, len)
+ else
+ print *, "Error getting record number: ", i
+ goto 100
+ endif
+
+ fmt = '(i3,a6,a18,a6,a18,a6,a18)'
+ write (*, fmt) i, " id= ", sid, " ra= ", sra, " dec= ", sdec
+ enddo
+100 continue
+
+
+C Close the connection and shut down the VOClient server.
+ call vfcloseconnection (cone)
+ call vfclosevoclient (1, ier)
+
+ return
+ end
diff --git a/vendor/voclient/libvoclient/examples/f77registry.f b/vendor/voclient/libvoclient/examples/f77registry.f
new file mode 100644
index 00000000..d7f2fb21
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/f77registry.f
@@ -0,0 +1,45 @@
+C
+C F77REGISTRY -- Fortran example task of VOClient Registry interface
+C
+C M.Fitzpatrick, NOAO, July 2006
+
+ program f77registry
+
+ character svc*10, term*60
+ character title*70, type*20, sname*20
+ integer result, ier, count
+
+ svc = "cone"
+ term = "cool stars"
+
+c Initialize the VOClient interface
+ call vfinitvoclient ("", ier)
+
+c Do a keyword Registry search of Cone services.
+ call vfregsearchbysvc (svc, term, 0, result, ier)
+
+C Summarize the results
+ call vfresgetcount (result, count)
+ print *, "#"
+ print *, "# Service Type: ", svc
+ print *, "# Search Term: ", term
+ print *, "#"
+ print *, "# Found ", count, " matching records"
+ print *, "#"
+
+ do 10 i = 1, count
+
+ call vfresgetstr (result, "Title", i, title, len)
+ call vfresgetstr (result, "ShortName", i, sname, len)
+ call vfresgetstr (result, "Type", i, type, len)
+
+ print *, "----------------------------------------------------"
+ print *, "Title: ", title
+ print *, "Type: ", type, " ShortName: ", sname
+
+10 continue
+
+c Shut down the VO Client
+ call vfclosevoclient (0)
+ stop
+ end
diff --git a/vendor/voclient/libvoclient/examples/f77sesame.f b/vendor/voclient/libvoclient/examples/f77sesame.f
new file mode 100644
index 00000000..16c1246f
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/f77sesame.f
@@ -0,0 +1,23 @@
+C
+C F77SESAME -- Fortran example task of VOClient Sesame interface
+C
+C M.Fitzpatrick, NOAO, Jul 2006
+
+ program f77sesame
+
+ double precision ra, dec
+ character target*10, pos*24
+ integer sr, len
+
+ target = "ngc1234"
+
+ call vfnameresolver (target, sr)
+ call vfresolverra (sr, ra)
+ call vfresolverdec (sr, dec)
+ call vfresolverpos (sr, pos, len)
+
+ print *, "Target: ", target, " ra=", ra, " dec=", dec
+ print *, " (", pos,")"
+
+ stop
+ end
diff --git a/vendor/voclient/libvoclient/examples/f77siap.f b/vendor/voclient/libvoclient/examples/f77siap.f
new file mode 100644
index 00000000..bcb1c1a2
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/f77siap.f
@@ -0,0 +1,118 @@
+C
+C F77SIAP -- Fortran example task of VOClient interface
+C
+C M.Fitzpatrick, NOAO, Jul 2006
+
+ program f77siap
+
+ double precision ra, dec, size
+ character service*80, ffmt*80
+ integer maxim
+
+C Initialize values. Note the VOClient library assumes all floating
+C point values are double precision.
+ ra = 12.0d0
+ dec = 0.0d0
+ size = 0.5d0
+C service = "http://envoy.cacr.caltech.edu:8080/questsiap/siap?band=JU&"
+C service = "http://www-gsss.stsci.edu/gscvo/DSS2.jsp"
+ service = "http://skyview.gsfc.nasa.gov/cgi-bin/vo/sia.pl?"
+
+ ffmt = "image/fits"
+ maxim = 5
+
+ call siapservice (service, ra, dec, size, size, ffmt, maxim)
+
+ stop
+ end
+
+
+C Simple test routine to call a Cone search service and summarize results.
+
+ subroutine siapservice (service, ra, dec, rasiz, decsiz, ffmt, maxim)
+
+ character*80 service, ffmt, fname
+ character*160 qstring, acref
+ integer nrec, nattr, len, ier, maxim, index, nloop
+ integer siap, query, qr, rec, v
+ double precision ra, dec, rasiz, decsiz
+
+C Define VOClient interface constants we'll use.
+
+C Initialize the VOClient
+ call vfinitvoclient ("", ier)
+
+C Get a new connection to the named service and form a query.
+ call vfopensiapconnection (service, siap, ier)
+ call vfgetsiapquery (siap, ra, dec, rasiz, decsiz, ffmt, query)
+
+C Print the query string we're about to execute.
+ index = 1
+ call vfgetquerystring (query, "siap", index, qstring, len)
+ print *, "Executing Query: "
+ print *, qstring
+ print *, ""
+
+C Execute the query, get back a response handle 'qr'.
+ call vfexecquery (query, qr)
+
+C Now summarize the response.
+ call vfgetrecordcount (qr, nrec)
+ if (nrec <= 0) then
+ print *, "No records matched"
+ return
+ endif
+
+C Get a sample record so we can summarize columns.
+ call vfgetrecord (qr, 1, rec)
+ if (rec > 0) then
+ call vfgetattrcount (rec, nattr)
+ endif
+
+ print *, "# returns ", nrec, " records of ", nattr, " attrs"
+ print *, "#"
+ print *, "# --- Summary output ---"
+ print *, "#"
+
+
+
+C Download the first 'maxim' images in the list. Note the results table
+C is one-indexed in this interface. We also show how to catch an invalid
+C record descriptor. To try this, change the starting index to 0 instead
+C of 1.
+
+ nloop = min (maxim, nrec)
+ do i = 1, nloop, 1
+
+C Get the row in the table and then select values to print.
+ call vfgetrecord (qr, i, rec)
+ if (rec < 0) then
+ write (*,'(a,i4)'), "Error getting record number: ", i
+ goto 100
+ endif
+
+C Get the image access reference and download the file.
+ call vfgetattribute (rec, "AccessReference", v)
+ call vfstringvalue (v, acref, len)
+ write (*,'(a,a)'), "Downloading: ", acref
+
+C Create a filename for the download.
+ call vfmkfname ("dataset%04d.fits", i, fname, len)
+
+ call vfgetdataset (rec, acref, fname, ier)
+ if (ier .eq. 0) then
+ write (*,'(a,a)'), " Saved to file: ",fname
+ else
+ write (*, '(a)'), " ERROR: Download failed...."
+ endif
+
+ enddo
+100 continue
+
+
+C Shut down the VOClient server.
+ call vfcloseconnection (siap)
+ call vfclosevoclient (1, ier)
+
+ return
+ end
diff --git a/vendor/voclient/libvoclient/examples/f77skybot.f b/vendor/voclient/libvoclient/examples/f77skybot.f
new file mode 100644
index 00000000..e6e538ef
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/f77skybot.f
@@ -0,0 +1,38 @@
+C
+C F77SKYBOT -- Fortran example task of VOClient SkyBoT interface
+C
+C M.Fitzpatrick, NOAO, Aug 2006
+
+ program f77skybot
+
+ double precision ra, dec, sr, epoch, vmag
+ character name*15
+ integer skybot, nobjs, len, i
+
+ ra = 0.0
+ dec = 0.0
+ sr = 600.0
+ epoch = 2454545.0
+
+ print *, "#"
+ print *, "# ra=", ra, " dec=", dec, " sr=", sr, " epoch=", epoch
+ print *, "#"
+ call vfskybot (ra, dec, sr, sr, epoch, skybot)
+ call vfskybotnobjs (skybot, nobjs)
+
+ print *, "#"
+ print *, "# Found ", nobjs, " objects"
+ print *, "#"
+
+ do 10 i = 1, nobjs
+ call vfskybotstr (skybot, "name", i, name, len)
+ call vfskybotdbl (skybot, "ra", i, ra)
+ call vfskybotdbl (skybot, "dec", i, dec)
+ call vfskybotdbl (skybot, "vmag", i, vmag)
+
+ print *, "Obj: ", name, " ra=", ra, " dec=", dec, " Mv=", vmag
+
+10 continue
+
+ stop
+ end
diff --git a/vendor/voclient/libvoclient/examples/messier.cl b/vendor/voclient/libvoclient/examples/messier.cl
new file mode 100644
index 00000000..54926590
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/messier.cl
@@ -0,0 +1,22 @@
+# MESSIER -- Loop through the Messier catalog, displaying a DSS image of each.
+
+procedure messier ()
+
+begin
+ int qr, stat
+ string svc, coords = "/tmp/coords"
+
+ reset clobber = yes # Allow file overwrites
+
+ svc = regResolver ("dss","sia") # Find the DSS SIA service
+
+ for (i=1; i < 111; i=i+1) { # Loop over Messier objs
+ sesame ("M"//i,verb+) | scan (x,y) # Resolve name to coords
+ print ("30 30 0 :text M"//i, > coords)
+
+ qr = dalSiapSvc (svc, x, y, 0.25) # Query for data
+ stat = dalGetData (qr, 0, "foo.fits") # Download 1st image
+ display ("foo.fits[0]", 1) # Display it
+ tvmark (1,"",commands=coords,txsiz=5,col=205) # Label it
+ }
+end
diff --git a/vendor/voclient/libvoclient/examples/registry1.c b/vendor/voclient/libvoclient/examples/registry1.c
new file mode 100644
index 00000000..60e38ba9
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/registry1.c
@@ -0,0 +1,140 @@
+/************************************************************************
+ * Simple test program of a Registry query using the high-level procedure
+ * voc_regSearch() to do the search.
+ *
+ * Usage: registry1 [-flags] [keyword_list]
+ *
+ * Or call with no args for the built-in unit test. The '-o' flag says
+ * to logically OR the keywords
+ *
+ * Examples:
+ *
+ * registry1 -siap // List all SIAP services
+ * registry1 -cone cool stars // keyword search on Cone services
+ * registry1 cool stars // keyword search on all resources
+ *
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+
+#define ANY -1
+#define CONE 0
+#define SIAP 1
+#define TABULAR 2
+
+
+char *keywords = "cool stars\0"; /* default search terms */
+int orValues = 0;
+int svc_type = ANY;
+
+
+static void callRegistry (char *keywords, int orValues, int type);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ callRegistry (keywords, orValues, svc_type); /* use defaults */
+ return (0);
+
+ } else if (argc >= 2) {
+ int arg = 1;
+ char keyw[1024];
+
+ bzero (keyw, 1024);
+ while (arg < argc) {
+ if (strncmp (argv[arg], "-any", 2) == 0)
+ svc_type = ANY;
+ else if (strncmp (argv[arg], "-cone", 2) == 0)
+ svc_type = CONE;
+ else if (strncmp (argv[arg], "-siap", 2) == 0)
+ svc_type = SIAP;
+ else if (strncmp (argv[arg], "-tabular", 2) == 0)
+ svc_type = TABULAR;
+ else if (strncmp (argv[arg], "-or", 2) == 0)
+ orValues = 1;
+ else {
+ strcat (keyw, argv[arg]);
+ if (arg < (argc-1)) strcat (keyw, " ");
+ }
+ arg++;
+ }
+
+ /* Now call the SIAP Service and summarize the results.
+ */
+ callRegistry (keyw, orValues, svc_type);
+ }
+
+ return (0);
+}
+
+
+/* Simple procedure to test a Registry query and print some results.
+ */
+static void
+callRegistry (char *keywords, int orValues, int type)
+{
+ int i, nresources = -1;
+ char *surl, *rtype, *title, *sname, *clev;
+ char *sql =
+ (type == CONE ? "ResourceType like '%cone%'" :
+ (type == SIAP ? "ResourceType like '%siap%'" :
+ (type == TABULAR ? "ResourceType like '%tabular%'" : NULL)
+ )
+ );
+
+
+ /* Initialize the VO Client interface.
+ */
+ if (voc_initVOClient ("") == ERR)
+ return;
+
+ printf ("#\n# Search words: '%s'\n", keywords);
+ printf ("# SQL predicate: '%s'\n#\n", sql);
+
+ /* Do the search.
+ */
+ RegResult res = voc_regSearch (sql, keywords, orValues);
+ if (res < 0) {
+ printf ("error from regSearch(), aborting...\n");
+ voc_closeVOClient (0); /* shutdown */
+ return;
+ }
+
+ /* Summarize the results.
+ */
+ nresources = voc_resGetCount (res);
+ printf ("#\n#Found %d matching records\n#\n\n", nresources);
+
+ for (i = 0; i < nresources; i++) {
+ title = voc_resGetStr (res, "Title", i);
+ surl = voc_resGetStr (res, "ServiceUrl", i);
+ rtype = voc_resGetStr (res, "ServiceType", i);
+ sname = voc_resGetStr (res, "ShortName", i);
+ clev = voc_resGetStr (res, "ContentLevel", i);
+
+ printf ("----------------------------------------------------------\n");
+ printf ("(%d of %d) %s\n", i+1, nresources, title);
+ printf ("SvcURL: %s\n", surl);
+ printf ("ShortName: %-30.30s\tResType: %s\n", sname, rtype);
+ printf ("ContentLevel: %s\n\n", (clev ? clev : "none provided"));
+
+ /* Free the pointers returned. */
+ if (title) free ((char *)title);
+ if (surl) free ((char *)surl);
+ if (rtype) free ((char *)rtype);
+ if (sname) free ((char *)sname);
+ if (clev) free ((char *)clev);
+ }
+
+ voc_closeVOClient (0); /* shutdown */
+}
diff --git a/vendor/voclient/libvoclient/examples/registry2.c b/vendor/voclient/libvoclient/examples/registry2.c
new file mode 100644
index 00000000..db7e2e6a
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/registry2.c
@@ -0,0 +1,151 @@
+/************************************************************************
+ * Simple test program of a Registry query using the lower-level interface
+ * calls to explicitly form the query.
+ *
+ * Usage: registry2 [flags] [keyword_list]
+ *
+ * Or call with no args for the built-in unit test. The '-o' flag says
+ * to logically OR the keywords
+ *
+ * Example usage:
+ *
+ * registry1 -siap // List all SIAP services
+ * registry1 -cone cool stars // keyword search on Cone services
+ * registry1 cool stars // keyword search on all resources
+ *
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+
+#define ANY -1
+#define CONE 0
+#define SIAP 1
+#define TABULAR 2
+
+
+char *keywords = "radio galaxies\0"; /* default search terms */
+int orValues = 0;
+int svc_type = ANY;
+
+
+static void callRegistry (char *keywords, int orValues, int type);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ callRegistry (keywords, orValues, svc_type); /* use defaults */
+ return (0);
+
+ } else if (argc >= 2) {
+ int arg = 1;
+ char keyw[1024];
+
+ bzero (keyw, 1024);
+ while (arg < argc) {
+ if (strncmp (argv[arg], "-any", 2) == 0)
+ svc_type = ANY;
+ else if (strncmp (argv[arg], "-cone", 2) == 0)
+ svc_type = CONE;
+ else if (strncmp (argv[arg], "-siap", 2) == 0)
+ svc_type = SIAP;
+ else if (strncmp (argv[arg], "-tabular", 2) == 0)
+ svc_type = TABULAR;
+ else if (strncmp (argv[arg], "-or", 2) == 0)
+ orValues = 1;
+ else {
+ strcat (keyw, argv[arg]);
+ if (arg < (argc-1)) strcat (keyw, " ");
+ }
+ arg++;
+ }
+
+ /* Now call the SIAP Service and summarize the results.
+ */
+ callRegistry (keyw, orValues, svc_type);
+ }
+
+ return (0);
+}
+
+
+/* Simple procedure to test a Registry query and print some results.
+ */
+static void
+callRegistry (char *keywords, int orValues, int type)
+{
+ int i, nresources = -1;
+ char *rtype, *title, *sname;
+ char *sql =
+ (type == CONE ? "ResourceType like '%cone%'" :
+ (type == SIAP ? "ResourceType like '%siap%'" :
+ (type == TABULAR ? "ResourceType like '%tabular%'" : NULL)
+ )
+ );
+ RegQuery query;
+ RegResult res;
+
+
+ /* Initialize the VO Client interface.
+ */
+ if (voc_initVOClient ("") == ERR)
+ return;
+
+ printf ("#\n# Search words: '%s'\n", keywords);
+ printf ("# SQL predicate: '%s'\n#\n", sql);
+
+ /* Form the query and do the search.
+ */
+ query = voc_regQuery (sql, 0);
+ if (keywords && keywords[0])
+ voc_regAddSearchTerm (query, keywords, orValues);
+
+ /*
+ {
+ char *qstring;
+ qstring = voc_regGetQueryString(query);
+ printf ("#\n# Query String:\n\n%s\n\n", qstring);
+ }
+ */
+
+ /* Now execute the query.
+ */
+ res = voc_regExecute (query);
+ if (res == (RegResult) NULL) {
+ fprintf (stderr, "Error executing query, quitting.\n");
+ voc_closeVOClient (0); /* shutdown */
+ return;
+ }
+
+ /* Summarize the results.
+ */
+ printf ("#\n#Found %d matching records\n#\n\n",
+ (nresources = voc_resGetCount(res) ));
+
+ for (i = 0; i < nresources; i++) {
+ title = voc_resGetStr (res, "Title", i);
+ rtype = voc_resGetStr (res, "ServiceType", i);
+ sname = voc_resGetStr (res, "ShortName", i);
+
+ printf ("----------------------------------------------------------\n");
+ printf ("(%d of %d) %s\n", i+1, nresources, title);
+ printf ("ShortName: %-30.30s\tResType: %s\n", sname, rtype);
+
+ /* Free the pointers returned. */
+ if (title) free ((char *)title);
+ if (rtype) free ((char *)rtype);
+ if (sname) free ((char *)sname);
+ }
+ printf ("\n\n");
+
+ voc_closeVOClient (0); /* shutdown */
+}
diff --git a/vendor/voclient/libvoclient/examples/registry3.c b/vendor/voclient/libvoclient/examples/registry3.c
new file mode 100644
index 00000000..ed9fd63e
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/registry3.c
@@ -0,0 +1,132 @@
+/************************************************************************
+ * Simple test program of a Registry query using the high-level procedure
+ * voc_regSearchByService() to do the search.
+ *
+ * Usage: registry3 [-flags] [keyword_list]
+ *
+ * Or call with no args for the built-in unit test. The '-o' flag says
+ * to logically OR the keywords
+ *
+ * Examples:
+ *
+ * registry3 -siap // List all SIAP services
+ * registry3 -cone cool stars // keyword search on Cone services
+ * registry3 cool stars // keyword search on all resources
+ *
+ *
+ * M. Fitzpatrick, NOAO, July 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+
+#define ANY -1
+#define CONE 0
+#define SIAP 1
+#define TABULAR 2
+
+
+char *keywords = "cool stars\0"; /* default search terms */
+int orValues = 0;
+int svc_type = ANY;
+
+
+static void callRegistry (char *keywords, int orValues, int type);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ callRegistry (keywords, orValues, svc_type); /* use defaults */
+ return (0);
+
+ } else if (argc >= 2) {
+ int arg = 1;
+ char keyw[1024];
+
+ bzero (keyw, 1024);
+ while (arg < argc) {
+ if (strncmp (argv[arg], "-any", 2) == 0)
+ svc_type = ANY;
+ else if (strncmp (argv[arg], "-cone", 2) == 0)
+ svc_type = CONE;
+ else if (strncmp (argv[arg], "-siap", 2) == 0)
+ svc_type = SIAP;
+ else if (strncmp (argv[arg], "-tabular", 2) == 0)
+ svc_type = TABULAR;
+ else if (strncmp (argv[arg], "-or", 2) == 0)
+ orValues = 1;
+ else {
+ strcat (keyw, argv[arg]);
+ if (arg < (argc-1)) strcat (keyw, " ");
+ }
+ arg++;
+ }
+
+ /* Now call the SIAP Service and summarize the results.
+ */
+ callRegistry (keyw, orValues, svc_type);
+ }
+
+ return (0);
+}
+
+
+/* Simple procedure to test a Registry query and print some results.
+ */
+static void
+callRegistry (char *keywords, int orValues, int type)
+{
+ int i, nresources = -1;
+ char *rtype, *title, *sname, *clev;
+ char *svc =
+ (type == CONE ? "cone" :
+ (type == SIAP ? "siap" :
+ (type == TABULAR ? "tabular" : NULL)
+ )
+ );
+
+
+ /* Initialize the VO Client interface.
+ */
+ if (voc_initVOClient ("") == ERR)
+ return;
+
+ printf ("#\n# Search words: '%s'\n", keywords);
+ printf ("# Service Type: '%s'\n#\n", svc);
+
+ /* Do the search.
+ */
+ RegResult res = voc_regSearchByService (svc, keywords, orValues);
+
+ /* Summarize the results.
+ */
+ nresources = voc_resGetCount (res);
+ printf ("#\n#Found %d matching records\n#\n\n", nresources);
+
+ for (i = 0; i < nresources; i++) {
+ title = voc_resGetStr (res, "Title", i);
+ rtype = voc_resGetStr (res, "ServiceType", i);
+ sname = voc_resGetStr (res, "ShortName", i);
+ clev = voc_resGetStr (res, "ContentLevel", i);
+
+ printf ("----------------------------------------------------------\n");
+ printf ("(%d of %d) %s\n", i+1, nresources, title);
+ printf ("ShortName: %-30.30s\tResType: %s\n", sname, rtype);
+ printf ("ContentLevel: %s\n\n", (clev ? clev : "none provided"));
+
+ /* Free the pointers returned. */
+ if (title) free ((char *)title);
+ if (rtype) free ((char *)rtype);
+ if (sname) free ((char *)sname);
+ if (clev) free ((char *)clev);
+ }
+
+ voc_closeVOClient (0); /* shutdown */
+}
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);
+}
diff --git a/vendor/voclient/libvoclient/examples/resolver.java b/vendor/voclient/libvoclient/examples/resolver.java
new file mode 100644
index 00000000..519746e9
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/resolver.java
@@ -0,0 +1,32 @@
+
+// Test program for the VOCSesame class.
+//
+// Assuming the NVOSS classpath and working from this directory:
+//
+// % javac -classpath ../../lib/voclient.jar:$CLASSPATH resolver.java
+// % java -classpath ../../lib/voclient.jar:$CLASSPATH resolver m51
+//
+
+import voclient.*;
+
+public class resolver {
+
+ public static void main (String[] args) {
+
+ // Require a target name
+ if (args.length == 0) {
+ System.out.println ("Usage: resolve <target>");
+ System.exit (0);
+ }
+
+ // Invoke the service in the constructor so we can just use the result.
+ VOCSesame sr = new VOCSesame (args[0]);
+
+ // The following two lines should produce the same results.
+ System.out.println ( "target = "+ sr.target +
+ " ra = "+ sr.ra + " dec = "+ sr.dec + " (" + sr.pos + ")");
+ System.out.println ( "target = "+ sr.getTarget() +
+ " ra = "+ sr.getRa() + " dec = "+ sr.getDec() +
+ " (" + sr.pos + ")" );
+ }
+}
diff --git a/vendor/voclient/libvoclient/examples/siap1.c b/vendor/voclient/libvoclient/examples/siap1.c
new file mode 100644
index 00000000..1109c6e9
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/siap1.c
@@ -0,0 +1,159 @@
+/************************************************************************
+ * Call a SIAP search service and print a summary selected fields of the
+ * results.
+ *
+ * Usage: siap1 ra dec size [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 12.0; /* default values */
+double dec = 0.0;
+double size = 0.5;
+
+char *service = "http://skyview.gsfc.nasa.gov/cgi-bin/vo/sia.pl?";
+char *server = "6200:localhost";
+
+static void callSiapService (char *url, double ra, double dec, double size);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ size = atof (argv[arg++]);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: siap1 [-ds server] ra dec size [siapURL]\n");
+ exit(1);
+ }
+
+ /* Now call the SIAP Service and summarize the results.
+ */
+ callSiapService (service, ra, dec, size);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a SIA service and summarize results.
+ */
+static void
+callSiapService (char *service_url, double ra, double dec, double size)
+{
+ char *voc_opts = NULL;
+ int i=0, nrec=0, nattr=0;
+ char *attrList = NULL, *ip;
+
+ DAL siap; /* DAL Connection */
+ Query query; /* query handle */
+ QResponse qr; /* query response handle */
+ QRecord rec; /* result record andle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ siap = voc_openSiapConnection (service_url); /* open a connection */
+
+ /* Form a query. Here we'll use the one search size we're given for
+ * both the RA,DEC sizes, and specify a null format.
+ */
+ query = voc_getSiapQuery (siap, ra, dec, size, size, NULL);
+
+ printf ("Executing Query:\n %s\n\n",
+ voc_getQueryString (query, SIAP_CONN, 0));
+ qr = voc_executeQuery (query); /* execute the query */
+
+
+ if ((nrec = voc_getRecordCount (qr)) <= 0) { /* summarize response */
+ fprintf (stderr, "no records matched");
+ exit (1);
+
+ } else {
+ rec = voc_getRecord (qr, 0);
+ nattr = (rec != ERR) ? voc_getAttrCount (rec) : 0;
+
+
+ printf ("# returns %d records containing %d attributes each\n#\n",
+ nrec, nattr);
+ printf ("# --- Summary output ---\n#\n");
+
+ attrList = voc_getAttrList (rec);
+ printf ("# Attribute List:\n# ");
+ for (ip = attrList; *ip; ip++)
+ if (isspace (*ip))
+ printf ("\n# ");
+ else
+ putchar (*ip);
+ printf ("\n#\n");
+
+ free ((void *) attrList);
+ }
+
+ /* Summarize and print selected query results.
+ */
+ for (i = 0; i < nrec; i++) {
+ char *s_ra, *s_dec, *s_naxis, *s_format, *s_title, *s_fsize;
+
+ rec = voc_getRecord (qr, i); /* get a row in the table */
+
+ /* The getStringAttr method returns an allocated pointer to a string
+ * we'll need to free below, however we can use a NULL pointer to
+ * know when no data were found.
+ */
+ s_ra = voc_getStringAttr (rec, "RA");
+ s_dec = voc_getStringAttr (rec, "DEC");
+ s_naxis = voc_getStringAttr (rec, "Naxis");
+ s_format = voc_getStringAttr (rec, "Format");
+ s_title = voc_getStringAttr (rec, "Title");
+ s_fsize = voc_getStringAttr (rec, "Filesize");
+ if (! s_title )
+ s_title = voc_getStringAttr (rec, "ID_MAIN"); /* fallback */
+
+ printf ("ra=%-.10s\tdec=%-.10s\t[%s] %9.9s %-.12s\t%-32.32s\n",
+ (s_ra ? s_ra : "<null>"),
+ (s_dec ? s_dec : "<null>"),
+ (s_naxis ? s_naxis : "<null>"),
+ (s_fsize ? s_fsize : "<null>"),
+ (s_format ? s_format : "<null>"),
+ (s_title ? s_title : "<null>"));
+
+ if (s_ra) free ((void *) s_ra); /* clean up temp pointers */
+ if (s_dec) free ((void *) s_dec);
+ if (s_naxis) free ((void *) s_naxis);
+ if (s_fsize) free ((void *) s_fsize);
+ if (s_format) free ((void *) s_format);
+ if (s_title) free ((void *) s_title);
+ }
+
+ voc_closeConnection (siap); /* close the siap connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/siap2.c b/vendor/voclient/libvoclient/examples/siap2.c
new file mode 100644
index 00000000..1d6e94a4
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/siap2.c
@@ -0,0 +1,95 @@
+/************************************************************************
+ * Call a SIAP search service and print the results as a CSV file.
+ *
+ * Usage: siap2 ra dec size [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 12.0; /* default values */
+double dec = 0.0;
+double size = 0.5;
+
+char *service = "http://skyview.gsfc.nasa.gov/cgi-bin/vo/sia.pl?";
+char *server = "6200:localhost";
+
+static void callSiapService (char *url, double ra, double dec, double size);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ size = atof (argv[arg++]);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: siap2 [-ds server] ra dec size [siapURL]\n");
+ exit(1);
+ }
+
+ /* Now call the Siap Service and summarize the results.
+ */
+ callSiapService (service, ra, dec, size);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a Siap search service and summarize results.
+ */
+static void
+callSiapService (char *service_url, double ra, double dec, double size)
+{
+ char *voc_opts = NULL;
+ char *csv = NULL;
+
+ DAL siap; /* DAL Connection */
+ Query query; /* query handle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ siap = voc_openSiapConnection (service_url); /* open a connection */
+
+ /* Form a query. Here we'll use the one search size we're given for
+ * both the RA,DEC sizes, and specify a null format.
+ */
+ query = voc_getSiapQuery (siap, ra, dec, size, size, NULL);
+
+ csv = voc_executeCSV (query);
+ write (fileno(stdout), csv, strlen (csv));
+ fprintf (stdout, "\n");
+
+ free ((void *) csv); /* free local storage */
+
+ voc_closeConnection (siap); /* close the siap connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/siap3.c b/vendor/voclient/libvoclient/examples/siap3.c
new file mode 100644
index 00000000..a5b69add
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/siap3.c
@@ -0,0 +1,94 @@
+/************************************************************************
+ * Call a SIAP search service and print the results as a CSV file.
+ *
+ * Usage: siap3 ra dec size [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 12.0; /* default values */
+double dec = 0.0;
+double size = 0.5;
+
+char *service = "http://skyview.gsfc.nasa.gov/cgi-bin/vo/sia.pl?";
+char *server = "6200:localhost";
+
+static void callSiapService (char *url, double ra, double dec, double size);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ size = atof (argv[arg++]);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: siap3 [-ds server] ra dec size [siapURL]\n");
+ exit(1);
+ }
+
+ /* Now call the Siap Service and summarize the results.
+ */
+ callSiapService (service, ra, dec, size);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a Siap search service and summarize results.
+ */
+static void
+callSiapService (char *service_url, double ra, double dec, double size)
+{
+ char *voc_opts = NULL;
+ char *vot = NULL;
+
+ DAL siap; /* DAL Connection */
+ Query query; /* query handle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ siap = voc_openSiapConnection (service_url); /* open a connection */
+
+ /* Form a query. Here we'll use the one search size we're given for
+ * both the RA,DEC sizes, and specify a null format.
+ */
+ query = voc_getSiapQuery (siap, ra, dec, size, size, NULL);
+
+ vot = voc_executeVOTable (query);
+ write (fileno(stdout), vot, strlen (vot));
+
+ free ((void *) vot); /* free local storage */
+
+ voc_closeConnection (siap); /* close the siap connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/siap4.c b/vendor/voclient/libvoclient/examples/siap4.c
new file mode 100644
index 00000000..5d5b8def
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/siap4.c
@@ -0,0 +1,146 @@
+/************************************************************************
+ * Call a SIAP search service and download resulting datasets.
+ *
+ * Usage: siap4 ra dec size [format [maximages [serviceURL]]]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 12.0; /* default values */
+double dec = 0.0;
+double size = 0.5;
+char *format = "ALL";
+int maximages= 5;
+
+char *service1 = "http://www-gsss.stsci.edu/gscvo/DSS2.jsp";
+char *service2 = "http://skyview.gsfc.nasa.gov/cgi-bin/vo/sia.pl?";
+
+char *server = "6200:localhost";
+
+static void callSiapService (char *url, double ra, double dec, double size,
+ char *format, int maximages);
+
+
+int main (int argc, char *argv[])
+{
+ char *service = service2;
+
+
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ size = atof (argv[arg++]);
+ if (arg < argc) format = argv[arg++];
+ if (arg < argc) maximages = atoi (argv[arg++]);
+ if (arg < argc) service = argv[arg++];
+
+ } else {
+ fprintf (stderr,
+ "Usage: siap4 [-ds server] ra dec size [fmt [maximg [siapURL]]]\n");
+ exit(1);
+ }
+
+ /* Now call the Siap Service and summarize the results.
+ */
+ callSiapService (service, ra, dec, size, format, maximages);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a Siap search service and summarize results.
+ */
+static void
+callSiapService (char *service_url, double ra, double dec, double size,
+ char *format, int maximages)
+{
+ char *voc_opts = NULL;
+ char *acref = NULL;
+ char fname[SZ_FNAME];
+ int i, nattr = 0, nrec = 0;
+
+ DAL siap; /* DAL Connection */
+ Query query; /* query handle */
+ QResponse qr; /* query response handle */
+ QRecord rec; /* result record handle */
+ QRAttribute v; /* dataset attribute */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ siap = voc_openSiapConnection (service_url); /* open a connection */
+
+ /* Form a query. Here we'll use the one search size we're given for
+ * both the RA,DEC sizes, and specify a null format.
+ */
+ query = voc_getSiapQuery (siap, ra, dec, size, size, format);
+
+ printf ("Executing Query:\n %s\n\n",
+ voc_getQueryString (query, SIAP_CONN, 0));
+ qr = voc_executeQuery (query); /* execute the query */
+
+
+ /* Summarize response.
+ */
+ if ((nrec = voc_getRecordCount (qr)) <= 0) {
+ fprintf (stderr, "no records matched");
+ exit (1);
+
+ } else {
+ rec = voc_getRecord (qr, 0);
+ nattr = (rec != ERR) ? voc_getAttrCount (rec) : 0;
+
+ printf ("# returns %d records containing %d attributes each\n#\n",
+ nrec, nattr);
+ }
+
+
+ /* Download the first 'maximages' images.
+ */
+ printf ("Downloading images:\n");
+
+ for (i=0; i < nrec && i < maximages; i++) {
+ rec = voc_getRecord (qr, i); /* get a row in the table */
+
+ v = voc_getAttribute (rec, "AccessReference");
+
+ if (v <= 0)
+ continue;
+
+ bzero (fname, SZ_FNAME);
+ sprintf (fname, "dataset.%04d", i);
+ printf ("Downloading: %s\n", (acref = voc_stringValue (v)) );
+
+ if ( voc_getDataset (rec, acref, fname) == OK )
+ printf ("Downloaded %s\n", fname);
+ else
+ printf ("Download failed\n");
+ }
+
+ voc_closeConnection (siap); /* close the siap connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/siap5.c b/vendor/voclient/libvoclient/examples/siap5.c
new file mode 100644
index 00000000..de4ddad4
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/siap5.c
@@ -0,0 +1,133 @@
+/************************************************************************
+ * Call a SIAP search service and print a summary selected fields of the
+ * results.
+ *
+ * Usage: siap5 ra dec size [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, Feb 2009
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 12.0; /* default values */
+double dec = 0.0;
+double size = 0.2;
+
+char *service = "http://skyview.gsfc.nasa.gov/cgi-bin/vo/sia.pl?";
+char *server = "6200:localhost";
+
+static void callSiapService (char *url, double ra, double dec, double size);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ size = atof (argv[arg++]);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: siap1 [-ds server] ra dec size [siapURL]\n");
+ exit(1);
+ }
+
+ /* Now call the SIAP Service and summarize the results.
+ */
+ callSiapService (service, ra, dec, size);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a SIA service and summarize results.
+ */
+static void
+callSiapService (char *service_url, double ra, double dec, double size)
+{
+ char *voc_opts = NULL;
+ int i=0, nrec=0, nattr=0;
+ char *attrList = NULL, *ip;
+
+ DAL siap; /* DAL Connection */
+ Query query; /* query handle */
+ QResponse qr; /* query response handle */
+ QRecord rec; /* result record andle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ siap = voc_openSiapConnection (service_url); /* open a connection */
+
+ /* Form a query. Here we'll use the one search size we're given for
+ * both the RA,DEC sizes, and specify a null format.
+ */
+ query = voc_getSiapQuery (siap, ra, dec, size, size, NULL);
+
+ printf ("Executing Query:\n %s\n\n",
+ voc_getQueryString (query, SIAP_CONN, 0));
+ qr = voc_executeQuery (query); /* execute the query */
+
+
+ if ((nrec = voc_getRecordCount (qr)) <= 0) { /* summarize response */
+ fprintf (stderr, "no records matched");
+ exit (1);
+
+ } else {
+ rec = voc_getRecord (qr, 0);
+ nattr = (rec != ERR) ? voc_getAttrCount (rec) : 0;
+
+
+ printf ("# returns %d records containing %d attributes each\n#\n",
+ nrec, nattr);
+ printf ("# --- Summary output ---\n#\n");
+
+ attrList = voc_getAttrList (rec);
+ printf ("# Attribute List:\n# ");
+ for (ip = attrList; *ip; ip++)
+ if (isspace (*ip))
+ printf ("\n# ");
+ else
+ putchar (*ip);
+ printf ("\n#\n");
+
+
+ printf ("\n\n");
+ printf ("#N,ID,UCD,Name,UType\n");
+ for (i=0; i < nattr; i++) {
+ printf ("%d,%s,%s,%s,%s\n", i,
+ voc_getFieldAttr (qr, i, "id"),
+ voc_getFieldAttr (qr, i, "ucd"),
+ voc_getFieldAttr (qr, i, "name"),
+ voc_getFieldAttr (qr, i, "utype"));
+ }
+ }
+
+ voc_closeConnection (siap); /* close the siap connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+ free ((void *) attrList);
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/simple.c b/vendor/voclient/libvoclient/examples/simple.c
new file mode 100644
index 00000000..670be8d7
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/simple.c
@@ -0,0 +1,81 @@
+/************************************************************************
+ * Call a cone/siap search service and print a summary selected fields of the
+ * results.
+ *
+ * Usage: simple [cone|siap] ra dec sr [type [serviceURL]]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+
+double ra = 12.0; /* default values */
+double dec = 12.0;
+double sr = 0.1;
+
+char *cone_service = \
+ "http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1&";
+char *siap_service = "http://skyview.gsfc.nasa.gov/cgi-bin/vo/sia.pl?";
+
+
+
+int main (int argc, char *argv[])
+{
+ char *result = NULL;
+ char *service = cone_service;
+ int svc_type = CONE_SERVICE;
+ int type = VOC_CSV;
+ int status = 0;
+
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+
+ } else if (argc == 2) {
+ /* Use builtin defaults with requested service type. */
+ if (argv[1][0] == 'c') {
+ svc_type = CONE_SERVICE, service = cone_service;
+ } else {
+ svc_type = SIAP_SERVICE, service = siap_service;
+ }
+
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ svc_type = (argv[arg++][0] == 'c' ? CONE_SERVICE : SIAP_SERVICE);
+ ra = atof (argv[arg++]); /* parse arguments */
+ dec = atof (argv[arg++]);
+ sr = atof (argv[arg++]);
+ if (arg < argc)
+ type = (argv[arg++][0] == 'v' ? VOC_VOTABLE : VOC_CSV);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: simpleCone ra dec sr [type [coneURL]]\n");
+ exit(1);
+ }
+
+ /* Now call the Cone Service and print the results.
+ */
+ if (svc_type == CONE_SERVICE)
+ result = voc_coneCaller (service, ra, dec, sr, type);
+ else if (svc_type == SIAP_SERVICE)
+ result = voc_siapCaller (service, ra, dec, sr, sr, "image/fits", type);
+
+ if (result)
+ write (fileno(stdout), result, strlen (result));
+ else {
+ fprintf (stderr, "Error executing query\n");
+ status = 1;
+ }
+
+ return (status);
+}
diff --git a/vendor/voclient/libvoclient/examples/simple.java b/vendor/voclient/libvoclient/examples/simple.java
new file mode 100644
index 00000000..fb1e79b6
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/simple.java
@@ -0,0 +1,23 @@
+
+public class simple {
+
+ public static void main (String[] argv) {
+
+ // Load the VOClient shared library.
+ try {
+ System.loadLibrary ("voclient");
+
+ } catch (UnsatisfiedLinkError Err) {
+ System.err.println ("Load Error " + Err);
+ System.exit (1);
+ }
+
+ // Call a simple Cone service.
+ System.out.println (
+ voclient.voc_coneCaller (
+ "http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1&",
+ 0.0, 0.0, 0.05, 1)
+ );
+
+ }
+}
diff --git a/vendor/voclient/libvoclient/examples/simple.pl b/vendor/voclient/libvoclient/examples/simple.pl
new file mode 100755
index 00000000..38e295d3
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/simple.pl
@@ -0,0 +1,6 @@
+#!/usr/local/bin/perl
+
+use voclient;
+
+print voclient::voc_coneCaller("http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1&",12.,12.,0.1,2),"\n\n";
+
diff --git a/vendor/voclient/libvoclient/examples/simple.py b/vendor/voclient/libvoclient/examples/simple.py
new file mode 100755
index 00000000..d3638709
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/simple.py
@@ -0,0 +1,6 @@
+#!/usr/local/bin/python
+
+import voclient
+
+print voclient.voc_coneCaller("http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1&",12.,12.,0.1,2),"\n\n";
+
diff --git a/vendor/voclient/libvoclient/examples/simple.tcl b/vendor/voclient/libvoclient/examples/simple.tcl
new file mode 100755
index 00000000..a47e325f
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/simple.tcl
@@ -0,0 +1,5 @@
+#!/usr/bin/tclsh
+
+load ./voclient.so voclient
+puts [voc_coneCaller "http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1&" 12. 12. 0.1 1]
+
diff --git a/vendor/voclient/libvoclient/examples/skybot.c b/vendor/voclient/libvoclient/examples/skybot.c
new file mode 100644
index 00000000..78da18ca
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/skybot.c
@@ -0,0 +1,59 @@
+/************************************************************************
+ * Call the SkyBoT minor planet service with the specified parameters.
+ *
+ * Usage: skybot <ra> <dec> <sr> <jd_epoch>
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, August 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+
+double ra = 0.0, /* RA of search (J2000) */
+ dec = 0.0, /* Dec of search (J2000) */
+ sr = 900.0, /* Search radius (arcsec) */
+ epoch = 2454545.0; /* JD epoch */
+
+
+int main (int argc, char *argv[])
+{
+ Skybot sb = (Skybot) NULL;
+ int i, n;
+
+
+ /* Process command line arguments or else use built-in defaults.
+ */
+ if (argc == 5) {
+ ra = atof (argv[1]);
+ dec = atof (argv[2]);
+ sr = atof (argv[3]);
+ epoch = atof (argv[4]);
+ }
+ printf ("#\n# SkyBoT Service\n#\n# Search Terms:\n");
+ printf ("#\t ra=%f dec=%f sr=%.2f epoch=%f\n#\n", ra, dec, sr, epoch);
+
+ /* Now call the SkyBoT Service and summarize the results. We'll
+ * let the interface initialize the VO Client server and simply call
+ * the procedure we need.
+ */
+ sb = voc_skybot (ra, dec, sr, sr, epoch);
+
+ printf ("# Found %d objects\n#\n", (n = voc_skybotNObjs(sb)) );
+
+ for (i = 0; i < n; i++) {
+ printf ("%02d: %-12s ra=%10.6f dec=%10.6f Mv=%.2f R=%.4f\n", i+1,
+ voc_skybotStrAttr(sb, "name", i),
+ voc_skybotDblAttr(sb, "ra", i),
+ voc_skybotDblAttr(sb, "dec", i),
+ voc_skybotDblAttr(sb, "vmag", i),
+ voc_skybotDblAttr(sb, "cdist", i));
+ }
+
+ voc_closeVOClient (1);
+ return (0);
+}
diff --git a/vendor/voclient/libvoclient/examples/skyportal1_java b/vendor/voclient/libvoclient/examples/skyportal1_java
new file mode 100644
index 00000000..fb2c6d5a
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/skyportal1_java
@@ -0,0 +1,85 @@
+
+import voclient.*;
+import dalclient.*;
+
+
+/**
+ */
+public class skyportal1 {
+ private static final double DEF_RA = 16.031;
+ private static final double DEF_DEC = -0.891;
+
+ public static void main(String args[]) throws Exception
+ {
+ double ra = DEF_RA,
+ dec = DEF_DEC;
+ int arg = 0;
+
+
+ if (args.length == 0) {
+ // Built-in no-args unit test.
+ } else if (args.length >= 3) {
+ ra = Double.parseDouble(args[arg++]);
+ dec = Double.parseDouble(args[arg++]);
+ } else {
+ System.out.println ("Usage: skyportal1 ra dec");
+ System.exit(1);
+ }
+
+ querySkyPortal (ra, dec); // make the query
+ }
+
+
+ /** Simple test routine to query a SkyPortal and summarize results.
+ */
+ static void querySkyPortal (double ra, double dec) throws Exception
+ {
+
+ String qry = " SELECT o.objId, o.ra,o.dec, o.type,t.objId,t.j_m,o.z " +
+ " FROM SDSS:PhotoPrimary o, " +
+ " TWOMASS:PhotoPrimary t WHERE XMATCH(o,t)<2.5 " +
+ " AND Region('Circle J2000 " + ra + " " + dec + " .10') " +
+ " AND( o.z- t.j_m)>1 " ;
+
+ // Get a new connection to the service.
+ VOCSkyPortal sp = new VOCSkyPortal (qry);
+
+ // Execute the query and fetch results.
+ sp.executeCSV();
+
+ QueryResponse qr = sp.execute();
+ if (qr.getRecordCount() <= 0) {
+ System.out.println("no records found");
+ System.exit(1);
+ }
+
+ // Summarize query response.
+ {
+ int nrec = qr.getRecordCount();
+ QueryRecord r = qr.getRecord(0);
+ int nattr = (r != null) ? r.getAttributeCount() : 0;
+ System.out.println("# returns " + nrec + " records containing " +
+ nattr + " attributes each");
+ System.out.println("# --- Summary output ---");
+ }
+
+ // Summarize and print selected query results.
+ for (int i=0; i < qr.getRecordCount(); i++) {
+ QueryRecord r = qr.getRecord(i);
+ String s_id, s_ra, s_dec, s_class;
+ QRAttribute v;
+
+ s_id = ((v = r.getAttribute("sdss_objid")) != null) ?
+ v.stringValue() : "<none>";
+ s_ra = ((v = r.getAttribute("sdss_ra")) != null) ?
+ v.stringValue() : "<unknown>";
+ s_dec = ((v = r.getAttribute("sdss_dec")) != null) ?
+ v.stringValue() : "<unknown>";
+ s_class = ((v = r.getAttribute("sdss_type")) != null) ?
+ v.stringValue() : "<unknown>";
+
+ System.out.println("id=" + s_id + "\tra=" + s_ra +
+ "\tdec=" + s_dec + "\tclass=" + s_class);
+ }
+ }
+}
diff --git a/vendor/voclient/libvoclient/examples/spptest.x b/vendor/voclient/libvoclient/examples/spptest.x
new file mode 100644
index 00000000..d0ef5693
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/spptest.x
@@ -0,0 +1,471 @@
+#
+# SPPTEST -- SPP test programs for the VOClient interface.
+#
+# M. Fitzpatrick, NOAO, Jul 2006
+
+
+task simple = t_simple,
+ cone = t_cone,
+ siap = t_siap,
+ sesame = t_sesame,
+ skybot = t_skybot,
+ registry1 = t_registry1,
+ registry2 = t_registry2,
+ registry3 = t_registry3
+
+
+define DEF_RA 12.0; # default search values
+define DEF_DEC 12.0;
+define DEF_SIZE 0.1;
+define DEF_SR 0.5;
+
+define CONE_SVC "http://www.nofs.navy.mil/cgi-bin/vo_cone.cgi?CAT=USNO-B1&"
+define SIAP_SVC "http://skyview.gsfc.nasa.gov/cgi-bin/vo/sia.pl?"
+
+
+define MAX_IMAGES 5
+
+define SZ_URL 512
+define SZ_RESULT 128000 # allow up to 128K of results
+
+
+# SIMPLE -- Trivial SPP task to call the high-level interface functions.
+# Here we test the all-in-one caller procedures and get the result as a
+# string. We'll simply write out the string, a real app could just as
+# easily open the string as a file and parse it as needed.
+
+procedure t_simple ()
+
+char fname[SZ_FNAME], otype[SZ_FNAME], svctype[SZ_FNAME]
+char result[SZ_RESULT]
+double ra, dec, size
+int reslen
+
+double clgetd()
+bool streq()
+int vx_conecaller() # returns the length of the result
+int vx_siapcaller() # returns the length of the result
+
+begin
+ call aclrs (fname, SZ_FNAME) # clear string arrays
+ call aclrs (otype, SZ_FNAME)
+ call aclrs (svctype, SZ_FNAME)
+ call aclrs (result, SZ_RESULT)
+
+ call clgstr ("dal", svctype, SZ_FNAME) # get task parameters
+ ra = clgetd ("ra")
+ dec = clgetd ("dec")
+ size = clgetd ("size")
+ call clgstr ("type", otype, SZ_FNAME)
+
+ # Now call the service requested.
+ if (streq ("cone", svctype)) {
+ reslen = vx_coneCaller (CONE_SVC, ra, dec, size, otype,
+ result, SZ_RESULT)
+
+ } else if (streq ("siap", svctype)) {
+ reslen = vx_siapCaller (SIAP_SVC, ra, dec, size, size,
+ "image/fits", otype, result, SZ_RESULT)
+
+ } else {
+ call eprintf ("Invalid service type '%s'\n")
+ call pargstr (svctype)
+ return
+ }
+
+ # Print the results to the screen.
+ if (reslen > 0) {
+ call write (STDOUT, result, reslen)
+ if (reslen >= SZ_RESULT)
+ call eprintf ("\n\nResults possibly truncated....\n\n")
+ } else
+ call eprintf ("No results from service\n")
+end
+
+
+# CONE -- Simple test program to call a Cone search service and summarize
+# the results to the screen.
+
+procedure t_cone ()
+
+char qstring[SZ_URL]
+char sid[SZ_FNAME], sra[SZ_FNAME], sdec[SZ_FNAME]
+double ra, dec, size
+int cone, query, qr, rec
+int i, nrec, nattr, len
+
+double clgetd()
+int vx_initVOClient(), vx_coneConnection()
+int vx_executeQuery(), vx_coneQuery(), vx_stringAttr()
+int vx_record(), vx_recordCount(), vx_atCount()
+
+begin
+ ra = clgetd ("ra") # get task parameters
+ dec = clgetd ("dec")
+ size = clgetd ("size")
+
+ # Make the Cone call and summarize the table.
+
+ if (vx_initVOClient("") == ERR) # Initialize
+ return
+
+ # Open a connection and form the query.
+ cone = vx_coneConnection (CONE_SVC)
+ query = vx_coneQuery (cone, ra, dec, size)
+
+ call vx_queryString (query, "cone", 0, qstring, SZ_PATHNAME)
+ call printf ("\nExecuting query:\n %s\n\n")
+ call pargstr (qstring)
+
+ # Execute the query.
+ qr = vx_executeQuery (query)
+
+ # Summarize the response.
+ nrec = vx_recordCount (qr)
+ if (nrec <= 0) {
+ call eprintf ("No records matched.")
+ return
+
+ } else {
+ rec = vx_record (qr, 0)
+ nattr = 0
+ if (rec != ERR)
+ nattr = vx_atCount (rec)
+
+ call printf ("# return %d records containing %d attrs each\n#\n")
+ call pargi (nrec)
+ call pargi (nattr)
+
+ call printf ("#\n# --- Summary output ---\n#\n")
+ }
+
+
+ # Download a few images.
+ for (i = 0; i < nrec; i=i+1) {
+ rec = vx_record (qr, i)
+
+ if (rec > 0) {
+ len = vx_stringAttr (rec, "ID_MAIN", sid, SZ_FNAME)
+ len = vx_stringAttr (rec, "POS_EQ_RA_MAIN", sra, SZ_FNAME)
+ len = vx_stringAttr (rec, "POS_EQ_DEC_MAIN", sdec, SZ_FNAME)
+
+ call printf ("%4d id=%s ra=%s dec=%s\n")
+ call pargi (i)
+ call pargstr (sid)
+ call pargstr (sra)
+ call pargstr (sdec)
+
+ } else {
+ call eprintf ("\nError getting record number %d\n")
+ call pargi (i)
+ }
+
+ }
+
+ call vx_closeConnection (cone)
+ call vx_closeVOClient (0)
+end
+
+
+# SIAP -- Simple test procedure to call a SIAP service and download several
+# test images.
+
+procedure t_siap ()
+
+char fname[SZ_FNAME], qstring[SZ_URL], acref[SZ_URL]
+double ra, dec, size
+int siap, query, qr, rec, v
+int i, nrec, nattr, len
+
+double clgetd()
+int vx_initVOClient(), vx_siapConnection()
+int vx_executeQuery(), vx_siapQuery()
+int vx_record(), vx_recordCount(), vx_atCount()
+int vx_getAttribute(), vx_getDataset(), vx_stringValue()
+
+begin
+ ra = clgetd ("ra") # get task parameters
+ dec = clgetd ("dec")
+ size = clgetd ("size")
+
+ # Make the SIAP call and download a few images.
+
+ if (vx_initVOClient("") == ERR) # Initialize
+ return
+
+ # Open a connection and form the query.
+ siap = vx_siapConnection (SIAP_SVC)
+ query = vx_siapQuery (siap, ra, dec, size, size, "image/fits")
+
+ call vx_queryString (query, "siap", 0, qstring, SZ_PATHNAME)
+ call printf ("\nExecuting query:\n %s\n\n")
+ call pargstr (qstring)
+
+ # Execute the query.
+ qr = vx_executeQuery (query)
+
+ # Summarize the response.
+ nrec = vx_recordCount (qr)
+ if (nrec <= 0) {
+ call eprintf ("No records matched.")
+ return
+
+ } else {
+ rec = vx_record (qr, 0)
+ nattr = 0
+ if (rec != ERR)
+ nattr = vx_atCount (rec)
+
+ call printf ("# return %d records containing %d attrs each\n#\n")
+ call pargi (nrec)
+ call pargi (nattr)
+ }
+
+
+ # Download a few images.
+ for (i = 0; i < nrec && i < MAX_IMAGES; i=i+1) {
+ rec = vx_record (qr, i)
+ v = vx_getAttribute (rec, "AccessReference")
+
+ if (v <= 0)
+ next
+
+ call aclrs (fname, SZ_FNAME) # clear string arrays
+ call sprintf (fname, SZ_FNAME, "dataset%04d.fits")
+ call pargi (i)
+
+ len = vx_stringValue (v, acref, SZ_URL)
+ call printf ("Downloading: %s\n")
+ call pargstr (acref)
+
+ if (vx_getDataset (rec, acref, fname) == OK) {
+ call printf ("\n Saved to file: %s\n\n")
+ call pargstr (fname)
+ } else
+ call eprintf ("\n Downloaded failed\n")
+ }
+
+ call vx_closeConnection (siap)
+ call vx_closeVOClient (0)
+end
+
+
+# SESAME -- Simple test procedure of the Sesame service.
+
+procedure t_sesame ()
+
+char target[SZ_FNAME], pos[SZ_LINE]
+double ra, dec
+int sr, len
+
+int vx_initVOClient()
+int vx_nameresolver(), vx_resolverpos()
+double vx_resolverra(), vx_resolverdec()
+
+begin
+ call clgstr ("target", target, SZ_FNAME)
+
+ if (vx_initVOClient("") == ERR) # Initialize
+ return
+
+ sr = vx_nameresolver (target)
+
+ ra = vx_resolverra (sr)
+ dec = vx_resolverdec (sr)
+ len = vx_resolverpos (sr, pos, SZ_LINE)
+
+ call printf ("target=%s ra=%.6f dec=%.6f (%s)\n\n")
+ call pargstr (target)
+ call pargd (ra)
+ call pargd (dec)
+ call pargstr (pos)
+
+ call vx_closeVOClient (0)
+end
+
+
+# SKYBOT -- Simple test procedure of the SkyBoT service.
+
+procedure t_skybot ()
+
+char name[SZ_FNAME]
+double ra, dec, sr, epoch, vmag
+int sb, nobjs, len, i
+
+real clgetr()
+int vx_initVOClient()
+int vx_skybot(), vx_skybotnobjs(), vx_skybotstr()
+double vx_skybotdbl()
+
+begin
+ ra = clgetr ("ra") # Get the parameters
+ dec = clgetr ("dec")
+ sr = clgetr ("sr")
+ epoch = clgetr ("epoch")
+
+ if (vx_initVOClient("") == ERR) # Initialize
+ return
+
+ call printf ("#\n# Search Terms: ra=%.6f dec=%.6f sr=%.1f epoch=%.3f\n")
+ call pargd (ra)
+ call pargd (dec)
+ call pargd (sr)
+ call pargd (epoch)
+
+ # Call the service
+ sb = vx_skybot (ra, dec, sr, sr, epoch)
+
+ nobjs = vx_skybotnobjs (sb)
+ call printf ("#\n# Found %d objects\n#\n")
+ call pargi (nobjs)
+
+ for (i=0; i < nobjs; i=i+1) {
+ len = vx_skybotstr (sb, "name", i, name, SZ_FNAME)
+ ra = vx_skybotdbl (sb, "ra", i)
+ dec = vx_skybotdbl (sb, "dec", i)
+ vmag = vx_skybotdbl (sb, "vmag", i)
+
+ call printf ("%d: obj=%12s ra=%.6f dec=%.6f Mv=%s\n")
+ call pargi (i)
+ call pargstr (name)
+ call pargd (ra)
+ call pargd (dec)
+ call pargd (vmag)
+ }
+
+ call vx_closeVOClient (0)
+end
+
+
+# REGISTRY -- Simple tests of the Registry search procedures.
+
+procedure t_registry1 ()
+
+char sql[SZ_LINE], keywords[SZ_LINE]
+int orValues, res, count
+
+int vx_initVOClient(), vx_regsearch(), vx_rscount(), btoi()
+bool clgetb()
+
+begin
+ call clgstr ("sql", sql, SZ_LINE)
+ call clgstr ("keywords", keywords, SZ_LINE)
+ orValues = btoi (clgetb ("orValues"))
+
+ if (vx_initVOClient("") == ERR) # Initialize
+ return
+
+ # Do the Registry search, get back a result object. Remember that
+ # the 'orValues' is an integer in the interface, we converted from
+ # the boolean parameter above.
+
+ res = vx_regsearch (sql, keywords, orValues)
+
+ count = vx_rscount (res)
+ call printf ("#\n# Found %d matching records\n#\n\n")
+ call pargi (count)
+
+ call reg_printRecords (res, count)
+
+ call vx_closeVOClient (0)
+end
+
+
+procedure t_registry2 ()
+
+char sql[SZ_LINE], keywords[SZ_LINE], qstring[1024]
+int orValues, res, query, count, len
+
+int vx_initVOClient(), vx_rscount(), vx_regquery()
+int btoi(), vx_rgetquerystring(), vx_rexecute()
+bool clgetb()
+
+begin
+ call clgstr ("sql", sql, SZ_LINE)
+ call clgstr ("keywords", keywords, SZ_LINE)
+ orValues = btoi (clgetb ("orValues"))
+
+ if (vx_initVOClient("") == ERR) # Initialize
+ return
+
+ # Do the Registry search, get back a result object. Remember that
+ # the 'orValues' is an integer in the interface, we converted from
+ # the boolean parameter above.
+
+ query = vx_regquery (sql, 0);
+ call vx_raddsearchterm (query, keywords, orValues)
+
+ len = vx_rgetquerystring (query, qstring, 1024)
+ call printf ("#\n# Query;\n %s\n#\n\n")
+ call pargstr (qstring)
+
+ res = vx_rexecute (query)
+
+ count = vx_rscount (res)
+ call printf ("#\n# Found %d matching records\n#\n\n")
+ call pargi (count)
+
+ call reg_printRecords (res, count)
+
+ call vx_closeVOClient (0)
+end
+
+
+procedure t_registry3 ()
+
+char svc[SZ_LINE], term[SZ_LINE]
+int orValues, res, count
+
+int vx_initVOClient(), vx_regsearchbysvc(), vx_rscount(), btoi()
+bool clgetb()
+
+begin
+ call clgstr ("svc", svc, SZ_LINE)
+ call clgstr ("term", term, SZ_LINE)
+ orValues = btoi (clgetb ("orValues"))
+
+ if (vx_initVOClient("") == ERR) # Initialize
+ return
+
+ # Do the Registry search given the particular service type. The
+ # search term may be either a keyword list or another SQL predicate.
+
+ res = vx_regsearchbysvc (svc, term, orValues)
+
+ count = vx_rscount (res)
+ call printf ("#\n# Found %d matching records\n#\n\n")
+ call pargi (count)
+
+ call reg_printRecords (res, count)
+
+ call vx_closeVOClient (0)
+end
+
+
+procedure reg_printRecords (res, count)
+
+int res, count, i
+char title[SZ_LINE], url[SZ_LINE], svctype[SZ_LINE], type[SZ_LINE]
+
+begin
+ for (i = 0; i < count; i=i+1) {
+ call vx_rsstr (res, "Title", i, title, SZ_LINE)
+ call vx_rsstr (res, "ServiceUrl", i, url, SZ_LINE)
+ call vx_rsstr (res, "ResourceType", i, svctype, SZ_LINE)
+ call vx_rsstr (res, "Type", i, type, SZ_LINE)
+
+ call printf ("\n----------------------------------------------------\n")
+ call printf ("(%d of %d) %s\n")
+ call pargi (i+1)
+ call pargi (count)
+ call pargstr (title)
+ call printf ("ServiceURL: %s\n")
+ call pargstr (url)
+ call printf ("ResourceType: %s\t\tType: %s\n")
+ call pargstr (svctype)
+ call pargstr (type)
+ }
+end
+
+
+
diff --git a/vendor/voclient/libvoclient/examples/ssap1.c b/vendor/voclient/libvoclient/examples/ssap1.c
new file mode 100644
index 00000000..b26ef27d
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/ssap1.c
@@ -0,0 +1,156 @@
+/************************************************************************
+ * Call a SSAP search service and print a summary selected fields of the
+ * results.
+ *
+ * Usage: ssap1 ra dec size [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 350.25; /* default values */
+double dec = -16.4;
+double size = 0.5;
+
+char *service = "http://galex.stsci.edu/gxWS/SSAP/gxSSAP.aspx?";
+char *server = "6200:localhost";
+
+static void callSsapService (char *url, double ra, double dec, double size);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ size = atof (argv[arg++]);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: ssap1 [-ds server] ra dec size [ssapURL]\n");
+ exit(1);
+ }
+
+ /* Now call the SSAP Service and summarize the results.
+ */
+ callSsapService (service, ra, dec, size);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a SSA service and summarize results.
+ */
+static void
+callSsapService (char *service_url, double ra, double dec, double size)
+{
+ char *voc_opts = NULL;
+ int i=0, nrec=0, nattr=0;
+ char *attrList = NULL, *ip;
+
+ DAL ssap; /* DAL Connection */
+ Query query; /* query handle */
+ QResponse qr; /* query response handle */
+ QRecord rec; /* result record andle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ ssap = voc_openSsapConnection (service_url); /* open a connection */
+
+ /* Form a query. Here we'll use the one search size we're given for
+ * both the RA,DEC sizes, and specify a null format.
+ */
+ query = voc_getSsapQuery (ssap, ra, dec, size, NULL, NULL, NULL);
+
+ printf ("Executing Query:\n %s\n\n",
+ voc_getQueryString (query, SSAP_CONN, 0));
+ qr = voc_executeQuery (query); /* execute the query */
+
+
+ if ((nrec = voc_getRecordCount (qr)) <= 0) { /* summarize response */
+ fprintf (stderr, "no records matched");
+ exit (1);
+
+ } else {
+ rec = voc_getRecord (qr, 0);
+ nattr = (rec != ERR) ? voc_getAttrCount (rec) : 0;
+
+
+ printf ("# returns %d records containing %d attributes each\n#\n",
+ nrec, nattr);
+ printf ("# --- Summary output ---\n#\n");
+
+ attrList = voc_getAttrList (rec);
+ printf ("# Attribute List:\n# ");
+ for (ip = attrList; *ip; ip++)
+ if (isspace (*ip))
+ printf ("\n# ");
+ else
+ putchar (*ip);
+ printf ("\n#\n");
+
+ free ((void *) attrList);
+ }
+
+ /* Summarize and print selected query results.
+ */
+ for (i = 0; i < nrec; i++) {
+ char *s_ra, *s_dec, *s_naxis, *s_title, *s_fsize;
+
+ rec = voc_getRecord (qr, i); /* get a row in the table */
+
+ /* The getStringAttr method returns an allocated pointer to a string
+ * we'll need to free below, however we can use a NULL pointer to
+ * know when no data were found.
+ */
+ s_ra = voc_getStringAttr (rec, "RA");
+ s_dec = voc_getStringAttr (rec, "DEC");
+ s_naxis = voc_getStringAttr (rec, "Naxis");
+ s_title = voc_getStringAttr (rec, "Title");
+ s_fsize = voc_getStringAttr (rec, "Filesize");
+ if (! s_title )
+ s_title = voc_getStringAttr (rec, "ID_MAIN"); /* fallback */
+
+ printf ("ra=%-.10s\tdec=%-.10s\t[%s] %9.9s\t%-32.32s\n",
+ (s_ra ? s_ra : "<null>"),
+ (s_dec ? s_dec : "<null>"),
+ (s_naxis ? s_naxis : "<null>"),
+ (s_fsize ? s_fsize : "<null>"),
+ (s_title ? s_title : "<null>"));
+
+ if (s_ra) free ((void *) s_ra); /* clean up temp pointers */
+ if (s_dec) free ((void *) s_dec);
+ if (s_naxis) free ((void *) s_naxis);
+ if (s_fsize) free ((void *) s_fsize);
+ if (s_title) free ((void *) s_title);
+ }
+
+ voc_closeConnection (ssap); /* close the ssap connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/ssap2.c b/vendor/voclient/libvoclient/examples/ssap2.c
new file mode 100644
index 00000000..98556167
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/ssap2.c
@@ -0,0 +1,95 @@
+/************************************************************************
+ * Call a SSAP search service and print the results as a CSV file.
+ *
+ * Usage: ssap2 ra dec size [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 350.25; /* default values */
+double dec = -16.4;
+double size = 0.5;
+
+char *service = "http://galex.stsci.edu/gxWS/SSAP/gxSSAP.aspx?";
+char *server = "6200:localhost";
+
+static void callSsapService (char *url, double ra, double dec, double size);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ size = atof (argv[arg++]);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: ssap2 [-ds server] ra dec size [ssapURL]\n");
+ exit(1);
+ }
+
+ /* Now call the Ssap Service and summarize the results.
+ */
+ callSsapService (service, ra, dec, size);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a Ssap search service and summarize results.
+ */
+static void
+callSsapService (char *service_url, double ra, double dec, double size)
+{
+ char *voc_opts = NULL;
+ char *csv = NULL;
+
+ DAL ssap; /* DAL Connection */
+ Query query; /* query handle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ ssap = voc_openSsapConnection (service_url); /* open a connection */
+
+ /* Form a query. Here we'll use the one search size we're given for
+ * both the RA,DEC sizes, and specify a null format.
+ */
+ query = voc_getSsapQuery (ssap, ra, dec, size, NULL, NULL, NULL);
+
+ csv = voc_executeCSV (query);
+ write (fileno(stdout), csv, strlen (csv));
+ fprintf (stdout, "\n");
+
+ free ((void *) csv); /* free local storage */
+
+ voc_closeConnection (ssap); /* close the ssap connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/ssap3.c b/vendor/voclient/libvoclient/examples/ssap3.c
new file mode 100644
index 00000000..f1fa4c4e
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/ssap3.c
@@ -0,0 +1,94 @@
+/************************************************************************
+ * Call a SSAP search service and print the results as a CSV file.
+ *
+ * Usage: ssap3 ra dec size [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 350.25; /* default values */
+double dec = -16.4;
+double size = 0.5;
+
+char *service = "http://galex.stsci.edu/gxWS/SSAP/gxSSAP.aspx?";
+char *server = "6200:localhost";
+
+static void callSsapService (char *url, double ra, double dec, double size);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ size = atof (argv[arg++]);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: ssap3 [-ds server] ra dec size [ssapURL]\n");
+ exit(1);
+ }
+
+ /* Now call the Ssap Service and summarize the results.
+ */
+ callSsapService (service, ra, dec, size);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a Ssap search service and summarize results.
+ */
+static void
+callSsapService (char *service_url, double ra, double dec, double size)
+{
+ char *voc_opts = NULL;
+ char *vot = NULL;
+
+ DAL ssap; /* DAL Connection */
+ Query query; /* query handle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ ssap = voc_openSsapConnection (service_url); /* open a connection */
+
+ /* Form a query. Here we'll use the one search size we're given for
+ * both the RA,DEC sizes, and specify a null format.
+ */
+ query = voc_getSsapQuery (ssap, ra, dec, size, NULL, NULL, NULL);
+
+ vot = voc_executeVOTable (query);
+ write (fileno(stdout), vot, strlen (vot));
+
+ free ((void *) vot); /* free local storage */
+
+ voc_closeConnection (ssap); /* close the ssap connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/ssap4.c b/vendor/voclient/libvoclient/examples/ssap4.c
new file mode 100644
index 00000000..89b27351
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/ssap4.c
@@ -0,0 +1,141 @@
+/************************************************************************
+ * Call a SSAP search service and download resulting datasets.
+ *
+ * Usage: ssap4 ra dec size [format [maximages [serviceURL]]]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, June 2006
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 350.25; /* default values */
+double dec = -16.4;
+double size = 0.5;
+char *format = "ALL";
+int maximages= 5;
+
+char *service = "http://galex.stsci.edu/gxWS/SSAP/gxSSAP.aspx?";
+char *server = "6200:localhost";
+
+static void callSsapService (char *url, double ra, double dec, double size,
+ char *format, int maximages);
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ size = atof (argv[arg++]);
+ if (arg < argc) format = argv[arg++];
+ if (arg < argc) maximages = atoi (argv[arg++]);
+ if (arg < argc) service = argv[arg++];
+
+ } else {
+ fprintf (stderr,
+ "Usage: ssap4 [-ds server] ra dec size [fmt [maximg [ssapURL]]]\n");
+ exit(1);
+ }
+
+ /* Now call the Ssap Service and summarize the results.
+ */
+ callSsapService (service, ra, dec, size, format, maximages);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a Ssap search service and summarize results.
+ */
+static void
+callSsapService (char *service_url, double ra, double dec, double size,
+ char *format, int maximages)
+{
+ char *voc_opts = NULL;
+ char *acref = NULL;
+ char fname[SZ_FNAME];
+ int i, nattr = 0, nrec = 0;
+
+ DAL ssap; /* DAL Connection */
+ Query query; /* query handle */
+ QResponse qr; /* query response handle */
+ QRecord rec; /* result record handle */
+ QRAttribute v; /* dataset attribute */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ ssap = voc_openSsapConnection (service_url); /* open a connection */
+
+ /* Form a query. Here we'll use the one search size we're given for
+ * both the RA,DEC sizes, and specify a null format.
+ */
+ query = voc_getSsapQuery (ssap, ra, dec, size, NULL, NULL, format);
+
+ printf ("Executing Query:\n %s\n\n",
+ voc_getQueryString (query, SSAP_CONN, 0));
+ qr = voc_executeQuery (query); /* execute the query */
+
+
+ /* Summarize response.
+ */
+ if ((nrec = voc_getRecordCount (qr)) <= 0) {
+ fprintf (stderr, "no records matched");
+ exit (1);
+
+ } else {
+ rec = voc_getRecord (qr, 0);
+ nattr = (rec != ERR) ? voc_getAttrCount (rec) : 0;
+
+ printf ("# returns %d records containing %d attributes each\n#\n",
+ nrec, nattr);
+ }
+
+
+ /* Download the first 'maximages' images.
+ */
+ printf ("Downloading images:\n");
+
+ for (i=0; i < nrec && i < maximages; i++) {
+ rec = voc_getRecord (qr, i); /* get a row in the table */
+
+ v = voc_getAttribute (rec, "AccessReference");
+
+ if (v <= 0)
+ continue;
+
+ bzero (fname, SZ_FNAME);
+ sprintf (fname, "dataset.%04d", i);
+ printf ("Downloading: %s\n", (acref = voc_stringValue (v)) );
+
+ if ( voc_getDataset (rec, acref, fname) == OK )
+ printf ("Downloaded %s\n", fname);
+ else
+ printf ("Download failed\n");
+ }
+
+ voc_closeConnection (ssap); /* close the ssap connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+
+ return;
+}
diff --git a/vendor/voclient/libvoclient/examples/ssap5.c b/vendor/voclient/libvoclient/examples/ssap5.c
new file mode 100644
index 00000000..554741be
--- /dev/null
+++ b/vendor/voclient/libvoclient/examples/ssap5.c
@@ -0,0 +1,135 @@
+/************************************************************************
+ * Call a SSAP search service and print a summary selected fields of the
+ * results.
+ *
+ * Usage: ssap5 ra dec size [serviceURL]
+ *
+ * Or call with no args for the built-in unit test.
+ *
+ * M. Fitzpatrick, NOAO, Feb 2009
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "VOClient.h"
+
+double ra = 12.0; /* default values */
+double dec = 0.0;
+double size = 0.05;
+
+char *service = "http://galex.stsci.edu/gxWS/SSAP/gxSSAP.aspx?";
+char *server = "6200:localhost";
+
+static void callSsapService (char *url, double ra, double dec, double size);
+
+
+
+int main (int argc, char *argv[])
+{
+ /* Process command line arguments.
+ */
+ if (argc <= 1) {
+ /* Use builtin defaults. */
+ } else if (argc >= 3) {
+ int arg = 1;
+
+ /* Look for a server specification. */
+ if (strncmp (argv[arg], "-ds",3) == 0)
+ server = argv[++arg];
+ ra = atof (argv[arg++]);
+ dec = atof (argv[arg++]);
+ size = atof (argv[arg++]);
+ if (arg < argc)
+ service = argv[arg++];
+
+ } else {
+ fprintf (stderr, "Usage: ssap51 [-ds server] ra dec size [ssapURL]\n");
+ exit(1);
+ }
+
+ /* Now call the SSAP Service and summarize the results.
+ */
+ callSsapService (service, ra, dec, size);
+
+ return (0);
+}
+
+
+/* Simple test routine to call a SIA service and summarize results.
+ */
+static void
+callSsapService (char *service_url, double ra, double dec, double size)
+{
+ char *voc_opts = NULL;
+ int i=0, nrec=0, nattr=0;
+ char *attrList = NULL, *ip;
+
+ DAL ssap; /* DAL Connection */
+ Query query; /* query handle */
+ QResponse qr; /* query response handle */
+ QRecord rec; /* result record andle */
+
+
+ /* Initialize the VOClient code. Error messages are printed by the
+ * interface so we just quit if there is a problem.
+ */
+ if (voc_initVOClient (voc_opts) == ERR)
+ return;
+
+ /* Get a new connection to the named service.
+ */
+ ssap = voc_openSsapConnection (service_url); /* open a connection */
+
+ /* Form a query. Here we'll use the one search size we're given for
+ * both the RA,DEC sizes, and specify a null format.
+ */
+ query = voc_getSsapQuery (ssap, ra, dec, size, NULL, NULL, NULL);
+
+ printf ("Executing Query:\n %s\n\n",
+ voc_getQueryString (query, SSAP_CONN, 0));
+ qr = voc_executeQuery (query); /* execute the query */
+
+
+ if ((nrec = voc_getRecordCount (qr)) <= 0) { /* summarize response */
+ fprintf (stderr, "no records matched");
+ exit (1);
+
+ } else {
+ rec = voc_getRecord (qr, 0);
+ nattr = (rec != ERR) ? voc_getAttrCount (rec) : 0;
+
+
+ printf ("# returns %d records containing %d attributes each\n#\n",
+ nrec, nattr);
+ printf ("# --- Summary output ---\n#\n");
+
+ attrList = voc_getAttrList (rec);
+ printf ("# Attribute List:\n# ");
+ for (ip = attrList; *ip; ip++)
+ if (isspace (*ip))
+ printf ("\n# ");
+ else
+ putchar (*ip);
+ printf ("\n#\n");
+
+
+ printf ("\n\n");
+ printf ("#N,ID,UCD,Name,DataType,UType\n");
+ for (i=0; i < nattr; i++) {
+ printf ("%d,%s,%s,%s,%s,%s,%s\n", i,
+ voc_getFieldAttr (qr, i, "id"),
+ voc_getFieldAttr (qr, i, "ucd"),
+ voc_getFieldAttr (qr, i, "name"),
+ voc_getFieldAttr (qr, i, "datatype"),
+ voc_getFieldAttr (qr, i, "arraysize"),
+ voc_getFieldAttr (qr, i, "utype"));
+ }
+ }
+
+ voc_closeConnection (ssap); /* close the ssap connection */
+ voc_closeVOClient (1); /* clean up and shutdown */
+ free ((void *) attrList);
+
+ return;
+}