#
#	echon
#

echon_init ()
{
	#
	#	set up echon
	#
	OUT=`echo -n "$*" 2>&1`

	case "$OUT" in
	 "$*")	ECHON_TYPE=bsd ;;
	 *)	ECHON_TYPE=sys5 ;;
	esac
}

echon ()
{
	case $ECHON_TYPE in
	  bsd)	echo -n "$*" ;;
	  *)	echo "$*\c" ;;
	esac
}

echon_init

echo_message ()
{
	FORMAT=$1

	test "$2" = "" && printf "$FORMAT" && return
	test "$3" = "" && printf "$FORMAT" "$2" && return
	test "$4" = "" && printf "$FORMAT" "$2" "$3" && return
	printf "$FORMAT" "$2" "$3" "$4"
}
