* #27232: jni: added pjproject checkout as regular git content

We will remove it once the next release of pjsip (with Android support)
comes out and is merged into SFLphone.
diff --git a/jni/pjproject-android/.svn/pristine/9d/9d12dd39f8f3c085fd36bff6a0b7a2e04eb6671b.svn-base b/jni/pjproject-android/.svn/pristine/9d/9d12dd39f8f3c085fd36bff6a0b7a2e04eb6671b.svn-base
new file mode 100644
index 0000000..b05f822
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/9d/9d12dd39f8f3c085fd36bff6a0b7a2e04eb6671b.svn-base
@@ -0,0 +1,484 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#ifndef __PJMEDIA_AUDIODEV_CONFIG_H__
+#define __PJMEDIA_AUDIODEV_CONFIG_H__
+
+/**
+ * @file config.h
+ * @brief Audio config.
+ */
+#include <pjmedia/types.h>
+#include <pj/pool.h>
+
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup audio_device_api Audio Device API
+ * @brief PJMEDIA audio device abstraction API.
+ */
+
+/**
+ * @defgroup s1_audio_device_config Compile time configurations
+ * @ingroup audio_device_api
+ * @brief Compile time configurations
+ * @{
+ */
+
+/**
+ * This setting controls whether PortAudio support should be included.
+ *
+ * By default it is enabled except on Windows platforms (including
+ * Windows Mobile) and Symbian.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO
+#   if (defined(PJ_WIN32) && PJ_WIN32!=0) || \
+       (defined(PJ_WIN64) && PJ_WIN64!=0) || \
+       (defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0)
+#	define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO	0
+#   else
+#	define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO	1
+#   endif
+#endif
+
+/**
+ * This setting controls whether Android OpenSL audio support should be
+ * included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_OPENSL
+#   define PJMEDIA_AUDIO_DEV_HAS_OPENSL		0
+#endif
+
+/**
+ * This setting controls whether Android JNI audio support should be
+ * included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_ANDROID_JNI
+#   define PJMEDIA_AUDIO_DEV_HAS_ANDROID_JNI    0
+#endif
+
+/**
+ * This setting controls whether BlackBerry 10 (BB10) audio support
+ * should be included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_BB10
+#   define PJMEDIA_AUDIO_DEV_HAS_BB10		0
+#endif
+
+/**
+ * This setting controls whether native ALSA support should be included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_ALSA
+#   define PJMEDIA_AUDIO_DEV_HAS_ALSA		0
+#endif
+
+
+/**
+ * This setting controls whether null audio support should be included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_NULL_AUDIO
+#   define PJMEDIA_AUDIO_DEV_HAS_NULL_AUDIO	0
+#endif
+
+
+/**
+ * This setting controls whether coreaudio support should be included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_COREAUDIO
+#   define PJMEDIA_AUDIO_DEV_HAS_COREAUDIO	0
+#endif
+
+
+/**
+ * This setting controls whether WMME support should be included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_WMME
+#   define PJMEDIA_AUDIO_DEV_HAS_WMME		1
+#endif
+
+ 
+/**
+ * This setting controls whether BDIMAD support should be included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_BDIMAD
+#	define PJMEDIA_AUDIO_DEV_HAS_BDIMAD	0
+#endif
+
+
+/**
+ * This setting controls whether Symbian APS support should be included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_SYMB_APS
+#   define PJMEDIA_AUDIO_DEV_HAS_SYMB_APS	0
+#endif
+
+
+/**
+ * This setting controls whether Symbian APS should perform codec
+ * detection in its factory initalization. Note that codec detection 
+ * may take few seconds and detecting more codecs will take more time.
+ * Possible values are:
+ * - 0: no codec detection, all APS codec (AMR-NB, G.711, G.729, and
+ *      iLBC) will be assumed as supported.
+ * - 1: minimal codec detection, i.e: only detect for AMR-NB and G.711,
+ *      (G.729 and iLBC are considered to be supported/unsupported when
+ *      G.711 is supported/unsupported).
+ * - 2: full codec detection, i.e: detect AMR-NB, G.711, G.729, and iLBC.
+ * 
+ * Default: 1 (minimal codec detection)
+ */
+#ifndef PJMEDIA_AUDIO_DEV_SYMB_APS_DETECTS_CODEC
+#   define PJMEDIA_AUDIO_DEV_SYMB_APS_DETECTS_CODEC 1
+#endif
+
+
+/**
+ * This setting controls whether Symbian VAS support should be included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_SYMB_VAS
+#   define PJMEDIA_AUDIO_DEV_HAS_SYMB_VAS	0
+#endif
+
+/**
+ * This setting controls Symbian VAS version to be used. Currently, valid
+ * values are only 1 (for VAS 1.0) and 2 (for VAS 2.0).
+ *
+ * Default: 1 (VAS version 1.0)
+ */
+#ifndef PJMEDIA_AUDIO_DEV_SYMB_VAS_VERSION
+#   define PJMEDIA_AUDIO_DEV_SYMB_VAS_VERSION	1
+#endif
+
+
+/**
+ * This setting controls whether Symbian audio (using built-in multimedia 
+ * framework) support should be included.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA
+#   define PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA	PJ_SYMBIAN
+#endif
+
+
+/**
+ * This setting controls whether the Symbian audio with built-in multimedia
+ * framework backend should be started synchronously. Note that synchronous
+ * start will block the application/UI, e.g: about 40ms for each direction
+ * on N95. While asynchronous start may cause invalid value (always zero)
+ * returned in input/output volume query, if the query is performed when
+ * the internal start procedure is not completely finished.
+ * 
+ * Default: 1 (yes)
+ */
+#ifndef PJMEDIA_AUDIO_DEV_MDA_USE_SYNC_START
+#   define PJMEDIA_AUDIO_DEV_MDA_USE_SYNC_START	1
+#endif
+
+
+/**
+ * This setting controls whether the Audio Device API should support
+ * device implementation that is based on the old sound device API
+ * (sound.h). 
+ *
+ * Enable this API if:
+ *  - you have implemented your own sound device using the old sound
+ *    device API (sound.h), and
+ *  - you wish to be able to use your sound device implementation
+ *    using the new Audio Device API.
+ *
+ * Please see http://trac.pjsip.org/repos/wiki/Audio_Dev_API for more
+ * info.
+ */
+#ifndef PJMEDIA_AUDIO_DEV_HAS_LEGACY_DEVICE
+#   define PJMEDIA_AUDIO_DEV_HAS_LEGACY_DEVICE	0
+#endif
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_AUDIODEV_CONFIG_H__ */
+
+/*
+ --------------------- DOCUMENTATION FOLLOWS ---------------------------
+ */
+
+/**
+ * @addtogroup audio_device_api Audio Device API
+ * @{
+
+PJMEDIA Audio Device API is a cross-platform audio API appropriate for use with
+VoIP applications and many other types of audio streaming applications. 
+
+The API abstracts many different audio API's on various platforms, such as:
+ - PortAudio back-end for Win32, Windows Mobile, Linux, Unix, dan MacOS X.
+ - native WMME audio for Win32 and Windows Mobile devices
+ - native Symbian audio streaming/multimedia framework (MMF) implementation
+ - native Nokia Audio Proxy Server (APS) implementation
+ - null-audio implementation
+ - and more to be implemented in the future
+
+The Audio Device API/library is an evolution from PJMEDIA @ref PJMED_SND and 
+contains many enhancements:
+
+ - Forward compatibility:
+\n
+   The new API has been designed to be extensible, it will support new API's as 
+   well as new features that may be introduced in the future without breaking 
+   compatibility with applications that use this API as well as compatibility 
+   with existing device implementations. 
+
+ - Device capabilities:
+\n
+   At the heart of the API is device capabilities management, where all possible
+   audio capabilities of audio devices should be able to be handled in a generic
+   manner. With this framework, new capabilities that may be discovered in the 
+   future can be handled in manner without breaking existing applications. 
+
+ - Built-in features:
+\n
+   The device capabilities framework enables applications to use and control 
+   audio features built-in in the device, such as:
+    - echo cancellation, 
+    - built-in codecs, 
+    - audio routing (e.g. to earpiece or loudspeaker),
+    - volume control,
+    - etc.
+
+ - Codec support:
+\n
+   Some audio devices such as Nokia/Symbian Audio Proxy Server (APS) and Nokia 
+   VoIP Audio Services (VAS) support built-in hardware audio codecs (e.g. G.729,
+   iLBC, and AMR), and application can use the sound device in encoded mode to
+   make use of these hardware codecs. 
+
+ - Multiple backends:
+\n
+   The new API supports multiple audio backends (called factories or drivers in 
+   the code) to be active simultaneously, and audio backends may be added or 
+   removed during run-time. 
+
+
+@section using Overview on using the API
+
+@subsection getting_started Getting started
+
+ -# <b>Configure the application's project settings</b>.\n
+    Add the following 
+    include:
+    \code
+    #include <pjmedia_audiodev.h>\endcode\n
+    And add <b>pjmedia-audiodev</b> library to your application link 
+    specifications.\n
+ -# <b>Compile time settings</b>.\n
+    Use the compile time settings to enable or
+    disable specific audio drivers. For more information, please see
+    \ref s1_audio_device_config.
+ -# <b>API initialization and cleaning up</b>.\n
+    Before anything else, application must initialize the API by calling:
+    \code
+    pjmedia_aud_subsys_init(pf);\endcode\n
+    And add this in the application cleanup sequence
+    \code
+    pjmedia_aud_subsys_shutdown();\endcode
+
+@subsection devices Working with devices
+
+ -# The following code prints the list of audio devices detected
+    in the system.
+    \code
+    int dev_count;
+    pjmedia_aud_dev_index dev_idx;
+    pj_status_t status;
+
+    dev_count = pjmedia_aud_dev_count();
+    printf("Got %d audio devices\n", dev_count);
+
+    for (dev_idx=0; dev_idx<dev_count; ++i) {
+	pjmedia_aud_dev_info info;
+
+	status = pjmedia_aud_dev_get_info(dev_idx, &info);
+	printf("%d. %s (in=%d, out=%d)\n",
+	       dev_idx, info.name, 
+	       info.input_count, info.output_count);
+    }
+    \endcode\n
+ -# Info: The #PJMEDIA_AUD_DEFAULT_CAPTURE_DEV and #PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV
+    constants are used to denote default capture and playback devices
+    respectively.
+ -# Info: You may save the device and driver's name in your application
+    setting, for example to specify the prefered devices to be
+    used by your application. You can then retrieve the device index
+    for the device by calling:
+    \code
+	const char *drv_name = "WMME";
+	const char *dev_name = "Wave mapper";
+	pjmedia_aud_dev_index dev_idx;
+
+        status = pjmedia_aud_dev_lookup(drv_name, dev_name, &dev_idx);
+	if (status==PJ_SUCCESS)
+	    printf("Device index is %d\n", dev_idx);
+    \endcode
+
+@subsection caps Device capabilities
+
+Capabilities are encoded as #pjmedia_aud_dev_cap enumeration. Please see
+#pjmedia_aud_dev_cap enumeration for more information.
+
+ -# The following snippet prints the capabilities supported by the device:
+    \code
+    pjmedia_aud_dev_info info;
+    pj_status_t status;
+
+    status = pjmedia_aud_dev_get_info(PJMEDIA_AUD_DEFAULT_CAPTURE_DEV, &info);
+    if (status == PJ_SUCCESS) {
+	unsigned i;
+	// Enumerate capability bits
+	printf("Device capabilities: ");
+	for (i=0; i<32; ++i) {
+	    if (info.caps & (1 << i))
+		printf("%s ", pjmedia_aud_dev_cap_name(1 << i, NULL));
+	}
+    }
+    \endcode\n
+ -# Info: You can set the device settings when opening audio stream by setting
+    the flags and the appropriate setting in #pjmedia_aud_param when calling
+    #pjmedia_aud_stream_create()\n
+ -# Info: Once the audio stream is running, you can retrieve or change the stream 
+    setting by specifying the capability in #pjmedia_aud_stream_get_cap()
+    and #pjmedia_aud_stream_set_cap() respectively.
+
+
+@subsection creating_stream Creating audio streams
+
+The audio stream enables audio streaming to capture device, playback device,
+or both.
+
+ -# It is recommended to initialize the #pjmedia_aud_param with its default
+    values before using it:
+    \code
+    pjmedia_aud_param param;
+    pjmedia_aud_dev_index dev_idx;
+    pj_status_t status;
+
+    dev_idx = PJMEDIA_AUD_DEFAULT_CAPTURE_DEV;
+    status = pjmedia_aud_dev_default_param(dev_idx, &param);
+    \endcode\n
+ -# Configure the mandatory parameters:
+    \code
+    param.dir = PJMEDIA_DIR_CAPTURE_PLAYBACK;
+    param.rec_id = PJMEDIA_AUD_DEFAULT_CAPTURE_DEV;
+    param.play_id = PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV;
+    param.clock_rate = 8000;
+    param.channel_count = 1;
+    param.samples_per_frame = 160;
+    param.bits_per_sample = 16;
+    \endcode\n
+ -# If you want the audio stream to use the device's built-in codec, specify
+    the codec in the #pjmedia_aud_param. You must make sure that the codec
+    is supported by the device, by looking at its supported format list in
+    the #pjmedia_aud_dev_info.\n
+    The snippet below sets the audio stream to use G.711 ULAW encoding:
+    \code
+    unsigned i;
+
+    // Make sure Ulaw is supported
+    if ((info.caps & PJMEDIA_AUD_DEV_CAP_EXT_FORMAT) == 0)
+	error("Device does not support extended formats");
+    for (i = 0; i < info.ext_fmt_cnt; ++i) {
+	if (info.ext_fmt[i].id == PJMEDIA_FORMAT_ULAW)
+	    break;
+    }
+    if (i == info.ext_fmt_cnt)
+	error("Device does not support Ulaw format");
+
+    // Set Ulaw format
+    param.flags |= PJMEDIA_AUD_DEV_CAP_EXT_FORMAT;
+    param.ext_fmt.id = PJMEDIA_FORMAT_ULAW;
+    param.ext_fmt.bitrate = 64000;
+    param.ext_fmt.vad = PJ_FALSE;
+    \endcode\n
+ -# Note that if non-PCM format is configured on the audio stream, the
+    capture and/or playback functions (#pjmedia_aud_rec_cb and 
+    #pjmedia_aud_play_cb respectively) will report the audio frame as
+    #pjmedia_frame_ext structure instead of the #pjmedia_frame.
+ -# Optionally configure other device's capabilities. The following snippet
+    shows how to enable echo cancellation on the device (note that this
+    snippet may not be necessary since the setting may have been enabled 
+    when calling #pjmedia_aud_dev_default_param() above):
+    \code
+    if (info.caps & PJMEDIA_AUD_DEV_CAP_EC) {
+	param.flags |= PJMEDIA_AUD_DEV_CAP_EC;
+	param.ec_enabled = PJ_TRUE;
+    }
+    \endcode
+ -# Open the audio stream, specifying the capture and/or playback callback
+    functions:
+    \code
+       pjmedia_aud_stream *stream;
+
+       status = pjmedia_aud_stream_create(&param, &rec_cb, &play_cb, 
+                                          user_data, &stream);
+    \endcode
+
+@subsection working_with_stream Working with audio streams
+
+ -# To start the audio stream:
+    \code
+	status = pjmedia_aud_stream_start(stream);
+    \endcode\n
+    To stop the stream:
+    \code
+	status = pjmedia_aud_stream_stop(stream);
+    \endcode\n
+    And to destroy the stream:
+    \code
+	status = pjmedia_aud_stream_destroy(stream);
+    \endcode\n
+ -# Info: The following shows how to retrieve the capability value of the
+    stream (in this case, the current output volume setting).
+    \code
+    // Volume setting is an unsigned integer showing the level in percent.
+    unsigned vol;
+    status = pjmedia_aud_stream_get_cap(stream, 
+					PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
+					&vol);
+    \endcode
+ -# Info: And following shows how to modify the capability value of the
+    stream (in this case, the current output volume setting).
+    \code
+    // Volume setting is an unsigned integer showing the level in percent.
+    unsigned vol = 50;
+    status = pjmedia_aud_stream_set_cap(stream, 
+					PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
+					&vol);
+    \endcode
+
+
+*/
+
+
+/**
+ * @}
+ */
+
diff --git a/jni/pjproject-android/.svn/pristine/9d/9d4261e0ff7346f86dc81b2b2aab8b3161370a39.svn-base b/jni/pjproject-android/.svn/pristine/9d/9d4261e0ff7346f86dc81b2b2aab8b3161370a39.svn-base
new file mode 100644
index 0000000..91a066d
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/9d/9d4261e0ff7346f86dc81b2b2aab8b3161370a39.svn-base
@@ -0,0 +1,116 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#include <pjsip-simple/errno.h>
+#include <pj/string.h>
+
+/* PJSIP-SIMPLE's own error codes/messages 
+ * MUST KEEP THIS ARRAY SORTED!!
+ * Message must be limited to 64 chars!
+ */
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
+static const struct 
+{
+    int code;
+    const char *msg;
+} err_str[] = 
+{
+    /* Event errors */
+    { PJSIP_SIMPLE_ENOPKG,	    "No SIP event package with the specified name" },
+    { PJSIP_SIMPLE_EPKGEXISTS,	    "SIP event package already exist" },
+
+    /* Presence errors */
+    { PJSIP_SIMPLE_ENOTSUBSCRIBE,   "Expecting SUBSCRIBE request" },
+    { PJSIP_SIMPLE_ENOPRESENCE,	    "No presence associated with the subscription" },
+    { PJSIP_SIMPLE_ENOPRESENCEINFO, "No presence info in the server subscription" },
+    { PJSIP_SIMPLE_EBADCONTENT,	    "Bad Content-Type for presence" },
+    { PJSIP_SIMPLE_EBADPIDF,	    "Bad PIDF content for presence" },
+    { PJSIP_SIMPLE_EBADXPIDF,	    "Bad XPIDF content for presence" },
+    { PJSIP_SIMPLE_EBADRPID,	    "Invalid or bad RPID document"},
+
+    /* isComposing errors. */
+    { PJSIP_SIMPLE_EBADISCOMPOSE,   "Bad isComposing indication/XML message" },
+};
+
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+/*
+ * pjsipsimple_strerror()
+ */
+PJ_DEF(pj_str_t) pjsipsimple_strerror( pj_status_t statcode, 
+				       char *buf, pj_size_t bufsize )
+{
+    pj_str_t errstr;
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
+    if (statcode >= PJSIP_SIMPLE_ERRNO_START && 
+	statcode < PJSIP_SIMPLE_ERRNO_START + PJ_ERRNO_SPACE_SIZE)
+    {
+	/* Find the error in the table.
+	 * Use binary search!
+	 */
+	int first = 0;
+	int n = PJ_ARRAY_SIZE(err_str);
+
+	while (n > 0) {
+	    int half = n/2;
+	    int mid = first + half;
+
+	    if (err_str[mid].code < statcode) {
+		first = mid+1;
+		n -= (half+1);
+	    } else if (err_str[mid].code > statcode) {
+		n = half;
+	    } else {
+		first = mid;
+		break;
+	    }
+	}
+
+
+	if (PJ_ARRAY_SIZE(err_str) && err_str[first].code == statcode) {
+	    pj_str_t msg;
+	    
+	    msg.ptr = (char*)err_str[first].msg;
+	    msg.slen = pj_ansi_strlen(err_str[first].msg);
+
+	    errstr.ptr = buf;
+	    pj_strncpy_with_null(&errstr, &msg, bufsize);
+	    return errstr;
+
+	} 
+    }
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+    /* Error not found. */
+    errstr.ptr = buf;
+    errstr.slen = pj_ansi_snprintf(buf, bufsize, 
+				   "Unknown pjsip-simple error %d",
+ 				   statcode);
+
+    return errstr;
+}
+
diff --git a/jni/pjproject-android/.svn/pristine/9d/9d4de14ab9fb0facae2f48780b874848cbf2f895.svn-base b/jni/pjproject-android/.svn/pristine/9d/9d4de14ab9fb0facae2f48780b874848cbf2f895.svn-base
new file mode 100644
index 0000000..e9de238
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/9d/9d4de14ab9fb0facae2f48780b874848cbf2f895.svn-base
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	true
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=mkdir
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f $src -o -d $src ]
+	then
+		true
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		true
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		true
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='	
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		true
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		true
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/jni/pjproject-android/.svn/pristine/9d/9d9e610bfe87da471e93d225269bb2ae400700f8.svn-base b/jni/pjproject-android/.svn/pristine/9d/9d9e610bfe87da471e93d225269bb2ae400700f8.svn-base
new file mode 100644
index 0000000..83238b4
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/9d/9d9e610bfe87da471e93d225269bb2ae400700f8.svn-base
Binary files differ
diff --git a/jni/pjproject-android/.svn/pristine/9d/9da5972490b164e1b1bbaede6cbd9a8dac321e16.svn-base b/jni/pjproject-android/.svn/pristine/9d/9da5972490b164e1b1bbaede6cbd9a8dac321e16.svn-base
new file mode 100644
index 0000000..ee0eead
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/9d/9da5972490b164e1b1bbaede6cbd9a8dac321e16.svn-base
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lint>
+</lint>
\ No newline at end of file
diff --git a/jni/pjproject-android/.svn/pristine/9d/9db09c8c466c80d9569deb7379732f47eaebe51b.svn-base b/jni/pjproject-android/.svn/pristine/9d/9db09c8c466c80d9569deb7379732f47eaebe51b.svn-base
new file mode 100644
index 0000000..3423bf2
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/9d/9db09c8c466c80d9569deb7379732f47eaebe51b.svn-base
@@ -0,0 +1,426 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#include <pjmedia/clock.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/lock.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/compat/high_precision.h>
+
+/* API: Init clock source */
+PJ_DEF(pj_status_t) pjmedia_clock_src_init( pjmedia_clock_src *clocksrc,
+                                            pjmedia_type media_type,
+                                            unsigned clock_rate,
+                                            unsigned ptime_usec )
+{
+    PJ_ASSERT_RETURN(clocksrc, PJ_EINVAL);
+
+    clocksrc->media_type = media_type;
+    clocksrc->clock_rate = clock_rate;
+    clocksrc->ptime_usec = ptime_usec;
+    pj_set_timestamp32(&clocksrc->timestamp, 0, 0);
+    pj_get_timestamp(&clocksrc->last_update);
+
+    return PJ_SUCCESS;
+}
+
+/* API: Update clock source */
+PJ_DECL(pj_status_t) pjmedia_clock_src_update( pjmedia_clock_src *clocksrc,
+                                               const pj_timestamp *timestamp )
+{
+    PJ_ASSERT_RETURN(clocksrc, PJ_EINVAL);
+
+    if (timestamp)
+        pj_memcpy(&clocksrc->timestamp, timestamp, sizeof(pj_timestamp));
+    pj_get_timestamp(&clocksrc->last_update);
+
+    return PJ_SUCCESS;
+}
+
+/* API: Get clock source's current timestamp */
+PJ_DEF(pj_status_t)
+pjmedia_clock_src_get_current_timestamp( const pjmedia_clock_src *clocksrc,
+                                         pj_timestamp *timestamp)
+{
+    pj_timestamp now;
+    unsigned elapsed_ms;
+    
+    PJ_ASSERT_RETURN(clocksrc && timestamp, PJ_EINVAL);
+
+    pj_get_timestamp(&now);
+    elapsed_ms = pj_elapsed_msec(&clocksrc->last_update, &now);
+    pj_memcpy(timestamp, &clocksrc->timestamp, sizeof(pj_timestamp));
+    pj_add_timestamp32(timestamp, elapsed_ms * clocksrc->clock_rate / 1000);
+
+    return PJ_SUCCESS;
+}
+
+/* API: Get clock source's time (in ms) */
+PJ_DEF(pj_uint32_t)
+pjmedia_clock_src_get_time_msec( const pjmedia_clock_src *clocksrc )
+{
+    pj_timestamp ts;
+
+    pjmedia_clock_src_get_current_timestamp(clocksrc, &ts);
+
+#if PJ_HAS_INT64
+    if (ts.u64 > PJ_UINT64(0x3FFFFFFFFFFFFF))
+        return (pj_uint32_t)(ts.u64 / clocksrc->clock_rate * 1000);
+    else
+        return (pj_uint32_t)(ts.u64 * 1000 / clocksrc->clock_rate);
+#elif PJ_HAS_FLOATING_POINT
+    return (pj_uint32_t)((1.0 * ts.u32.hi * 0xFFFFFFFFUL + ts.u32.lo)
+                         * 1000.0 / clocksrc->clock_rate);
+#else
+    if (ts.u32.lo > 0x3FFFFFUL)
+        return (pj_uint32_t)(0xFFFFFFFFUL / clocksrc->clock_rate * ts.u32.hi 
+                             * 1000UL + ts.u32.lo / clocksrc->clock_rate *
+                             1000UL);
+    else
+        return (pj_uint32_t)(0xFFFFFFFFUL / clocksrc->clock_rate * ts.u32.hi 
+                             * 1000UL + ts.u32.lo * 1000UL /
+                             clocksrc->clock_rate);
+#endif
+}
+
+
+/*
+ * Implementation of media clock with OS thread.
+ */
+
+struct pjmedia_clock
+{
+    pj_pool_t		    *pool;
+    pj_timestamp	     freq;
+    pj_timestamp	     interval;
+    pj_timestamp	     next_tick;
+    pj_timestamp	     timestamp;
+    unsigned		     timestamp_inc;
+    unsigned		     options;
+    pj_uint64_t		     max_jump;
+    pjmedia_clock_callback  *cb;
+    void		    *user_data;
+    pj_thread_t		    *thread;
+    pj_bool_t		     running;
+    pj_bool_t		     quitting;
+    pj_lock_t		    *lock;
+};
+
+
+static int clock_thread(void *arg);
+
+#define MAX_JUMP_MSEC	500
+#define USEC_IN_SEC	(pj_uint64_t)1000000
+
+/*
+ * Create media clock.
+ */
+PJ_DEF(pj_status_t) pjmedia_clock_create( pj_pool_t *pool,
+					  unsigned clock_rate,
+					  unsigned channel_count,
+					  unsigned samples_per_frame,
+					  unsigned options,
+					  pjmedia_clock_callback *cb,
+					  void *user_data,
+					  pjmedia_clock **p_clock)
+{
+    pjmedia_clock_param param;
+
+    param.usec_interval = (unsigned)(samples_per_frame * USEC_IN_SEC /
+			             channel_count / clock_rate);
+    param.clock_rate = clock_rate;
+    return pjmedia_clock_create2(pool, &param, options, cb,
+                                 user_data, p_clock);
+}
+
+PJ_DEF(pj_status_t) pjmedia_clock_create2(pj_pool_t *pool,
+                                          const pjmedia_clock_param *param,
+				          unsigned options,
+				          pjmedia_clock_callback *cb,
+				          void *user_data,
+				          pjmedia_clock **p_clock)
+{
+    pjmedia_clock *clock;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pool && param->usec_interval && param->clock_rate &&
+                     p_clock, PJ_EINVAL);
+
+    clock = PJ_POOL_ALLOC_T(pool, pjmedia_clock);
+    clock->pool = pj_pool_create(pool->factory, "clock%p", 512, 512, NULL);
+
+    status = pj_get_timestamp_freq(&clock->freq);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    clock->interval.u64 = param->usec_interval * clock->freq.u64 /
+                          USEC_IN_SEC;
+    clock->next_tick.u64 = 0;
+    clock->timestamp.u64 = 0;
+    clock->max_jump = MAX_JUMP_MSEC * clock->freq.u64 / 1000;
+    clock->timestamp_inc = (unsigned)(param->usec_interval *
+                                      param->clock_rate /
+				      USEC_IN_SEC);
+    clock->options = options;
+    clock->cb = cb;
+    clock->user_data = user_data;
+    clock->thread = NULL;
+    clock->running = PJ_FALSE;
+    clock->quitting = PJ_FALSE;
+    
+    /* I don't think we need a mutex, so we'll use null. */
+    status = pj_lock_create_null_mutex(pool, "clock", &clock->lock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    *p_clock = clock;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Start the clock. 
+ */
+PJ_DEF(pj_status_t) pjmedia_clock_start(pjmedia_clock *clock)
+{
+    pj_timestamp now;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(clock != NULL, PJ_EINVAL);
+
+    if (clock->running)
+	return PJ_SUCCESS;
+
+    status = pj_get_timestamp(&now);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    clock->next_tick.u64 = now.u64 + clock->interval.u64;
+    clock->running = PJ_TRUE;
+    clock->quitting = PJ_FALSE;
+
+    if ((clock->options & PJMEDIA_CLOCK_NO_ASYNC) == 0 && !clock->thread) {
+	status = pj_thread_create(clock->pool, "clock", &clock_thread, clock,
+				  0, 0, &clock->thread);
+	if (status != PJ_SUCCESS) {
+	    clock->running = PJ_FALSE;
+	    return status;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Stop the clock. 
+ */
+PJ_DEF(pj_status_t) pjmedia_clock_stop(pjmedia_clock *clock)
+{
+    PJ_ASSERT_RETURN(clock != NULL, PJ_EINVAL);
+
+    clock->running = PJ_FALSE;
+    clock->quitting = PJ_TRUE;
+
+    if (clock->thread) {
+	if (pj_thread_join(clock->thread) == PJ_SUCCESS) {
+	    pj_thread_destroy(clock->thread);
+	    clock->thread = NULL;
+	    pj_pool_reset(clock->pool);
+	} else {
+	    clock->quitting = PJ_FALSE;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Update the clock. 
+ */
+PJ_DEF(pj_status_t) pjmedia_clock_modify(pjmedia_clock *clock,
+                                         const pjmedia_clock_param *param)
+{
+    clock->interval.u64 = param->usec_interval * clock->freq.u64 /
+                          USEC_IN_SEC;
+    clock->timestamp_inc = (unsigned)(param->usec_interval *
+                                      param->clock_rate /
+				      USEC_IN_SEC);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Calculate next tick */
+PJ_INLINE(void) clock_calc_next_tick(pjmedia_clock *clock,
+				     pj_timestamp *now)
+{
+    if (clock->next_tick.u64+clock->max_jump < now->u64) {
+	/* Timestamp has made large jump, adjust next_tick */
+	clock->next_tick.u64 = now->u64;
+    }
+    clock->next_tick.u64 += clock->interval.u64;
+
+}
+
+/*
+ * Poll the clock. 
+ */
+PJ_DEF(pj_bool_t) pjmedia_clock_wait( pjmedia_clock *clock,
+				      pj_bool_t wait,
+				      pj_timestamp *ts)
+{
+    pj_timestamp now;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(clock != NULL, PJ_FALSE);
+    PJ_ASSERT_RETURN((clock->options & PJMEDIA_CLOCK_NO_ASYNC) != 0,
+		     PJ_FALSE);
+    PJ_ASSERT_RETURN(clock->running, PJ_FALSE);
+
+    status = pj_get_timestamp(&now);
+    if (status != PJ_SUCCESS)
+	return PJ_FALSE;
+
+    /* Wait for the next tick to happen */
+    if (now.u64 < clock->next_tick.u64) {
+	unsigned msec;
+
+	if (!wait)
+	    return PJ_FALSE;
+
+	msec = pj_elapsed_msec(&now, &clock->next_tick);
+	pj_thread_sleep(msec);
+    }
+
+    /* Call callback, if any */
+    if (clock->cb)
+	(*clock->cb)(&clock->timestamp, clock->user_data);
+
+    /* Report timestamp to caller */
+    if (ts)
+	ts->u64 = clock->timestamp.u64;
+
+    /* Increment timestamp */
+    clock->timestamp.u64 += clock->timestamp_inc;
+
+    /* Calculate next tick */
+    clock_calc_next_tick(clock, &now);
+
+    /* Done */
+    return PJ_TRUE;
+}
+
+
+/*
+ * Clock thread
+ */
+static int clock_thread(void *arg)
+{
+    pj_timestamp now;
+    pjmedia_clock *clock = (pjmedia_clock*) arg;
+
+    /* Set thread priority to maximum unless not wanted. */
+    if ((clock->options & PJMEDIA_CLOCK_NO_HIGHEST_PRIO) == 0) {
+	int max = pj_thread_get_prio_max(pj_thread_this());
+	if (max > 0)
+	    pj_thread_set_prio(pj_thread_this(), max);
+    }
+
+    /* Get the first tick */
+    pj_get_timestamp(&clock->next_tick);
+    clock->next_tick.u64 += clock->interval.u64;
+
+
+    while (!clock->quitting) {
+
+	pj_get_timestamp(&now);
+
+	/* Wait for the next tick to happen */
+	if (now.u64 < clock->next_tick.u64) {
+	    unsigned msec;
+	    msec = pj_elapsed_msec(&now, &clock->next_tick);
+	    pj_thread_sleep(msec);
+	}
+
+	/* Skip if not running */
+	if (!clock->running) {
+	    /* Calculate next tick */
+	    clock_calc_next_tick(clock, &now);
+	    continue;
+	}
+
+	pj_lock_acquire(clock->lock);
+
+	/* Call callback, if any */
+	if (clock->cb)
+	    (*clock->cb)(&clock->timestamp, clock->user_data);
+
+	/* Best effort way to detect if we've been destroyed in the callback */
+	if (clock->quitting)
+	    break;
+
+	/* Increment timestamp */
+	clock->timestamp.u64 += clock->timestamp_inc;
+
+	/* Calculate next tick */
+	clock_calc_next_tick(clock, &now);
+
+	pj_lock_release(clock->lock);
+    }
+
+    return 0;
+}
+
+
+/*
+ * Destroy the clock. 
+ */
+PJ_DEF(pj_status_t) pjmedia_clock_destroy(pjmedia_clock *clock)
+{
+    PJ_ASSERT_RETURN(clock != NULL, PJ_EINVAL);
+
+    clock->running = PJ_FALSE;
+    clock->quitting = PJ_TRUE;
+
+    if (clock->thread) {
+	pj_thread_join(clock->thread);
+	pj_thread_destroy(clock->thread);
+	clock->thread = NULL;
+    }
+
+    if (clock->lock) {
+	pj_lock_destroy(clock->lock);
+	clock->lock = NULL;
+    }
+
+    if (clock->pool) {
+	pj_pool_t *pool = clock->pool;
+	clock->pool = NULL;
+	pj_pool_release(pool);
+    }
+    return PJ_SUCCESS;
+}
+
+
diff --git a/jni/pjproject-android/.svn/pristine/9d/9db3fa2fb072e1c7959d87b3ed282391982e0ed4.svn-base b/jni/pjproject-android/.svn/pristine/9d/9db3fa2fb072e1c7959d87b3ed282391982e0ed4.svn-base
new file mode 100644
index 0000000..816a97f
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/9d/9db3fa2fb072e1c7959d87b3ed282391982e0ed4.svn-base
@@ -0,0 +1,12 @@
+export OS_CFLAGS   := $(CC_DEF)PJ_WIN32=1
+
+export OS_CXXFLAGS := 
+
+export OS_LDFLAGS  := $(CC_LIB)wsock32$(LIBEXT2) \
+		      $(CC_LIB)ws2_32$(LIBEXT2)\
+		      $(CC_LIB)ole32$(LIBEXT2)\
+		      $(CC_LIB)m$(LIBEXT2)
+
+export OS_SOURCES  := 
+
+
diff --git a/jni/pjproject-android/.svn/pristine/9d/9dce885103c912bc06333b52f87a9d34ec15ee2b.svn-base b/jni/pjproject-android/.svn/pristine/9d/9dce885103c912bc06333b52f87a9d34ec15ee2b.svn-base
new file mode 100644
index 0000000..f7f7365
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/9d/9dce885103c912bc06333b52f87a9d34ec15ee2b.svn-base
@@ -0,0 +1,856 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+
+#include "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+
+#define THIS_FILE   "txdata_test.c"
+
+
+#define HFIND(msg,h,H) ((pjsip_##h##_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_##H, NULL))
+
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+#   define LOOP	    10000
+#else
+#   define LOOP	    100000
+#endif
+
+
+/*
+ * This tests various core message creation functions. 
+ */
+static int core_txdata_test(void)
+{
+    pj_status_t status;
+    pj_str_t target, from, to, contact, body;
+    pjsip_rx_data dummy_rdata;
+    pjsip_tx_data *invite, *invite2, *cancel, *response, *ack;
+
+    PJ_LOG(3,(THIS_FILE, "   core transmit data test"));
+
+    /* Create INVITE request. */
+    target = pj_str("tel:+1");
+    from = pj_str("tel:+0");
+    to = pj_str("tel:+1");
+    contact = pj_str("Bob <sip:+0@example.com;user=phone>");
+    body = pj_str("Hello world!");
+
+    status = pjsip_endpt_create_request( endpt, &pjsip_invite_method, &target,
+					 &from, &to, &contact, NULL, 10, &body,
+					 &invite);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: unable to create request", status);
+	return -10;
+    }
+
+    /* Buffer must be invalid. */
+    if (pjsip_tx_data_is_valid(invite) != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: buffer must be invalid"));
+	return -14;
+    }
+    /* Reference counter must be set to 1. */
+    if (pj_atomic_get(invite->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: invalid reference counter"));
+	return -15;
+    }
+    /* Check message type. */
+    if (invite->msg->type != PJSIP_REQUEST_MSG)
+	return -16;
+    /* Check method. */
+    if (invite->msg->line.req.method.id != PJSIP_INVITE_METHOD)
+	return -17;
+
+    /* Check that mandatory headers are present. */
+    if (HFIND(invite->msg, from, FROM) == 0)
+	return -20;
+    if (HFIND(invite->msg, to, TO) == 0)
+	return -21;
+    if (HFIND(invite->msg, contact, CONTACT) == 0)
+	return -22;
+    if (HFIND(invite->msg, cid, CALL_ID) == 0)
+	return -23;
+    if (HFIND(invite->msg, cseq, CSEQ) == 0)
+	return -24;
+    do {
+	pjsip_via_hdr *via = HFIND(invite->msg, via, VIA);
+	if (via == NULL)
+	    return -25;
+	/* Branch param must be empty. */
+	if (via->branch_param.slen != 0)
+	    return -26;
+    } while (0);
+    if (invite->msg->body == NULL)
+	return -28;
+
+    /* Create another INVITE request from first request. */
+    status = pjsip_endpt_create_request_from_hdr( endpt, &pjsip_invite_method,
+						  invite->msg->line.req.uri,
+						  HFIND(invite->msg,from,FROM),
+						  HFIND(invite->msg,to,TO),
+						  HFIND(invite->msg,contact,CONTACT),
+						  HFIND(invite->msg,cid,CALL_ID),
+						  10, &body, &invite2);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: create second request failed", status);
+	return -30;
+    }
+    
+    /* Buffer must be invalid. */
+    if (pjsip_tx_data_is_valid(invite2) != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: buffer must be invalid"));
+	return -34;
+    }
+    /* Reference counter must be set to 1. */
+    if (pj_atomic_get(invite2->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: invalid reference counter"));
+	return -35;
+    }
+    /* Check message type. */
+    if (invite2->msg->type != PJSIP_REQUEST_MSG)
+	return -36;
+    /* Check method. */
+    if (invite2->msg->line.req.method.id != PJSIP_INVITE_METHOD)
+	return -37;
+
+    /* Check that mandatory headers are again present. */
+    if (HFIND(invite2->msg, from, FROM) == 0)
+	return -40;
+    if (HFIND(invite2->msg, to, TO) == 0)
+	return -41;
+    if (HFIND(invite2->msg, contact, CONTACT) == 0)
+	return -42;
+    if (HFIND(invite2->msg, cid, CALL_ID) == 0)
+	return -43;
+    if (HFIND(invite2->msg, cseq, CSEQ) == 0)
+	return -44;
+    if (HFIND(invite2->msg, via, VIA) == 0)
+	return -45;
+    /*
+    if (HFIND(invite2->msg, ctype, CONTENT_TYPE) == 0)
+	return -46;
+    if (HFIND(invite2->msg, clen, CONTENT_LENGTH) == 0)
+	return -47;
+    */
+    if (invite2->msg->body == NULL)
+	return -48;
+
+    /* Done checking invite2. We can delete this. */
+    if (pjsip_tx_data_dec_ref(invite2) != PJSIP_EBUFDESTROYED) {
+	PJ_LOG(3,(THIS_FILE, "   error: request buffer not destroyed!"));
+	return -49;
+    }
+
+    /* Initialize dummy rdata (to simulate receiving a request) 
+     * We should never do this in real application, as there are many
+     * many more fields need to be initialized!!
+     */
+    dummy_rdata.msg_info.cid = HFIND(invite->msg, cid, CALL_ID);
+    dummy_rdata.msg_info.clen = NULL;
+    dummy_rdata.msg_info.cseq = HFIND(invite->msg, cseq, CSEQ);
+    dummy_rdata.msg_info.ctype = NULL;
+    dummy_rdata.msg_info.from = HFIND(invite->msg, from, FROM);
+    dummy_rdata.msg_info.max_fwd = NULL;
+    dummy_rdata.msg_info.msg = invite->msg;
+    dummy_rdata.msg_info.record_route = NULL;
+    dummy_rdata.msg_info.require = NULL;
+    dummy_rdata.msg_info.route = NULL;
+    dummy_rdata.msg_info.to = HFIND(invite->msg, to, TO);
+    dummy_rdata.msg_info.via = HFIND(invite->msg, via, VIA);
+
+    /* Create a response message for the request. */
+    status = pjsip_endpt_create_response( endpt, &dummy_rdata, 301, NULL, 
+					  &response);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: unable to create response", status);
+	return -50;
+    }
+    
+    /* Buffer must be invalid. */
+    if (pjsip_tx_data_is_valid(response) != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: buffer must be invalid"));
+	return -54;
+    }
+    /* Check reference counter. */
+    if (pj_atomic_get(response->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: invalid ref count in response"));
+	return -55;
+    }
+    /* Check message type. */
+    if (response->msg->type != PJSIP_RESPONSE_MSG)
+	return -56;
+    /* Check correct status is set. */
+    if (response->msg->line.status.code != 301)
+	return -57;
+
+    /* Check that mandatory headers are again present. */
+    if (HFIND(response->msg, from, FROM) == 0)
+	return -60;
+    if (HFIND(response->msg, to, TO) == 0)
+	return -61;
+    /*
+    if (HFIND(response->msg, contact, CONTACT) == 0)
+	return -62;
+     */
+    if (HFIND(response->msg, cid, CALL_ID) == 0)
+	return -63;
+    if (HFIND(response->msg, cseq, CSEQ) == 0)
+	return -64;
+    if (HFIND(response->msg, via, VIA) == 0)
+	return -65;
+
+    /* This response message will be used later when creating ACK */
+
+    /* Create CANCEL request for the original request. */
+    status = pjsip_endpt_create_cancel( endpt, invite, &cancel);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: unable to create CANCEL request", status);
+	return -80;
+    }
+
+    /* Buffer must be invalid. */
+    if (pjsip_tx_data_is_valid(cancel) != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: buffer must be invalid"));
+	return -84;
+    }
+    /* Check reference counter. */
+    if (pj_atomic_get(cancel->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: invalid ref count in CANCEL request"));
+	return -85;
+    }
+    /* Check message type. */
+    if (cancel->msg->type != PJSIP_REQUEST_MSG)
+	return -86;
+    /* Check method. */
+    if (cancel->msg->line.req.method.id != PJSIP_CANCEL_METHOD)
+	return -87;
+
+    /* Check that mandatory headers are again present. */
+    if (HFIND(cancel->msg, from, FROM) == 0)
+	return -90;
+    if (HFIND(cancel->msg, to, TO) == 0)
+	return -91;
+    /*
+    if (HFIND(cancel->msg, contact, CONTACT) == 0)
+	return -92;
+    */
+    if (HFIND(cancel->msg, cid, CALL_ID) == 0)
+	return -93;
+    if (HFIND(cancel->msg, cseq, CSEQ) == 0)
+	return -94;
+    if (HFIND(cancel->msg, via, VIA) == 0)
+	return -95;
+
+    /* Done checking CANCEL request. */
+    if (pjsip_tx_data_dec_ref(cancel) != PJSIP_EBUFDESTROYED) {
+	PJ_LOG(3,(THIS_FILE, "   error: response buffer not destroyed!"));
+	return -99;
+    }
+
+    /* Modify dummy_rdata to simulate receiving response. */
+    pj_bzero(&dummy_rdata, sizeof(dummy_rdata));
+    dummy_rdata.msg_info.msg = response->msg;
+    dummy_rdata.msg_info.to = HFIND(response->msg, to, TO);
+
+    /* Create ACK request */
+    status = pjsip_endpt_create_ack( endpt, invite, &dummy_rdata, &ack );
+    if (status != PJ_SUCCESS) {
+	PJ_LOG(3,(THIS_FILE, "   error: unable to create ACK"));
+	return -100;
+    }
+    /* Buffer must be invalid. */
+    if (pjsip_tx_data_is_valid(ack) != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: buffer must be invalid"));
+	return -104;
+    }
+    /* Check reference counter. */
+    if (pj_atomic_get(ack->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: invalid ref count in ACK request"));
+	return -105;
+    }
+    /* Check message type. */
+    if (ack->msg->type != PJSIP_REQUEST_MSG)
+	return -106;
+    /* Check method. */
+    if (ack->msg->line.req.method.id != PJSIP_ACK_METHOD)
+	return -107;
+    /* Check Request-URI is present. */
+    if (ack->msg->line.req.uri == NULL)
+	return -108;
+
+    /* Check that mandatory headers are again present. */
+    if (HFIND(ack->msg, from, FROM) == 0)
+	return -110;
+    if (HFIND(ack->msg, to, TO) == 0)
+	return -111;
+    if (HFIND(ack->msg, cid, CALL_ID) == 0)
+	return -112;
+    if (HFIND(ack->msg, cseq, CSEQ) == 0)
+	return -113;
+    if (HFIND(ack->msg, via, VIA) == 0)
+	return -114;
+    if (ack->msg->body != NULL)
+	return -115;
+
+    /* Done checking invite message. */
+    if (pjsip_tx_data_dec_ref(invite) != PJSIP_EBUFDESTROYED) {
+	PJ_LOG(3,(THIS_FILE, "   error: response buffer not destroyed!"));
+	return -120;
+    }
+
+    /* Done checking response message. */
+    if (pjsip_tx_data_dec_ref(response) != PJSIP_EBUFDESTROYED) {
+	PJ_LOG(3,(THIS_FILE, "   error: response buffer not destroyed!"));
+	return -130;
+    }
+
+    /* Done checking ack message. */
+    if (pjsip_tx_data_dec_ref(ack) != PJSIP_EBUFDESTROYED) {
+	PJ_LOG(3,(THIS_FILE, "   error: response buffer not destroyed!"));
+	return -140;
+    }
+
+    /* Done. */
+    return 0;
+}
+
+
+
+/* 
+ * This test demonstrate the bug as reported in:
+ *  http://bugzilla.pjproject.net/show_bug.cgi?id=49
+ */
+#if INCLUDE_GCC_TEST
+static int gcc_test()
+{
+    char msgbuf[512];
+    pj_str_t target = pj_str("sip:alice@wonderland:5061;x-param=param%201"
+			     "?X-Hdr-1=Header%201"
+			     "&X-Empty-Hdr=");
+    pjsip_tx_data *tdata;
+    pjsip_parser_err_report err_list;
+    pjsip_msg *msg;
+    int len;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, "   header param in URI to create request"));
+
+    /* Create request with header param in target URI. */
+    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method, &target,
+					&target, &target, &target, NULL, -1,
+					NULL, &tdata);
+    if (status != 0) {
+	app_perror("   error: Unable to create request", status);
+	return -200;
+    }
+
+    /* Print and parse the request.
+     * We'll check that header params are not present in
+     */
+    len = pjsip_msg_print(tdata->msg, msgbuf, sizeof(msgbuf));
+    if (len < 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: printing message"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -250;
+    }
+    msgbuf[len] = '\0';
+
+    PJ_LOG(5,(THIS_FILE, "%d bytes request created:--begin-msg--\n"
+			 "%s\n"
+			 "--end-msg--", len, msgbuf));
+
+    /* Now parse the message. */
+    pj_list_init(&err_list);
+    msg = pjsip_parse_msg( tdata->pool, msgbuf, len, &err_list);
+    if (msg == NULL) {
+	pjsip_parser_err_report *e;
+
+	PJ_LOG(3,(THIS_FILE, "   error: parsing message message"));
+
+	e = err_list.next;
+	while (e != &err_list) {
+	    PJ_LOG(3,(THIS_FILE, "     %s in line %d col %d hname=%.*s",
+				 pj_exception_id_name(e->except_code), 
+				 e->line, e->col+1,
+				 (int)e->hname.slen,
+				 e->hname.ptr));
+	    e = e->next;
+	}
+
+	pjsip_tx_data_dec_ref(tdata);
+	return -255;
+    }
+
+    pjsip_tx_data_dec_ref(tdata);
+    return 0;
+}
+#endif
+
+
+/* This tests the request creating functions against the following
+ * requirements:
+ *  - header params in URI creates header in the request.
+ *  - method and headers params are correctly shown or hidden in
+ *    request URI, From, To, and Contact header.
+ */
+static int txdata_test_uri_params(void)
+{
+    char msgbuf[512];
+    pj_str_t target = pj_str("sip:alice@wonderland:5061;x-param=param%201"
+			     "?X-Hdr-1=Header%201"
+			     "&X-Empty-Hdr=");
+    pj_str_t contact;
+    pj_str_t pname = pj_str("x-param");
+    pj_str_t hname = pj_str("X-Hdr-1");
+    pj_str_t hemptyname = pj_str("X-Empty-Hdr");
+    pjsip_from_hdr *from_hdr;
+    pjsip_to_hdr *to_hdr;
+    pjsip_contact_hdr *contact_hdr;
+    pjsip_generic_string_hdr *hdr;
+    pjsip_tx_data *tdata;
+    pjsip_sip_uri *uri;
+    pjsip_param *param;
+    pjsip_via_hdr *via;
+    pjsip_parser_err_report err_list;
+    pjsip_msg *msg;
+    pj_ssize_t len;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, "   header param in URI to create request"));
+
+    /* Due to #930, contact argument is now parsed as Contact header, so
+     * must enclose it with <> to make it be parsed as URI.
+     */
+    pj_ansi_snprintf(msgbuf, sizeof(msgbuf), "<%.*s>",
+		     (int)target.slen, target.ptr);
+    contact.ptr = msgbuf;
+    contact.slen = strlen(msgbuf);
+
+    /* Create request with header param in target URI. */
+    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method, &target,
+					&target, &target, &contact, NULL, -1,
+					NULL, &tdata);
+    if (status != 0) {
+	app_perror("   error: Unable to create request", status);
+	return -200;
+    }
+
+    /* Fill up the Via header to prevent syntax error on parsing */
+    via = (pjsip_via_hdr*) pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);
+    via->transport = pj_str("TCP");
+    via->sent_by.host = pj_str("127.0.0.1");
+
+    /* Print and parse the request.
+     * We'll check that header params are not present in
+     */
+    len = pjsip_msg_print(tdata->msg, msgbuf, sizeof(msgbuf));
+    if (len < 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: printing message"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -250;
+    }
+    msgbuf[len] = '\0';
+
+    PJ_LOG(5,(THIS_FILE, "%d bytes request created:--begin-msg--\n"
+			 "%s\n"
+			 "--end-msg--", len, msgbuf));
+
+    /* Now parse the message. */
+    pj_list_init(&err_list);
+    msg = pjsip_parse_msg( tdata->pool, msgbuf, len, &err_list);
+    if (msg == NULL) {
+	pjsip_parser_err_report *e;
+
+	PJ_LOG(3,(THIS_FILE, "   error: parsing message message"));
+
+	e = err_list.next;
+	while (e != &err_list) {
+	    PJ_LOG(3,(THIS_FILE, "     %s in line %d col %d hname=%.*s",
+				 pj_exception_id_name(e->except_code), 
+				 e->line, e->col+1,
+				 (int)e->hname.slen,
+				 e->hname.ptr));
+	    e = e->next;
+	}
+
+	pjsip_tx_data_dec_ref(tdata);
+	return -256;
+    }
+
+    /* Check the existence of port, other_param, and header param.
+     * Port is now allowed in To and From header.
+     */
+    /* Port in request URI. */
+    uri = (pjsip_sip_uri*) pjsip_uri_get_uri(msg->line.req.uri);
+    if (uri->port != 5061) {
+	PJ_LOG(3,(THIS_FILE, "   error: port not present in request URI"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -260;
+    }
+    /* other_param in request_uri */
+    param = pjsip_param_find(&uri->other_param, &pname);
+    if (param == NULL || pj_strcmp2(&param->value, "param 1") != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: x-param not present in request URI"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -261;
+    }
+    /* header param in request uri. */
+    if (!pj_list_empty(&uri->header_param)) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam in request URI"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -262;
+    }
+
+    /* Port in From header. */
+    from_hdr = (pjsip_from_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_FROM, NULL);
+    uri = (pjsip_sip_uri*) pjsip_uri_get_uri(from_hdr->uri);
+    if (uri->port != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: port most not exist in From header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -270;
+    }
+    /* other_param in From header */
+    param = pjsip_param_find(&uri->other_param, &pname);
+    if (param == NULL || pj_strcmp2(&param->value, "param 1") != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: x-param not present in From header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -271;
+    }
+    /* header param in From header. */
+    if (!pj_list_empty(&uri->header_param)) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam in From header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -272;
+    }
+
+
+    /* Port in To header. */
+    to_hdr = (pjsip_to_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_TO, NULL);
+    uri = (pjsip_sip_uri*) pjsip_uri_get_uri(to_hdr->uri);
+    if (uri->port != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: port most not exist in To header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -280;
+    }
+    /* other_param in To header */
+    param = pjsip_param_find(&uri->other_param, &pname);
+    if (param == NULL || pj_strcmp2(&param->value, "param 1") != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: x-param not present in To header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -281;
+    }
+    /* header param in From header. */
+    if (!pj_list_empty(&uri->header_param)) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam in To header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -282;
+    }
+
+
+
+    /* Port in Contact header. */
+    contact_hdr = (pjsip_contact_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_CONTACT, NULL);
+    uri = (pjsip_sip_uri*) pjsip_uri_get_uri(contact_hdr->uri);
+    if (uri->port != 5061) {
+	PJ_LOG(3,(THIS_FILE, "   error: port not present in Contact header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -290;
+    }
+    /* other_param in Contact header */
+    param = pjsip_param_find(&uri->other_param, &pname);
+    if (param == NULL || pj_strcmp2(&param->value, "param 1") != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: x-param not present in Contact header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -291;
+    }
+    /* header param in Contact header. */
+    if (pj_list_empty(&uri->header_param)) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam is missing in Contact header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -292;
+    }
+    /* Check for X-Hdr-1 */
+    param = pjsip_param_find(&uri->header_param, &hname);
+    if (param == NULL || pj_strcmp2(&param->value, "Header 1")!=0) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam is missing in Contact header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -293;
+    }
+    /* Check for X-Empty-Hdr */
+    param = pjsip_param_find(&uri->header_param, &hemptyname);
+    if (param == NULL || pj_strcmp2(&param->value, "")!=0) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam is missing in Contact header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -294;
+    }
+
+
+    /* Check that headers are present in the request. */
+    hdr = (pjsip_generic_string_hdr*) 
+	pjsip_msg_find_hdr_by_name(msg, &hname, NULL);
+    if (hdr == NULL || pj_strcmp2(&hdr->hvalue, "Header 1")!=0) {
+	PJ_LOG(3,(THIS_FILE, "   error: header X-Hdr-1 not created"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -300;
+    }
+
+    hdr = (pjsip_generic_string_hdr*) 
+	pjsip_msg_find_hdr_by_name(msg, &hemptyname, NULL);
+    if (hdr == NULL || pj_strcmp2(&param->value, "")!=0) {
+	PJ_LOG(3,(THIS_FILE, "   error: header X-Empty-Hdr not created"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -330;
+    }
+
+    pjsip_tx_data_dec_ref(tdata);
+    return 0;
+}
+
+
+/*
+ * create request benchmark
+ */
+static int create_request_bench(pj_timestamp *p_elapsed)
+{
+    enum { COUNT = 100 };
+    unsigned i, j;
+    pjsip_tx_data *tdata[COUNT];
+    pj_timestamp t1, t2, elapsed;
+    pj_status_t status;
+
+    pj_str_t str_target = pj_str("sip:someuser@someprovider.com");
+    pj_str_t str_from = pj_str("\"Local User\" <sip:localuser@serviceprovider.com>");
+    pj_str_t str_to = pj_str("\"Remote User\" <sip:remoteuser@serviceprovider.com>");
+    pj_str_t str_contact = str_from;
+
+    elapsed.u64 = 0;
+
+    for (i=0; i<LOOP; i+=COUNT) {
+	pj_bzero(tdata, sizeof(tdata));
+
+	pj_get_timestamp(&t1);
+
+	for (j=0; j<COUNT; ++j) {
+	    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method,
+						&str_target, &str_from, &str_to,
+						&str_contact, NULL, -1, NULL,
+						&tdata[j]);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to create request", status);
+		goto on_error;
+	    }
+	}
+
+	pj_get_timestamp(&t2);
+	pj_sub_timestamp(&t2, &t1);
+	pj_add_timestamp(&elapsed, &t2);
+	
+	for (j=0; j<COUNT; ++j)
+	    pjsip_tx_data_dec_ref(tdata[j]);
+    }
+
+    p_elapsed->u64 = elapsed.u64;
+    return PJ_SUCCESS;
+
+on_error:
+    for (i=0; i<COUNT; ++i) {
+	if (tdata[i])
+	    pjsip_tx_data_dec_ref(tdata[i]);
+    }
+    return -400;
+}
+
+
+
+/*
+ * create response benchmark
+ */
+static int create_response_bench(pj_timestamp *p_elapsed)
+{
+    enum { COUNT = 100 };
+    unsigned i, j;
+    pjsip_via_hdr *via;
+    pjsip_rx_data rdata;
+    pjsip_tx_data *request;
+    pjsip_tx_data *tdata[COUNT];
+    pj_timestamp t1, t2, elapsed;
+    pj_status_t status;
+
+    /* Create the request first. */
+    pj_str_t str_target = pj_str("sip:someuser@someprovider.com");
+    pj_str_t str_from = pj_str("\"Local User\" <sip:localuser@serviceprovider.com>");
+    pj_str_t str_to = pj_str("\"Remote User\" <sip:remoteuser@serviceprovider.com>");
+    pj_str_t str_contact = str_from;
+
+    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method,
+					&str_target, &str_from, &str_to,
+					&str_contact, NULL, -1, NULL,
+					&request);
+    if (status != PJ_SUCCESS) {
+	app_perror("    error: unable to create request", status);
+	return status;
+    }
+
+    /* Create several Via headers */
+    via = pjsip_via_hdr_create(request->pool);
+    via->sent_by.host = pj_str("192.168.0.7");
+    via->sent_by.port = 5061;
+    via->transport = pj_str("udp");
+    via->rport_param = 0;
+    via->branch_param = pj_str("012345678901234567890123456789");
+    via->recvd_param = pj_str("192.168.0.7");
+    pjsip_msg_insert_first_hdr(request->msg, (pjsip_hdr*) pjsip_hdr_clone(request->pool, via));
+    pjsip_msg_insert_first_hdr(request->msg, (pjsip_hdr*) pjsip_hdr_clone(request->pool, via));
+    pjsip_msg_insert_first_hdr(request->msg, (pjsip_hdr*)via);
+    
+
+    /* Create "dummy" rdata from the tdata */
+    pj_bzero(&rdata, sizeof(pjsip_rx_data));
+    rdata.tp_info.pool = request->pool;
+    rdata.msg_info.msg = request->msg;
+    rdata.msg_info.from = (pjsip_from_hdr*) pjsip_msg_find_hdr(request->msg, PJSIP_H_FROM, NULL);
+    rdata.msg_info.to = (pjsip_to_hdr*) pjsip_msg_find_hdr(request->msg, PJSIP_H_TO, NULL);
+    rdata.msg_info.cseq = (pjsip_cseq_hdr*) pjsip_msg_find_hdr(request->msg, PJSIP_H_CSEQ, NULL);
+    rdata.msg_info.cid = (pjsip_cid_hdr*) pjsip_msg_find_hdr(request->msg, PJSIP_H_FROM, NULL);
+    rdata.msg_info.via = via;
+
+    /*
+     * Now benchmark create_response
+     */
+    elapsed.u64 = 0;
+
+    for (i=0; i<LOOP; i+=COUNT) {
+	pj_bzero(tdata, sizeof(tdata));
+
+	pj_get_timestamp(&t1);
+
+	for (j=0; j<COUNT; ++j) {
+	    status = pjsip_endpt_create_response(endpt, &rdata, 200, NULL, &tdata[j]);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to create request", status);
+		goto on_error;
+	    }
+	}
+
+	pj_get_timestamp(&t2);
+	pj_sub_timestamp(&t2, &t1);
+	pj_add_timestamp(&elapsed, &t2);
+	
+	for (j=0; j<COUNT; ++j)
+	    pjsip_tx_data_dec_ref(tdata[j]);
+    }
+
+    p_elapsed->u64 = elapsed.u64;
+    pjsip_tx_data_dec_ref(request);
+    return PJ_SUCCESS;
+
+on_error:
+    for (i=0; i<COUNT; ++i) {
+	if (tdata[i])
+	    pjsip_tx_data_dec_ref(tdata[i]);
+    }
+    return -400;
+}
+
+
+int txdata_test(void)
+{
+    enum { REPEAT = 4 };
+    unsigned i, msgs;
+    pj_timestamp usec[REPEAT], min, freq;
+    int status;
+
+    status = pj_get_timestamp_freq(&freq);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = core_txdata_test();
+    if (status  != 0)
+	return status;
+
+#if INCLUDE_GCC_TEST
+    status = gcc_test();
+    if (status != 0)
+	return status;
+#endif
+
+    status = txdata_test_uri_params();
+    if (status != 0)
+	return status;
+
+
+    /*
+     * Benchmark create_request()
+     */
+    PJ_LOG(3,(THIS_FILE, "   benchmarking request creation:"));
+    for (i=0; i<REPEAT; ++i) {
+	PJ_LOG(3,(THIS_FILE, "    test %d of %d..",
+		  i+1, REPEAT));
+	status = create_request_bench(&usec[i]);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    min.u64 = PJ_UINT64(0xFFFFFFFFFFFFFFF);
+    for (i=0; i<REPEAT; ++i) {
+	if (usec[i].u64 < min.u64) min.u64 = usec[i].u64;
+    }
+
+    msgs = (unsigned)(freq.u64 * LOOP / min.u64);
+
+    PJ_LOG(3,(THIS_FILE, "    Requests created at %d requests/sec", msgs));
+
+    report_ival("create-request-per-sec", 
+		msgs, "msg/sec",
+		"Number of typical request messages that can be created "
+		"per second with <tt>pjsip_endpt_create_request()</tt>");
+
+
+    /*
+     * Benchmark create_response()
+     */
+    PJ_LOG(3,(THIS_FILE, "   benchmarking response creation:"));
+    for (i=0; i<REPEAT; ++i) {
+	PJ_LOG(3,(THIS_FILE, "    test %d of %d..",
+		  i+1, REPEAT));
+	status = create_response_bench(&usec[i]);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    min.u64 = PJ_UINT64(0xFFFFFFFFFFFFFFF);
+    for (i=0; i<REPEAT; ++i) {
+	if (usec[i].u64 < min.u64) min.u64 = usec[i].u64;
+    }
+
+    msgs = (unsigned)(freq.u64 * LOOP / min.u64);
+
+    PJ_LOG(3,(THIS_FILE, "    Responses created at %d responses/sec", msgs));
+
+    report_ival("create-response-per-sec", 
+		msgs, "msg/sec",
+		"Number of typical response messages that can be created "
+		"per second with <tt>pjsip_endpt_create_response()</tt>");
+
+
+    return 0;
+}
+ 
diff --git a/jni/pjproject-android/.svn/pristine/9d/9de16ece400d438f6d1ab2ac2f07ea8af6dd604a.svn-base b/jni/pjproject-android/.svn/pristine/9d/9de16ece400d438f6d1ab2ac2f07ea8af6dd604a.svn-base
new file mode 100644
index 0000000..14ef2d0
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/9d/9de16ece400d438f6d1ab2ac2f07ea8af6dd604a.svn-base
@@ -0,0 +1,621 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/toast_ulaw.c,v 1.1 1992/10/28 00:15:50 jutta Exp $ */
+
+#include	"toast.h"
+
+/* toast_ulaw -- functions to manipulate u-law encoded sound.
+ */
+
+extern FILE	*in, *out;
+
+#define	U2S(x)	(u2s[  (unsigned  char)(x)       ])
+#define	S2U(x)	(s2u[ ((unsigned short)(x)) >> 3 ])
+
+static unsigned short u2s[] = {
+	33280, 34308, 35336, 36364, 37393, 38421, 39449, 40477,
+	41505, 42534, 43562, 44590, 45618, 46647, 47675, 48703,
+	49474, 49988, 50503, 51017, 51531, 52045, 52559, 53073,
+	53587, 54101, 54616, 55130, 55644, 56158, 56672, 57186,
+	57572, 57829, 58086, 58343, 58600, 58857, 59114, 59371,
+	59628, 59885, 60142, 60399, 60656, 60913, 61171, 61428,
+	61620, 61749, 61877, 62006, 62134, 62263, 62392, 62520,
+	62649, 62777, 62906, 63034, 63163, 63291, 63420, 63548,
+	63645, 63709, 63773, 63838, 63902, 63966, 64030, 64095,
+	64159, 64223, 64287, 64352, 64416, 64480, 64544, 64609,
+	64657, 64689, 64721, 64753, 64785, 64818, 64850, 64882,
+	64914, 64946, 64978, 65010, 65042, 65075, 65107, 65139,
+	65163, 65179, 65195, 65211, 65227, 65243, 65259, 65275,
+	65291, 65308, 65324, 65340, 65356, 65372, 65388, 65404,
+	65416, 65424, 65432, 65440, 65448, 65456, 65464, 65472,
+	65480, 65488, 65496, 65504, 65512, 65520, 65528,     0,
+	32256, 31228, 30200, 29172, 28143, 27115, 26087, 25059,
+	24031, 23002, 21974, 20946, 19918, 18889, 17861, 16833,
+	16062, 15548, 15033, 14519, 14005, 13491, 12977, 12463,
+	11949, 11435, 10920, 10406,  9892,  9378,  8864,  8350,
+	 7964,  7707,  7450,  7193,  6936,  6679,  6422,  6165, 
+	 5908,  5651,  5394,  5137,  4880,  4623,  4365,  4108, 
+	 3916,  3787,  3659,  3530,  3402,  3273,  3144,  3016, 
+	 2887,  2759,  2630,  2502,  2373,  2245,  2116,  1988, 
+	 1891,  1827,  1763,  1698,  1634,  1570,  1506,  1441, 
+	 1377,  1313,  1249,  1184,  1120,  1056,   992,   927, 
+	  879,   847,   815,   783,   751,   718,   686,   654,
+	  622,   590,   558,   526,   494,   461,   429,   397,
+	  373,   357,   341,   325,   309,   293,   277,   261,
+	  245,   228,   212,   196,   180,   164,   148,   132,
+	  120,   112,   104,    96,    88,    80,    72,    64,
+ 	   56,    48,    40,    32,    24,    16,    8,      0
+};
+
+static unsigned char s2u[] = {
+0377,0376,0375,0374,0373,0372,0371,0370,0367,0366,0365,0364,0363,0362,0361,
+0360,0357,0357,0356,0356,0355,0355,0354,0354,0353,0353,0352,0352,0351,0351,
+0350,0350,0347,0347,0346,0346,0345,0345,0344,0344,0343,0343,0342,0342,0341,
+0341,0340,0340,0337,0337,0337,0337,0336,0336,0336,0336,0335,0335,0335,0335,
+0334,0334,0334,0334,0333,0333,0333,0333,0332,0332,0332,0332,0331,0331,0331,
+0331,0330,0330,0330,0330,0327,0327,0327,0327,0326,0326,0326,0326,0325,0325,
+0325,0325,0324,0324,0324,0324,0323,0323,0323,0323,0322,0322,0322,0322,0321,
+0321,0321,0321,0320,0320,0320,0320,0317,0317,0317,0317,0317,0317,0317,0317,
+0316,0316,0316,0316,0316,0316,0316,0316,0315,0315,0315,0315,0315,0315,0315,
+0315,0314,0314,0314,0314,0314,0314,0314,0314,0313,0313,0313,0313,0313,0313,
+0313,0313,0312,0312,0312,0312,0312,0312,0312,0312,0311,0311,0311,0311,0311,
+0311,0311,0311,0310,0310,0310,0310,0310,0310,0310,0310,0307,0307,0307,0307,
+0307,0307,0307,0307,0306,0306,0306,0306,0306,0306,0306,0306,0305,0305,0305,
+0305,0305,0305,0305,0305,0304,0304,0304,0304,0304,0304,0304,0304,0303,0303,
+0303,0303,0303,0303,0303,0303,0303,0302,0302,0302,0302,0302,0302,0302,0302,
+0301,0301,0301,0301,0301,0301,0301,0301,0300,0300,0300,0300,0300,0300,0300,
+0300,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,0277,
+0277,0277,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,0276,
+0276,0276,0276,0275,0275,0275,0275,0275,0275,0275,0275,0275,0275,0275,0275,
+0275,0275,0275,0275,0274,0274,0274,0274,0274,0274,0274,0274,0274,0274,0274,
+0274,0274,0274,0274,0274,0273,0273,0273,0273,0273,0273,0273,0273,0273,0273,
+0273,0273,0273,0273,0273,0273,0272,0272,0272,0272,0272,0272,0272,0272,0272,
+0272,0272,0272,0272,0272,0272,0272,0271,0271,0271,0271,0271,0271,0271,0271,
+0271,0271,0271,0271,0271,0271,0271,0271,0270,0270,0270,0270,0270,0270,0270,
+0270,0270,0270,0270,0270,0270,0270,0270,0270,0267,0267,0267,0267,0267,0267,
+0267,0267,0267,0267,0267,0267,0267,0267,0267,0267,0266,0266,0266,0266,0266,
+0266,0266,0266,0266,0266,0266,0266,0266,0266,0266,0266,0265,0265,0265,0265,
+0265,0265,0265,0265,0265,0265,0265,0265,0265,0265,0265,0265,0264,0264,0264,
+0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0264,0263,0263,
+0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0263,0262,
+0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,0262,
+0262,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,0261,
+0261,0261,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,0260,
+0260,0260,0260,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,
+0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,0257,
+0257,0257,0257,0257,0257,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,
+0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,0256,
+0256,0256,0256,0256,0256,0256,0256,0255,0255,0255,0255,0255,0255,0255,0255,
+0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,0255,
+0255,0255,0255,0255,0255,0255,0255,0255,0255,0254,0254,0254,0254,0254,0254,
+0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,
+0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0254,0253,0253,0253,0253,
+0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,
+0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0253,0252,0252,
+0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,
+0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,0252,
+0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,
+0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,0251,
+0251,0251,0251,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,
+0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,0250,
+0250,0250,0250,0250,0250,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,
+0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,0247,
+0247,0247,0247,0247,0247,0247,0247,0246,0246,0246,0246,0246,0246,0246,0246,
+0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,0246,
+0246,0246,0246,0246,0246,0246,0246,0246,0246,0245,0245,0245,0245,0245,0245,
+0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,
+0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0245,0244,0244,0244,0244,
+0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,
+0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0244,0243,0243,
+0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,
+0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,0243,
+0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,
+0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,0242,
+0242,0242,0242,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,
+0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,0241,
+0241,0241,0241,0241,0241,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,
+0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,0240,
+0240,0240,0240,0240,0240,0240,0240,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,
+0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0237,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,0236,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,0235,
+0235,0235,0235,0235,0235,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,0234,
+0234,0234,0234,0234,0234,0234,0234,0234,0234,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,
+0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0233,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,0232,
+0232,0232,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,0231,
+0231,0231,0231,0231,0231,0231,0231,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,
+0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0230,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,0227,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,0226,
+0226,0226,0226,0226,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,0225,
+0225,0225,0225,0225,0225,0225,0225,0225,0225,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,
+0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0224,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,0223,
+0223,0223,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,0222,
+0222,0222,0222,0222,0222,0222,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,
+0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0221,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,0220,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,0217,
+0217,0217,0217,0217,0217,0217,0217,0217,0217,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,0216,
+0216,0216,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,
+0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0215,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,0214,
+0214,0214,0214,0214,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,
+0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0213,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,0212,
+0212,0212,0212,0212,0212,0212,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,0211,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,0210,
+0210,0210,0210,0210,0210,0210,0210,0210,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,0207,
+0207,0207,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,
+0206,0206,0206,0206,0206,0206,0206,0206,0206,0206,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,0205,
+0205,0205,0205,0205,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,
+0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0204,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,0203,
+0203,0203,0203,0203,0203,0203,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,
+0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0202,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,0201,
+0201,0201,0201,0201,0201,0201,0201,0201,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,0200,
+0200,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,
+0000,0000,0000,0000,0000,0000,0000,0000,0000,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,0001,
+0001,0001,0001,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,
+0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0002,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,0003,
+0003,0003,0003,0003,0003,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,
+0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0004,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,0005,
+0005,0005,0005,0005,0005,0005,0005,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,0006,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,0007,
+0007,0007,0007,0007,0007,0007,0007,0007,0007,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,0010,
+0010,0010,0010,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,
+0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0011,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,0012,
+0012,0012,0012,0012,0012,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,
+0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0013,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,0014,
+0014,0014,0014,0014,0014,0014,0014,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,0016,
+0016,0016,0016,0016,0016,0016,0016,0016,0016,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,0017,
+0017,0017,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,0020,
+0020,0020,0020,0020,0020,0020,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,
+0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0021,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,0022,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,0023,
+0023,0023,0023,0023,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,0024,
+0024,0024,0024,0024,0024,0024,0024,0024,0024,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,
+0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0025,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,0026,
+0026,0026,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,0027,
+0027,0027,0027,0027,0027,0027,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,
+0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0030,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,0031,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,0032,
+0032,0032,0032,0032,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,0033,
+0033,0033,0033,0033,0033,0033,0033,0033,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,
+0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0034,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,0035,
+0035,0035,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,0036,
+0036,0036,0036,0036,0036,0036,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,
+0037,0037,0037,0037,0037,0037,0037,0037,0037,0037,0040,0040,0040,0040,0040,
+0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,
+0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0040,0041,0041,
+0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,
+0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,0041,
+0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,
+0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,0042,
+0042,0042,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,
+0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,0043,
+0043,0043,0043,0043,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,
+0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,0044,
+0044,0044,0044,0044,0044,0044,0045,0045,0045,0045,0045,0045,0045,0045,0045,
+0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,0045,
+0045,0045,0045,0045,0045,0045,0045,0045,0046,0046,0046,0046,0046,0046,0046,
+0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,
+0046,0046,0046,0046,0046,0046,0046,0046,0046,0046,0047,0047,0047,0047,0047,
+0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,
+0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0047,0050,0050,
+0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,
+0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,0050,
+0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,
+0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,0051,
+0051,0051,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,
+0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,0052,
+0052,0052,0052,0052,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,
+0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,0053,
+0053,0053,0053,0053,0053,0053,0054,0054,0054,0054,0054,0054,0054,0054,0054,
+0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,0054,
+0054,0054,0054,0054,0054,0054,0054,0054,0055,0055,0055,0055,0055,0055,0055,
+0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,
+0055,0055,0055,0055,0055,0055,0055,0055,0055,0055,0056,0056,0056,0056,0056,
+0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,
+0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0056,0057,0057,0057,
+0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,
+0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,0057,
+0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,0060,
+0060,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,0061,
+0061,0061,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,0062,
+0062,0062,0062,0063,0063,0063,0063,0063,0063,0063,0063,0063,0063,0063,0063,
+0063,0063,0063,0063,0064,0064,0064,0064,0064,0064,0064,0064,0064,0064,0064,
+0064,0064,0064,0064,0064,0065,0065,0065,0065,0065,0065,0065,0065,0065,0065,
+0065,0065,0065,0065,0065,0065,0066,0066,0066,0066,0066,0066,0066,0066,0066,
+0066,0066,0066,0066,0066,0066,0066,0067,0067,0067,0067,0067,0067,0067,0067,
+0067,0067,0067,0067,0067,0067,0067,0067,0070,0070,0070,0070,0070,0070,0070,
+0070,0070,0070,0070,0070,0070,0070,0070,0070,0071,0071,0071,0071,0071,0071,
+0071,0071,0071,0071,0071,0071,0071,0071,0071,0071,0072,0072,0072,0072,0072,
+0072,0072,0072,0072,0072,0072,0072,0072,0072,0072,0072,0073,0073,0073,0073,
+0073,0073,0073,0073,0073,0073,0073,0073,0073,0073,0073,0073,0074,0074,0074,
+0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0074,0075,0075,
+0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,0075,
+0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,0076,
+0076,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,0077,
+0077,0077,0100,0100,0100,0100,0100,0100,0100,0100,0101,0101,0101,0101,0101,
+0101,0101,0101,0102,0102,0102,0102,0102,0102,0102,0102,0103,0103,0103,0103,
+0103,0103,0103,0103,0104,0104,0104,0104,0104,0104,0104,0104,0105,0105,0105,
+0105,0105,0105,0105,0105,0106,0106,0106,0106,0106,0106,0106,0106,0107,0107,
+0107,0107,0107,0107,0107,0107,0110,0110,0110,0110,0110,0110,0110,0110,0111,
+0111,0111,0111,0111,0111,0111,0111,0112,0112,0112,0112,0112,0112,0112,0112,
+0113,0113,0113,0113,0113,0113,0113,0113,0114,0114,0114,0114,0114,0114,0114,
+0114,0115,0115,0115,0115,0115,0115,0115,0115,0116,0116,0116,0116,0116,0116,
+0116,0116,0117,0117,0117,0117,0117,0117,0117,0117,0120,0120,0120,0120,0121,
+0121,0121,0121,0122,0122,0122,0122,0123,0123,0123,0123,0124,0124,0124,0124,
+0125,0125,0125,0125,0126,0126,0126,0126,0127,0127,0127,0127,0130,0130,0130,
+0130,0131,0131,0131,0131,0132,0132,0132,0132,0133,0133,0133,0133,0134,0134,
+0134,0134,0135,0135,0135,0135,0136,0136,0136,0136,0137,0137,0137,0137,0140,
+0140,0141,0141,0142,0142,0143,0143,0144,0144,0145,0145,0146,0146,0147,0147,
+0150,0150,0150,0151,0151,0152,0152,0153,0153,0154,0154,0155,0155,0156,0156,
+0157,0157,0160,0161,0162,0163,0164,0165,0166,0167,0170,0171,0172,0173,0174,
+0175,0176
+};
+
+int ulaw_input P1((buf), gsm_signal * buf)
+{
+	int i, c;
+
+	for (i = 0; i < 160 && (c = fgetc(in)) != EOF; i++) buf[i] = U2S(c);
+	if (c == EOF && ferror(in)) return -1;
+	return i;
+}
+
+int ulaw_output P1((buf), gsm_signal * buf)
+{
+	int i;
+
+	for(i = 0; i < 160; i++, buf++)
+		if (fputc( (char)S2U( (unsigned short)*buf ), out) == EOF)
+			return -1;
+	return 0;
+}
diff --git a/jni/pjproject-android/.svn/pristine/9d/9de2dcc1ca93fbd52260ac751b737b07e994aced.svn-base b/jni/pjproject-android/.svn/pristine/9d/9de2dcc1ca93fbd52260ac751b737b07e994aced.svn-base
new file mode 100644
index 0000000..ac058de
--- /dev/null
+++ b/jni/pjproject-android/.svn/pristine/9d/9de2dcc1ca93fbd52260ac751b737b07e994aced.svn-base
@@ -0,0 +1,104 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
+ * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#include "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "msg_logger.c"
+
+static pj_bool_t msg_log_enabled;
+
+static pj_bool_t on_rx_msg(pjsip_rx_data *rdata)
+{
+    if (msg_log_enabled) {
+	PJ_LOG(4,(THIS_FILE, "RX %d bytes %s from %s:%s:%d:\n"
+			     "%.*s\n"
+			     "--end msg--",
+			     rdata->msg_info.len,
+			     pjsip_rx_data_get_info(rdata),
+			     rdata->tp_info.transport->type_name,
+			     rdata->pkt_info.src_name,
+			     rdata->pkt_info.src_port,
+			     rdata->msg_info.len,
+			     rdata->msg_info.msg_buf));
+    }
+
+    return PJ_FALSE;
+}
+
+static pj_status_t on_tx_msg(pjsip_tx_data *tdata)
+{
+    if (msg_log_enabled) {
+	PJ_LOG(4,(THIS_FILE, "TX %d bytes %s to %s:%s:%d:\n"
+			     "%.*s\n"
+			     "--end msg--",
+			     (tdata->buf.cur - tdata->buf.start),
+			     pjsip_tx_data_get_info(tdata),
+			     tdata->tp_info.transport->type_name,
+			     tdata->tp_info.dst_name,
+			     tdata->tp_info.dst_port,
+			     (tdata->buf.cur - tdata->buf.start),
+			     tdata->buf.start));
+    }
+    return PJ_SUCCESS;
+}
+
+
+/* Message logger module. */
+static pjsip_module mod_msg_logger = 
+{
+    NULL, NULL,				/* prev and next	*/
+    { "mod-msg-logger", 14},		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_TRANSPORT_LAYER-1,/* Priority		*/
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &on_rx_msg,				/* on_rx_request()	*/
+    &on_rx_msg,				/* on_rx_response()	*/
+    &on_tx_msg,				/* on_tx_request()	*/
+    &on_tx_msg,				/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+};
+
+int init_msg_logger(void)
+{
+    pj_status_t status;
+
+    if (mod_msg_logger.id != -1)
+	return 0;
+
+    status = pjsip_endpt_register_module(endpt, &mod_msg_logger);
+    if (status != PJ_SUCCESS) {
+	app_perror("  error registering module", status);
+	return -10;
+    }
+
+    return 0;
+}
+
+int msg_logger_set_enabled(pj_bool_t enabled)
+{
+    int val = msg_log_enabled;
+    msg_log_enabled = enabled;
+    return val;
+}
+