Fix for ticket:29 . Newly generated .cc,.h,.i files are also checked
authormichaelld <michaelld@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 5 Feb 2007 20:29:40 +0000 (20:29 +0000)
committermichaelld <michaelld@221aa14e-8319-0410-a670-987f0aec2ac5>
Mon, 5 Feb 2007 20:29:40 +0000 (20:29 +0000)
in, with the "warning" message at the top.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4385 221aa14e-8319-0410-a670-987f0aec2ac5

22 files changed:
gr-trellis/src/lib/Makefile.am
gr-trellis/src/lib/build_utils.py [deleted file]
gr-trellis/src/lib/build_utils_codes.py [deleted file]
gr-trellis/src/lib/generate_all.py
gr-trellis/src/lib/generate_common.py [deleted file]
gr-trellis/src/lib/generate_trellis.py [new file with mode: 0644]
gr-trellis/src/lib/trellis_encoder_bb.cc
gr-trellis/src/lib/trellis_encoder_bi.cc
gr-trellis/src/lib/trellis_encoder_bs.cc
gr-trellis/src/lib/trellis_encoder_ii.cc
gr-trellis/src/lib/trellis_encoder_si.cc
gr-trellis/src/lib/trellis_encoder_ss.cc
gr-trellis/src/lib/trellis_metrics_c.cc
gr-trellis/src/lib/trellis_metrics_f.cc
gr-trellis/src/lib/trellis_metrics_i.cc
gr-trellis/src/lib/trellis_metrics_s.cc
gr-trellis/src/lib/trellis_viterbi_b.cc
gr-trellis/src/lib/trellis_viterbi_combined_b.cc
gr-trellis/src/lib/trellis_viterbi_combined_i.cc
gr-trellis/src/lib/trellis_viterbi_combined_s.cc
gr-trellis/src/lib/trellis_viterbi_i.cc
gr-trellis/src/lib/trellis_viterbi_s.cc

index 466ab6bb7bc784b3a6fd1ff2656a35e84a275727..0648c2618dd458659e983c5fc5aa33400dc5c2a2 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2004,2005,2006 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -21,8 +21,6 @@
 
 include $(top_srcdir)/Makefile.common
 
-include Makefile.gen
-
 # Install this stuff so that it ends up as the gnuradio.trellis module
 # This usually ends up at:
 #   ${prefix}/lib/python${python_version}/site-packages/gnuradio
@@ -34,28 +32,60 @@ INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
 
 SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES)
 
-ALL_IFILES =                           \
-       $(LOCAL_IFILES)                 \
-       $(NON_LOCAL_IFILES)             
-
-NON_LOCAL_IFILES =                     \
-       $(GNURADIO_I)                   
-
+# ----------------------------------------------------------------
+# these scripts generate trellis codes from template files
+
+CODE_GENERATOR =                               \
+       generate_all.py                         \
+       generate_trellis.py                     \
+       trellis_encoder_XX.cc.t                 \
+       trellis_encoder_XX.h.t                  \
+       trellis_encoder_XX.i.t                  \
+       trellis_metrics_X.cc.t                  \
+       trellis_metrics_X.h.t                   \
+       trellis_metrics_X.i.t                   \
+       trellis_viterbi_combined_X.cc.t         \
+       trellis_viterbi_combined_X.h.t          \
+       trellis_viterbi_combined_X.i.t          \
+       trellis_viterbi_X.cc.t                  \
+       trellis_viterbi_X.h.t                   \
+       trellis_viterbi_X.i.t
 
-LOCAL_IFILES =                                 \
-       $(top_srcdir)/gr-trellis/src/lib/trellis.i                      
+include Makefile.gen
 
+$(GENERATED_H) $(GENERATED_I) $(GENERATED_CC): $(CODE_GENERATOR)
+       PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python \
+               srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_all.py
 
 # These files are built by SWIG.  The first is the C++ glue.
 # The second is the python wrapper that loads the _trellis shared library
 # and knows how to call our extensions.
 
-BUILT_SOURCES =                        \
-       trellis.cc                      \
+SWIG_BUILT_SOURCES =           \
+       trellis.cc              \
        trellis.py                              
 
