Skip to content

Commit

Permalink
Move broad N/K/T definitions to jmode.c
Browse files Browse the repository at this point in the history
  • Loading branch information
kspalaiologos committed Oct 14, 2024
1 parent ebec8a2 commit 595e694
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
10 changes: 0 additions & 10 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,4 @@ typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32;
typedef int8_t i8; typedef int16_t i16; typedef int32_t i32;
typedef size_t sz;

// ============================================================================
// Reed-Solomon code parameters (223 bytes of input, 32 bytes of parity).
// ============================================================================
// Some platform-specific code uses these extensively. Yuck.
#ifndef _PLATFORM_H_
#define K 223
#define N 255
#define T 32
#endif

#endif
7 changes: 7 additions & 0 deletions jmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
#include <sys/types.h>
#include <sys/stat.h>

// ============================================================================
// Reed-Solomon code parameters (223 bytes of input, 32 bytes of parity).
// ============================================================================
#define K 223
#define N 255
#define T 32

// ============================================================================
// Implementation of Reed-Solomon codes. Follows the BCH view. Original code
// was written by Phil Karn, KA9Q, in 1999. This is a modified version due to
Expand Down

0 comments on commit 595e694

Please sign in to comment.