Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
February 2009
- 20 participants
- 764 discussions
05 Feb '09
Author: anthm
Date: Thu Feb 5 11:14:12 2009
New Revision: 11656
Log:
tweak sofia profile shutdown
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
freeswitch/trunk/src/switch_core_session.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Thu Feb 5 11:14:12 2009
@@ -692,7 +692,7 @@
int use_100rel = !sofia_test_pflag(profile, PFLAG_DISABLE_100REL);
int use_timer = !sofia_test_pflag(profile, PFLAG_DISABLE_TIMER);
const char *supported = NULL;
- int sanity = 4;
+ int sanity;
switch_mutex_lock(mod_sofia_globals.mutex);
mod_sofia_globals.threads++;
@@ -831,9 +831,15 @@
sofia_clear_pflag_locked(profile, PFLAG_RUNNING);
switch_core_session_hupall_matching_var("sofia_profile_name", profile->name, SWITCH_CAUSE_MANAGER_REQUEST);
+ sanity = 10;
while (profile->inuse) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Waiting for %d session(s)\n", profile->inuse);
su_root_step(profile->s_root, 1000);
+ if (!--sanity) {
+ break;
+ } else if (sanity == 5) {
+ switch_core_session_hupall_matching_var("sofia_profile_name", profile->name, SWITCH_CAUSE_MANAGER_REQUEST);
+ }
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write lock %s\n", profile->name);
@@ -841,6 +847,8 @@
sofia_reg_unregister(profile);
nua_shutdown(profile->nua);
su_root_run(profile->s_root);
+ nua_shutdown(profile->nua);
+ su_root_run(profile->s_root);
sofia_clear_pflag_locked(profile, PFLAG_RUNNING);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Waiting for worker thread\n");
@@ -848,16 +856,18 @@
while (sofia_test_pflag(profile, PFLAG_WORKER_RUNNING)) {
switch_yield(100000);
}
-
+
+ sanity = 4;
while (profile->inuse) {
+ switch_core_session_hupall_matching_var("sofia_profile_name", profile->name, SWITCH_CAUSE_MANAGER_REQUEST);
switch_yield(5000000);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Waiting for %d session(s)\n", profile->inuse);
- if (!sanity--) {
+ if (!--sanity) {
break;
}
}
nua_destroy(profile->nua);
-
+
switch_mutex_lock(profile->ireg_mutex);
switch_mutex_unlock(profile->ireg_mutex);
Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c (original)
+++ freeswitch/trunk/src/switch_core_session.c Thu Feb 5 11:14:12 2009
@@ -142,8 +142,8 @@
switch_mutex_unlock(runtime.throttle_mutex);
while (session_manager.session_count > 0) {
- switch_yield(100000);
- if (++loops == 100) {
+ switch_yield(1000000);
+ if (++loops == 30) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Giving up with %d session%s remaining\n",
session_manager.session_count, session_manager.session_count == 1 ? "" : "s");
break;
1
0
Author: mikej
Date: Thu Feb 5 10:21:18 2009
New Revision: 11655
Log:
fix gcc 4.3.2 build warnings
Modified:
freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c
freeswitch/trunk/libs/spandsp/src/vector_float.c
Modified: freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c (original)
+++ freeswitch/trunk/libs/spandsp/src/gsm0610_lpc.c Thu Feb 5 10:21:18 2009
@@ -135,7 +135,7 @@
/*- End of function --------------------------------------------------------*/
#if defined(__GNUC__) && defined(SPANDSP_USE_MMX)
-void gsm0610_vec_vsraw(const int16_t *p, int n, int bits)
+static void gsm0610_vec_vsraw(const int16_t *p, int n, int bits)
{
static const int64_t ones = 0x0001000100010001LL;
Modified: freeswitch/trunk/libs/spandsp/src/vector_float.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/vector_float.c (original)
+++ freeswitch/trunk/libs/spandsp/src/vector_float.c Thu Feb 5 10:21:18 2009
@@ -132,13 +132,14 @@
SPAN_DECLARE(void) vec_negatef(float z[], const float x[], int n)
{
int i;
- static const uint32_t mask = 0x80000000;
+ static const uint32_t mask = 0x80000000;
+ static const float *fmask = (float *)&mask;
__m128 n1;
__m128 n2;
if ((i = n & ~3))
{
- n2 = _mm_set1_ps(*((float *) &mask));
+ n2 = _mm_set1_ps(*fmask);
for (i -= 4; i >= 0; i -= 4)
{
n1 = _mm_loadu_ps(x + i);
1
0
[commit] r11654 - in freeswitch/trunk/libs/spandsp: . src src/msvc src/spandsp src/spandsp/private
by FreeSWITCH SVN 05 Feb '09
by FreeSWITCH SVN 05 Feb '09
05 Feb '09
Author: mikej
Date: Thu Feb 5 09:54:02 2009
New Revision: 11654
Log:
update to snapshot spandsp-20090205
Modified:
freeswitch/trunk/libs/spandsp/ (props changed)
freeswitch/trunk/libs/spandsp/src/async.c
freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head
freeswitch/trunk/libs/spandsp/src/silence_gen.c
freeswitch/trunk/libs/spandsp/src/spandsp/async.h
freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h
freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h
freeswitch/trunk/libs/spandsp/src/spandsp/private/t4.h
freeswitch/trunk/libs/spandsp/src/spandsp/saturated.h
freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
freeswitch/trunk/libs/spandsp/src/spandsp/t30.h
freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
freeswitch/trunk/libs/spandsp/src/spandsp/t4.h
freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
freeswitch/trunk/libs/spandsp/src/spandsp/version.h
freeswitch/trunk/libs/spandsp/src/t30.c
freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c
freeswitch/trunk/libs/spandsp/src/t4.c
freeswitch/trunk/libs/spandsp/src/v42.c
Modified: freeswitch/trunk/libs/spandsp/src/async.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/async.c (original)
+++ freeswitch/trunk/libs/spandsp/src/async.c Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: async.c,v 1.16 2009/02/03 16:28:39 steveu Exp $
+ * $Id: async.c,v 1.17 2009/02/04 13:18:53 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj (original)
+++ freeswitch/trunk/libs/spandsp/src/libspandsp.vcproj Thu Feb 5 09:54:02 2009
@@ -8,37 +8,22 @@
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
- <Platforms>
- <Platform
+ <Platforms>
+ <Platform
Name="Win32"
/>
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)Debug"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
+ <Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
@@ -52,16 +37,7 @@
CompileAs="1"
DisableSpecificWarnings="4127"
/>
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
+ <Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
@@ -71,29 +47,8 @@
ImportLibrary="./Debug\spandsp.lib"
TargetMachine="1"
/>
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
+ </Configuration>
+ <Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)Release"
IntermediateDirectory="$(ConfigurationName)"
@@ -101,22 +56,7 @@
CharacterSet="1"
WholeProgramOptimization="1"
>
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
+ <Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".;.\spandsp;.\msvc;..\..\tiff-3.8.2\libtiff;.\generated"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSPANDSP_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H"
@@ -126,16 +66,7 @@
DebugInformationFormat="3"
DisableSpecificWarnings="4127"
/>
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
+ <Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
@@ -147,33 +78,12 @@
ImportLibrary="./Release\spandsp.lib"
TargetMachine="1"
/>
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
Modified: freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head (original)
+++ freeswitch/trunk/libs/spandsp/src/msvc/vc8proj.head Thu Feb 5 09:54:02 2009
@@ -87,4 +87,4 @@
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
\ No newline at end of file
+ >
Modified: freeswitch/trunk/libs/spandsp/src/silence_gen.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/silence_gen.c (original)
+++ freeswitch/trunk/libs/spandsp/src/silence_gen.c Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: silence_gen.c,v 1.18 2009/02/03 16:28:40 steveu Exp $
+ * $Id: silence_gen.c,v 1.19 2009/02/04 13:18:53 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/async.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/async.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/async.h Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: async.h,v 1.21 2009/02/03 16:28:40 steveu Exp $
+ * $Id: async.h,v 1.22 2009/02/04 13:18:53 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/complex_vector_float.h Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: complex_vector_float.h,v 1.12 2009/01/31 08:48:11 steveu Exp $
+ * $Id: complex_vector_float.h,v 1.13 2009/02/04 13:18:53 steveu Exp $
*/
#if !defined(_SPANDSP_COMPLEX_VECTOR_FLOAT_H_)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/fast_convert.h Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: fast_convert.h,v 1.1 2009/02/03 16:28:41 steveu Exp $
+ * $Id: fast_convert.h,v 1.2 2009/02/05 12:21:36 steveu Exp $
*/
#if !defined(_SPANDSP_FAST_CONVERT_H_)
@@ -90,7 +90,6 @@
* These replacement functions (pulled from the Public Domain MinGW
* math.h header) replace the native versions.
*/
-#if 0
static __inline__ long int lrint(double x)
{
long int retval;
@@ -119,8 +118,8 @@
);
return retval;
}
-#endif
+ /* The fastest way to convert is the equivalent of lrint() */
static __inline__ long int lfastrint(double x)
{
long int retval;
@@ -149,7 +148,7 @@
);
return retval;
}
-#elif defined(HAVE_LRINT) && defined(HAVE_LRINTF)
+#elif defined(__GNUC__)
#if defined(__i386__)
/* These routines are guaranteed fast on an i386 machine. Using the built in
@@ -235,6 +234,7 @@
* Win32 doesn't seem to have the lrint() and lrintf() functions.
* Therefore implement inline versions of these functions here.
*/
+
__inline long int lrint(double x)
{
long int i;
@@ -269,7 +269,7 @@
__inline double rint(double dbl)
{
- __asm
+ _asm
{
fld dbl
frndint
@@ -300,7 +300,7 @@
return i;
}
#elif defined(WIN64) || defined(_WIN64)
- /* Win64 machines will do best with a simple assignment. */
+ /* x86_64 machines will do best with a simple assignment. */
__inline long int lfastrint(double x)
{
@@ -377,12 +377,21 @@
the accuracy issues related to changing the rounding scheme are of little concern
to us. */
-#if 0
#if !defined(__sgi)
#warning "No usable lrint() and lrintf() functions available."
#warning "Replacing these functions with a simple C cast."
#endif
-#endif
+
+ static __inline__ long int lrint(double x)
+ {
+ return (long int) (x);
+ }
+
+ static __inline__ long int lrintf(float x)
+ {
+ return (long int) (x);
+ }
+
static __inline__ long int lfastrint(double x)
{
return (long int) (x);
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/private/t4.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/private/t4.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/private/t4.h Thu Feb 5 09:54:02 2009
@@ -22,25 +22,29 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t4.h,v 1.1 2008/10/13 13:14:01 steveu Exp $
+ * $Id: t4.h,v 1.2 2009/02/05 12:21:36 steveu Exp $
*/
#if !defined(_SPANDSP_PRIVATE_T4_H_)
#define _SPANDSP_PRIVATE_T4_H_
/*!
- T.4 FAX compression/decompression descriptor. This defines the working state
- for a single instance of a T.4 FAX compression or decompression channel.
+ TIFF specific state information to go with T.4 compression or decompression handling.
*/
-struct t4_state_s
+typedef struct
{
- /*! \brief The same structure is used for T.4 transmit and receive. This variable
- records which mode is in progress. */
- int rx;
- /* "Background" information about the FAX, which can be stored in a TIFF file. */
- /*! \brief The vendor of the machine which produced the TIFF file. */
+ /*! \brief The libtiff context for the current TIFF file */
+ TIFF *tiff_file;
+
+ /*! \brief The compression type for output to the TIFF file. */
+ int output_compression;
+ /*! \brief The TIFF G3 FAX options. */
+ int output_t4_options;
+
+ /* "Background" information about the FAX, which can be stored in the image file. */
+ /*! \brief The vendor of the machine which produced the file. */
const char *vendor;
- /*! \brief The model of machine which produced the TIFF file. */
+ /*! \brief The model of machine which produced the file. */
const char *model;
/*! \brief The local ident string. */
const char *local_ident;
@@ -50,9 +54,17 @@
const char *sub_address;
/*! \brief The FAX DCS information, as an ASCII string. */
const char *dcs;
- /*! \brief The text which will be used in FAX page header. No text results
- in no header line. */
- const char *header_info;
+} t4_tiff_state_t;
+
+/*!
+ T.4 FAX compression/decompression descriptor. This defines the working state
+ for a single instance of a T.4 FAX compression or decompression channel.
+*/
+struct t4_state_s
+{
+ /*! \brief The same structure is used for T.4 transmit and receive. This variable
+ records which mode is in progress. */
+ int rx;
/*! \brief The type of compression used between the FAX machines. */
int line_encoding;
@@ -60,11 +72,6 @@
for hardware FAX machines. */
int min_bits_per_row;
- /*! \brief The compression type for output to the TIFF file. */
- int output_compression;
- /*! \brief The TIFF G3 FAX options. */
- int output_t4_options;
-
/*! \brief Callback function to read a row of pixels from the image source. */
t4_row_read_handler_t row_read_handler;
/*! \brief Opaque pointer passed to row_read_handler. */
@@ -88,8 +95,6 @@
/*! \brief A point to the image buffer. */
uint8_t *image_buffer;
- /*! \brief The libtiff context for the current TIFF file */
- TIFF *tiff_file;
/*! \brief The current file name. */
const char *file;
/*! \brief The first page to transfer. -1 to start at the beginning of the file. */
@@ -99,7 +104,7 @@
/*! \brief The number of pages transferred to date. */
int pages_transferred;
- /*! \brief The number of pages in the current TIFF file. */
+ /*! \brief The number of pages in the current image file. */
int pages_in_file;
/*! \brief Column-to-column (X) resolution in pixels per metre. */
int x_resolution;
@@ -193,8 +198,15 @@
/*! \brief The maximum bits in any row of the current page. For monitoring only. */
int max_row_bits;
+ /*! \brief The text which will be used in FAX page header. No text results
+ in no header line. */
+ const char *header_info;
+
/*! \brief Error and flow logging control */
logging_state_t logging;
+
+ /*! \brief All TIFF file specific state information for the T.4 context. */
+ t4_tiff_state_t tiff;
};
#endif
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/saturated.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/saturated.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/saturated.h Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: saturated.h,v 1.3 2009/02/03 17:25:53 steveu Exp $
+ * $Id: saturated.h,v 1.4 2009/02/05 12:21:36 steveu Exp $
*/
/*! \file */
@@ -75,7 +75,6 @@
return INT16_MAX;
if (famp < (float) INT16_MIN)
return INT16_MIN;
- //return (int16_t) lfastrintf(famp);
return (int16_t) lrintf(famp);
}
/*- End of function --------------------------------------------------------*/
@@ -86,11 +85,33 @@
return INT16_MAX;
if (damp < (double) INT16_MIN)
return INT16_MIN;
- //return (int16_t) lfastrint(damp);
return (int16_t) lrint(damp);
}
/*- End of function --------------------------------------------------------*/
+/* Saturate to a 16 bit integer, using the fastest float to int conversion */
+static __inline__ int16_t ffastsaturatef(float famp)
+{
+ if (famp > (float) INT16_MAX)
+ return INT16_MAX;
+ if (famp < (float) INT16_MIN)
+ return INT16_MIN;
+ return (int16_t) lfastrintf(famp);
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Saturate to a 16 bit integer, using the fastest double to int conversion */
+static __inline__ int16_t ffastsaturate(double damp)
+{
+ if (damp > (double) INT16_MAX)
+ return INT16_MAX;
+ if (damp < (double) INT16_MIN)
+ return INT16_MIN;
+ return (int16_t) lfastrint(damp);
+}
+/*- End of function --------------------------------------------------------*/
+
+/* Saturate to a 16 bit integer, using the closest float to int conversion */
static __inline__ float ffsaturatef(float famp)
{
if (famp > (float) INT16_MAX)
@@ -101,6 +122,7 @@
}
/*- End of function --------------------------------------------------------*/
+/* Saturate to a 16 bit integer, using the closest double to int conversion */
static __inline__ double ffsaturate(double famp)
{
if (famp > (double) INT16_MAX)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/silence_gen.h Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: silence_gen.h,v 1.14 2009/02/03 16:28:41 steveu Exp $
+ * $Id: silence_gen.h,v 1.15 2009/02/04 13:18:53 steveu Exp $
*/
#if !defined(_SPANDSP_SILENCE_GEN_H_)
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t30.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t30.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t30.h Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30.h,v 1.122 2009/02/03 16:28:41 steveu Exp $
+ * $Id: t30.h,v 1.123 2009/02/04 13:18:53 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t38_non_ecm_buffer.h Thu Feb 5 09:54:02 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_non_ecm_buffer.h,v 1.5 2009/02/03 16:28:41 steveu Exp $
+ * $Id: t38_non_ecm_buffer.h,v 1.6 2009/02/04 13:18:53 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/t4.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/t4.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/t4.h Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t4.h,v 1.55 2009/02/03 16:28:41 steveu Exp $
+ * $Id: t4.h,v 1.56 2009/02/05 12:21:36 steveu Exp $
*/
/*! \file */
@@ -249,7 +249,7 @@
started with t4_rx_init.
\param s The T.4 receive context.
\return 0 for success, otherwise -1. */
-SPAN_DECLARE(int) t4_rx_delete(t4_state_t *s);
+SPAN_DECLARE(int) t4_rx_free(t4_state_t *s);
/*! \brief End reception of a document. Tidy up and close the file.
This should be used to end T.4 reception started with
@@ -379,7 +379,7 @@
started with t4_tx_init.
\param s The T.4 context.
\return 0 for success, otherwise -1. */
-SPAN_DECLARE(int) t4_tx_delete(t4_state_t *s);
+SPAN_DECLARE(int) t4_tx_free(t4_state_t *s);
/*! \brief End the transmission of a document. Tidy up and close the file.
This should be used to end T.4 transmission started with t4_tx_init.
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/v42.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/v42.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/v42.h Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v42.h,v 1.28 2009/02/03 16:28:41 steveu Exp $
+ * $Id: v42.h,v 1.29 2009/02/04 13:18:53 steveu Exp $
*/
/*! \page v42_page V.42 modem error correction
Modified: freeswitch/trunk/libs/spandsp/src/spandsp/version.h
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/spandsp/version.h (original)
+++ freeswitch/trunk/libs/spandsp/src/spandsp/version.h Thu Feb 5 09:54:02 2009
@@ -30,8 +30,8 @@
/* The date and time of the version are in UTC form. */
-#define SPANDSP_RELEASE_DATE 20090203
-#define SPANDSP_RELEASE_TIME 172817
+#define SPANDSP_RELEASE_DATE 20090205
+#define SPANDSP_RELEASE_TIME 122416
#endif
/*- End of file ------------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/t30.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t30.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t30.c Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t30.c,v 1.283 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t30.c,v 1.284 2009/02/04 13:18:53 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t38_non_ecm_buffer.c Thu Feb 5 09:54:02 2009
@@ -23,7 +23,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t38_non_ecm_buffer.c,v 1.6 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t38_non_ecm_buffer.c,v 1.7 2009/02/04 13:18:53 steveu Exp $
*/
/*! \file */
Modified: freeswitch/trunk/libs/spandsp/src/t4.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/t4.c (original)
+++ freeswitch/trunk/libs/spandsp/src/t4.c Thu Feb 5 09:54:02 2009
@@ -24,7 +24,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: t4.c,v 1.121 2009/02/03 16:28:40 steveu Exp $
+ * $Id: t4.c,v 1.123 2009/02/05 12:21:36 steveu Exp $
*/
/*
@@ -117,6 +117,8 @@
#include "faxfont.h"
+static int encode_row(t4_state_t *s);
+
#if defined(T4_STATE_DEBUGGING)
static void STATE_TRACE(const char *format, ...)
{
@@ -156,66 +158,68 @@
uint16_t resunit;
float x_resolution;
float y_resolution;
+ t4_tiff_state_t *t;
+ t = &s->tiff;
/* Prepare the directory entry fully before writing the image, or libtiff complains */
- TIFFSetField(s->tiff_file, TIFFTAG_COMPRESSION, s->output_compression);
- if (s->output_compression == COMPRESSION_CCITT_T4)
+ TIFFSetField(t->tiff_file, TIFFTAG_COMPRESSION, t->output_compression);
+ if (t->output_compression == COMPRESSION_CCITT_T4)
{
- TIFFSetField(s->tiff_file, TIFFTAG_T4OPTIONS, s->output_t4_options);
- TIFFSetField(s->tiff_file, TIFFTAG_FAXMODE, FAXMODE_CLASSF);
+ TIFFSetField(t->tiff_file, TIFFTAG_T4OPTIONS, t->output_t4_options);
+ TIFFSetField(t->tiff_file, TIFFTAG_FAXMODE, FAXMODE_CLASSF);
}
- TIFFSetField(s->tiff_file, TIFFTAG_IMAGEWIDTH, s->image_width);
- TIFFSetField(s->tiff_file, TIFFTAG_BITSPERSAMPLE, 1);
- TIFFSetField(s->tiff_file, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
- TIFFSetField(s->tiff_file, TIFFTAG_SAMPLESPERPIXEL, 1);
- if (s->output_compression == COMPRESSION_CCITT_T4
+ TIFFSetField(t->tiff_file, TIFFTAG_IMAGEWIDTH, s->image_width);
+ TIFFSetField(t->tiff_file, TIFFTAG_BITSPERSAMPLE, 1);
+ TIFFSetField(t->tiff_file, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
+ TIFFSetField(t->tiff_file, TIFFTAG_SAMPLESPERPIXEL, 1);
+ if (t->output_compression == COMPRESSION_CCITT_T4
||
- s->output_compression == COMPRESSION_CCITT_T6)
+ t->output_compression == COMPRESSION_CCITT_T6)
{
- TIFFSetField(s->tiff_file, TIFFTAG_ROWSPERSTRIP, -1L);
+ TIFFSetField(t->tiff_file, TIFFTAG_ROWSPERSTRIP, -1L);
}
else
{
- TIFFSetField(s->tiff_file,
+ TIFFSetField(t->tiff_file,
TIFFTAG_ROWSPERSTRIP,
- TIFFDefaultStripSize(s->tiff_file, 0));
+ TIFFDefaultStripSize(t->tiff_file, 0));
}
- TIFFSetField(s->tiff_file, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
- TIFFSetField(s->tiff_file, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
- TIFFSetField(s->tiff_file, TIFFTAG_FILLORDER, FILLORDER_LSB2MSB);
+ TIFFSetField(t->tiff_file, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
+ TIFFSetField(t->tiff_file, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE);
+ TIFFSetField(t->tiff_file, TIFFTAG_FILLORDER, FILLORDER_LSB2MSB);
x_resolution = s->x_resolution/100.0f;
y_resolution = s->y_resolution/100.0f;
/* Metric seems the sane thing to use in the 21st century, but a lot of lousy software
gets FAX resolutions wrong, and more get it wrong using metric than using inches. */
#if 0
- TIFFSetField(s->tiff_file, TIFFTAG_XRESOLUTION, x_resolution);
- TIFFSetField(s->tiff_file, TIFFTAG_YRESOLUTION, y_resolution);
+ TIFFSetField(t->tiff_file, TIFFTAG_XRESOLUTION, x_resolution);
+ TIFFSetField(t->tiff_file, TIFFTAG_YRESOLUTION, y_resolution);
resunit = RESUNIT_CENTIMETER;
- TIFFSetField(s->tiff_file, TIFFTAG_RESOLUTIONUNIT, resunit);
+ TIFFSetField(t->tiff_file, TIFFTAG_RESOLUTIONUNIT, resunit);
#else
- TIFFSetField(s->tiff_file, TIFFTAG_XRESOLUTION, floorf(x_resolution*CM_PER_INCH + 0.5f));
- TIFFSetField(s->tiff_file, TIFFTAG_YRESOLUTION, floorf(y_resolution*CM_PER_INCH + 0.5f));
+ TIFFSetField(t->tiff_file, TIFFTAG_XRESOLUTION, floorf(x_resolution*CM_PER_INCH + 0.5f));
+ TIFFSetField(t->tiff_file, TIFFTAG_YRESOLUTION, floorf(y_resolution*CM_PER_INCH + 0.5f));
resunit = RESUNIT_INCH;
- TIFFSetField(s->tiff_file, TIFFTAG_RESOLUTIONUNIT, resunit);
+ TIFFSetField(t->tiff_file, TIFFTAG_RESOLUTIONUNIT, resunit);
#endif
/* TODO: add the version of spandsp */
- TIFFSetField(s->tiff_file, TIFFTAG_SOFTWARE, "spandsp");
+ TIFFSetField(t->tiff_file, TIFFTAG_SOFTWARE, "spandsp");
if (gethostname(buf, sizeof(buf)) == 0)
- TIFFSetField(s->tiff_file, TIFFTAG_HOSTCOMPUTER, buf);
+ TIFFSetField(t->tiff_file, TIFFTAG_HOSTCOMPUTER, buf);
#if defined(TIFFTAG_FAXDCS)
- if (s->dcs)
- TIFFSetField(s->tiff_file, TIFFTAG_FAXDCS, s->dcs);
+ if (t->dcs)
+ TIFFSetField(t->tiff_file, TIFFTAG_FAXDCS, t->dcs);
#endif
- if (s->sub_address)
- TIFFSetField(s->tiff_file, TIFFTAG_FAXSUBADDRESS, s->sub_address);
- if (s->far_ident)
- TIFFSetField(s->tiff_file, TIFFTAG_IMAGEDESCRIPTION, s->far_ident);
- if (s->vendor)
- TIFFSetField(s->tiff_file, TIFFTAG_MAKE, s->vendor);
- if (s->model)
- TIFFSetField(s->tiff_file, TIFFTAG_MODEL, s->model);
+ if (t->sub_address)
+ TIFFSetField(t->tiff_file, TIFFTAG_FAXSUBADDRESS, t->sub_address);
+ if (t->far_ident)
+ TIFFSetField(t->tiff_file, TIFFTAG_IMAGEDESCRIPTION, t->far_ident);
+ if (t->vendor)
+ TIFFSetField(t->tiff_file, TIFFTAG_MAKE, t->vendor);
+ if (t->model)
+ TIFFSetField(t->tiff_file, TIFFTAG_MODEL, t->model);
time(&now);
tm = localtime(&now);
@@ -227,43 +231,33 @@
tm->tm_hour,
tm->tm_min,
tm->tm_sec);
- TIFFSetField(s->tiff_file, TIFFTAG_DATETIME, buf);
- TIFFSetField(s->tiff_file, TIFFTAG_FAXRECVTIME, now - s->page_start_time);
+ TIFFSetField(t->tiff_file, TIFFTAG_DATETIME, buf);
+ TIFFSetField(t->tiff_file, TIFFTAG_FAXRECVTIME, now - s->page_start_time);
- TIFFSetField(s->tiff_file, TIFFTAG_IMAGELENGTH, s->image_length);
+ TIFFSetField(t->tiff_file, TIFFTAG_IMAGELENGTH, s->image_length);
/* Set the total pages to 1. For any one page document we will get this
right. For multi-page documents we will need to come back and fill in
the right answer when we know it. */
- TIFFSetField(s->tiff_file, TIFFTAG_PAGENUMBER, s->pages_transferred++, 1);
+ TIFFSetField(t->tiff_file, TIFFTAG_PAGENUMBER, s->pages_transferred++, 1);
s->pages_in_file = s->pages_transferred;
- if (s->output_compression == COMPRESSION_CCITT_T4)
+ if (t->output_compression == COMPRESSION_CCITT_T4)
{
if (s->bad_rows)
{
- TIFFSetField(s->tiff_file, TIFFTAG_BADFAXLINES, s->bad_rows);
- TIFFSetField(s->tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_REGENERATED);
- TIFFSetField(s->tiff_file, TIFFTAG_CONSECUTIVEBADFAXLINES, s->longest_bad_row_run);
+ TIFFSetField(t->tiff_file, TIFFTAG_BADFAXLINES, s->bad_rows);
+ TIFFSetField(t->tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_REGENERATED);
+ TIFFSetField(t->tiff_file, TIFFTAG_CONSECUTIVEBADFAXLINES, s->longest_bad_row_run);
}
else
{
- TIFFSetField(s->tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
+ TIFFSetField(t->tiff_file, TIFFTAG_CLEANFAXDATA, CLEANFAXDATA_CLEAN);
}
}
- TIFFSetField(s->tiff_file, TIFFTAG_IMAGEWIDTH, s->image_width);
+ TIFFSetField(t->tiff_file, TIFFTAG_IMAGEWIDTH, s->image_width);
return 0;
}
/*- End of function --------------------------------------------------------*/
-static void update_row_bit_info(t4_state_t *s)
-{
- if (s->row_bits > s->max_row_bits)
- s->max_row_bits = s->row_bits;
- if (s->row_bits < s->min_row_bits)
- s->min_row_bits = s->row_bits;
- s->row_bits = 0;
-}
-/*- End of function --------------------------------------------------------*/
-
static int test_resolution(int res_unit, float actual, float expected)
{
if (res_unit == RESUNIT_INCH)
@@ -310,24 +304,26 @@
float x_resolution;
float y_resolution;
int i;
+ t4_tiff_state_t *t;
+ t = &s->tiff;
parm = 0;
- TIFFGetField(s->tiff_file, TIFFTAG_BITSPERSAMPLE, &parm);
+ TIFFGetField(t->tiff_file, TIFFTAG_BITSPERSAMPLE, &parm);
if (parm != 1)
return -1;
parm = 0;
- TIFFGetField(s->tiff_file, TIFFTAG_IMAGEWIDTH, &parm);
+ TIFFGetField(t->tiff_file, TIFFTAG_IMAGEWIDTH, &parm);
s->image_width = parm;
s->bytes_per_row = (s->image_width + 7)/8;
parm = 0;
- TIFFGetField(s->tiff_file, TIFFTAG_IMAGELENGTH, &parm);
+ TIFFGetField(t->tiff_file, TIFFTAG_IMAGELENGTH, &parm);
s->image_length = parm;
x_resolution = 0.0f;
- TIFFGetField(s->tiff_file, TIFFTAG_XRESOLUTION, &x_resolution);
+ TIFFGetField(t->tiff_file, TIFFTAG_XRESOLUTION, &x_resolution);
y_resolution = 0.0f;
- TIFFGetField(s->tiff_file, TIFFTAG_YRESOLUTION, &y_resolution);
+ TIFFGetField(t->tiff_file, TIFFTAG_YRESOLUTION, &y_resolution);
res_unit = RESUNIT_INCH;
- TIFFGetField(s->tiff_file, TIFFTAG_RESOLUTIONUNIT, &res_unit);
+ TIFFGetField(t->tiff_file, TIFFTAG_RESOLUTIONUNIT, &res_unit);
/* Allow a little range for the X resolution in centimeters. The spec doesn't pin down the
precise value. The other value should be exact. */
@@ -360,16 +356,37 @@
static int open_tiff_input_file(t4_state_t *s, const char *file)
{
- if ((s->tiff_file = TIFFOpen(file, "r")) == NULL)
+ if ((s->tiff.tiff_file = TIFFOpen(file, "r")) == NULL)
return -1;
return 0;
}
/*- End of function --------------------------------------------------------*/
+static int read_tiff_image(t4_state_t *s)
+{
+ int row;
+ int image_length;
+
+ image_length = 0;
+ TIFFGetField(s->tiff.tiff_file, TIFFTAG_IMAGELENGTH, &image_length);
+ for (row = 0; row < image_length; row++)
+ {
+ if (TIFFReadScanline(s->tiff.tiff_file, s->row_buf, row, 0) <= 0)
+ {
+ span_log(&s->logging, SPAN_LOG_WARNING, "%s: Read error at row %d.\n", s->file, row);
+ break;
+ }
+ if (encode_row(s))
+ return -1;
+ }
+ return image_length;
+}
+/*- End of function --------------------------------------------------------*/
+
static int close_tiff_input_file(t4_state_t *s)
{
- TIFFClose(s->tiff_file);
- s->tiff_file = NULL;
+ TIFFClose(s->tiff.tiff_file);
+ s->tiff.tiff_file = NULL;
if (s->file)
free((char *) s->file);
s->file = NULL;
@@ -379,16 +396,30 @@
static int open_tiff_output_file(t4_state_t *s, const char *file)
{
- if ((s->tiff_file = TIFFOpen(file, "w")) == NULL)
+ if ((s->tiff.tiff_file = TIFFOpen(file, "w")) == NULL)
return -1;
return 0;
}
/*- End of function --------------------------------------------------------*/
+static void write_tiff_image(t4_state_t *s)
+{
+ /* Set up the TIFF directory info... */
+ set_tiff_directory_info(s);
+ /* ..and then write the image... */
+ if (TIFFWriteEncodedStrip(s->tiff.tiff_file, 0, s->image_buffer, s->image_length*s->bytes_per_row) < 0)
+ span_log(&s->logging, SPAN_LOG_WARNING, "%s: Error writing TIFF strip.\n", s->file);
+ /* ...then the directory entry, and libtiff is happy. */
+ TIFFWriteDirectory(s->tiff.tiff_file);
+}
+/*- End of function --------------------------------------------------------*/
+
static int close_tiff_output_file(t4_state_t *s)
{
int i;
+ t4_tiff_state_t *t;
+ t = &s->tiff;
/* Perform any operations needed to tidy up a written TIFF file before
closure. */
if (s->pages_transferred > 1)
@@ -398,13 +429,13 @@
need to set the correct total page count associated with each page. */
for (i = 0; i < s->pages_transferred; i++)
{
- TIFFSetDirectory(s->tiff_file, (tdir_t) i);
- TIFFSetField(s->tiff_file, TIFFTAG_PAGENUMBER, i, s->pages_transferred);
- TIFFWriteDirectory(s->tiff_file);
+ TIFFSetDirectory(t->tiff_file, (tdir_t) i);
+ TIFFSetField(t->tiff_file, TIFFTAG_PAGENUMBER, i, s->pages_transferred);
+ TIFFWriteDirectory(t->tiff_file);
}
}
- TIFFClose(s->tiff_file);
- s->tiff_file = NULL;
+ TIFFClose(t->tiff_file);
+ t->tiff_file = NULL;
if (s->file)
{
/* Try not to leave a file behind, if we didn't receive any pages to
@@ -418,6 +449,16 @@
}
/*- End of function --------------------------------------------------------*/
+static void update_row_bit_info(t4_state_t *s)
+{
+ if (s->row_bits > s->max_row_bits)
+ s->max_row_bits = s->row_bits;
+ if (s->row_bits < s->min_row_bits)
+ s->min_row_bits = s->row_bits;
+ s->row_bits = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
static __inline__ int run_length(unsigned int bits)
{
@@ -780,13 +821,7 @@
}
else
{
- /* Set up the TIFF directory info... */
- set_tiff_directory_info(s);
- /* ..and then write the image... */
- if (TIFFWriteEncodedStrip(s->tiff_file, 0, s->image_buffer, s->image_length*s->bytes_per_row) < 0)
- span_log(&s->logging, SPAN_LOG_WARNING, "%s: Error writing TIFF strip.\n", s->file);
- /* ...then the directory entry, and libtiff is happy. */
- TIFFWriteDirectory(s->tiff_file);
+ write_tiff_image(s);
}
s->rx_bits = 0;
s->rx_skip_bits = 0;
@@ -801,7 +836,8 @@
static __inline__ void drop_rx_bits(t4_state_t *s, int bits)
{
/* Only remove one bit right now. The rest need to be removed step by step,
- checking for a misaligned EOL along the way. */
+ checking for a misaligned EOL along the way. This is time consuming, but
+ if we don't do it a single bit error can severely damage an image. */
s->row_bits += bits;
s->rx_skip_bits += (bits - 1);
s->rx_bits--;
@@ -1162,6 +1198,11 @@
SPAN_DECLARE(t4_state_t *) t4_rx_init(t4_state_t *s, const char *file, int output_encoding)
{
+ if (s == NULL)
+ {
+ if ((s = (t4_state_t *) malloc(sizeof(*s))) == NULL)
+ return NULL;
+ }
memset(s, 0, sizeof(*s));
span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
span_log_set_protocol(&s->logging, "T.4");
@@ -1179,16 +1220,16 @@
switch (output_encoding)
{
case T4_COMPRESSION_ITU_T4_1D:
- s->output_compression = COMPRESSION_CCITT_T4;
- s->output_t4_options = GROUP3OPT_FILLBITS;
+ s->tiff.output_compression = COMPRESSION_CCITT_T4;
+ s->tiff.output_t4_options = GROUP3OPT_FILLBITS;
break;
case T4_COMPRESSION_ITU_T4_2D:
- s->output_compression = COMPRESSION_CCITT_T4;
- s->output_t4_options = GROUP3OPT_FILLBITS | GROUP3OPT_2DENCODING;
+ s->tiff.output_compression = COMPRESSION_CCITT_T4;
+ s->tiff.output_t4_options = GROUP3OPT_FILLBITS | GROUP3OPT_2DENCODING;
break;
case T4_COMPRESSION_ITU_T6:
- s->output_compression = COMPRESSION_CCITT_T6;
- s->output_t4_options = 0;
+ s->tiff.output_compression = COMPRESSION_CCITT_T6;
+ s->tiff.output_t4_options = 0;
break;
}
@@ -1220,7 +1261,7 @@
uint32_t *bufptr;
span_log(&s->logging, SPAN_LOG_FLOW, "Start rx page - compression %d\n", s->line_encoding);
- if (s->tiff_file == NULL)
+ if (s->tiff.tiff_file == NULL)
return -1;
/* Calculate the scanline/tile width. */
@@ -1286,23 +1327,22 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) t4_rx_delete(t4_state_t *s)
+SPAN_DECLARE(int) t4_rx_end(t4_state_t *s)
{
- if (t4_rx_end(s))
+ if (!s->rx)
return -1;
+ if (s->tiff.tiff_file)
+ close_tiff_output_file(s);
free_buffers(s);
- free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) t4_rx_end(t4_state_t *s)
+SPAN_DECLARE(int) t4_rx_free(t4_state_t *s)
{
- if (!s->rx)
+ if (t4_rx_end(s))
return -1;
- if (s->tiff_file)
- close_tiff_output_file(s);
- free_buffers(s);
+ free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
@@ -1333,31 +1373,31 @@
SPAN_DECLARE(void) t4_rx_set_dcs(t4_state_t *s, const char *dcs)
{
- s->dcs = (dcs && dcs[0]) ? dcs : NULL;
+ s->tiff.dcs = (dcs && dcs[0]) ? dcs : NULL;
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(void) t4_rx_set_sub_address(t4_state_t *s, const char *sub_address)
{
- s->sub_address = (sub_address && sub_address[0]) ? sub_address : NULL;
+ s->tiff.sub_address = (sub_address && sub_address[0]) ? sub_address : NULL;
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(void) t4_rx_set_far_ident(t4_state_t *s, const char *ident)
{
- s->far_ident = (ident && ident[0]) ? ident : NULL;
+ s->tiff.far_ident = (ident && ident[0]) ? ident : NULL;
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(void) t4_rx_set_vendor(t4_state_t *s, const char *vendor)
{
- s->vendor = vendor;
+ s->tiff.vendor = vendor;
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(void) t4_rx_set_model(t4_state_t *s, const char *model)
{
- s->model = model;
+ s->tiff.model = model;
}
/*- End of function --------------------------------------------------------*/
@@ -1721,6 +1761,11 @@
{
int run_space;
+ if (s == NULL)
+ {
+ if ((s = (t4_state_t *) malloc(sizeof(*s))) == NULL)
+ return NULL;
+ }
memset(s, 0, sizeof(*s));
span_log_init(&s->logging, SPAN_LOG_NONE, NULL);
span_log_set_protocol(&s->logging, "T.4");
@@ -1801,7 +1846,7 @@
tm.tm_hour,
tm.tm_min,
s->header_info,
- s->local_ident,
+ s->tiff.local_ident,
s->pages_transferred + 1);
}
/*- End of function --------------------------------------------------------*/
@@ -1813,9 +1858,9 @@
int repeats;
int pattern;
int row_bufptr;
- int parm;
int run_space;
int len;
+ int this_image_width;
char *t;
char header[132 + 1];
uint8_t *bufptr8;
@@ -1824,23 +1869,26 @@
span_log(&s->logging, SPAN_LOG_FLOW, "Start tx page %d\n", s->pages_transferred);
if (s->pages_transferred > s->stop_page)
return -1;
- if (s->tiff_file == NULL)
- return -1;
- if (!TIFFSetDirectory(s->tiff_file, (tdir_t) s->pages_transferred))
+ if (s->tiff.tiff_file == NULL)
return -1;
+ this_image_width = 0;
+ if (s->row_read_handler == NULL)
+ {
+ if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred))
+ return -1;
+ TIFFGetField(s->tiff.tiff_file, TIFFTAG_IMAGEWIDTH, &this_image_width);
+ }
s->image_size = 0;
s->tx_bitstream = 0;
s->tx_bits = 0;
s->row_is_2d = (s->line_encoding == T4_COMPRESSION_ITU_T6);
s->rows_to_next_1d_row = s->max_rows_to_next_1d_row - 1;
- /* Allow for pages being of different width */
- parm = 0;
- TIFFGetField(s->tiff_file, TIFFTAG_IMAGEWIDTH, &parm);
- run_space = (parm + 4)*sizeof(uint32_t);
- if (parm != s->image_width)
+ /* Allow for pages being of different width. */
+ run_space = (this_image_width + 4)*sizeof(uint32_t);
+ if (this_image_width != s->image_width)
{
- s->image_width = parm;
+ s->image_width = this_image_width;
s->bytes_per_row = (s->image_width + 7)/8;
if ((bufptr = (uint32_t *) realloc(s->cur_runs, run_space)) == NULL)
@@ -1928,18 +1976,8 @@
}
else
{
- s->image_length = 0;
- TIFFGetField(s->tiff_file, TIFFTAG_IMAGELENGTH, &s->image_length);
- for (row = 0; row < s->image_length; row++)
- {
- if (TIFFReadScanline(s->tiff_file, s->row_buf, row, 0) <= 0)
- {
- span_log(&s->logging, SPAN_LOG_WARNING, "%s: Read error at row %d.\n", s->file, row);
- break;
- }
- if (encode_row(s))
- return -1;
- }
+ if ((s->image_length = read_tiff_image(s)) < 0)
+ return -1;
}
if (s->line_encoding == T4_COMPRESSION_ITU_T6)
{
@@ -1970,7 +2008,7 @@
span_log(&s->logging, SPAN_LOG_FLOW, "Checking for the existance of page %d\n", s->pages_transferred + 1);
if (s->pages_transferred >= s->stop_page)
return -1;
- if (s->tiff_file == NULL)
+ if (s->tiff.tiff_file == NULL)
return -1;
if (s->pages_in_file >= 0)
{
@@ -1979,8 +2017,11 @@
}
else
{
- if (!TIFFSetDirectory(s->tiff_file, (tdir_t) s->pages_transferred + 1))
- return -1;
+ if (s->row_read_handler == NULL)
+ {
+ if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred + 1))
+ return -1;
+ }
}
return 0;
}
@@ -2048,23 +2089,22 @@
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) t4_tx_delete(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_end(t4_state_t *s)
{
- if (t4_tx_end(s))
+ if (s->rx)
return -1;
+ if (s->tiff.tiff_file)
+ close_tiff_input_file(s);
free_buffers(s);
- free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
-SPAN_DECLARE(int) t4_tx_end(t4_state_t *s)
+SPAN_DECLARE(int) t4_tx_free(t4_state_t *s)
{
- if (s->rx)
+ if (t4_tx_end(s))
return -1;
- if (s->tiff_file)
- close_tiff_input_file(s);
- free_buffers(s);
+ free(s);
return 0;
}
/*- End of function --------------------------------------------------------*/
@@ -2085,7 +2125,7 @@
SPAN_DECLARE(void) t4_tx_set_local_ident(t4_state_t *s, const char *ident)
{
- s->local_ident = (ident && ident[0]) ? ident : NULL;
+ s->tiff.local_ident = (ident && ident[0]) ? ident : NULL;
}
/*- End of function --------------------------------------------------------*/
@@ -2121,12 +2161,15 @@
trusted? Some files say 0. Actually searching for the last page is
more reliable. */
max = 0;
- while (TIFFSetDirectory(s->tiff_file, (tdir_t) max))
- max++;
+ if (s->row_write_handler == NULL)
+ {
+ while (TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) max))
+ max++;
+ /* Back to the previous page */
+ if (!TIFFSetDirectory(s->tiff.tiff_file, (tdir_t) s->pages_transferred))
+ return -1;
+ }
s->pages_in_file = max;
- /* Back to the previous page */
- if (!TIFFSetDirectory(s->tiff_file, (tdir_t) s->pages_transferred))
- return -1;
return max;
}
/*- End of function --------------------------------------------------------*/
Modified: freeswitch/trunk/libs/spandsp/src/v42.c
==============================================================================
--- freeswitch/trunk/libs/spandsp/src/v42.c (original)
+++ freeswitch/trunk/libs/spandsp/src/v42.c Thu Feb 5 09:54:02 2009
@@ -22,7 +22,7 @@
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: v42.c,v 1.48 2009/02/03 16:28:40 steveu Exp $
+ * $Id: v42.c,v 1.49 2009/02/04 13:18:53 steveu Exp $
*/
/* THIS IS A WORK IN PROGRESS. IT IS NOT FINISHED. */
1
0
Author: jskopis
Date: Wed Feb 4 21:40:44 2009
New Revision: 11653
Log:
whoops
Removed:
freeswitch/branches/jskopis/trunk/
1
0
Author: jskopis
Date: Wed Feb 4 21:36:18 2009
New Revision: 11652
Log:
copying trunk
Added:
freeswitch/branches/jskopis/trunk/
- copied from r11651, /freeswitch/trunk/
1
0
Author: jskopis
Date: Wed Feb 4 21:36:06 2009
New Revision: 11651
Log:
whoops
Removed:
freeswitch/branches/jskopis/trunk/
1
0
Author: jskopis
Date: Wed Feb 4 21:32:38 2009
New Revision: 11650
Log:
copying trunk
Added:
freeswitch/branches/jskopis/trunk/
- copied from r11649, /freeswitch/trunk/
1
0
Author: brian
Date: Wed Feb 4 18:18:50 2009
New Revision: 11649
Log:
merge in new iksemel patches
Removed:
freeswitch/trunk/libs/iksemel/doc/texinfo.tex
1
0
Author: anthm
Date: Wed Feb 4 18:16:40 2009
New Revision: 11648
Log:
revert
Modified:
freeswitch/trunk/libs/iksemel/build/texinfo.tex
freeswitch/trunk/libs/iksemel/configure.ac
Modified: freeswitch/trunk/libs/iksemel/build/texinfo.tex
==============================================================================
--- freeswitch/trunk/libs/iksemel/build/texinfo.tex (original)
+++ freeswitch/trunk/libs/iksemel/build/texinfo.tex Wed Feb 4 18:16:40 2009
@@ -3,10 +3,10 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2004-09-06.16}
+\def\texinfoversion{2005-07-05.19}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
-% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
% Foundation, Inc.
%
% This texinfo.tex file is free software; you can redistribute it and/or
@@ -21,8 +21,8 @@
%
% You should have received a copy of the GNU General Public License
% along with this texinfo.tex file; see the file COPYING. If not, write
-% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-% Boston, MA 02111-1307, USA.
+% to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+% Boston, MA 02110-1301, USA.
%
% As a special exception, when this file is read by TeX when processing
% a Texinfo source document, you may use the result without
@@ -89,10 +89,11 @@
\let\ptexhat=^
\let\ptexi=\i
\let\ptexindent=\indent
-\let\ptexnoindent=\noindent
\let\ptexinsert=\insert
\let\ptexlbrace=\{
\let\ptexless=<
+\let\ptexnewwrite\newwrite
+\let\ptexnoindent=\noindent
\let\ptexplus=+
\let\ptexrbrace=\}
\let\ptexslash=\/
@@ -154,10 +155,12 @@
% In some macros, we cannot use the `\? notation---the left quote is
% in some cases the escape char.
+\chardef\backChar = `\\
\chardef\colonChar = `\:
\chardef\commaChar = `\,
\chardef\dotChar = `\.
\chardef\exclamChar= `\!
+\chardef\plusChar = `\+
\chardef\questChar = `\?
\chardef\semiChar = `\;
\chardef\underChar = `\_
@@ -166,6 +169,12 @@
\chardef\spacecat = 10
\def\spaceisspace{\catcode\spaceChar=\spacecat}
+{% for help with debugging.
+ % example usage: \expandafter\show\activebackslash
+ \catcode`\! = 0 \catcode`\\ = \active
+ !global!def!activebackslash{\}
+}
+
% Ignore a token.
%
\def\gobble#1{}
@@ -301,10 +310,7 @@
% take effect in \write's, yet the group defined by the \vbox ends
% before the \shipout runs.
%
- \escapechar = `\\ % use backslash in output files.
\indexdummies % don't expand commands in the output.
- \normalturnoffactive % \ in index entries must not stay \, e.g., if
- % the page break happens to be in the middle of an example.
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
@@ -355,7 +361,7 @@
\egroup % \vbox from first cropmarks clause
\fi
}% end of \shipout\vbox
- }% end of group with \normalturnoffactive
+ }% end of group with \indexdummies
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi
}
@@ -565,7 +571,7 @@
\let\}=\myrbrace
\begingroup
% Definitions to produce \{ and \} commands for indices,
- % and @{ and @} for the aux file.
+ % and @{ and @} for the aux/toc files.
\catcode`\{ = \other \catcode`\} = \other
\catcode`\[ = 1 \catcode`\] = 2
\catcode`\! = 0 \catcode`\\ = \other
@@ -646,13 +652,28 @@
\let\/=\allowbreak
% @. is an end-of-sentence period.
-\def\.{.\spacefactor=3000 }
+\def\.{.\spacefactor=\endofsentencespacefactor\space}
% @! is an end-of-sentence bang.
-\def\!{!\spacefactor=3000 }
+\def\!{!\spacefactor=\endofsentencespacefactor\space}
% @? is an end-of-sentence query.
-\def\?{?\spacefactor=3000 }
+\def\?{?\spacefactor=\endofsentencespacefactor\space}
+
+% @frenchspacing on|off says whether to put extra space after punctuation.
+%
+\def\onword{on}
+\def\offword{off}
+%
+\parseargdef\frenchspacing{%
+ \def\temp{#1}%
+ \ifx\temp\onword \plainfrenchspacing
+ \else\ifx\temp\offword \plainnonfrenchspacing
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+ \fi\fi
+}
% @w prevents a word break. Without the \leavevmode, @w at the
% beginning of a paragraph, when TeX is still in vertical mode, would
@@ -1091,7 +1112,7 @@
%
\def\enddots{%
\dots
- \spacefactor=3000
+ \spacefactor=\endofsentencespacefactor
}
% @comma{} is so commas can be inserted into text without messing up
@@ -1175,7 +1196,62 @@
\fi
\fi
\fi
-%
+
+% PDF uses PostScript string constants for the names of xref targets, to
+% for display in the outlines, and in other places. Thus, we have to
+% double any backslashes. Otherwise, a name like "\node" will be
+% interpreted as a newline (\n), followed by o, d, e. Not good.
+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
+% (and related messages, the final outcome is that it is up to the TeX
+% user to double the backslashes and otherwise make the string valid, so
+% that's we do).
+
+% double active backslashes.
+%
+{\catcode`\@=0 \catcode`\\=\active
+ @gdef@activebackslash{@catcode`@\=@active @otherbackslash}
+ @gdef@activebackslashdouble{%
+ @catcode@backChar=@active
+ @let\=@doublebackslash}
+}
+
+% To handle parens, we must adopt a different approach, since parens are
+% not active characters. hyperref.dtx (which has the same problem as
+% us) handles it with this amazing macro to replace tokens. I've
+% tinkered with it a little for texinfo, but it's definitely from there.
+%
+% #1 is the tokens to replace.
+% #2 is the replacement.
+% #3 is the control sequence with the string.
+%
+\def\HyPsdSubst#1#2#3{%
+ \def\HyPsdReplace##1#1##2\END{%
+ ##1%
+ \ifx\\##2\\%
+ \else
+ #2%
+ \HyReturnAfterFi{%
+ \HyPsdReplace##2\END
+ }%
+ \fi
+ }%
+ \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
+}
+\long\def\HyReturnAfterFi#1\fi{\fi#1}
+
+% #1 is a control sequence in which to do the replacements.
+\def\backslashparens#1{%
+ \xdef#1{#1}% redefine it as its expansion; the definition is simply
+ % \lastnode when called from \setref -> \pdfmkdest.
+ \HyPsdSubst{(}{\backslashlparen}{#1}%
+ \HyPsdSubst{)}{\backslashrparen}{#1}%
+}
+
+{\catcode\exclamChar = 0 \catcode\backChar = \other
+ !gdef!backslashlparen{\(}%
+ !gdef!backslashrparen{\)}%
+}
+
\ifpdf
\input pdfcolor
\pdfcatalog{/PageMode /UseOutlines}%
@@ -1200,13 +1276,18 @@
\pdfrefximage \pdflastximage
\fi}
\def\pdfmkdest#1{{%
- % We have to set dummies so commands such as @code in a section title
- % aren't expanded.
+ % We have to set dummies so commands such as @code, and characters
+ % such as \, aren't expanded when present in a section title.
\atdummies
- \normalturnoffactive
- \pdfdest name{#1} xyz%
- }}
- \def\pdfmkpgn#1{#1}
+ \activebackslashdouble
+ \def\pdfdestname{#1}%
+ \backslashparens\pdfdestname
+ \pdfdest name{\pdfdestname} xyz%
+ }}%
+ %
+ % used to mark target names; must be expandable.
+ \def\pdfmkpgn#1{#1}%
+ %
\let\linkcolor = \Blue % was Cyan, but that seems light?
\def\endlink{\Black\pdfendlink}
% Adding outlines to PDF; macros for calculating structure of outlines
@@ -1217,20 +1298,31 @@
\advance\tempnum by 1
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
%
- % #1 is the section text. #2 is the pdf expression for the number
- % of subentries (or empty, for subsubsections). #3 is the node
- % text, which might be empty if this toc entry had no
- % corresponding node. #4 is the page number.
+ % #1 is the section text, which is what will be displayed in the
+ % outline by the pdf viewer. #2 is the pdf expression for the number
+ % of subentries (or empty, for subsubsections). #3 is the node text,
+ % which might be empty if this toc entry had no corresponding node.
+ % #4 is the page number
%
\def\dopdfoutline#1#2#3#4{%
% Generate a link to the node text if that exists; else, use the
% page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't
- % seem worthwhile, since most documents are normally structured.
+ % seem worth the trouble, since most documents are normally structured.
\def\pdfoutlinedest{#3}%
- \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi
+ \ifx\pdfoutlinedest\empty
+ \def\pdfoutlinedest{#4}%
+ \else
+ % Doubled backslashes in the name.
+ {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
+ \backslashparens\pdfoutlinedest}%
+ \fi
+ %
+ % Also double the backslashes in the display string.
+ {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
+ \backslashparens\pdfoutlinetext}%
%
- \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}%
+ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
@@ -1242,13 +1334,13 @@
% Read toc silently, to get counts of subentries for \pdfoutline.
\def\numchapentry##1##2##3##4{%
\def\thischapnum{##2}%
- \let\thissecnum\empty
- \let\thissubsecnum\empty
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
}%
\def\numsecentry##1##2##3##4{%
\advancenumber{chap\thischapnum}%
\def\thissecnum{##2}%
- \let\thissubsecnum\empty
+ \def\thissubsecnum{0}%
}%
\def\numsubsecentry##1##2##3##4{%
\advancenumber{sec\thissecnum}%
@@ -1257,9 +1349,9 @@
\def\numsubsubsecentry##1##2##3##4{%
\advancenumber{subsec\thissubsecnum}%
}%
- \let\thischapnum\empty
- \let\thissecnum\empty
- \let\thissubsecnum\empty
+ \def\thischapnum{0}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
%
% use \def rather than \let here because we redefine \chapentry et
% al. a second time, below.
@@ -1271,7 +1363,7 @@
\def\unnsecentry{\numsecentry}%
\def\unnsubsecentry{\numsubsecentry}%
\def\unnsubsubsecentry{\numsubsubsecentry}%
- \input \jobname.toc
+ \readdatafile{toc}%
%
% Read toc second time, this time actually producing the outlines.
% The `-' means take the \expnumber as the absolute number of
@@ -1297,41 +1389,12 @@
% their "best" equivalent, based on the @documentencoding. Right
% now, I guess we'll just let the pdf reader have its way.
\indexnofonts
- \turnoffactive
+ \setupdatafile
+ \activebackslash
\input \jobname.toc
\endgroup
}
%
- \def\makelinks #1,{%
- \def\params{#1}\def\E{END}%
- \ifx\params\E
- \let\nextmakelinks=\relax
- \else
- \let\nextmakelinks=\makelinks
- \ifnum\lnkcount>0,\fi
- \picknum{#1}%
- \startlink attr{/Border [0 0 0]}
- goto name{\pdfmkpgn{\the\pgn}}%
- \linkcolor #1%
- \advance\lnkcount by 1%
- \endlink
- \fi
- \nextmakelinks
- }
- \def\picknum#1{\expandafter\pn#1}
- \def\pn#1{%
- \def\p{#1}%
- \ifx\p\lbrace
- \let\nextpn=\ppn
- \else
- \let\nextpn=\ppnn
- \def\first{#1}
- \fi
- \nextpn
- }
- \def\ppn#1{\pgn=#1\gobble}
- \def\ppnn{\pgn=\first}
- \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
\else\let\nextsp\skipspaces
@@ -1406,7 +1469,7 @@
\def\rm{\fam=0 \setfontstyle{rm}}
\def\it{\fam=\itfam \setfontstyle{it}}
\def\sl{\fam=\slfam \setfontstyle{sl}}
-\def\bf{\fam=\bffam \setfontstyle{bf}}
+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
\def\tt{\fam=\ttfam \setfontstyle{tt}}
% Texinfo sort of supports the sans serif font style, which plain TeX does not.
@@ -1468,17 +1531,10 @@
\def\scbshape{csc}
% Text fonts (11.2pt, magstep1).
-\newcount\mainmagstep
-\ifx\bigger\relax
- % not really supported.
- \mainmagstep=\magstep1
- \setfont\textrm\rmshape{12}{1000}
- \setfont\texttt\ttshape{12}{1000}
-\else
- \mainmagstep=\magstephalf
- \setfont\textrm\rmshape{10}{\mainmagstep}
- \setfont\texttt\ttshape{10}{\mainmagstep}
-\fi
+\def\textnominalsize{11pt}
+\edef\mainmagstep{\magstephalf}
+\setfont\textrm\rmshape{10}{\mainmagstep}
+\setfont\texttt\ttshape{10}{\mainmagstep}
\setfont\textbf\bfshape{10}{\mainmagstep}
\setfont\textit\itshape{10}{\mainmagstep}
\setfont\textsl\slshape{10}{\mainmagstep}
@@ -1495,6 +1551,7 @@
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
\setfont\smallrm\rmshape{9}{1000}
\setfont\smalltt\ttshape{9}{1000}
\setfont\smallbf\bfshape{10}{900}
@@ -1507,6 +1564,7 @@
\font\smallsy=cmsy9
% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
\setfont\smallerrm\rmshape{8}{1000}
\setfont\smallertt\ttshape{8}{1000}
\setfont\smallerbf\bfshape{10}{800}
@@ -1519,6 +1577,7 @@
\font\smallersy=cmsy8
% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
\setfont\titlerm\rmbshape{12}{\magstep3}
\setfont\titleit\itbshape{10}{\magstep4}
\setfont\titlesl\slbshape{10}{\magstep4}
@@ -1533,6 +1592,7 @@
\def\authortt{\sectt}
% Chapter (and unnumbered) fonts (17.28pt).
+\def\chapnominalsize{17pt}
\setfont\chaprm\rmbshape{12}{\magstep2}
\setfont\chapit\itbshape{10}{\magstep3}
\setfont\chapsl\slbshape{10}{\magstep3}
@@ -1545,6 +1605,7 @@
\font\chapsy=cmsy10 scaled \magstep3
% Section fonts (14.4pt).
+\def\secnominalsize{14pt}
\setfont\secrm\rmbshape{12}{\magstep1}
\setfont\secit\itbshape{10}{\magstep2}
\setfont\secsl\slbshape{10}{\magstep2}
@@ -1557,6 +1618,7 @@
\font\secsy=cmsy10 scaled \magstep2
% Subsection fonts (13.15pt).
+\def\ssecnominalsize{13pt}
\setfont\ssecrm\rmbshape{12}{\magstephalf}
\setfont\ssecit\itbshape{10}{1315}
\setfont\ssecsl\slbshape{10}{1315}
@@ -1569,6 +1631,7 @@
\font\ssecsy=cmsy10 scaled 1315
% Reduced fonts for @acro in text (10pt).
+\def\reducednominalsize{10pt}
\setfont\reducedrm\rmshape{10}{1000}
\setfont\reducedtt\ttshape{10}{1000}
\setfont\reducedbf\bfshape{10}{1000}
@@ -1608,6 +1671,7 @@
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
\let\tenttsl=\textttsl
+ \def\curfontsize{text}%
\def\lsize{reduced}\def\lllsize{smaller}%
\resetmathfonts \setleading{\textleading}}
\def\titlefonts{%
@@ -1615,13 +1679,16 @@
\let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
\let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
\let\tenttsl=\titlettsl
+ \def\curfontsize{title}%
\def\lsize{chap}\def\lllsize{subsec}%
\resetmathfonts \setleading{25pt}}
\def\titlefont#1{{\titlefonts\rm #1}}
\def\chapfonts{%
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
\let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
- \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
+ \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
+ \let\tenttsl=\chapttsl
+ \def\curfontsize{chap}%
\def\lsize{sec}\def\lllsize{text}%
\resetmathfonts \setleading{19pt}}
\def\secfonts{%
@@ -1629,6 +1696,7 @@
\let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
\let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
\let\tenttsl=\secttsl
+ \def\curfontsize{sec}%
\def\lsize{subsec}\def\lllsize{reduced}%
\resetmathfonts \setleading{16pt}}
\def\subsecfonts{%
@@ -1636,6 +1704,7 @@
\let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
\let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
\let\tenttsl=\ssecttsl
+ \def\curfontsize{ssec}%
\def\lsize{text}\def\lllsize{small}%
\resetmathfonts \setleading{15pt}}
\let\subsubsecfonts = \subsecfonts
@@ -1644,6 +1713,7 @@
\let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
\let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
\let\tenttsl=\reducedttsl
+ \def\curfontsize{reduced}%
\def\lsize{small}\def\lllsize{smaller}%
\resetmathfonts \setleading{10.5pt}}
\def\smallfonts{%
@@ -1651,6 +1721,7 @@
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
\let\tenttsl=\smallttsl
+ \def\curfontsize{small}%
\def\lsize{smaller}\def\lllsize{smaller}%
\resetmathfonts \setleading{10.5pt}}
\def\smallerfonts{%
@@ -1658,6 +1729,7 @@
\let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
\let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
\let\tenttsl=\smallerttsl
+ \def\curfontsize{smaller}%
\def\lsize{smaller}\def\lllsize{smaller}%
\resetmathfonts \setleading{9.5pt}}
@@ -1720,9 +1792,13 @@
\let\dfn=\smartslanted
\let\emph=\smartitalic
+% @b, explicit bold.
\def\b#1{{\bf #1}}
\let\strong=\b
+% @sansserif, explicit sans.
+\def\sansserif#1{{\sf #1}}
+
% We can't just use \exhyphenpenalty, because that only has effect at
% the end of a paragraph. Restore normal hyphenation at the end of the
% group within which \nohyphenation is presumably called.
@@ -1735,14 +1811,21 @@
% sometimes \x has an active definition that messes things up.
%
\catcode`@=11
- \def\frenchspacing{%
+ \def\plainfrenchspacing{%
\sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
\sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+ \def\endofsentencespacefactor{1000}% for @. and friends
+ }
+ \def\plainnonfrenchspacing{%
+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+ \def\endofsentencespacefactor{3000}% for @. and friends
}
\catcode`@=\other
+\def\endofsentencespacefactor{3000}% default
\def\t#1{%
- {\tt \rawbackslash \frenchspacing #1}%
+ {\tt \rawbackslash \plainfrenchspacing #1}%
\null
}
\def\samp#1{`\tclose{#1}'\null}
@@ -1779,7 +1862,7 @@
\nohyphenation
%
\rawbackslash
- \frenchspacing
+ \plainfrenchspacing
#1%
}%
\null
@@ -1799,8 +1882,14 @@
\catcode`\_=\active
%
\global\def\code{\begingroup
- \catcode`\-=\active \let-\codedash
- \catcode`\_=\active \let_\codeunder
+ \catcode`\-=\active \catcode`\_=\active
+ \ifallowcodebreaks
+ \let-\codedash
+ \let_\codeunder
+ \else
+ \let-\realdash
+ \let_\realunder
+ \fi
\codex
}
}
@@ -1820,6 +1909,28 @@
}
\def\codex #1{\tclose{#1}\endgroup}
+% An additional complication: the above will allow breaks after, e.g.,
+% each of the four underscores in __typeof__. This is undesirable in
+% some manuals, especially if they don't have long identifiers in
+% general. @allowcodebreaks provides a way to control this.
+%
+\newif\ifallowcodebreaks \allowcodebreakstrue
+
+\def\keywordtrue{true}
+\def\keywordfalse{false}
+
+\parseargdef\allowcodebreaks{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\keywordtrue
+ \allowcodebreakstrue
+ \else\ifx\txiarg\keywordfalse
+ \allowcodebreaksfalse
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+ \fi\fi
+}
+
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
@@ -1827,16 +1938,16 @@
% `example' (@kbd uses ttsl only inside of @example and friends),
% or `code' (@kbd uses normal tty font always).
\parseargdef\kbdinputstyle{%
- \def\arg{#1}%
- \ifx\arg\worddistinct
+ \def\txiarg{#1}%
+ \ifx\txiarg\worddistinct
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
- \else\ifx\arg\wordexample
+ \else\ifx\txiarg\wordexample
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
- \else\ifx\arg\wordcode
+ \else\ifx\txiarg\wordcode
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
\else
\errhelp = \EMsimple
- \errmessage{Unknown @kbdinputstyle option `\arg'}%
+ \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
\fi\fi\fi
}
\def\worddistinct{distinct}
@@ -1948,7 +2059,7 @@
%
\def\abbr#1{\doabbr #1,,\finish}
\def\doabbr#1,#2,#3\finish{%
- {\frenchspacing #1}%
+ {\plainfrenchspacing #1}%
\def\temp{#2}%
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
@@ -1959,6 +2070,54 @@
%
\def\pounds{{\it\$}}
+% @euro{} comes from a separate font, depending on the current style.
+% We use the free feym* fonts from the eurosym package by Henrik
+% Theiling, which support regular, slanted, bold and bold slanted (and
+% "outlined" (blackboard board, sort of) versions, which we don't need).
+% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
+%
+% Although only regular is the truly official Euro symbol, we ignore
+% that. The Euro is designed to be slightly taller than the regular
+% font height.
+%
+% feymr - regular
+% feymo - slanted
+% feybr - bold
+% feybo - bold slanted
+%
+% There is no good (free) typewriter version, to my knowledge.
+% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
+% Hmm.
+%
+% Also doesn't work in math. Do we need to do math with euro symbols?
+% Hope not.
+%
+%
+\def\euro{{\eurofont e}}
+\def\eurofont{%
+ % We set the font at each command, rather than predefining it in
+ % \textfonts and the other font-switching commands, so that
+ % installations which never need the symbol don't have to have the
+ % font installed.
+ %
+ % There is only one designed size (nominal 10pt), so we always scale
+ % that to the current nominal size.
+ %
+ % By the way, simply using "at 1em" works for cmr10 and the like, but
+ % does not work for cmbx10 and other extended/shrunken fonts.
+ %
+ \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
+ %
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
+ \else
+ % regular:
+ \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
+ \fi
+ \thiseurofont
+}
+
% @registeredsymbol - R in a circle. The font for the R should really
% be smaller yet, but lllsize is the best we can do for now.
% Adapted from the plain.tex definition of \copyright.
@@ -2314,15 +2473,26 @@
% @table, @ftable, @vtable.
\envdef\table{%
\let\itemindex\gobble
- \tablex
+ \tablecheck{table}%
}
\envdef\ftable{%
\def\itemindex ##1{\doind {fn}{\code{##1}}}%
- \tablex
+ \tablecheck{ftable}%
}
\envdef\vtable{%
\def\itemindex ##1{\doind {vr}{\code{##1}}}%
- \tablex
+ \tablecheck{vtable}%
+}
+\def\tablecheck#1{%
+ \ifnum \the\catcode`\^^M=\active
+ \endgroup
+ \errmessage{This command won't work in this context; perhaps the problem is
+ that we are \inenvironment\thisenv}%
+ \def\next{\doignore{#1}}%
+ \else
+ \let\next\tablex
+ \fi
+ \next
}
\def\tablex#1{%
\def\itemindicate{#1}%
@@ -2721,19 +2891,17 @@
\global\setpercentfalse
}
-\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
-% If so, do nothing. If not, give it an appropriate dimension based on
-% current baselineskip.
+\def\setmultitablespacing{%
+ \def\multistrut{\strut}% just use the standard line spacing
+ %
+ % Compute \multitablelinespace (if not defined by user) for use in
+ % \multitableparskip calculation. We used define \multistrut based on
+ % this, but (ironically) that caused the spacing to be off.
+ % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
\ifdim\multitablelinespace=0pt
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
\global\advance\multitablelinespace by-\ht0
-%% strut to put in table in case some entry doesn't have descenders,
-%% to keep lines equally spaced
-\let\multistrut = \strut
-\else
-%% FIXME: what is \box0 supposed to be?
-\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
-width0pt\relax} \fi
+\fi
%% Test to see if parskip is larger than space between lines of
%% table. If not, do nothing.
%% If so, set to same dimension as multitablelinespace.
@@ -2963,9 +3131,8 @@
% Index generation facilities
% Define \newwrite to be identical to plain tex's \newwrite
-% except not \outer, so it can be used within \newindex.
-{\catcode`\@=11
-\gdef\newwrite{\alloc@7\write\chardef\sixt@@n}}
+% except not \outer, so it can be used within macros and \if's.
+\edef\newwrite{\makecsname{ptexnewwrite}}
% \newindex {foo} defines an index named foo.
% It automatically defines \fooindex such that
@@ -3051,6 +3218,7 @@
% we have to laboriously prevent expansion for those that we don't.
%
\def\indexdummies{%
+ \escapechar = `\\ % use backslash in output files.
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
\def\ {\realbackslash\space }%
% Need these in case \tex is in effect and \{ is a \delimiter again.
@@ -3059,34 +3227,14 @@
\let\{ = \mylbrace
\let\} = \myrbrace
%
- % \definedummyword defines \#1 as \realbackslash #1\space, thus
- % effectively preventing its expansion. This is used only for control
- % words, not control letters, because the \space would be incorrect
- % for control characters, but is needed to separate the control word
- % from whatever follows.
- %
- % For control letters, we have \definedummyletter, which omits the
- % space.
- %
- % These can be used both for control words that take an argument and
- % those that do not. If it is followed by {arg} in the input, then
- % that will dutifully get written to the index (or wherever).
- %
- \def\definedummyword##1{%
- \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
- }%
- \def\definedummyletter##1{%
- \expandafter\def\csname ##1\endcsname{\realbackslash ##1}%
- }%
- \let\definedummyaccent\definedummyletter
- %
% Do the redefinitions.
\commondummies
}
-% For the aux file, @ is the escape character. So we want to redefine
-% everything using @ instead of \realbackslash. When everything uses
-% @, this will be simpler.
+% For the aux and toc files, @ is the escape character. So we want to
+% redefine everything using @ as the escape character (instead of
+% \realbackslash, still used for index files). When everything uses @,
+% this will be simpler.
%
\def\atdummies{%
\def\@{@@}%
@@ -3094,85 +3242,90 @@
\let\{ = \lbraceatcmd
\let\} = \rbraceatcmd
%
- % (See comments in \indexdummies.)
- \def\definedummyword##1{%
- \expandafter\def\csname ##1\endcsname{@##1\space}%
- }%
- \def\definedummyletter##1{%
- \expandafter\def\csname ##1\endcsname{@##1}%
- }%
- \let\definedummyaccent\definedummyletter
- %
% Do the redefinitions.
\commondummies
}
-% Called from \indexdummies and \atdummies. \definedummyword and
-% \definedummyletter must be defined first.
+% Called from \indexdummies and \atdummies.
%
\def\commondummies{%
%
- \normalturnoffactive
+ % \definedummyword defines \#1 as \string\#1\space, thus effectively
+ % preventing its expansion. This is used only for control% words,
+ % not control letters, because the \space would be incorrect for
+ % control characters, but is needed to separate the control word
+ % from whatever follows.
+ %
+ % For control letters, we have \definedummyletter, which omits the
+ % space.
+ %
+ % These can be used both for control words that take an argument and
+ % those that do not. If it is followed by {arg} in the input, then
+ % that will dutifully get written to the index (or wherever).
+ %
+ \def\definedummyword ##1{\def##1{\string##1\space}}%
+ \def\definedummyletter##1{\def##1{\string##1}}%
+ \let\definedummyaccent\definedummyletter
%
\commondummiesnofonts
%
- \definedummyletter{_}%
+ \definedummyletter\_%
%
% Non-English letters.
- \definedummyword{AA}%
- \definedummyword{AE}%
- \definedummyword{L}%
- \definedummyword{OE}%
- \definedummyword{O}%
- \definedummyword{aa}%
- \definedummyword{ae}%
- \definedummyword{l}%
- \definedummyword{oe}%
- \definedummyword{o}%
- \definedummyword{ss}%
- \definedummyword{exclamdown}%
- \definedummyword{questiondown}%
- \definedummyword{ordf}%
- \definedummyword{ordm}%
+ \definedummyword\AA
+ \definedummyword\AE
+ \definedummyword\L
+ \definedummyword\OE
+ \definedummyword\O
+ \definedummyword\aa
+ \definedummyword\ae
+ \definedummyword\l
+ \definedummyword\oe
+ \definedummyword\o
+ \definedummyword\ss
+ \definedummyword\exclamdown
+ \definedummyword\questiondown
+ \definedummyword\ordf
+ \definedummyword\ordm
%
% Although these internal commands shouldn't show up, sometimes they do.
- \definedummyword{bf}%
- \definedummyword{gtr}%
- \definedummyword{hat}%
- \definedummyword{less}%
- \definedummyword{sf}%
- \definedummyword{sl}%
- \definedummyword{tclose}%
- \definedummyword{tt}%
+ \definedummyword\bf
+ \definedummyword\gtr
+ \definedummyword\hat
+ \definedummyword\less
+ \definedummyword\sf
+ \definedummyword\sl
+ \definedummyword\tclose
+ \definedummyword\tt
%
- \definedummyword{LaTeX}%
- \definedummyword{TeX}%
+ \definedummyword\LaTeX
+ \definedummyword\TeX
%
% Assorted special characters.
- \definedummyword{bullet}%
- \definedummyword{comma}%
- \definedummyword{copyright}%
- \definedummyword{registeredsymbol}%
- \definedummyword{dots}%
- \definedummyword{enddots}%
- \definedummyword{equiv}%
- \definedummyword{error}%
- \definedummyword{expansion}%
- \definedummyword{minus}%
- \definedummyword{pounds}%
- \definedummyword{point}%
- \definedummyword{print}%
- \definedummyword{result}%
+ \definedummyword\bullet
+ \definedummyword\comma
+ \definedummyword\copyright
+ \definedummyword\registeredsymbol
+ \definedummyword\dots
+ \definedummyword\enddots
+ \definedummyword\equiv
+ \definedummyword\error
+ \definedummyword\euro
+ \definedummyword\expansion
+ \definedummyword\minus
+ \definedummyword\pounds
+ \definedummyword\point
+ \definedummyword\print
+ \definedummyword\result
+ %
+ % We want to disable all macros so that they are not expanded by \write.
+ \macrolist
+ %
+ \normalturnoffactive
%
% Handle some cases of @value -- where it does not contain any
% (non-fully-expandable) commands.
\makevalueexpandable
- %
- % Normal spaces, not active ones.
- \unsepspaces
- %
- % No macro expansion.
- \turnoffmacros
}
% \commondummiesnofonts: common to \commondummies and \indexnofonts.
@@ -3182,57 +3335,57 @@
\catcode`\~=\other
\gdef\commondummiesnofonts{%
% Control letters and accents.
- \definedummyletter{!}%
- \definedummyaccent{"}%
- \definedummyaccent{'}%
- \definedummyletter{*}%
- \definedummyaccent{,}%
- \definedummyletter{.}%
- \definedummyletter{/}%
- \definedummyletter{:}%
- \definedummyaccent{=}%
- \definedummyletter{?}%
- \definedummyaccent{^}%
- \definedummyaccent{`}%
- \definedummyaccent{~}%
- \definedummyword{u}%
- \definedummyword{v}%
- \definedummyword{H}%
- \definedummyword{dotaccent}%
- \definedummyword{ringaccent}%
- \definedummyword{tieaccent}%
- \definedummyword{ubaraccent}%
- \definedummyword{udotaccent}%
- \definedummyword{dotless}%
+ \definedummyletter\!%
+ \definedummyaccent\"%
+ \definedummyaccent\'%
+ \definedummyletter\*%
+ \definedummyaccent\,%
+ \definedummyletter\.%
+ \definedummyletter\/%
+ \definedummyletter\:%
+ \definedummyaccent\=%
+ \definedummyletter\?%
+ \definedummyaccent\^%
+ \definedummyaccent\`%
+ \definedummyaccent\~%
+ \definedummyword\u
+ \definedummyword\v
+ \definedummyword\H
+ \definedummyword\dotaccent
+ \definedummyword\ringaccent
+ \definedummyword\tieaccent
+ \definedummyword\ubaraccent
+ \definedummyword\udotaccent
+ \definedummyword\dotless
%
% Texinfo font commands.
- \definedummyword{b}%
- \definedummyword{i}%
- \definedummyword{r}%
- \definedummyword{sc}%
- \definedummyword{t}%
+ \definedummyword\b
+ \definedummyword\i
+ \definedummyword\r
+ \definedummyword\sc
+ \definedummyword\t
%
% Commands that take arguments.
- \definedummyword{acronym}%
- \definedummyword{cite}%
- \definedummyword{code}%
- \definedummyword{command}%
- \definedummyword{dfn}%
- \definedummyword{emph}%
- \definedummyword{env}%
- \definedummyword{file}%
- \definedummyword{kbd}%
- \definedummyword{key}%
- \definedummyword{math}%
- \definedummyword{option}%
- \definedummyword{samp}%
- \definedummyword{strong}%
- \definedummyword{tie}%
- \definedummyword{uref}%
- \definedummyword{url}%
- \definedummyword{var}%
- \definedummyword{verb}%
- \definedummyword{w}%
+ \definedummyword\acronym
+ \definedummyword\cite
+ \definedummyword\code
+ \definedummyword\command
+ \definedummyword\dfn
+ \definedummyword\emph
+ \definedummyword\env
+ \definedummyword\file
+ \definedummyword\kbd
+ \definedummyword\key
+ \definedummyword\math
+ \definedummyword\option
+ \definedummyword\samp
+ \definedummyword\strong
+ \definedummyword\tie
+ \definedummyword\uref
+ \definedummyword\url
+ \definedummyword\var
+ \definedummyword\verb
+ \definedummyword\w
}
}
@@ -3243,13 +3396,9 @@
%
\def\indexnofonts{%
% Accent commands should become @asis.
- \def\definedummyaccent##1{%
- \expandafter\let\csname ##1\endcsname\asis
- }%
+ \def\definedummyaccent##1{\let##1\asis}%
% We can just ignore other control letters.
- \def\definedummyletter##1{%
- \expandafter\def\csname ##1\endcsname{}%
- }%
+ \def\definedummyletter##1{\let##1\empty}%
% Hopefully, all control words can become @asis.
\let\definedummyword\definedummyaccent
%
@@ -3295,6 +3444,7 @@
\def\enddots{...}%
\def\equiv{==}%
\def\error{error}%
+ \def\euro{euro}%
\def\expansion{==>}%
\def\minus{-}%
\def\pounds{pounds}%
@@ -3302,8 +3452,17 @@
\def\print{-|}%
\def\result{=>}%
%
- % Don't write macro names.
- \emptyusermacros
+ % We need to get rid of all macros, leaving only the arguments (if present).
+ % Of course this is not nearly correct, but it is the best we can do for now.
+ % makeinfo does not expand macros in the argument to @deffn, which ends up
+ % writing an index entry, and texindex isn't prepared for an index sort entry
+ % that starts with \.
+ %
+ % Since macro invocations are followed by braces, we can just redefine them
+ % to take a single TeX argument. The case of a macro invocation that
+ % goes to end-of-line is not handled.
+ %
+ \macrolist
}
\let\indexbackslash=0 %overridden during \printindex.
@@ -3350,7 +3509,6 @@
%
% Remember, we are within a group.
\indexdummies % Must do this here, since \bf, etc expand at this stage
- \escapechar=`\\
\def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
% so it will be output as is; and it will print as backslash.
%
@@ -4217,11 +4375,11 @@
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unnchap}%
- \def\thischapter{#1}%
+ \gdef\thischapter{#1}%
\else\ifx\temptype\Yomitfromtockeyword
\setbox0 = \hbox{}% contents like unnumbered, but no toc entry
\def\toctype{omit}%
- \xdef\thischapter{}%
+ \gdef\thischapter{}%
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
\def\toctype{app}%
@@ -4410,11 +4568,11 @@
\fi
%
\iflinks
- \toks0 = {#2}%
- \toks2 = \expandafter{\lastnode}%
- \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}{#3}%
- {\the\toks2}{\noexpand\folio}}}%
- \temp
+ {\atdummies
+ \edef\temp{%
+ \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
+ \temp
+ }
\fi
\fi
%
@@ -4427,6 +4585,31 @@
\ifpdf \global\pdfmakepagedesttrue \fi
}
+
+% These characters do not print properly in the Computer Modern roman
+% fonts, so we must take special care. This is more or less redundant
+% with the Texinfo input format setup at the end of this file.
+%
+\def\activecatcodes{%
+ \catcode`\"=\active
+ \catcode`\$=\active
+ \catcode`\<=\active
+ \catcode`\>=\active
+ \catcode`\\=\active
+ \catcode`\^=\active
+ \catcode`\_=\active
+ \catcode`\|=\active
+ \catcode`\~=\active
+}
+
+
+% Read the toc file, which is essentially Texinfo input.
+\def\readtocfile{%
+ \setupdatafile
+ \activecatcodes
+ \input \jobname.toc
+}
+
\newskip\contentsrightmargin \contentsrightmargin=1in
\newcount\savepageno
\newcount\lastnegativepageno \lastnegativepageno = -1
@@ -4448,11 +4631,7 @@
%
\savepageno = \pageno
\begingroup % Set up to handle contents files properly.
- \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
- % We can't do this, because then an actual ^ in a section
- % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
- %\catcode`\^=7 % to see ^^e4 as \"a etc. juha(a)piuha.ydi.vtt.fi
- \raggedbottom % Worry more about breakpoints than the bottom.
+ \raggedbottom % Worry more about breakpoints than the bottom.
\advance\hsize by -\contentsrightmargin % Don't use the full line length.
%
% Roman numerals for page numbers.
@@ -4465,7 +4644,7 @@
\startcontents{\putwordTOC}%
\openin 1 \jobname.toc
\ifeof 1 \else
- \input \jobname.toc
+ \readtocfile
\fi
\vfill \eject
\contentsalignmacro % in case @setchapternewpage odd is in effect
@@ -4503,7 +4682,7 @@
\let\unnsubsubsecentry = \numsecentry
\openin 1 \jobname.toc
\ifeof 1 \else
- \input \jobname.toc
+ \readtocfile
\fi
\closein 1
\vfill \eject
@@ -4693,6 +4872,7 @@
\let\/=\ptexslash
\let\*=\ptexstar
\let\t=\ptext
+ \let\frenchspacing=\plainfrenchspacing
%
\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
@@ -4738,7 +4918,8 @@
\let\afterenvbreak = \aboveenvbreak
-% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
+% also clear it, so that its embedded environments do the narrowing again.
\let\nonarrowing=\relax
% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
@@ -4775,7 +4956,7 @@
% each corner char, and rule thickness
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
- \let\nonarrowing=\comment
+ \let\nonarrowing = t%
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
@@ -4815,11 +4996,11 @@
\parskip = 0pt
\parindent = 0pt
\emergencystretch = 0pt % don't try to avoid overfull boxes
- % @cartouche defines \nonarrowing to inhibit narrowing
- % at next level down.
\ifx\nonarrowing\relax
\advance \leftskip by \lispnarrowing
\exdentamount=\lispnarrowing
+ \else
+ \let\nonarrowing = \relax
\fi
\let\exdent=\nofillexdent
}
@@ -4919,6 +5100,7 @@
\advance\leftskip by \lispnarrowing
\advance\rightskip by \lispnarrowing
\exdentamount = \lispnarrowing
+ \else
\let\nonarrowing = \relax
\fi
\parsearg\quotationlabel
@@ -5011,8 +5193,8 @@
}
\endgroup
\def\setupverbatim{%
+ \let\nonarrowing = t%
\nonfillstart
- \advance\leftskip by -\defbodyindent
% Easiest (and conventionally used) font for verbatim
\tt
\def\par{\leavevmode\egroup\box0\endgraf}%
@@ -5482,8 +5664,19 @@
\newcount\paramno % Count of parameters
\newtoks\macname % Macro name
\newif\ifrecursive % Is it recursive?
-\def\macrolist{} % List of all defined macros in the form
- % \do\macro1\do\macro2...
+
+% List of all defined macros in the form
+% \definedummyword\macro1\definedummyword\macro2...
+% Currently is also contains all @aliases; the list can be split
+% if there is a need.
+\def\macrolist{}
+
+% Add the macro to \macrolist
+\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
+\def\addtomacrolistxxx#1{%
+ \toks0 = \expandafter{\macrolist\definedummyword#1}%
+ \xdef\macrolist{\the\toks0}%
+}
% Utility routines.
% This does \let #1 = #2, with \csnames; that is,
@@ -5581,10 +5774,7 @@
\else \errmessage{Macro name \the\macname\space already defined}\fi
\global\cslet{macsave.\the\macname}{\the\macname}%
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
- % Add the macroname to \macrolist
- \toks0 = \expandafter{\macrolist\do}%
- \xdef\macrolist{\the\toks0
- \expandafter\noexpand\csname\the\macname\endcsname}%
+ \addtomacrolist{\the\macname}%
\fi
\begingroup \macrobodyctxt
\ifrecursive \expandafter\parsermacbody
@@ -5598,7 +5788,7 @@
% Remove the macro name from \macrolist:
\begingroup
\expandafter\let\csname#1\endcsname \relax
- \let\do\unmacrodo
+ \let\definedummyword\unmacrodo
\xdef\macrolist{\macrolist}%
\endgroup
\else
@@ -5610,10 +5800,10 @@
% macro definitions that have been changed to \relax.
%
\def\unmacrodo#1{%
- \ifx#1\relax
+ \ifx #1\relax
% remove this
\else
- \noexpand\do \noexpand #1%
+ \noexpand\definedummyword \noexpand#1%
\fi
}
@@ -5732,25 +5922,6 @@
\expandafter\parsearg
\fi \next}
-% We want to disable all macros during \shipout so that they are not
-% expanded by \write.
-\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}%
- \edef\next{\macrolist}\expandafter\endgroup\next}
-
-% For \indexnofonts, we need to get rid of all macros, leaving only the
-% arguments (if present). Of course this is not nearly correct, but it
-% is the best we can do for now. makeinfo does not expand macros in the
-% argument to @deffn, which ends up writing an index entry, and texindex
-% isn't prepared for an index sort entry that starts with \.
-%
-% Since macro invocations are followed by braces, we can just redefine them
-% to take a single TeX argument. The case of a macro invocation that
-% goes to end-of-line is not handled.
-%
-\def\emptyusermacros{\begingroup
- \def\do##1{\let\noexpand##1=\noexpand\asis}%
- \edef\next{\macrolist}\expandafter\endgroup\next}
-
% @alias.
% We need some trickery to remove the optional spaces around the equal
@@ -5760,6 +5931,7 @@
\def\aliasyyy #1=#2\relax{%
{%
\expandafter\let\obeyedspace=\empty
+ \addtomacrolist{#1}%
\xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
}%
\next
@@ -5829,8 +6001,6 @@
\iflinks
{%
\atdummies % preserve commands, but don't expand them
- \turnoffactive
- \otherbackslash
\edef\writexrdef##1##2{%
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
##1}{##2}}% these are parameters of \writexrdef
@@ -5884,13 +6054,17 @@
\ifpdf
\leavevmode
\getfilename{#4}%
- {\turnoffactive \otherbackslash
+ {\turnoffactive
+ % See comments at \activebackslashdouble.
+ {\activebackslashdouble \xdef\pdfxrefdest{#1}%
+ \backslashparens\pdfxrefdest}%
+ %
\ifnum\filenamelength>0
\startlink attr{/Border [0 0 0]}%
- goto file{\the\filename.pdf} name{#1}%
+ goto file{\the\filename.pdf} name{\pdfxrefdest}%
\else
\startlink attr{/Border [0 0 0]}%
- goto name{\pdfmkpgn{#1}}%
+ goto name{\pdfmkpgn{\pdfxrefdest}}%
\fi
}%
\linkcolor
@@ -5904,7 +6078,6 @@
% include an _ in the xref name, etc.
\indexnofonts
\turnoffactive
- \otherbackslash
\expandafter\global\expandafter\let\expandafter\Xthisreftitle
\csname XR#1-title\endcsname
}%
@@ -5939,7 +6112,7 @@
% into the usual \leavevmode...\vrule stuff for purposes of
% printing. So we \turnoffactive for the \refx-snt, back on for the
% printing, back off for the \refx-pg.
- {\turnoffactive \otherbackslash
+ {\turnoffactive
% Only output a following space if the -snt ref is nonempty; for
% @unnumbered and @anchor, it won't be.
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
@@ -5952,7 +6125,7 @@
,\space
%
% output the `page 3'.
- \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}%
+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
\fi
\fi
\endlink
@@ -6055,13 +6228,13 @@
\def\tryauxfile{%
\openin 1 \jobname.aux
\ifeof 1 \else
- \readauxfile
+ \readdatafile{aux}%
\global\havexrefstrue
\fi
\closein 1
}
-\def\readauxfile{\begingroup
+\def\setupdatafile{%
\catcode`\^^@=\other
\catcode`\^^A=\other
\catcode`\^^B=\other
@@ -6130,11 +6303,11 @@
%
% Make the characters 128-255 be printing characters.
{%
- \count 1=128
+ \count1=128
\def\loop{%
- \catcode\count 1=\other
- \advance\count 1 by 1
- \ifnum \count 1<256 \loop \fi
+ \catcode\count1=\other
+ \advance\count1 by 1
+ \ifnum \count1<256 \loop \fi
}%
}%
%
@@ -6142,10 +6315,13 @@
\catcode`\{=1
\catcode`\}=2
\catcode`\@=0
- %
- \input \jobname.aux
-\endgroup}
+}
+\def\readdatafile#1{%
+\begingroup
+ \setupdatafile
+ \input\jobname.#1
+\endgroup}
\message{insertions,}
% including footnotes.
@@ -6492,7 +6668,7 @@
% \floatlabel-lof. Besides \floatident, we include the short
% caption if specified, else the full caption if specified, else nothing.
{%
- \atdummies \turnoffactive \otherbackslash
+ \atdummies
% since we read the caption text in the macro world, where ^^M
% is turned into a normal character, we have to scan it back, so
% we don't write the literal three characters "^^M" into the aux file.
@@ -6682,9 +6858,9 @@
\fi
}
-% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
-% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
-% physical page width.
+% Parameters in order: 1) textheight; 2) textwidth;
+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
+% 7) physical page height; 8) physical page width.
%
% We also call \setleading{\textleading}, so the caller should define
% \textleading. The caller should also set \parskip.
@@ -6731,7 +6907,7 @@
{11in}{8.5in}%
}}
-% Use @smallbook to reset parameters for 7x9.5 (or so) format.
+% Use @smallbook to reset parameters for 7x9.25 trim size.
\def\smallbook{{\globaldefs = 1
\parskip = 2pt plus 1pt
\textleading = 12pt
@@ -6748,6 +6924,24 @@
\defbodyindent = .5cm
}}
+% Use @smallerbook to reset parameters for 6x9 trim size.
+% (Just testing, parameters still in flux.)
+\def\smallerbook{{\globaldefs = 1
+ \parskip = 1.5pt plus 1pt
+ \textleading = 12pt
+ %
+ \internalpagesizes{7.4in}{4.8in}%
+ {-.2in}{-.4in}%
+ {0pt}{14pt}%
+ {9in}{6in}%
+ %
+ \lispnarrowing = 0.25in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .4cm
+}}
+
% Use @afourpaper to print on European A4 paper.
\def\afourpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
@@ -6900,6 +7094,7 @@
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
+\let\realunder=_
% Subroutine for the previous macro.
\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
@@ -6937,8 +7132,9 @@
@gdef@otherbackslash{@let\=@realbackslash}
}
-% \realbackslash is an actual character `\' with catcode other.
-{\catcode`\\=\other @gdef@realbackslash{\}}
+% \realbackslash is an actual character `\' with catcode other, and
+% \doublebackslash is two of them (for the pdf outlines).
+{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
% \normalbackslash outputs one backslash in fixed width font.
\def\normalbackslash{{\tt\backslashcurfont}}
@@ -6981,7 +7177,7 @@
% On the other hand, perhaps the file did not have a `\input texinfo'. Then
% the first `\{ in the file would cause an error. This macro tries to fix
% that, assuming it is called before the first `\' could plausibly occur.
-% Also back turn on active characters that might appear in the input
+% Also turn back on active characters that might appear in the input
% file name, in case not using a pre-dumped format.
%
@gdef@fixbackslash{%
Modified: freeswitch/trunk/libs/iksemel/configure.ac
==============================================================================
--- freeswitch/trunk/libs/iksemel/configure.ac (original)
+++ freeswitch/trunk/libs/iksemel/configure.ac Wed Feb 4 18:16:40 2009
@@ -1,9 +1,10 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_PREREQ(2.50)
+AC_CONFIG_AUX_DIR(build)
AC_CONFIG_SRCDIR([configure.ac])
-AM_INIT_AUTOMAKE(iksemel,1.2)
-AM_CONFIG_HEADER(include/config.h)
+AM_INIT_AUTOMAKE(iksemel,1.3)
+AC_CONFIG_HEADERS(include/config.h)
AC_CANONICAL_HOST
@@ -54,6 +55,35 @@
fi
fi
+AC_DEFUN([AX_COMPILER_VENDOR],
+[
+AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+ [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
+ # note: don't check for gcc first since some other compilers define __GNUC__
+ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+ vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+#if !($vencpp)
+ thisisanerror;
+#endif
+])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
+ done
+ ])
+])
+
+AX_COMPILER_VENDOR
+
+# Enable 64 bit build
+AC_ARG_ENABLE(64,
+[AC_HELP_STRING([--enable-64],[build with 64 bit support])],[enable_64="$enable_64"],[enable_64="no"])
+
+if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
+ if test "${enable_64}" = "yes"; then
+ CFLAGS="$CFLAGS -m64"
+ CXXFLAGS="$CXXFLAGS -m64"
+ fi
+fi
+
dnl Generating makefiles
AC_CONFIG_FILES([
Makefile
1
0
Author: anthm
Date: Wed Feb 4 18:11:37 2009
New Revision: 11647
Log:
revert
Modified:
freeswitch/trunk/libs/iksemel/configure.ac
Modified: freeswitch/trunk/libs/iksemel/configure.ac
==============================================================================
--- freeswitch/trunk/libs/iksemel/configure.ac (original)
+++ freeswitch/trunk/libs/iksemel/configure.ac Wed Feb 4 18:11:37 2009
@@ -2,7 +2,7 @@
AC_INIT
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR([configure.ac])
-AM_INIT_AUTOMAKE(iksemel,1.3)
+AM_INIT_AUTOMAKE(iksemel,1.2)
AM_CONFIG_HEADER(include/config.h)
AC_CANONICAL_HOST
@@ -45,7 +45,7 @@
AC_CHECK_FUNCS(getopt_long)
AC_CHECK_FUNCS(getaddrinfo)
-AM_PATH_LIBGNUTLS(,AC_DEFINE(HAVE_GNUTLS,,"Use libgnutls"))
+AX_PATH_LIBGNUTLS(,AC_DEFINE(HAVE_GNUTLS,,"Use libgnutls"))
dnl Check -Wall flag of GCC
if test "x$GCC" = "xyes"; then
1
0