+BUILT_SOURCES = \
+       $(GENERATED_H)          \
+       $(GENERATED_I)          \
+       $(GENERATED_CC)         \
+       $(SWIG_BUILT_SOURCES)
+
+ALL_IFILES =                   \
+       $(LOCAL_IFILES)         \
+       $(NON_LOCAL_IFILES)     
+
+NON_LOCAL_IFILES =             \
+       $(GNURADIO_I)   
+
+LOCAL_IFILES =                         \
+       $(top_srcdir)/gr-trellis/src/lib/trellis.i                      
+
+EXTRA_DIST =                   \
+       $(CODE_GENERATOR)
+
 # This gets trellis.py installed in the right place
-ourpython_PYTHON =                     \
+ourpython_PYTHON =             \
        trellis.py
 
 ourlib_LTLIBRARIES = _trellis.la
@@ -81,7 +111,7 @@ _trellis_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
 _trellis_la_LIBADD =                   \
        $(PYTHON_LDFLAGS)               \
        $(GNURADIO_CORE_LIBS)           \
-       -lstdc++                        
+       -lstdc++
 
 trellis.cc trellis.py: $(ALL_IFILES) $(grinclude_HEADERS)
        $(SWIG) $(SWIGPYTHONARGS) -module trellis -o trellis.cc $(LOCAL_IFILES)
@@ -97,9 +127,8 @@ grinclude_HEADERS =                  \
         trellis_permutation.h          \
         trellis_siso_type.h            \
        trellis_siso_f.h                \
-       trellis_siso_combined_f.h               \
-       $(GENERATED_H)                  
-
+       trellis_siso_combined_f.h       \
+       $(GENERATED_H)
 
 # These swig headers get installed in ${prefix}/include/gnuradio/swig
 swiginclude_HEADERS =                  \
@@ -112,11 +141,9 @@ swiginclude_HEADERS =                      \
        trellis_siso_combined_f.i       \
        trellis_generated.i
 
-
-
-MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
+CLEANFILES = $(BUILT_SOURCES) *.pyc
 
 # Don't distribute output of swig
 dist-hook:
