[svn-commits] kpfleming: branch 1.2 r2059 - in /branches/1.2: ./ wctc4xxp/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jan 31 12:01:34 MST 2007


Author: kpfleming
Date: Wed Jan 31 13:01:33 2007
New Revision: 2059

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2059
Log:
make it simpler for existing userspace apps to use the new zaptel.h that requires linux/types.h

Modified:
    branches/1.2/fxotune.c
    branches/1.2/fxstest.c
    branches/1.2/hdlcstress.c
    branches/1.2/hdlctest.c
    branches/1.2/patgen.c
    branches/1.2/patlooptest.c
    branches/1.2/pattest.c
    branches/1.2/timertest.c
    branches/1.2/tonezone.c
    branches/1.2/torisatool.c
    branches/1.2/usbfxstest.c
    branches/1.2/wctc4xxp/codec_test.c
    branches/1.2/zaptel.c
    branches/1.2/zaptel.h
    branches/1.2/zonedata.c
    branches/1.2/ztcfg.c
    branches/1.2/ztd-eth.c
    branches/1.2/ztd-loc.c
    branches/1.2/ztdiag.c
    branches/1.2/ztdummy.c
    branches/1.2/ztdynamic.c
    branches/1.2/ztmonitor.c
    branches/1.2/zttool.c
    branches/1.2/zttranscode.c

Modified: branches/1.2/fxotune.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/fxotune.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/fxotune.c (original)
+++ branches/1.2/fxotune.c Wed Jan 31 13:01:33 2007
@@ -22,7 +22,6 @@
 #include <fcntl.h>
 #include <math.h>
 
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/fxstest.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/fxstest.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/fxstest.c (original)
+++ branches/1.2/fxstest.c Wed Jan 31 13:01:33 2007
@@ -5,7 +5,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
-#include <linux/types.h>
 #include "zaptel.h"
 #include "tonezone.h"
 #include "wctdm.h"

Modified: branches/1.2/hdlcstress.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/hdlcstress.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/hdlcstress.c (original)
+++ branches/1.2/hdlcstress.c Wed Jan 31 13:01:33 2007
@@ -2,10 +2,8 @@
 #include <fcntl.h>
 #include <string.h>
 #include <errno.h>
-#include <linux/types.h>
 #include <linux/zaptel.h>
 #include <stdio.h>
-#include <linux/types.h>
 #include <linux/ppp_defs.h> 
 #include <sys/ioctl.h>
 #include <unistd.h>

Modified: branches/1.2/hdlctest.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/hdlctest.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/hdlctest.c (original)
+++ branches/1.2/hdlctest.c Wed Jan 31 13:01:33 2007
@@ -2,10 +2,8 @@
 #include <fcntl.h>
 #include <string.h>
 #include <errno.h>
-#include <linux/types.h>
 #include <linux/zaptel.h>
 #include <stdio.h>
-#include <linux/types.h>
 #include <linux/ppp_defs.h> 
 #include <sys/ioctl.h>
 #include <unistd.h>

Modified: branches/1.2/patgen.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/patgen.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/patgen.c (original)
+++ branches/1.2/patgen.c Wed Jan 31 13:01:33 2007
@@ -3,14 +3,12 @@
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>
-#include <linux/types.h>
 #include <linux/ppp_defs.h> 
 #include <sys/ioctl.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include "bittest.h"
 
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/patlooptest.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/patlooptest.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/patlooptest.c (original)
+++ branches/1.2/patlooptest.c Wed Jan 31 13:01:33 2007
@@ -3,14 +3,12 @@
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>
-#include <linux/types.h>
 #include <linux/ppp_defs.h> 
 #include <sys/ioctl.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <time.h>
 
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/pattest.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/pattest.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/pattest.c (original)
+++ branches/1.2/pattest.c Wed Jan 31 13:01:33 2007
@@ -3,14 +3,12 @@
 #include <string.h>
 #include <errno.h>
 #include <stdio.h>
