about summary refs log tree commit diff stats
path: root/numericx.c
Commit message (Collapse)AuthorAgeFilesLines
* separate into header, implementation and cliDaniel Santos2022-03-171-197/+15
| | | | | | | | | * 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>
* doc updateDaniel Santos2022-03-171-21/+22
| | | | Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* invalid argument list of main() return E2BIGDaniel Santos2022-03-171-2/+3
| | | | | | | | * 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() not printing messageDaniel Santos2022-03-171-30/+45
| | | | | | | | | | | * 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>
* update numericx.c commentsDaniel Santos2022-03-171-9/+27
| | | | Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* make numericx_translate()Daniel Santos2022-03-171-35/+140
| | | | | | | | * 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>
* remove DEBUGDaniel Santos2022-03-171-27/+0
| | | | | | * remove debug message printing and the DEBUG variable Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add doxygenDaniel Santos2022-03-161-40/+139
| | | | | | | | * 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>
* better comments and legibilityDaniel Santos2022-03-141-6/+85
| | | | | | | * 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>
* better invalid numeral error messageDaniel Santos2022-03-131-1/+2
| | | | | | * invalid numeral error message now indicates which numerals are valid Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* minor optimization for main cycleDaniel Santos2022-03-121-1/+7
| | | | | | | * optimizes main counting cycle if TO_INFINITE_BASE is set, by adding to_second variable Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* static program name (macro)Daniel Santos2022-03-121-8/+6
| | | | | | | * make program name into the macro PROG_NAME * add program name into all error messages Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* free memoryDaniel Santos2022-03-121-1/+27
| | | | | | | | * add mem rule to Makefile * add free_numeral() * free all memory allocations Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* Check if number belongs to numerical systemDaniel Santos2022-03-121-0/+23
| | | | | | | * add is_valid_number() * check if number belongs to the 'from' numerical system Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* DEBUG messages more compactDaniel Santos2022-03-111-9/+9
| | | | | | | * print_numeral() without '\n' * more compact DEBUG message Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add TO_INFINITE_BASE flagDaniel Santos2022-03-111-6/+9
| | | | | | | * add to increment() one more argument (char* brand_new_digit) * add TO_INFINITE_BASE functionality Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add FROM_INFINITE_BASE flagDaniel Santos2022-03-111-2/+32
| | | | | | | * defines both (TO and FROM)_INFINITE_BASE * add FROM_INFINITE_BASE functionality Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add (FROM and TO)_FIRST_NUMBER_VOID flagsDaniel Santos2022-03-101-0/+39
| | | | | | | * add decrement_number_string() * add (FROM and TO)_FIRST_NUMBER_VOID flags Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* compile flags don't need trueDaniel Santos2022-03-101-9/+12
| | | | | | | compilation flags are defined as true by default. rearrange them. Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add TO_UNITS_ON_THE_END and FROM_UNITS_ON_THE_ENDDaniel Santos2022-03-091-6/+49
| | | | | | | | * add reverse_string() * number variable instead of number_first/number_last * add flags TO_UNITS_ON_THE_END and FROM_UNITS_ON_THE_END Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* add argument processingDaniel Santos2022-03-091-0/+7
| | | | | | add usage message when invalid argument Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* remove unnecessary is_same_size functionDaniel Santos2022-03-081-14/+0
| | | | Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
* workingDaniel Santos2022-03-081-0/+165
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>