Instead of printing a usage message with the "numericx" string as a
program name, uses argv[0], better for debugging log readability.
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* change make into $(MAKE)
* in compiling libraries, echo message with path
* create Makefile variables: INSTALL and prefix
* add rule install-lib
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* numericx_translate() was returning EXIT_SUCCESS in case of success.
Doohh! Now it is return true, in case of success.
Ajust doxygen comment accordingly.
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* removed c99 as the c compiler variable
* add doc rule
* add build library rules for .a and .so
* mem2 rule now tests for 000 arg instead of 0
* clean rule update for libraries
* add numericx.h dependency to rules
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add is_number_void()
* numericx_translate() was only handling a void number with one digit
as argument, for example a 0.
When encontering a void number with more then one digit, the function
was entering on a infinite cycle.
Now, with the function is_number_void(), numericx_translate() can
handle correctly void number with any number of cases. Either with a
from numerical system that is infinite (0 == 00 == 000 ...) or if it
is not (0 is void, 00 is concrete, 000 is concrete, ...)
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* removed doxygen comments from header file
* change the title of README.md from better understanding in doxygen
doc
* removed all files from doc/ and rebuild the doc
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* numericx_translate() was doing a reverse of the string argument,
which it cannot. Now the reverse is using a malloced version of the
string argument.
* add free() to malloced number from number argument
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* the source code was, in the last commit, separated, in order to
create a library. Makes build the CLIs in the Makefile work.
* make clean cleans the *.o
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* separate numericx into: numericx.h, numericx.c, cli.c
* numericx.h is the numericx library header
* numericx.c is the numericx library implementation
* cli.c is the numericx command-line program
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* If invalid number of arguments supplied to main(), return errno E2BIG
* add Makefile rule to test memory leak of wrong number of arguments to
main()
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* numericx_translate() only returns status codes. Instead of returning
the resulting translated string.
* add result_string to numericx_translate() arguments, that is the
variable to where to store the resulting translated string.
* for the cli program, now the message is delegated to main. Also
changed the doxygen comments of main().
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add numericx_free() and numericx_translate()
* functionality in main() to the minimum, to house the
numericx_translate() in it
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add html symbolic link pointing to doc/, so that when building the
doc with doxygen, all documentation goes to doc/
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* remove html/* for the creating on a submodule in this directory, so
that the documentation can be in a separate branch, for codeberg
pages
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* transformed comments into doxygen comments and set it's attributes
* add doxygen.conf file
* add doxygen html documentation
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add better comments to the code structure
* on decrement_number_string(), renamed arguments for better legibility
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add sun to earth and vice-versa rule, without adding it to the all
rule
* also add earth<->sun to 'clean' Makefile rule
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>