-#include <linux/types.h>
 #include <linux/ppp_defs.h> 
 #include <sys/ioctl.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include "bittest.h"
 
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/timertest.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/timertest.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/timertest.c (original)
+++ branches/1.2/timertest.c Wed Jan 31 13:01:33 2007
@@ -8,7 +8,6 @@
 #include <sys/time.h>
 #include <errno.h>
 
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/tonezone.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/tonezone.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/tonezone.c (original)
+++ branches/1.2/tonezone.c Wed Jan 31 13:01:33 2007
@@ -29,7 +29,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
-#include <linux/types.h>
 #include "tonezone.h"
 
 #define DEFAULT_ZT_DEV "/dev/zap/ctl"

Modified: branches/1.2/torisatool.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/torisatool.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/torisatool.c (original)
+++ branches/1.2/torisatool.c Wed Jan 31 13:01:33 2007
@@ -28,7 +28,6 @@
 #include <sys/ioctl.h>
 #include <string.h>
 #include <errno.h>
-#include <linux/types.h>
 #include "zaptel.h"
 #include "torisa.h"
 

Modified: branches/1.2/usbfxstest.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/usbfxstest.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/usbfxstest.c (original)
+++ branches/1.2/usbfxstest.c Wed Jan 31 13:01:33 2007
@@ -6,7 +6,6 @@
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include "zap.h"
-#include <linux/types.h>
 #include <linux/zaptel.h>
 
 int main(int argc, char *argv[])

Modified: branches/1.2/wctc4xxp/codec_test.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctc4xxp/codec_test.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/wctc4xxp/codec_test.c (original)
+++ branches/1.2/wctc4xxp/codec_test.c Wed Jan 31 13:01:33 2007
@@ -35,7 +35,6 @@
 #include <errno.h>
 #include <sys/mman.h>
 #include <unistd.h>
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "../zaptel.h"
 #else

Modified: branches/1.2/zaptel.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/zaptel.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/zaptel.c (original)
+++ branches/1.2/zaptel.c Wed Jan 31 13:01:33 2007
@@ -79,7 +79,6 @@
 #define FAST_HDLC_NEED_TABLES
 #include "fasthdlc.h"
 
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/zaptel.h
URL: http://svn.digium.com/view/zaptel/branches/1.2/zaptel.h?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/zaptel.h (original)
+++ branches/1.2/zaptel.h Wed Jan 31 13:01:33 2007
@@ -30,20 +30,26 @@
 #ifndef _LINUX_ZAPTEL_H
 #define _LINUX_ZAPTEL_H
 
+#include <linux/types.h>
+
 #ifdef __KERNEL__
 #include "zconfig.h"
 #include <linux/version.h>
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 #include <linux/config.h>
 #endif
+
 #ifdef CONFIG_ZAPATA_NET	
 #include <linux/hdlc.h>
 #endif
+
 #ifdef CONFIG_ZAPATA_PPP
 #include <linux/ppp_channel.h>
 #include <linux/skbuff.h>
 #include <linux/interrupt.h>
 #endif
+
 #include <linux/fs.h>
 #include <linux/list.h>
 
@@ -69,7 +75,8 @@
 
 #include "ecdis.h"
 #include "fasthdlc.h"
-#endif
+#endif /* __KERNEL__ */
+
 #ifdef CONFIG_DEVFS_FS
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
 #include <linux/devfs_fs_kernel.h>
@@ -789,9 +796,6 @@
 
 };
 
-#ifdef __KERNEL__
-#endif /* KERNEL */
-
 /* Define the maximum block size */
 #define	ZT_MAX_BLOCKSIZE	8192
 
@@ -991,8 +995,6 @@
 #endif
 
 #ifdef __KERNEL__
-
-#include <linux/types.h>
 #include <linux/poll.h>
 
 #define	ZT_MAX_EVENTSIZE	64	/* 64 events max in buffer */
@@ -1019,7 +1021,8 @@
 #endif
 	struct zt_chan *chan;
 };
-#endif
+
+#endif /* CONFIG_ZAPATA_NET */
 
 /* Conference queue stucture */
 struct confq {
@@ -1451,24 +1454,24 @@
 };
 
 /* Receive a dynamic span message */
-extern void zt_dynamic_receive(struct zt_span *span, unsigned char *msg, int msglen);
+void zt_dynamic_receive(struct zt_span *span, unsigned char *msg, int msglen);
 
 /* Register a dynamic driver */