-       @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
-       @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
+       @for file in $(SWIG_BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
+       @for file in $(SWIG_BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
diff --git a/gr-trellis/src/lib/build_utils.py b/gr-trellis/src/lib/build_utils.py
deleted file mode 100644 (file)
index 9145e86..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-#
-# Copyright 2004 Free Software Foundation, Inc.
-# 
-# This file is part of GNU Radio
-# 
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-# 
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-# 
-
-"""Misc utilities used at build time
-"""
-
-import re, os, os.path
-from build_utils_codes import *
-
-
-# set srcdir to the directory that contains Makefile.am
-try:
-    srcdir = os.environ['srcdir']
-except KeyError, e:
-    srcdir = "."
-srcdir = srcdir + '/'
-
-
-name_dict = {}
-
-def log_output_name (name):
-    (base, ext) = os.path.splitext (name)
-    ext = ext[1:]                       # drop the leading '.'
-    
-    entry = name_dict.setdefault (ext, [])
-    entry.append (name)
-    
-def open_and_log_name (name, dir):
-    f = open (name, dir)
-    log_output_name (name)
-    return f
-
-def expand_template (d, template_filename, extra = ""):
-    '''Given a dictionary D and a TEMPLATE_FILENAME, expand template into output file
-    '''
-    output_extension = extract_extension (template_filename)
-    template = open_src (template_filename, 'r')
-    output_name = d['NAME'] + extra + '.' + output_extension
-    log_output_name (output_name)
-    output = open (output_name, 'w')
-    do_substitution (d, template, output)
-    template.close ()
-    output.close ()
-
-def output_glue (dirname):
-    output_makefile_fragment ()
-    output_ifile_include (dirname)
-    
-def output_makefile_fragment ():
-    f = open ('Makefile.gen', 'w')
-    f.write ('#\n# This file is machine generated.  All edits will be overwritten\n#\n')
-    output_subfrag (f, 'h')
-    output_subfrag (f, 'i')
-    output_subfrag (f, 'cc')
-    f.close ()
-
-def output_ifile_include (dirname):
-    f = open ('%s_generated.i' % (dirname,), 'w')
-    f.write ('//\n// This file is machine generated.  All edits will be overwritten\n//\n')
-    files = name_dict.setdefault ('i', [])
-    files.sort ()
-    f.write ('%{\n')
-    for file in files:
-        f.write ('#include <%s>\n' % (file[0:-1] + 'h',))
-    f.write ('%}\n\n')
-    for file in files:
-        f.write ('%%include <%s>\n' % (file,))
-
-def output_subfrag (f, ext):
-    files = name_dict.setdefault (ext, [])
-    files.sort ()
-    f.write ("GENERATED_%s =" % (ext.upper ()))
-    for file in files:
-        f.write (" \\\n\t%s" % (file,))
-    f.write ("\n\n")
-    
-
-def extract_extension (template_name):
-    # template name is something like: GrFIRfilterXXX.h.t
-    # we return everything between the penultimate . and .t
-    mo = re.search (r'\.([a-z]+)\.t$', template_name)
-    if not mo:
-        raise ValueError, "Incorrectly formed template_name '%s'" % (template_name,)
-    return mo.group (1)
-
-def open_src (name, mode):
-    global srcdir
-    return open (os.path.join (srcdir, name), mode)
-
-def do_substitution (d, in_file, out_file):
-    def repl (match_obj):
-        key = match_obj.group (1)
-        # print key
-        return d[key]
-    
-    inp = in_file.read ()
-    out = re.sub (r"@([a-zA-Z0-9_]+)@", repl, inp)
-    out_file.write (out)
-
-    
-
-copyright = '''/* -*- c++ -*- */
-/*
- * Copyright 2003,2004 Free Software Foundation, Inc.
- * 
- * This file is part of GNU Radio
- * 
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- * 
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-'''
-
-def is_byte (code3):
-    if i_code (code3) == 'b' or o_code (code3) == 'b':
-        return '1'
-    else:
-        return '0'
-
-def is_short (code3):
-    if i_code (code3) == 's' or o_code (code3) == 's':
-        return '1'
-    else:
-        return '0'
-
-def is_int (code3):
-    if i_code (code3) == 'i' or o_code (code3) == 'i':
-        return '1'
-    else:
-        return '0'
-
-def is_float (code3):
-    if i_code (code3) == 'f' or o_code (code3) == 'f':
-        return '1'
-    else:
-        return '0'
-
-def is_complex (code3):
-    if i_code (code3) == 'c' or o_code (code3) == 'c':
-        return '1'
-    else:
-        return '0'
-
-
-
-
-def standard_dict (name, code3):
-    d = {}
-    d['NAME'] = name
-    d['GUARD_NAME'] = 'INCLUDED_%s_H' % name.upper ()
-    d['BASE_NAME'] = re.sub ('^trellis_', '', name)
-    d['SPTR_NAME'] = '%s_sptr' % name
-    d['WARNING'] = 'WARNING: this file is machine generated.  Edits will be over written'
-    d['COPYRIGHT'] = copyright
-    d['TYPE'] = i_type (code3)
-    d['I_TYPE'] = i_type (code3)
-    d['O_TYPE'] = o_type (code3)
-    d['TAP_TYPE'] = tap_type (code3)
-    d['IS_BYTE'] = is_byte (code3)
-    d['IS_SHORT'] = is_short (code3)
-    d['IS_INT'] = is_int (code3)
-    d['IS_FLOAT'] = is_float (code3)
-    d['IS_COMPLEX'] = is_complex (code3)
-    return d
diff --git a/gr-trellis/src/lib/build_utils_codes.py b/gr-trellis/src/lib/build_utils_codes.py
deleted file mode 100644 (file)
index aa2e7f3..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Copyright 2004 Free Software Foundation, Inc.
-# 
-# This file is part of GNU Radio
-# 
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-# 
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-# 
-
-def i_code (code3):
-    return code3[0]
-
-def o_code (code3):
-    if len (code3) >= 2:
-        return code3[1]
-    else:
-        return code3[0]
-
-def tap_code (code3):
-    if len (code3) >= 3:
-        return code3[2]
-    else:
-        return code3[0]
-
-def i_type (code3):
-    return char_to_type[i_code (code3)]
-
-def o_type (code3):
-    return char_to_type[o_code (code3)]
-
-def tap_type (code3):
-    return char_to_type[tap_code (code3)]
-
-
-char_to_type = {}
-char_to_type['s'] = 'short'
-char_to_type['i'] = 'int'
-char_to_type['f'] = 'float'
-char_to_type['c'] = 'gr_complex'
-char_to_type['b'] = 'unsigned char'
index e41123b1346ea8ffe97aff20dd62391c9a8abc27..eda86ff7614baaf4b4f81eacf9df6f8abf0dc8a4 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004 Free Software Foundation, Inc.
+# Copyright 2006,2007 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
 
 from build_utils import output_glue
 
-import generate_common
+import generate_trellis
 
 def generate_all ():
-    generate_common.generate ()
+    generate_trellis.generate ()
     output_glue ('trellis')
 
-
 if __name__ == '__main__':
     generate_all ()
diff --git a/gr-trellis/src/lib/generate_common.py b/gr-trellis/src/lib/generate_common.py
deleted file mode 100644 (file)
index e09a0d2..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2004 Free Software Foundation, Inc.
-# 
-# This file is part of GNU Radio
-# 
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-# 
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING.  If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-# 
-
-from build_utils import expand_template, standard_dict
-from build_utils_codes import *
-
-import re
-
-
-# regular blocks
-other_roots = [
-    'trellis_encoder_XX',
-    'trellis_metrics_X',
-    'trellis_viterbi_X',
-    'trellis_viterbi_combined_X',
-    ]
-other_signatures = (
-    ['bb','bs','bi','ss','si','ii'],
-    ['s','i','f','c'],
-    ['b','s','i'],
-    ['b','s','i'],
-    )
-
-
-
-def expand_h_cc_i (root, sig):
-    # root looks like 'gr_vector_sink_X'
-    name = re.sub ('X+', sig, root)
-    d = standard_dict (name, sig)
-    expand_template (d, root + '.h.t')
-    expand_template (d, root + '.cc.t')
-    expand_template (d, root + '.i.t')
-
-
-def generate ():
-    i=0
-    for r in other_roots :
-        for s in other_signatures[i]:
-            expand_h_cc_i (r, s)
-        i=i+1
-            
-
-
-if __name__ == '__main__':
-    generate ()
-
-    
diff --git a/gr-trellis/src/lib/generate_trellis.py b/gr-trellis/src/lib/generate_trellis.py
new file mode 100644 (file)
index 0000000..e23ec4a
--- /dev/null
@@ -0,0 +1,117 @@
+#!/usr/bin/env python
+#
+# Copyright 2006,2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from build_utils import expand_template, copyright, open_and_log_name
+from build_utils_codes import *
+import re
+
+# regular blocks
+
+other_roots = [
+    'trellis_encoder_XX',
+    'trellis_metrics_X',
+    'trellis_viterbi_X',
+    'trellis_viterbi_combined_X',
+    ]
+
+other_signatures = (
+    ['bb','bs','bi','ss','si','ii'],
+    ['s','i','f','c'],
+    ['b','s','i'],
+    ['b','s','i'],
+    )
+
+
+def is_byte (code3):
+    if i_code (code3) == 'b' or o_code (code3) == 'b':
+        return '1'
+    else:
+        return '0'
+
+
+def is_short (code3):
+    if i_code (code3) == 's' or o_code (code3) == 's':
+        return '1'
+    else:
+        return '0'
+
+
+def is_int (code3):
+    if i_code (code3) == 'i' or o_code (code3) == 'i':
+        return '1'
+    else:
+        return '0'
+
+
+def is_float (code3):
+    if i_code (code3) == 'f' or o_code (code3) == 'f':
+        return '1'
+    else:
+        return '0'
+
+
+def is_complex (code3):
+    if i_code (code3) == 'c' or o_code (code3) == 'c':
+        return '1'
+    else:
+        return '0'
+
+
+def standard_dict (name, code3):
+    d = {}
+    d['NAME'] = name
+    d['GUARD_NAME'] = 'INCLUDED_%s_H' % name.upper ()
+    d['BASE_NAME'] = re.sub ('^trellis_', '', name)
+    d['SPTR_NAME'] = '%s_sptr' % name
+    d['WARNING'] = 'WARNING: this file is machine generated.  Edits will be over written'
+    d['COPYRIGHT'] = copyright
+    d['TYPE'] = i_type (code3)
+    d['I_TYPE'] = i_type (code3)
+    d['O_TYPE'] = o_type (code3)
+    d['TAP_TYPE'] = tap_type (code3)
+    d['IS_BYTE'] = is_byte (code3)
+    d['IS_SHORT'] = is_short (code3)
+    d['IS_INT'] = is_int (code3)
+    d['IS_FLOAT'] = is_float (code3)
+    d['IS_COMPLEX'] = is_complex (code3)
+    return d
+
+
+def expand_h_cc_i (root, sig):
+    # root looks like 'gr_vector_sink_X'
+    name = re.sub ('X+', sig, root)
+    d = standard_dict (name, sig)
+    expand_template (d, root + '.h.t')
+    expand_template (d, root + '.cc.t')
+    expand_template (d, root + '.i.t')
+
+
+def generate ():
+    i=0
+    for r in other_roots :
+        for s in other_signatures[i]:
+            expand_h_cc_i (r, s)
+        i=i+1
+
+
+if __name__ == '__main__':
+    generate ()
index 6740f3ac5118eb263a0e0f61cb9695f39b324f4f..bbb3c905f60a22a35beb991ab52a874849a334b7 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -50,7 +52,7 @@ trellis_encoder_bb::work (int noutput_items,
                        gr_vector_const_void_star &input_items,
                        gr_vector_void_star &output_items)
 {
-  int ST_tmp;
+  int ST_tmp=0;
 
   assert (input_items.size() == output_items.size());
   int nstreams = input_items.size();
index 62a3be74a746842f00053af63f4a5c3630111804..5e3d1899ba8bc0d1f1dc9a84e60446a2b3609cb9 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -50,7 +52,7 @@ trellis_encoder_bi::work (int noutput_items,
                        gr_vector_const_void_star &input_items,
                        gr_vector_void_star &output_items)
 {
-  int ST_tmp;
+  int ST_tmp=0;
 
   assert (input_items.size() == output_items.size());
   int nstreams = input_items.size();
index 7a2c233b1363316515666aa0c821584ea0c05800..0d84ca90415cbb92a89d414a457955d1290baa20 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -50,7 +52,7 @@ trellis_encoder_bs::work (int noutput_items,
                        gr_vector_const_void_star &input_items,
                        gr_vector_void_star &output_items)
 {
-  int ST_tmp;
+  int ST_tmp=0;
 
   assert (input_items.size() == output_items.size());
   int nstreams = input_items.size();
index 7b58a9b980489c68a09b4139bb04492fba30faae..e281763a18a1a403f284320b791fd24264c7aea4 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -50,7 +52,7 @@ trellis_encoder_ii::work (int noutput_items,
                        gr_vector_const_void_star &input_items,
                        gr_vector_void_star &output_items)
 {
-  int ST_tmp;
+  int ST_tmp=0;
 
   assert (input_items.size() == output_items.size());
   int nstreams = input_items.size();
index 69840d519baa264b22cb7c7e54c0852d67d2ab17..03da34fa1ac3beaf825755dd95b682f5e2f37a37 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -50,7 +52,7 @@ trellis_encoder_si::work (int noutput_items,
                        gr_vector_const_void_star &input_items,
                        gr_vector_void_star &output_items)
 {
-  int ST_tmp;
+  int ST_tmp=0;
 
   assert (input_items.size() == output_items.size());
   int nstreams = input_items.size();
index 7074c54c97642ca3ccf187860cad6fbbd7eb0e7c..e4196eb997291ff762e557d8d502cbfa7e4c6afe 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -50,7 +52,7 @@ trellis_encoder_ss::work (int noutput_items,
                        gr_vector_const_void_star &input_items,
                        gr_vector_void_star &output_items)
 {
-  int ST_tmp;
+  int ST_tmp=0;
 
   assert (input_items.size() == output_items.size());
   int nstreams = input_items.size();
index 8a817513c092bd8a17708748fd1dbb42528d79a6..1dc3d137d8b1a50fcbf4ac3dd49a0b14a469042f 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifndef HAVE_CONFIG_H
 #include "config.h"
 #endif
index d9c91b2745858a0bce5d2ceb3b17bf424a9758a3..6cfbe3520ed5be7761337cd9e601c860bcad3685 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifndef HAVE_CONFIG_H
 #include "config.h"
 #endif
index c2162e704f04a5a615c69d73a6521d252f4a7cd4..ab0938d229e2984df91c86773d4c2d2629985587 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifndef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 5229f74c37f5811bb293ff2914c821f0708e0fd0..dd989b8e5a0124cec2b4a16f37bf593a9e2dc8b3 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifndef HAVE_CONFIG_H
 #include "config.h"
 #endif
index 01c75381ced04bb62b3f0ad9844760735cc60f46..b4144434a8cec10ca953db325be864fc6c12f174 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -106,7 +108,7 @@ void viterbi_algorithm(int I, int S, int O,
       for(int j=0;j<S;j++) { // for each next state do ACS
           minm=INF;
           minmi=0;
-          for(int i=0;i<PS[j].size();i++) {
+          for(unsigned int i=0;i<PS[j].size();i++) {
               //int i0 = j*I+i;
               if((mm=alpha[alphai*S+PS[j][i]]+in[k*O+OS[PS[j][i]*I+PI[j][i]]])<minm)
                   minm=mm,minmi=i;
index 62d877f6a0353a75c42c53ae7864b2b4646bfa83..9860c7f86b94903684db6e570e2718e644b6cbc1 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -119,8 +121,8 @@ void viterbi_algorithm_combined(int I, int S, int O,
       for(int j=0;j<S;j++) { // for each next state do ACS
           minm=INF;
           minmi=0;
-          for(int i=0;i<PS[j].size();i++) {
-              int i0 = j*I+i;
+          for(unsigned int i=0;i<PS[j].size();i++) {
+              //int i0 = j*I+i;
               if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
                   minm=mm,minmi=i;
           }
index 37a0355002c41fa77d35df895a551baca32c21c1..72b64e0d03f435bbc51df5cf18b36b7843e061c2 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -119,8 +121,8 @@ void viterbi_algorithm_combined(int I, int S, int O,
       for(int j=0;j<S;j++) { // for each next state do ACS
           minm=INF;
           minmi=0;
-          for(int i=0;i<PS[j].size();i++) {
-              int i0 = j*I+i;
+          for(unsigned int i=0;i<PS[j].size();i++) {
+              //int i0 = j*I+i;
               if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
                   minm=mm,minmi=i;
           }
index c332dd0d5387423679818d2cf64732ff7b35d0fe..9ee6bc420417c13198996eee1ef0a24387914103 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -119,8 +121,8 @@ void viterbi_algorithm_combined(int I, int S, int O,
       for(int j=0;j<S;j++) { // for each next state do ACS
           minm=INF;
           minmi=0;
-          for(int i=0;i<PS[j].size();i++) {
-              int i0 = j*I+i;
+          for(unsigned int i=0;i<PS[j].size();i++) {
+              //int i0 = j*I+i;
               if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
                   minm=mm,minmi=i;
           }
index f5d61173b417a2655408f9fa5c984d19c62b2862..b39c68510f90aa4293f56c62d5ffac5e26d197cf 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -106,7 +108,7 @@ void viterbi_algorithm(int I, int S, int O,
       for(int j=0;j<S;j++) { // for each next state do ACS
           minm=INF;
           minmi=0;
-          for(int i=0;i<PS[j].size();i++) {
+          for(unsigned int i=0;i<PS[j].size();i++) {
               //int i0 = j*I+i;
               if((mm=alpha[alphai*S+PS[j][i]]+in[k*O+OS[PS[j][i]*I+PI[j][i]]])<minm)
                   minm=mm,minmi=i;
index ccdd115584f51fb0a5fa5644385bff76e079ff7d..9ccbab28b828666639588258182c6e48f084608a 100644 (file)
@@ -20,6 +20,8 @@
  * Boston, MA 02110-1301, USA.
  */
 
+// WARNING: this file is machine generated.  Edits will be over written
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -106,7 +108,7 @@ void viterbi_algorithm(int I, int S, int O,
       for(int j=0;j<S;j++) { // for each next state do ACS
           minm=INF;
           minmi=0;
-          for(int i=0;i<PS[j].size();i++) {
+          for(unsigned int i=0;i<PS[j].size();i++) {
               //int i0 = j*I+i;
               if((mm=alpha[alphai*S+PS[j][i]]+in[k*O+OS[PS[j][i]*I+PI[j][i]]])<minm)
                   minm=mm,minmi=i;