► gcc make cmake valgrind
git clone https://github.com/msio808/rescal.git
cd rescal/config/
./build.sh --run
./build.sh --debug
./build --memcheck
./build.sh --clean
.
├── config
│ ├── build.sh
│ └── CMakeLists.txt
├── docs
│ └── README.md
├── include
│ ├── helpers.h
│ └── src.h
├── LICENSE
└── src
├── helpers
│ ├── helpers.c
│ └── src.c
└── main.c
- Comment out the
strings.h
from the../include/src.h
file. - Write your own custom
strcasecmp()
function. - Unlike the
strcmp()
thestrcasecmp()
function is case-insensitive.
The code below might help
#include <ctype.h>
#include <stdint.h>
//? Custom implementation of strcasecmp
int strcasecmp(const char *str1, const char *str2) {
while (*str1 && *str2) {
const char ch1 = tolower((uint8_t)*str1);
const char ch2 = tolower((uint8_t)*str2);
if (ch1 != ch2) {
return ch1 - ch2;
}
str1++;
str2++;
}
return tolower((uint8_t)*str1) - tolower((uint8_t)*str2);
}