-extern int zt_dynamic_register(struct zt_dynamic_driver *driver);
+int zt_dynamic_register(struct zt_dynamic_driver *driver);
 
 /* Unregister a dynamic driver */
-extern void zt_dynamic_unregister(struct zt_dynamic_driver *driver);
+void zt_dynamic_unregister(struct zt_dynamic_driver *driver);
 
 /* Receive on a span.  The zaptel interface will handle all the calculations for
    all member channels of the span, pulling the data from the readchunk buffer */
-extern int zt_receive(struct zt_span *span);
+int zt_receive(struct zt_span *span);
 
 /* Prepare writechunk buffers on all channels for this span */
-extern int zt_transmit(struct zt_span *span);
+int zt_transmit(struct zt_span *span);
 
 /* Register a span.  Returns 0 on success, -1 on failure.  Pref-master is non-zero if
    we should have preference in being the master device */
-extern int zt_register(struct zt_span *span, int prefmaster);
+int zt_register(struct zt_span *span, int prefmaster);
  
 /* Allocate / free memory for a transcoder */
 struct zt_transcoder *zt_transcoder_alloc(int numchans);
@@ -1485,32 +1488,32 @@
 
 
 /* Unregister a span */
-extern int zt_unregister(struct zt_span *span);
+int zt_unregister(struct zt_span *span);
 
 /* Gives a name to an LBO */
-extern char *zt_lboname(int lbo);
+char *zt_lboname(int lbo);
 
 /* Tell Zaptel about changes in received rbs bits */
-extern void zt_rbsbits(struct zt_chan *chan, int bits);
+void zt_rbsbits(struct zt_chan *chan, int bits);
 
 /* Tell Zaptel abou changes in received signalling */
-extern void zt_hooksig(struct zt_chan *chan, zt_rxsig_t rxsig);
+void zt_hooksig(struct zt_chan *chan, zt_rxsig_t rxsig);
 
 /* Queue an event on a channel */
-extern void zt_qevent_nolock(struct zt_chan *chan, int event);
+void zt_qevent_nolock(struct zt_chan *chan, int event);
 
 /* Queue an event on a channel, locking it first */
-extern void zt_qevent_lock(struct zt_chan *chan, int event);
+void zt_qevent_lock(struct zt_chan *chan, int event);
 
 /* Notify a change possible change in alarm status */
-extern void zt_alarm_notify(struct zt_span *span);
+void zt_alarm_notify(struct zt_span *span);
 
 /* Initialize a tone state */
-extern void zt_init_tone_state(struct zt_tone_state *ts, struct zt_tone *zt);
+void zt_init_tone_state(struct zt_tone_state *ts, struct zt_tone *zt);
 
 /* Get a given DTMF or MF tone struct, suitable for zt_tone_nextsample.
    Set 'mf' to 0 for DTMF or 1 for MFv1 */
-extern struct zt_tone *zt_dtmf_tone(char digit, int mf);
+struct zt_tone *zt_dtmf_tone(char digit, int mf);
 
 /* Echo cancel a receive and transmit chunk for a given channel.  This
    should be called by the low-level driver as close to the interface
@@ -1518,8 +1521,8 @@
    AT THE ZAPTEL LEVEL.  zt_ec_chunk will not echo cancel if it should
    not be doing so.  rxchunk is modified in-place */
 
-extern void zt_ec_chunk(struct zt_chan *chan, unsigned char *rxchunk, const unsigned char *txchunk);
-extern void zt_ec_span(struct zt_span *span);
+void zt_ec_chunk(struct zt_chan *chan, unsigned char *rxchunk, const unsigned char *txchunk);
+void zt_ec_span(struct zt_span *span);
 
 extern struct file_operations *zt_transcode_fops;
 
@@ -1528,15 +1531,15 @@
 extern short __zt_mulaw[256];
 extern short __zt_alaw[256];
 #ifdef CONFIG_CALC_XLAW
