about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel Santos <dacs.git@brilhante.top>2022-03-19 07:35:32 +0000
committerDaniel Santos <dacs.git@brilhante.top>2022-03-19 07:35:32 +0000
commitfcc6c957bfb391b675b3f251a28ec988e31ff50c (patch)
tree9c87db58b95899749642809ed026989ef4ad2682
parentaa172de2cf295c84311f32dfc1b61f0f1d173d20 (diff)
downloadnumericx-c-fcc6c957bfb391b675b3f251a28ec988e31ff50c.tar.gz
numericx_translate() return true
 * 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>
-rw-r--r--cli.c4
-rw-r--r--numericx.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/cli.c b/cli.c
index 816da7d..be77bcc 100644
--- a/cli.c
+++ b/cli.c
@@ -143,7 +143,7 @@ main(int argc, char* argv[])
 	switch( status )
 	{
 		case EINVAL:
-			fprintf(stderr, "error: %s: %s. Resulting string variable has to be NULL.\n",
+			fprintf(stderr, "error: %s: %s. Resulting string argument value has to be NULL.\n",
 					PROG_NAME, strerror(EINVAL));
 			break;
 		case EDOM:
@@ -154,7 +154,7 @@ main(int argc, char* argv[])
 				fprintf(stderr, "error: %s: Unrepresentable void number.\n", PROG_NAME);
 			break;
 	}
-	if( !(status == EXIT_SUCCESS) )
+	if( !(status == true) )
 	{
 		fprintf(stderr, "error: %s: Incapable of translating.\n", PROG_NAME);
 		free(from);
diff --git a/numericx.c b/numericx.c
index 41831e9..306c6cf 100644
--- a/numericx.c
+++ b/numericx.c
@@ -357,7 +357,7 @@ is_number_void(char* number, char* void_numeral, bool is_infinite)
  * @return EINVAL if argument of result_string is not NULL.
  * @return EDOM if number doesn't belong to the 'from' numerical system.
  * @return ERANGE if the resulting number cannot be represented, because of a 'from' void number and a lack of void number in 'to'.
- * @return EXIT_SUCCESS in case of success.
+ * @return true in case of success.
  */
 int
 numericx_translate(char* from, bool from_units_on_the_end, bool from_first_number_void, bool from_infinite_base, char* to, bool to_units_on_the_end, bool to_first_number_void, bool to_infinite_base, char* number_arg, char** result_string)
@@ -442,5 +442,5 @@ numericx_translate(char* from, bool from_units_on_the_end, bool from_first_numbe
 	free_numeral(result);
 	free(number);
 
-	return EXIT_SUCCESS;
+	return true;
 }