Commit Graph

38 Commits

Author SHA1 Message Date
Daniel Santos 327de4f901 update numericx.c comments
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-17 09:07:07 +00:00
Daniel Santos 23772dbb14 doc update
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-17 07:55:41 +00:00
Daniel Santos a23fe88c3a Makefile fix
* fix sun-to-earth rule, missing -o

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-17 07:49:49 +00:00
Daniel Santos 2fe995048c make numericx_translate()
* 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>
2022-03-17 07:49:49 +00:00
Daniel Santos 2775a1670c remove DEBUG
* remove debug message printing and the DEBUG variable

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-17 07:49:49 +00:00
Daniel Santos c4bc0ae725 rename doxygen.conf to Doxyfile
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-16 21:39:09 +00:00
Daniel Santos e4545cb7fd doc update
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-16 20:04:29 +00:00
Daniel Santos 2952ed7c23 add html symlink for doxygen build
* 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>
2022-03-16 20:01:12 +00:00
Daniel Santos c6d7a8a26f add Documentation section in README.md
* README.md has a Documentation section with a link to the online
   documentation website

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-16 19:50:28 +00:00
Daniel Santos 9393cea4a4 add submodule doc/
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-16 16:49:37 +00:00
Daniel Santos b1f890b434 remove html/ for submodule
* 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>
2022-03-16 16:18:42 +00:00
Daniel Santos fdd2142827 update README.md
* text 'console program' to 'command-line interface'

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-16 14:33:18 +00:00
Daniel Santos acc2126757 add doxygen
* 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>
2022-03-16 14:29:11 +00:00
Daniel Santos b559d657c3 test rule in Makefile
* add tests/earth.sh
 * add to Makefile all the necessary rules for `make test`

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-15 14:34:39 +00:00
Daniel Santos ad3f14edbd better comments and legibility
* 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>
2022-03-14 17:17:00 +00:00
Daniel Santos 471cd39b04 rearrange Makefile
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-14 15:32:52 +00:00
Daniel Santos 78d5b4d899 update README.md
* correct mispellings and make the text more understandable

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-13 22:44:15 +00:00
Daniel Santos 428eecbdcb better invalid numeral error message
* invalid numeral error message now indicates which numerals are valid

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-13 14:28:09 +00:00
Daniel Santos f44be5f3b4 create README.md
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-13 14:21:26 +00:00
Daniel Santos 5d7cabc420 add to Makefile sun<->earth rule
* 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>
2022-03-12 18:14:15 +00:00
Daniel Santos f1cd830c40 add decimal<->binary Makefile rule
* add decimal to binary and vice-versa Makefile rule

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-12 17:38:31 +00:00
Daniel Santos 6e579c2763 add .PHONY to Makefile
* add .PHONY to some rules in Makefile

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-12 17:21:36 +00:00
Daniel Santos 2dd0e8663e minor optimization for main cycle
* optimizes main counting cycle if TO_INFINITE_BASE is set,
   by adding to_second variable

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-12 17:06:32 +00:00
Daniel Santos a1447b807b static program name (macro)
* make program name into the macro PROG_NAME
 * add program name into all error messages

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-12 16:32:13 +00:00
Daniel Santos 90c869857b free memory
* add mem rule to Makefile
 * add free_numeral()
 * free all memory allocations

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-12 13:21:39 +00:00
Daniel Santos 06bb8994d4 Check if number belongs to numerical system
* add is_valid_number()
 * check if number belongs to the 'from' numerical system

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-12 12:16:32 +00:00
Daniel Santos ab849603a0 Makefile update
* put all the rules to make programs to test my past numerical systems
   programs

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-12 12:16:25 +00:00
Daniel Santos ca3f9df04c add MIT license
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-11 19:28:35 +00:00
Daniel Santos 45f470b632 DEBUG messages more compact
* print_numeral() without '\n'
 * more compact DEBUG message

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-11 16:23:05 +00:00
Daniel Santos 06d3c41779 add TO_INFINITE_BASE flag
* add to increment() one more argument (char* brand_new_digit)
 * add TO_INFINITE_BASE functionality

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-11 16:03:07 +00:00
Daniel Santos df82e9e3eb add FROM_INFINITE_BASE flag
* defines both (TO and FROM)_INFINITE_BASE
 * add FROM_INFINITE_BASE functionality

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-11 15:18:12 +00:00
Daniel Santos 43398cf34b add (FROM and TO)_FIRST_NUMBER_VOID flags
* add decrement_number_string()
 * add (FROM and TO)_FIRST_NUMBER_VOID flags

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-10 18:52:54 +00:00
Daniel Santos 310002d3e0 compile flags don't need true
compilation flags are defined as true by default.
rearrange them.

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-10 18:45:26 +00:00
Daniel Santos dcc93c0ba6 add TO_UNITS_ON_THE_END and FROM_UNITS_ON_THE_END
* 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>
2022-03-09 14:06:02 +00:00
Daniel Santos ef7e6f99a2 add argument processing
add usage message when invalid argument

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-09 12:34:32 +00:00
Daniel Santos 6715048969 remove unnecessary is_same_size function
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-08 18:56:53 +00:00
Daniel Santos 4ca19c42a8 add gitignore 2022-03-08 18:56:11 +00:00
Daniel Santos 4f221f3649 working
Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
2022-03-08 18:45:10 +00:00