[Pkg-voip-commits] r1520 - zaptel/trunk/debian/patches
Kilian Krause
kilian at costa.debian.org
Thu Mar 30 20:43:47 UTC 2006
Author: kilian
Date: 2006-03-30 20:43:46 +0000 (Thu, 30 Mar 2006)
New Revision: 1520
Added:
zaptel/trunk/debian/patches/gendigits.dpatch
Log:
add patch for gendigits to allow generation of linux-2.6 modules in the Debian Kernel Team style.
Added: zaptel/trunk/debian/patches/gendigits.dpatch
===================================================================
--- zaptel/trunk/debian/patches/gendigits.dpatch 2006-03-30 20:11:01 UTC (rev 1519)
+++ zaptel/trunk/debian/patches/gendigits.dpatch 2006-03-30 20:43:46 UTC (rev 1520)
@@ -0,0 +1,59 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## gendigits.dpatch by Kilian Krause <kilian at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix writing to be on stdout rather than some file which fails eventually.
+
+ at DPATCH@
+--- ../build-area/zaptel-1.2.5/gendigits.c 2005-11-29 19:42:08.000000000 +0100
++++ debian/build/source/gendigits.c 2006-03-30 22:30:51.000000000 +0200
+@@ -95,7 +95,7 @@
+ return(ulawbyte);
+ }
+
+-int process(FILE *f, char *label, ZAP_DIAL z[], float low_tone_level, float high_tone_level)
++int process(char *label, ZAP_DIAL z[], float low_tone_level, float high_tone_level)
+ {
+ char c;
+ float gain;
+@@ -119,7 +119,7 @@
+ init_v2_2 = sin(-4.0 * M_PI * (z->f2 / 8000.0)) * gain;
+ init_v3_2 = sin(-2.0 * M_PI * (z->f2 / 8000.0)) * gain;
+
+- fprintf(f, "\t /* %s_%c */ { %d, %d, %d, %d, %d, %d, DEFAULT_DTMF_LENGTH, &%s_silence }, \n", label, c,
++ printf("\t /* %s_%c */ { %d, %d, %d, %d, %d, %d, DEFAULT_DTMF_LENGTH, &%s_silence }, \n", label, c,
+ fac1, init_v2_1, init_v3_1,
+ fac2, init_v2_2, init_v3_2,
+ label);
+@@ -141,23 +141,15 @@
+
+ int main(int argc, char *argv[])
+ {
+- FILE *f;
+-
+- if ((f = fopen("tones.h", "w"))) {
+- fprintf(f, "/* DTMF and MF tones used by the Tormenta Driver, in static tables.\n"
++ printf("/* DTMF and MF tones used by the Tormenta Driver, in static tables.\n"
+ " Generated automatically from gendigits. Do not edit by hand. */\n");
+- fprintf(f, "static struct zt_tone dtmf_tones[16] = {\n");
+- process(f, "dtmf", dtmf_dial, LEVEL_DTMF_LOW, LEVEL_DTMF_HIGH);
+- fprintf(f, "};\n\n");
+- fprintf(f, "static struct zt_tone mfv1_tones[15] = {\n");
+- process(f, "mfv1", mf_dial, LEVEL_MF, LEVEL_MF);
+- fprintf(f, "};\n\n");
+- fprintf(f, "/* END tones.h */\n");
+- fclose(f);
+- } else {
+- fprintf(stderr, "Unable to open tones.h for writing\n");
+- return 1;
+- }
++ printf("static struct zt_tone dtmf_tones[16] = {\n");
++ process("dtmf", dtmf_dial, LEVEL_DTMF_LOW, LEVEL_DTMF_HIGH);
++ printf("};\n\n");
++ printf("static struct zt_tone mfv1_tones[15] = {\n");
++ process("mfv1", mf_dial, LEVEL_MF, LEVEL_MF);
++ printf("};\n\n");
++ printf("/* END tones.h */\n");
+
+ return 0;
+ }
Property changes on: zaptel/trunk/debian/patches/gendigits.dpatch
___________________________________________________________________
Name: svn:executable
+ *
More information about the Pkg-voip-commits
mailing list