summaryrefslogtreecommitdiff
path: root/lib/char.h
diff options
context:
space:
mode:
authorChristoph Berg <christoph.berg@credativ.de>2022-08-23 10:23:16 +0200
committerChristoph Berg <christoph.berg@credativ.de>2022-08-23 10:23:16 +0200
commit2d1068e60bce7ae1fff11623454900e8cee956b1 (patch)
treeacebe276e30466ef0ab91bc3da5e379bec0d7dc5 /lib/char.h
parent43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (diff)
New upstream version 2.6.0~rc3+repackupstream/2.6.0_rc3+repack
Diffstat (limited to 'lib/char.h')
-rwxr-xr-xlib/char.h114
1 files changed, 57 insertions, 57 deletions
diff --git a/lib/char.h b/lib/char.h
index cc477ec7..469dd862 100755
--- a/lib/char.h
+++ b/lib/char.h
@@ -1,57 +1,57 @@
-/* Include file to configure the RS codec for character symbols
- *
- * Copyright 2002, Phil Karn, KA9Q
- * May be used under the terms of the GNU General Public License (GPL)
- */
-#define DTYPE unsigned char
-
-/* Reed-Solomon codec control block */
-struct rs {
- int mm; /* Bits per symbol */
- int nn; /* Symbols per block (= (1<<mm)-1) */
- DTYPE *alpha_to; /* log lookup table */
- DTYPE *index_of; /* Antilog lookup table */
- DTYPE *genpoly; /* Generator polynomial */
- int nroots; /* Number of generator roots = number of parity symbols */
- int fcr; /* First consecutive root, index form */
- int prim; /* Primitive element, index form */
- int iprim; /* prim-th root of 1, index form */
- int pad; /* Padding bytes in shortened block */
-};
-
-static inline int modnn(struct rs *rs,int x){
- while (x >= rs->nn) {
- x -= rs->nn;
- x = (x >> rs->mm) + (x & rs->nn);
- }
- return x;
-}
-#define MODNN(x) modnn(rs,x)
-
-#define MM (rs->mm)
-#define NN (rs->nn)
-#define ALPHA_TO (rs->alpha_to)
-#define INDEX_OF (rs->index_of)
-#define GENPOLY (rs->genpoly)
-#define NROOTS (rs->nroots)
-#define FCR (rs->fcr)
-#define PRIM (rs->prim)
-#define IPRIM (rs->iprim)
-#define PAD (rs->pad)
-#define A0 (NN)
-
-#define ENCODE_RS encode_rs_char
-#define DECODE_RS decode_rs_char
-#define INIT_RS init_rs_char
-#define FREE_RS free_rs_char
-
-void ENCODE_RS(void *p,DTYPE *data,DTYPE *parity);
-int DECODE_RS(void *p,DTYPE *data,int *eras_pos,int no_eras);
-void *INIT_RS(int symsize,int gfpoly,int fcr,
- int prim,int nroots,int pad);
-void FREE_RS(void *p);
-
-
-
-
-
+/* Include file to configure the RS codec for character symbols
+ *
+ * Copyright 2002, Phil Karn, KA9Q
+ * May be used under the terms of the GNU General Public License (GPL)
+ */
+#define DTYPE unsigned char
+
+/* Reed-Solomon codec control block */
+struct rs {
+ int mm; /* Bits per symbol */
+ int nn; /* Symbols per block (= (1<<mm)-1) */
+ DTYPE *alpha_to; /* log lookup table */
+ DTYPE *index_of; /* Antilog lookup table */
+ DTYPE *genpoly; /* Generator polynomial */
+ int nroots; /* Number of generator roots = number of parity symbols */
+ int fcr; /* First consecutive root, index form */
+ int prim; /* Primitive element, index form */
+ int iprim; /* prim-th root of 1, index form */
+ int pad; /* Padding bytes in shortened block */
+};
+
+static inline int modnn(struct rs *rs,int x){
+ while (x >= rs->nn) {
+ x -= rs->nn;
+ x = (x >> rs->mm) + (x & rs->nn);
+ }
+ return x;
+}
+#define MODNN(x) modnn(rs,x)
+
+#define MM (rs->mm)
+#define NN (rs->nn)
+#define ALPHA_TO (rs->alpha_to)
+#define INDEX_OF (rs->index_of)
+#define GENPOLY (rs->genpoly)
+#define NROOTS (rs->nroots)
+#define FCR (rs->fcr)
+#define PRIM (rs->prim)
+#define IPRIM (rs->iprim)
+#define PAD (rs->pad)
+#define A0 (NN)
+
+#define ENCODE_RS encode_rs_char
+#define DECODE_RS decode_rs_char
+#define INIT_RS init_rs_char
+#define FREE_RS free_rs_char
+
+void ENCODE_RS(void *p,DTYPE *data,DTYPE *parity);
+int DECODE_RS(void *p,DTYPE *data,int *eras_pos,int no_eras);
+void *INIT_RS(int symsize,int gfpoly,int fcr,
+ int prim,int nroots,int pad);
+void FREE_RS(void *p);
+
+
+
+
+