#!/bin/sh
# $Id: scanf_test,v 1.5 2008/06/09 17:38:16 mdw Exp $

#####################################################################
#
# Copyright (c) 1995 - 2004, EMBL, Peter Keller
# 
# CCIF: a library to access and output data conforming to the
# CIF (Crystallographic Information File) and mmCIF (Macromolecular
# CIF) specifications, and other related specifications.
# 
# This library is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# version 3, modified in accordance with the provisions of the 
# license to address the requirements of UK law.
#
# You should have received a copy of the modified GNU Lesser General 
# Public License along with this library.  If not, copies may be 
# downloaded from http://www.ccp4.ac.uk/ccp4license.php
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
# 
#####################################################################

# echo's %p if RTL supports it, %x if it is equivalent, or fails if neither
# works.

test=`./scanf_ansi %p`
if [ "$test" = "Hello World!" ] ; then
   echo \"%p\"
   exit 0
fi
rm -f core

test=`./scanf_ansi %x`
if [ "$test" = "Hello World!" ] ; then
   echo \"%x\"
   exit 0
fi
rm -f core

echo 'Tell me how to convert pointers to and from printable characters!' 1>&2
exit 1

