| Techno | Version |
|---|---|
| C | C99 |
| gcc | 11 |
| make | 4.2 |
Possible to use without make
System libs requirements
stdlib.hstdio.h
Custom embedded libs
input.h: User input management system.str.h: Lightweight simple string management system.convert.h: Module containing the numeric conversion functions between bases.
.
├── bin
├── demo.mp4
├── doc
├── Doxyfile
├── Makefile
├── README.md
└── src
├── convert.c
├── convert.h
├── input.c
├── input.h
├── main.c
├── str.c
└── str.h
3 directories, 11 filesGo to the root folder which contains the
Makefileand thesrcfolder.
Just type the make command :
makeGenerates the executable in the bin folder.
Just type the make command :
gcc -g -std=c99 src/str.c src/input.c src/convert.c src/main.c -o bin/mainGenerates the executable in the bin folder.
Once the compilation has been validated, all that remains is to execute the compiled file which is in the
binfolder. Just type the make command :
./bin/mainThe program takes the operating mode as a parameter. There are two modes: Conversion from decimal base to a given base. Conversion from a given base to the decimal base.
Two modes of use redirect the output of a command via the pipe, or directly launch the program and enter the values.
# Using the pipe :
echo "5 2" | ./bin/main --from-decimal-to-any
echo "0101 2" | ./bin/main --from-any-to-decimal
# Input during execution :
./bin/main --from-decimal-to-any
5 2
./bin/main --from-any-to-decimal
0101 2Example of input via redirect and vie direct input
You can watch an example video of how to use the program: demo.mp4
