summaryrefslogtreecommitdiff
path: root/gruel/src/scheme
diff options
context:
space:
mode:
Diffstat (limited to 'gruel/src/scheme')
-rw-r--r--gruel/src/scheme/.gitignore8
-rw-r--r--gruel/src/scheme/Makefile.am21
-rw-r--r--gruel/src/scheme/gnuradio/.gitignore8
-rw-r--r--gruel/src/scheme/gnuradio/CMakeLists.txt26
-rw-r--r--gruel/src/scheme/gnuradio/Makefile.am33
-rw-r--r--gruel/src/scheme/gnuradio/gen-serial-tags.py53
-rw-r--r--gruel/src/scheme/gnuradio/macros-etc.scm50
-rw-r--r--gruel/src/scheme/gnuradio/pmt-serial-tags.scm75
-rw-r--r--gruel/src/scheme/gnuradio/pmt-serialize.scm48
9 files changed, 0 insertions, 322 deletions
diff --git a/gruel/src/scheme/.gitignore b/gruel/src/scheme/.gitignore
deleted file mode 100644
index a02b6ff73..000000000
--- a/gruel/src/scheme/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
diff --git a/gruel/src/scheme/Makefile.am b/gruel/src/scheme/Makefile.am
deleted file mode 100644
index 4980063d7..000000000
--- a/gruel/src/scheme/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# Copyright 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 3, 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 this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-SUBDIRS = gnuradio
diff --git a/gruel/src/scheme/gnuradio/.gitignore b/gruel/src/scheme/gnuradio/.gitignore
deleted file mode 100644
index a02b6ff73..000000000
--- a/gruel/src/scheme/gnuradio/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/Makefile
-/Makefile.in
-/.la
-/.lo
-/.deps
-/.libs
-/*.la
-/*.lo
diff --git a/gruel/src/scheme/gnuradio/CMakeLists.txt b/gruel/src/scheme/gnuradio/CMakeLists.txt
deleted file mode 100644
index 4ff4f7feb..000000000
--- a/gruel/src/scheme/gnuradio/CMakeLists.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 2010 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 3, 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.
-
-########################################################################
-
-install(FILES
- pmt-serial-tags.scm
- pmt-serialize.scm
- macros-etc.scm
-DESTINATION ${GR_PKG_DATA_DIR} COMPONENT "gruel_swig")
diff --git a/gruel/src/scheme/gnuradio/Makefile.am b/gruel/src/scheme/gnuradio/Makefile.am
deleted file mode 100644
index e7b6bf744..000000000
--- a/gruel/src/scheme/gnuradio/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Copyright 2007,2009,2010,2011 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 3, 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 this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-include $(top_srcdir)/Makefile.common
-
-#pkgdatadir = $(datadir)/gnuradio
-
-EXTRA_DIST += \
- gen-serial-tags.py
-
-# really scheme source files FIXME wrong location
-dist_pkgdata_DATA = \
- pmt-serial-tags.scm \
- pmt-serialize.scm \
- macros-etc.scm
-
diff --git a/gruel/src/scheme/gnuradio/gen-serial-tags.py b/gruel/src/scheme/gnuradio/gen-serial-tags.py
deleted file mode 100644
index 18e927beb..000000000
--- a/gruel/src/scheme/gnuradio/gen-serial-tags.py
+++ /dev/null
@@ -1,53 +0,0 @@
-"""
-//
-// Copyright 2011 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 3, 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 this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-//
-// THIS FILE IS MACHINE GENERATED FROM %s. DO NOT EDIT BY HAND.
-// See %s for additional commentary.
-//
-
-#ifndef INCLUDED_PMT_SERIAL_TAGS_H
-#define INCLUDED_PMT_SERIAL_TAGS_H
-
-enum pst_tags {
-%s
-};
-#endif /* INCLUDED_PMT_SERIAL_TAGS_H */
-"""
-
-import sys, os, re
-
-if __name__ == '__main__':
- if len(sys.argv) != 3:
- print "Usage %s <input_scm_file> <output_hdr_file>"%__file__
- exit()
- input_scm_file, output_hdr_file = sys.argv[1:]
- enums = list()
- for line in open(input_scm_file).readlines():
- match = re.match('^\s*\(define\s+([\w|-]+)\s+#x([0-9a-fA-F]+)\)', line)
- if not match: continue
- name, value = match.groups()
- name = name.upper().replace('-', '_')
- enums.append(' %s = 0x%s'%(name, value))
- open(output_hdr_file, 'w').write(__doc__%(
- os.path.basename(__file__),
- os.path.basename(input_scm_file),
- ',\n'.join(enums),
- ))
diff --git a/gruel/src/scheme/gnuradio/macros-etc.scm b/gruel/src/scheme/gnuradio/macros-etc.scm
deleted file mode 100644
index ac2a4a342..000000000
--- a/gruel/src/scheme/gnuradio/macros-etc.scm
+++ /dev/null
@@ -1,50 +0,0 @@
-;;; -*- scheme -*-
-;;;
-;;; Copyright 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 3, 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 this program; if not, write to the Free Software Foundation, Inc.,
-;;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;;
-
-(define-module (gnuradio macros-etc)
- :export (atom? when unless for-each-in-file))
-
-(define (atom? obj)
- (not (pair? obj)))
-
-(defmacro when (pred . body)
- `(if ,pred (begin ,@body) #f))
-
-(defmacro unless (pred . body)
- `(if (not ,pred) (begin ,@body) #f))
-
-
-(define (for-each-in-file file f)
- (let ((port (if (port? file)
- file
- (open-input-file file))))
- (letrec
- ((loop
- (lambda (port form)
- (cond ((eof-object? form)
- (when (not (eq? port file))
- (close-input-port port))
- #t)
- (else
- (f form)
- (set! form #f) ; for GC
- (loop port (read port)))))))
- (loop port (read port)))))
diff --git a/gruel/src/scheme/gnuradio/pmt-serial-tags.scm b/gruel/src/scheme/gnuradio/pmt-serial-tags.scm
deleted file mode 100644
index 646a751ea..000000000
--- a/gruel/src/scheme/gnuradio/pmt-serial-tags.scm
+++ /dev/null
@@ -1,75 +0,0 @@
-;;; -*-scheme-*-
-;;;
-;;; Copyright 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 3, or (define 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 this program; if not, write to the Free Software Foundation, Inc.,
-;;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;;
-
-;;; definitions of tag values used for marshalling pmt data
-
-(define pst-true #x00)
-(define pst-false #x01)
-(define pst-symbol #x02) ; untagged-int16 n; followed by n bytes of symbol name
-(define pst-int32 #x03)
-(define pst-double #x04)
-(define pst-complex #x05) ; complex<double>: real, imag
-(define pst-null #x06)
-(define pst-pair #x07) ; followed by two objects
-(define pst-vector #x08) ; untagged-int32 n; followed by n objects
-(define pst-dict #x09) ; untagged-int32 n; followed by n key/value tuples
-
-(define pst-uniform-vector #x0a)
-
-;; u8, s8, u16, s16, u32, s32, u64, s64, f32, f64, c32, c64
-;;
-;; untagged-uint8 tag
-;; untagged-uint8 uvi (define uniform vector info, see below)
-;; untagged-int32 n-items
-;; untagged-uint8 npad
-;; npad bytes of zeros to align binary data
-;; n-items binary numeric items
-;;
-;; uvi:
-;; +-+-+-+-+-+-+-+-+
-;; |B| subtype |
-;; +-+-+-+-+-+-+-+-+
-;;
-;; B == 0, numeric data is little-endian.
-;; B == 1, numeric data is big-endian.
-
- (define uvi-endian-mask #x80)
- (define uvi-subtype-mask #x7f)
-
- (define uvi-little-endian #x00)
- (define uvi-big-endian #x80)
-
- (define uvi-u8 #x00)
- (define uvi-s8 #x01)
- (define uvi-u16 #x02)
- (define uvi-s16 #x03)
- (define uvi-u32 #x04)
- (define uvi-s32 #x05)
- (define uvi-u64 #x06)
- (define uvi-s64 #x07)
- (define uvi-f32 #x08)
- (define uvi-f64 #x09)
- (define uvi-c32 #x0a)
- (define uvi-c64 #x0b)
-
-
-(define pst-comment #x3b) ; ascii ';'
-(define pst-comment-end #x0a) ; ascii '\n'
diff --git a/gruel/src/scheme/gnuradio/pmt-serialize.scm b/gruel/src/scheme/gnuradio/pmt-serialize.scm
deleted file mode 100644
index c1d32d75b..000000000
--- a/gruel/src/scheme/gnuradio/pmt-serialize.scm
+++ /dev/null
@@ -1,48 +0,0 @@
-;;;
-;;; Copyright 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 3, 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 this program; if not, write to the Free Software Foundation, Inc.,
-;;; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-;;;
-
-;;; An implementation of pmt_serialize in scheme.
-;;; Currently handles only symbols and pairs. They're all we need for now.
-
-(define-module (gnuradio pmt-serialize)
- :export (pmt-serialize))
-
-(load-from-path "gnuradio/pmt-serial-tags")
-
-(define (pmt-serialize obj put-byte)
- (define (put-u16 x)
- (put-byte (logand (ash x -8) #xff))
- (put-byte (logand x #xff)))
-
- (cond ((null? obj)
- (put-byte pst-null))
- ((symbol? obj)
- (let* ((sym-as-bytes (map char->integer (string->list (symbol->string obj))))
- (len (length sym-as-bytes)))
- (put-byte pst-symbol)
- (put-u16 len)
- (for-each put-byte sym-as-bytes)))
-
- ((pair? obj)
- (put-byte pst-pair)
- (pmt-serialize (car obj) put-byte)
- (pmt-serialize (cdr obj) put-byte))
- (else
- (throw 'not-implemented "pmt-serialize" obj))))