-extern u_char __zt_lineartoulaw(short a);
-extern u_char __zt_lineartoalaw(short a);
+u_char __zt_lineartoulaw(short a);
+u_char __zt_lineartoalaw(short a);
 #else
 extern u_char __zt_lin2mu[16384];
 extern u_char __zt_lin2a[16384];
 #endif
 
 /* Used by dynamic zaptel -- don't use directly */
-extern void zt_set_dynamic_ioctl(int (*func)(unsigned int cmd, unsigned long data));
+void zt_set_dynamic_ioctl(int (*func)(unsigned int cmd, unsigned long data));
 
 /* Used privately by zaptel.  Avoid touching directly */
 struct zt_tone {

Modified: branches/1.2/zonedata.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/zonedata.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/zonedata.c (original)
+++ branches/1.2/zonedata.c Wed Jan 31 13:01:33 2007
@@ -23,7 +23,6 @@
  * UK information from BT SIN 350 Issue 1.1
  * Helpful reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf
  */
-#include <linux/types.h>
 #include "tonezone.h"
 
 struct tone_zone builtin_zones[]  =

Modified: branches/1.2/ztcfg.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztcfg.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/ztcfg.c (original)
+++ branches/1.2/ztcfg.c Wed Jan 31 13:01:33 2007
@@ -38,7 +38,6 @@
 #include <fcntl.h>
 #include <errno.h>
 #include "ztcfg.h"
-#include <linux/types.h>
 #include "tonezone.h"
 #include "zaptel.h"
 

Modified: branches/1.2/ztd-eth.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztd-eth.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/ztd-eth.c (original)
+++ branches/1.2/ztd-eth.c Wed Jan 31 13:01:33 2007
@@ -36,7 +36,6 @@
 #ifdef CONFIG_DEVFS_FS
 #include <linux/devfs_fs_kernel.h>
 #endif
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/ztd-loc.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztd-loc.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/ztd-loc.c (original)
+++ branches/1.2/ztd-loc.c Wed Jan 31 13:01:33 2007
@@ -60,7 +60,6 @@
 #ifdef CONFIG_DEVFS_FS
 #include <linux/devfs_fs_kernel.h>
 #endif
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/ztdiag.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztdiag.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/ztdiag.c (original)
+++ branches/1.2/ztdiag.c Wed Jan 31 13:01:33 2007
@@ -4,7 +4,6 @@
 #include <stdlib.h>
 #include <unistd.h>
 
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/ztdummy.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztdummy.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/ztdummy.c (original)
+++ branches/1.2/ztdummy.c Wed Jan 31 13:01:33 2007
@@ -59,7 +59,6 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/errno.h>
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/ztdynamic.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztdynamic.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/ztdynamic.c (original)
+++ branches/1.2/ztdynamic.c Wed Jan 31 13:01:33 2007
@@ -36,7 +36,6 @@
 #ifdef CONFIG_DEVFS_FS
 #include <linux/devfs_fs_kernel.h>
 #endif
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #else

Modified: branches/1.2/ztmonitor.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztmonitor.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/ztmonitor.c (original)
+++ branches/1.2/ztmonitor.c Wed Jan 31 13:01:33 2007
@@ -38,7 +38,6 @@
 #include <sys/time.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #include "tonezone.h"

Modified: branches/1.2/zttool.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/zttool.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/zttool.c (original)
+++ branches/1.2/zttool.c Wed Jan 31 13:01:33 2007
@@ -38,7 +38,6 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <newt.h>
-#include <linux/types.h>
 #ifdef STANDALONE_ZAPATA
 #include "zaptel.h"
 #include "tonezone.h"

Modified: branches/1.2/zttranscode.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/zttranscode.c?view=diff&rev=2059&r1=2058&r2=2059
==============================================================================
--- branches/1.2/zttranscode.c (original)
+++ branches/1.2/zttranscode.c Wed Jan 31 13:01:33 2007
@@ -34,7 +34,6 @@
 #include <linux/interrupt.h>
 #include <linux/vmalloc.h>
 #include <asm/io.h>
-#include <linux/types.h>
 #ifdef CONFIG_DEVFS_FS
 #include <linux/devfs_fs_kernel.h>
 #endif



More information about the svn-commits mailing list