m4_include(m4/ax_c99_features.m4)
m4_include(m4/ax_check_export_capability.m4)
m4_include(m4/ax_check_arm_neon.m4)
-
-AC_DEFUN([AC_FUNC_ALIGNED_ALLOC],[
-saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Werror"
- AC_CACHE_CHECK([checking for aligned_alloc],
- [ac_cv_func_aligned_alloc],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([
- #define _ISOC11_SOURCE
- #include <stdlib.h>
- ],
- [
- aligned_alloc(0,0);
- ])],
- [ac_cv_func_aligned_alloc=yes],
- [ac_cv_func_aligned_alloc=no])])
-
- if test "x${ac_cv_func_aligned_alloc}" = "xyes" ; then
- AC_DEFINE([HAVE_ALIGNED_ALLOC], [1], [Define to 1 if you have the aligned_alloc() function.])
- fi
-CFLAGS="$saved_CFLAGS"
-])
+m4_include(m4/ax_func_aligned_alloc.m4)
AC_CONFIG_SRCDIR([src/tone_generate.c])
AC_CONFIG_AUX_DIR([config])
AC_ARG_ENABLE(doc, [ --enable-doc Build the documentation])
AC_ARG_ENABLE(tests, [ --enable-tests Build the test programs])
-AC_ARG_ENABLE(t43, [ --enable-t43 Enable T.43 support])
-AC_ARG_ENABLE(v32bis, [ --enable-v32bis Enable V.32bis support])
-AC_ARG_ENABLE(v34, [ --enable-v34 Enable V.34 support])
AC_ARG_ENABLE(mmx, [ --enable-mmx Enable MMX support])
AC_ARG_ENABLE(sse, [ --enable-sse Enable SSE support])
AC_ARG_ENABLE(sse2, [ --enable-sse2 Enable SSE2 support])
AC_ARG_ENABLE(ssse3, [ --enable-ssse3 Enable SSSE3 support])
AC_ARG_ENABLE(sse4_1, [ --enable-sse4-1 Enable SSE4.1 support])
AC_ARG_ENABLE(sse4_2, [ --enable-sse4-2 Enable SSE4.2 support])
-AC_ARG_ENABLE(sse4a, [ --enable-sse4a Enable SSE4A support])
-AC_ARG_ENABLE(sse5, [ --enable-sse5 Enable SSE5 support])
AC_ARG_ENABLE(avx, [ --enable-avx Enable AVX support])
AC_ARG_ENABLE(avx2, [ --enable-avx2 Enable AVX2 support])
AC_ARG_ENABLE(neon, [ --enable-neon Enable NEON support])
AC_ARG_ENABLE(fixed_point, [ --enable-fixed-point Enable fixed point support])
+AC_ARG_ENABLE(v32bis, [ --enable-v32bis Enable V.32bis support])
+AC_ARG_ENABLE(v34, [ --enable-v34 Enable V.34 support])
# The following is for MSVC, where we may be using a local copy of libtiff, built alongside spandsp
AC_ARG_ENABLE(builtin_tiff,
AX_C99_FLEXIBLE_ARRAY
-AC_FUNC_ALIGNED_ALLOC
+AX_FUNC_ALIGNED_ALLOC
AC_CHECK_FUNCS([memalign])
AC_CHECK_FUNCS([posix_memalign])
AC_CHECK_FUNCS([memmove])
if test "$enable_avx" = "yes" ; then
COMP_VENDOR_CFLAGS="-mavx $COMP_VENDOR_CFLAGS"
fi
- if test "$enable_sse5" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse5 $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_sse4a" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse4a $COMP_VENDOR_CFLAGS"
- fi
if test "$enable_sse4_2" = "yes" ; then
COMP_VENDOR_CFLAGS="-msse42 $COMP_VENDOR_CFLAGS"
fi
if test "$enable_avx" = "yes" ; then
COMP_VENDOR_CFLAGS="-mavx $COMP_VENDOR_CFLAGS"
fi
- if test "$enable_sse5" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse5 $COMP_VENDOR_CFLAGS"
- fi
- if test "$enable_sse4a" = "yes" ; then
- COMP_VENDOR_CFLAGS="-msse4a $COMP_VENDOR_CFLAGS"
- fi
if test "$enable_sse4_2" = "yes" ; then
COMP_VENDOR_CFLAGS="-msse42 $COMP_VENDOR_CFLAGS"
fi
fi
if test "$enable_avx" = "yes" ; then
AC_DEFINE([SPANDSP_USE_AVX], [1], [Use the AVX instruction set (i386 and x86_64 only).])
- enable_sse5="yes"
- fi
- if test "$enable_sse5" = "yes" ; then
- AC_DEFINE([SPANDSP_USE_SSE5], [1], [Use the SSE5 instruction set (i386 and x86_64 only).])
- enable_sse4a="yes"
- fi
- if test "$enable_sse4a" = "yes" ; then
- AC_DEFINE([SPANDSP_USE_SSE4A], [1], [Use the SSE4A instruction set (i386 and x86_64 only).])
enable_sse4_2="yes"
fi
if test "$enable_sse4_2" = "yes" ; then
AM_CONDITIONAL([COND_SSSE3], [test "$enable_ssse3" = yes])
AM_CONDITIONAL([COND_SSE4_1], [test "$enable_sse4_1" = yes])
AM_CONDITIONAL([COND_SSE4_2], [test "$enable_sse4_2" = yes])
-AM_CONDITIONAL([COND_SSE4A], [test "$enable_sse4a" = yes])
-AM_CONDITIONAL([COND_SSE5], [test "$enable_sse5" = yes])
AM_CONDITIONAL([COND_AVX], [test "$enable_avx" = yes])
AM_CONDITIONAL([COND_AVX2], [test "$enable_avx2" = yes])
AM_CONDITIONAL([COND_NEON], [test "$enable_neon" = yes])
test-data/etsi/fax/Makefile
test-data/itu/Makefile
test-data/itu/fax/Makefile
+ test-data/itu/tiff-fx/Makefile
test-data/local/Makefile
tests/Makefile
spandsp.pc
--- /dev/null
+# AX_FUNC_ALIGNED_ALLOC
+# ---------------------
+#
+# Check for the function aligned_alloc()
+#
+AC_DEFUN([AX_FUNC_ALIGNED_ALLOC],[
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror"
+ AC_CACHE_CHECK([checking for aligned_alloc],
+ [ax_cv_func_aligned_alloc],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([
+ #define _ISOC11_SOURCE
+ #include <stdlib.h>
+ ],
+ [
+ aligned_alloc(0,0);
+ ])],
+ [ax_cv_func_aligned_alloc=yes],
+ [ax_cv_func_aligned_alloc=no])])
+
+ if test "x${ax_cv_func_aligned_alloc}" = "xyes" ; then
+ AC_DEFINE([HAVE_ALIGNED_ALLOC], [1], [Define to 1 if you have the aligned_alloc() function.])
+ fi
+CFLAGS="$saved_CFLAGS"
+])# AX_ALIGNED_ALLOC
l = FFT_SIZE - (LINE_FILTER_SIZE - 1)/2;
for (i = 0; i < LINE_FILTER_SIZE; i++)
{
-
#if defined(HAVE_FFTW3_H)
impulse_responses[filter_sets][i] = out[l][0]/pw;
#else
SPAN_DECLARE(codec_munge_state_t *) codec_munge_init(int codec, int info);
-SPAN_DECLARE(void) codec_munge_free(codec_munge_state_t *s);
+SPAN_DECLARE(int) codec_munge_free(codec_munge_state_t *s);
SPAN_DECLARE(void) codec_munge(codec_munge_state_t *s, int16_t amp[], int len);
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(void) codec_munge_free(codec_munge_state_t *s)
+SPAN_DECLARE(int) codec_munge_free(codec_munge_state_t *s)
{
free(s);
+ return 0;
}
/*- End of function --------------------------------------------------------*/
static span_realloc_t __span_realloc = realloc;
static span_free_t __span_free = free;
-#ifdef _MSC_VER
+#if defined(_MSC_VER)
#pragma warning(pop)
#endif
SPAN_DECLARE(int) fax_modems_restart(fax_modems_state_t *s)
{
+ s->current_tx_type = -1;
return 0;
}
/*- End of function --------------------------------------------------------*/
s->hdlc_accept = hdlc_accept;
s->hdlc_accept_user_data = user_data;
- hdlc_rx_init(&s->hdlc_rx, false, false, HDLC_FRAMING_OK_THRESHOLD, fax_modems_hdlc_accept, s);
+ hdlc_rx_init(&s->hdlc_rx, false, true, HDLC_FRAMING_OK_THRESHOLD, fax_modems_hdlc_accept, s);
hdlc_tx_init(&s->hdlc_tx, false, 2, false, hdlc_tx_underflow, user_data);
fax_modems_start_slow_modem(s, FAX_MODEM_V21_RX);
static void weighting_filter(int16_t x[40],
const int16_t *e) // signal [-5..0.39.44] IN)
{
-#if defined(__GNUC__) && defined(SPANDSP_USE_MMX) && defined(__x86_64__) && !defined(__OpenBSD__)
+#if defined(__GNUC__) && defined(SPANDSP_USE_MMX) && defined(__x86_64__) && !defined(__OpenBSD__)
/* Table 4.4 Coefficients of the weighting filter */
/* This must be padded to a multiple of 4 for MMX to work */
static const union
s->status_handler(s->status_user_data, status);
else if (s->frame_handler)
s->frame_handler(s->frame_user_data, NULL, status, true);
+ /*endif*/
}
/*- End of function --------------------------------------------------------*/
//printf("Eh!\n");
break;
}
+ /*endswitch*/
}
/*- End of function --------------------------------------------------------*/
s->octet_count = s->octet_count_report_interval;
report_status_change(s, SIG_STATUS_OCTET_REPORT);
}
+ /*endif*/
}
else
{
s->octet_counting_mode = true;
s->octet_count = s->octet_count_report_interval;
}
+ /*endif*/
}
/*- End of function --------------------------------------------------------*/
{
if (s->octet_count_report_interval == 0)
return;
+ /*endif*/
/* If we are not in octet counting mode, we start it.
If we are in octet counting mode, we update it. */
s->octet_count = s->octet_count_report_interval;
report_status_change(s, SIG_STATUS_OCTET_REPORT);
}
+ /*endif*/
}
+ /*endif*/
}
/*- End of function --------------------------------------------------------*/
s->flags_seen = 0;
else
s->flags_seen = s->framing_ok_threshold - 1;
+ /*endif*/
/* An abort starts octet counting */
octet_set_and_count(s);
}
s->len -= s->crc_bytes;
if (s->frame_handler)
s->frame_handler(s->frame_user_data, s->buffer, s->len, false);
+ /*endif*/
}
+ /*endif*/
}
+ /*endif*/
}
else
{
s->len -= s->crc_bytes;
else
s->len = 0;
+ /*endif*/
if (s->frame_handler)
s->frame_handler(s->frame_user_data, s->buffer, s->len, false);
+ /*endif*/
}
+ /*endif*/
s->rx_length_errors++;
}
+ /*endif*/
}
+ /*endif*/
}
else
{
s->flags_seen = 0;
else
s->flags_seen = s->framing_ok_threshold - 1;
+ /*endif*/
}
+ /*endif*/
if (++s->flags_seen >= s->framing_ok_threshold && !s->framing_ok_announced)
{
report_status_change(s, SIG_STATUS_FRAMING_OK);
s->framing_ok_announced = true;
}
+ /*endif*/
}
+ /*endif*/
}
+ /*endif*/
s->len = 0;
s->num_bits = 0;
}
/* Is this a bit to be skipped for destuffing? */
if ((s->raw_bit_stream & 0x4100) == 0)
return;
+ /*endif*/
/* Is this a flag or abort? */
if ((s->raw_bit_stream & 0xFE00) == 0x7E00)
{
rx_flag_or_abort(s);
return;
}
+ /*endif*/
}
+ /*endif*/
s->num_bits++;
if (s->flags_seen < s->framing_ok_threshold)
{
if ((s->num_bits & 0x7) == 0)
octet_count(s);
+ /*endif*/
return;
}
+ /*endif*/
s->byte_in_progress = (s->byte_in_progress | (s->raw_bit_stream & 0x100)) >> 1;
if (s->num_bits == 8)
{
s->flags_seen = s->framing_ok_threshold - 1;
octet_set_and_count(s);
}
+ /*endif*/
s->num_bits = 0;
}
+ /*endif*/
}
/*- End of function --------------------------------------------------------*/
rx_special_condition(s, new_bit);
return;
}
+ /*endif*/
s->raw_bit_stream = (s->raw_bit_stream << 1) | ((new_bit << 8) & 0x100);
hdlc_rx_put_bit_core(s);
}
rx_special_condition(s, new_byte);
return;
}
+ /*endif*/
s->raw_bit_stream |= new_byte;
for (i = 0; i < 8; i++)
{
s->raw_bit_stream <<= 1;
hdlc_rx_put_bit_core(s);
}
+ /*endfor*/
}
/*- End of function --------------------------------------------------------*/
for (i = 0; i < len; i++)
hdlc_rx_put_byte(s, buf[i]);
+ /*endfor*/
}
/*- End of function --------------------------------------------------------*/
{
if ((s = (hdlc_rx_state_t *) span_alloc(sizeof(*s))) == NULL)
return NULL;
+ /*endif*/
}
+ /*endif*/
memset(s, 0, sizeof(*s));
s->frame_handler = handler;
s->frame_user_data = user_data;
s->tx_end = true;
return 0;
}
+ /*endif*/
if (s->len + len > s->max_frame_len)
return -1;
+ /*endif*/
if (s->progressive)
{
/* Only lock out if we are in the CRC section. */
if (s->pos >= HDLC_MAXFRAME_LEN)
return -1;
+ /*endif*/
}
else
{
/* Lock out if there is anything in the buffer. */
if (s->len)
return -1;
+ /*endif*/
}
+ /*endif*/
memcpy(&s->buffer[s->len], frame, len);
if (s->crc_bytes == 2)
s->crc = crc_itu16_calc(frame, len, (uint16_t) s->crc);
else
s->crc = crc_itu32_calc(frame, len, s->crc);
+ /*endif*/
if (s->progressive)
s->len += len;
else
s->len = len;
+ /*endif*/
s->tx_end = false;
return 0;
}
flag words. */
if (s->pos)
return -1;
+ /*endif*/
if (len < 0)
s->flag_octets += -len;
else
s->flag_octets = len;
+ /*endif*/
s->report_flag_underflow = true;
s->tx_end = false;
return 0;
{
if (s->len <= 0)
return -1;
+ /*endif*/
s->crc ^= 0xFFFF;
s->buffer[HDLC_MAXFRAME_LEN] ^= 0xFF;
s->buffer[HDLC_MAXFRAME_LEN + 1] ^= 0xFF;
and we have been told to report this underflow. */
if (s->underflow_handler)
s->underflow_handler(s->user_data);
+ /*endif*/
}
+ /*endif*/
}
+ /*endif*/
if (s->abort_octets)
{
s->abort_octets = 0;
return 0x7F;
}
+ /*endif*/
return s->idle_octet;
}
+ /*endif*/
if (s->len)
{
if (s->num_bits >= 8)
s->num_bits -= 8;
return (s->octets_in_progress >> s->num_bits) & 0xFF;
}
+ /*endif*/
if (s->pos >= s->len)
{
if (s->pos == s->len)
s->buffer[HDLC_MAXFRAME_LEN + 2] = (uint8_t) (s->crc >> 16);
s->buffer[HDLC_MAXFRAME_LEN + 3] = (uint8_t) (s->crc >> 24);
}
+ /*endif*/
s->pos = HDLC_MAXFRAME_LEN;
}
else if (s->pos == (size_t) (HDLC_MAXFRAME_LEN + s->crc_bytes))
s->crc = 0xFFFF;
else
s->crc = 0xFFFFFFFF;
+ /*endif*/
/* Report the underflow now. If there are timed flags still in progress, loading the
next frame right now will be harmless. */
s->report_flag_underflow = false;
in a new frame being sent. */
if (s->len == 0 && s->flag_octets < 2)
s->flag_octets = 2;
+ /*endif*/
return txbyte;
}
+ /*endif*/
}
+ /*endif*/
byte_in_progress = s->buffer[s->pos++];
i = bottom_bit(byte_in_progress | 0x100);
s->octets_in_progress <<= i;
s->octets_in_progress <<= 1;
s->num_bits++;
}
+ /*endif*/
}
+ /*endfor*/
/* An input byte will generate between 8 and 10 output bits */
return (s->octets_in_progress >> s->num_bits) & 0xFF;
}
s->tx_end = false;
return SIG_STATUS_END_OF_DATA;
}
+ /*endif*/
return s->idle_octet;
}
/*- End of function --------------------------------------------------------*/
s->crc = 0xFFFF;
else
s->crc = 0xFFFFFFFF;
+ /*endif*/
s->byte = 0;
s->bits = 0;
s->tx_end = false;
{
if ((s = (hdlc_tx_state_t *) span_alloc(sizeof(*s))) == NULL)
return NULL;
+ /*endif*/
}
+ /*endif*/
memset(s, 0, sizeof(*s));
s->underflow_handler = handler;
s->user_data = user_data;
s->crc_bytes = 2;
s->crc = 0xFFFF;
}
+ /*endif*/
s->idle_octet = 0x7E;
s->progressive = progressive;
s->max_frame_len = HDLC_MAXFRAME_LEN;
}
/*- End of function --------------------------------------------------------*/
-
static void trie_recursive_free(trie_node_t *t)
{
- int i;
- if (t)
- {
- if (t->first <= t->last)
- {
- for (i = t->first; i <= t->last; i++)
- trie_recursive_free(t->child_list[i]);
- }
- free(t);
- }
+ int i;
+
+ if (t)
+ {
+ if (t->first <= t->last)
+ {
+ for (i = t->first; i <= t->last; i++)
+ trie_recursive_free(t->child_list[i]);
+ /*endfor*/
+ }
+ /*endif*/
+ free(t);
+ }
+ /*endif*/
}
/*- End of function --------------------------------------------------------*/
static void trie_free(trie_t *s)
{
- if(s)
- {
- if(s->root)
- trie_recursive_free(s->root);
- free(s);
- }
+ if (s)
+ {
+ if (s->root)
+ trie_recursive_free(s->root);
+ /*endif*/
+ free(s);
+ }
+ /*endif*/
}
/*- End of function --------------------------------------------------------*/
if ((s = trie_create()) == NULL)
exit(2);
+ /*endif*/
printf("/* THIS FILE WAS AUTOMATICALLY GENERATED - ANY MODIFICATIONS MADE TO THIS");
printf(" FILE MAY BE OVERWRITTEN DURING FUTURE BUILDS OF THE SOFTWARE */\n");
for (i = 0; wordlist[i]; i++)
trie_add(s, wordlist[i], strlen(wordlist[i]));
+ /*endfor*/
printf("// The trie contains %d entries\n", i);
packed_ptr = 0;
{
return (long int) (x);
}
-#elif defined(__ppc__) || defined(__powerpc__)
+#elif (defined(__ppc__) || defined(__powerpc__)) && !defined(__NO_FPRS__)
static __inline__ long int lfastrint(register double x)
{
int res[2];
s = &t->t38_fe;
t38_core_restart(&s->t38);
+ s->current_tx_type = -1;
s->rx_signal_present = false;
s->timed_step = T38_TIMED_STEP_NONE;
//s->iaf = T30_IAF_MODE_T37 | T30_IAF_MODE_T38;
} packer_t;
#if defined(SPANDSP_SUPPORT_TIFF_FX)
-#if TIFFLIB_VERSION >= 20120615
+#if TIFFLIB_VERSION >= 20120922 && defined(HAVE_TIF_DIR_H)
extern TIFFFieldArray tiff_fx_field_array;
#endif
#endif
static int write_tiff_image(t4_rx_state_t *s)
{
t4_rx_tiff_state_t *t;
-#if defined(SPANDSP_SUPPORT_TIFF_FX)
+#if defined(SPANDSP_SUPPORT_TIFF_FX) && TIFFLIB_VERSION >= 20120922 && defined(HAVE_TIF_DIR_H)
toff_t diroff;
#endif
the first page in the file */
if (s->current_page == 0)
{
+#if TIFFLIB_VERSION >= 20120922 && defined(HAVE_TIF_DIR_H)
if (!TIFFCreateCustomDirectory(t->tiff_file, &tiff_fx_field_array))
{
TIFFSetField(t->tiff_file, TIFFTAG_FAXPROFILE, PROFILETYPE_G3_FAX);
if (!TIFFWriteDirectory(t->tiff_file))
span_log(&s->logging, SPAN_LOG_WARNING, "%s: Failed to write directory for page %d.\n", t->file, s->current_page);
}
+#endif
}
#endif
return 0;
#include "faxfont.h"
-#if defined(SPANDSP_SUPPORT_TIFF_FX)
+#if defined(SPANDSP_SUPPORT_TIFF_FX) && defined(HAVE_TIF_DIR_H)
#include <tif_dir.h>
#endif
{TIFFTAG_IMAGELAYER, 2, 2, TIFF_LONG, FIELD_CUSTOM, false, false, (char *) "ImageLayer"},
};
-#if TIFFLIB_VERSION >= 20120615
+#if TIFFLIB_VERSION >= 20120922 && defined(HAVE_TIF_DIR_H)
static TIFFField tiff_fx_tiff_fields[] =
{
{ TIFFTAG_INDEXED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, (char *) "Indexed" },
diroff = 0;
if (TIFFGetField(t->tiff_file, TIFFTAG_GLOBALPARAMETERSIFD, &diroff))
{
+#if TIFFLIB_VERSION >= 20120922 && defined(HAVE_TIF_DIR_H)
if (!TIFFReadCustomDirectory(t->tiff_file, diroff, &tiff_fx_field_array))
{
span_log(&s->logging, SPAN_LOG_FLOW, "Global parameter read failed\n");
if (!TIFFSetDirectory(t->tiff_file, (tdir_t) s->current_page))
span_log(&s->logging, SPAN_LOG_FLOW, "Failed to set directory to page %d\n", s->current_page);
}
+#endif
}
#endif
return 0;
tune_equalizer(s, &z, target);
raw_bits = phase_steps[((nearest >> 2) - (s->rx.constellation_state >> 2)) & 3];
bitstream = decode_baudx(s, nearest);
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx 0x%x\n", bitstream);
s->rx.training_count++;
//span_log(&s->logging, SPAN_LOG_FLOW, "S11 0x%02x 0x%02x 0x%X %d %d %d %d %d\n", raw_bits, nearest, bitstream, s->rx.scrambled_ones_to_date, 0, 0, 0, s->rx.training_count);
if (s->negotiated_bit_rate == 1200)
track_carrier(s, &z, target);
tune_equalizer(s, &z, target);
bitstream = decode_baudx(s, nearest);
+ span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx 0x%x\n", bitstream);
if (++s->rx.training_count > ms_to_symbols(270 + 765))
{
span_log(&s->logging, SPAN_LOG_FLOW, "+++ Rx normal operation (1200)\n");
{
case PI_HDLC_OPTIONAL_FUNCTIONS:
/* TODO: param_val is never used right now. */
- param_val = pack_value(buf, param_len);
+ //param_val = pack_value(buf, param_len);
break;
case PI_TX_INFO_MAXSIZE:
param_val = pack_value(buf, param_len);
--- /dev/null
+##
+## SpanDSP - a series of DSP components for telephony
+##
+## Makefile.am - Process this file with automake to produce Makefile.in
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License version 2, as
+## as published by the Free Software Foundation.
+##
+## 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
+## License along with this program; if not, write to the Free Software
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+SUBDIRS =
+
+DIST_SUBDIRS =
+
+EXTRA_DIST = c03x_02x.tif \
+ c03x_02x-bilevel.tif \
+ f03x_02x.tif \
+ f05x_02x.tif \
+ f06x_01x.tif \
+ j01x_02x.tif \
+ l02x_02x.tif \
+ l02x_02x-bilevel.tif \
+ l04x_02x.tif \
+ l04x_02x-bilevel.tif \
+ m02x_04x.tif \
+ m06x-03x.tif \
+ m11x_02x.tif
+
+all:
+
+clean:
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifdef HAVE_CONFIG_H
+#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifdef HAVE_CONFIG_H
+#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifdef HAVE_CONFIG_H
+#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifdef HAVE_CONFIG_H
+#if defined(HAVE_CONFIG_H)
#include "config.h"
#endif
struct iphdr
{
-#ifdef _HPUX_LI
+#if defined(_HPUX_LI)
unsigned int ihl:4;
unsigned int version:4;
#else
{
//if (s->modem->event)
// modem_event(s->modem);
-#ifdef SIMULATE_RING
+#if defined(SIMULATE_RING)
tmo.tv_sec = 0;
tmo.tv_usec= 1000000/RING_HZ;
#else
if (ret == 0)
{
/* Timeout */
-#ifdef SIMULATE_RING
+#if defined(SIMULATE_RING)
if (!modem->modem->started)
{
rcount++;
TIFFSetField(tif, TIFFTAG_MAKE, "soft-switch.org");
TIFFSetField(tif, TIFFTAG_MODEL, "spandsp");
TIFFSetField(tif, TIFFTAG_HOSTCOMPUTER, "i7.coppice.org");
-#if defined(SPANDSP_SUPPORT_TIFF_FX) && defined(HAVE_TIF_DIR_H)
+#if defined(SPANDSP_SUPPORT_TIFF_FX)
/* Make space for this to be filled in later */
TIFFSetField(tif, TIFFTAG_GLOBALPARAMETERSIFD, 0);
#endif
{
if ((stat = decode_length(buf, len, &ptr, &count)) < 0)
return -1;
+ if ((total_count + count) >= 16)
+ {
+ /* There is too much stuff here to be real, and it would overflow the bufs array
+ if we continue */
+ return -1;
+ }
for (i = 0; i < count; i++)
{
if (decode_open_type(buf, len, &ptr, &bufs[total_count + i], &lengths[total_count + i]) != 0)
break;
}
}
+ argc -= optind;
+ argv += optind;
if (decode_test_file)
{
decode_test_data_file(test_standard, decode_test_file);
exit(0);
}
- argc -= optind;
- argv += optind;
if (argc > 0)
match = argv[0];