Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ char* cpUint32ToStr(uint32_t* uipBuf, aint uiLen, char* cpStr){
* NOTE: Returns a structure, not a pointer to a structure.
*/
u32_phrase sStrToPhrase32(const char* cpStr, uint32_t* uipBuf){
u32_phrase sPhrase = {};
u32_phrase sPhrase = {0, 0};
aint uiStrLen = strlen(cpStr);
aint ui = 0;
for(; ui < uiStrLen; ui++){
Expand Down
4 changes: 4 additions & 0 deletions utilities/format.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ static const void* s_vpMagicNumber = (void*)"format";
#include "../library/lib.h"
#include "./objects.h"

#ifndef PATH_MAX
#define PATH_MAX 4096
#endif

/** \struct fmt_tag
* \brief The context for the format object.
*
Expand Down
14 changes: 12 additions & 2 deletions utilities/utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,22 @@
* \brief Utility functions code.
*/

#include <unistd.h>
#ifdef _MSC_VER
#include <direct.h>
#define getcwd _getcwd
#else
#include <unistd.h>
#endif

#include <limits.h>

#include "./utilities.h"

static const size_t s_uiBufSize = (PATH_MAX + 128);
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif

#define s_uiBufSize ((size_t) (PATH_MAX + 128))
static char s_cPeriod = 46;
static char* s_cpBinaryVal[16] = {
"00 00", "00 01", "00 10", "00 11",
Expand Down