replace PROG_NAME with "numericx" literal
* replaced PROG_NAME for string literal "numericx". * deleted macro definition of PROG_NAME. Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
This commit is contained in:
parent
fcc6c957bf
commit
f5421e7612
10
cli.c
10
cli.c
|
@ -111,7 +111,7 @@ main(int argc, char* argv[])
|
||||||
/* argument processing */
|
/* argument processing */
|
||||||
if( !(argc == 2) )
|
if( !(argc == 2) )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "usage: %s <number>\n", PROG_NAME);
|
fprintf(stderr, "usage: %s <number>\n", "numericx");
|
||||||
return E2BIG;
|
return E2BIG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,19 +144,19 @@ main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
case EINVAL:
|
case EINVAL:
|
||||||
fprintf(stderr, "error: %s: %s. Resulting string argument value has to be NULL.\n",
|
fprintf(stderr, "error: %s: %s. Resulting string argument value has to be NULL.\n",
|
||||||
PROG_NAME, strerror(EINVAL));
|
"numericx", strerror(EINVAL));
|
||||||
break;
|
break;
|
||||||
case EDOM:
|
case EDOM:
|
||||||
fprintf(stderr, "error: %s: %s. Valid numerals are: \"%s\".\n",
|
fprintf(stderr, "error: %s: %s. Valid numerals are: \"%s\".\n",
|
||||||
PROG_NAME, strerror(EDOM), from);
|
"numericx", strerror(EDOM), from);
|
||||||
break;
|
break;
|
||||||
case ERANGE:
|
case ERANGE:
|
||||||
fprintf(stderr, "error: %s: Unrepresentable void number.\n", PROG_NAME);
|
fprintf(stderr, "error: %s: Unrepresentable void number.\n", "numericx");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if( !(status == true) )
|
if( !(status == true) )
|
||||||
{
|
{
|
||||||
fprintf(stderr, "error: %s: Incapable of translating.\n", PROG_NAME);
|
fprintf(stderr, "error: %s: Incapable of translating.\n", "numericx");
|
||||||
free(from);
|
free(from);
|
||||||
free(to);
|
free(to);
|
||||||
numericx_free(result);
|
numericx_free(result);
|
||||||
|
|
|
@ -30,7 +30,7 @@ new_digit(numeral_ptr* last_numeral, char const* to_first)
|
||||||
numeral_ptr* new_numeral = malloc(sizeof(numeral_ptr));
|
numeral_ptr* new_numeral = malloc(sizeof(numeral_ptr));
|
||||||
if(new_numeral == NULL)
|
if(new_numeral == NULL)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "error: %s: %s!", PROG_NAME, strerror(ENOMEM));
|
fprintf(stderr, "error: %s: %s!", "numericx", strerror(ENOMEM));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#define PROG_NAME "numericx"
|
|
||||||
|
|
||||||
/* ||DATA STRUCTURE|| */
|
/* ||DATA STRUCTURE|| */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue