Skip to content

Commit

Permalink
Changed int_text to uint32_t
Browse files Browse the repository at this point in the history
  • Loading branch information
felipelouza committed Jun 5, 2018
1 parent b3bd847 commit 502950a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
4 changes: 2 additions & 2 deletions experiments/lib/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ char* file_load(FILE* f_in) {
char *c_buffer = (char*) malloc((size+1)*sizeof(char));
strncpy(c_buffer, c_aux, size);

c_buffer[size-1] = END_MARKER;
c_buffer[size] = '\0';
c_buffer[size-1] = 1; //END_MARKER;
c_buffer[size] = 0; //'\0';

free(c_aux);

Expand Down
12 changes: 3 additions & 9 deletions experiments/lib/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@
#include <inttypes.h>
#include <math.h>

#ifndef UCHAR_SIZE
#define UCHAR_SIZE 256
#endif

#define END_MARKER '$'

#ifndef M64
#define M64 0
#endif
Expand All @@ -39,11 +33,11 @@
#define I_MIN INT32_MIN
#endif

/*! @brief for integer alphabets define text array
/*! @option type of s[0,n-1] for integer alphabets
* @constraint sizeof(int_t) >= sizeof(int_text)
*/
typedef int32_t int_text; //4N bytes for s[0..n-1]
#define PRIdT PRId32
typedef uint32_t int_text; //4N bytes for s[0..n-1]
#define PRIdT PRIu32

/**********************************************************************/

Expand Down
6 changes: 3 additions & 3 deletions gsacak.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
#define I_MIN INT32_MIN
#endif

/*! @brief for integer alphabets define text array
/*! @option type of s[0,n-1] for integer alphabets
* @constraint sizeof(int_t) >= sizeof(int_text)
*/
typedef int32_t int_text; //4N bytes for s[0..n-1]
#define PRIdT PRId32
typedef uint32_t int_text; //4N bytes for s[0..n-1]
#define PRIdT PRIu32

/******************************************************************************/

Expand Down
6 changes: 3 additions & 3 deletions gsais.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@
#endif


/*! @brief for integer alphabets define text array
/*! @option type of s[0,n-1] for integer alphabets
* @constraint sizeof(int_t) >= sizeof(int_text)
*/
typedef int32_t int_text; //4N bytes for s[0..n-1]
#define PRIdT PRId32
typedef uint32_t int_text; //4N bytes for s[0..n-1]
#define PRIdT PRIu32

/******************************************************************************/

Expand Down

0 comments on commit 502950a

Please sign in to comment.