Centralize catgets() calls through MsgCat
CDE has relied upon catgets() implementations following a relaxed interpretation of the XPG internationalization standard that ignored -1, the standard error value returned by catopen, as the catalog argument. However, this same behavior causes segmentation faults with the musl C library. This patch: - Centralizes (with the exception of ToolTalk) all calls to catopen(), catgets(), and catclose() through MsgCat within the DtSvc library. - Prevents calls to catgets() and catclose() that rely upon undefined behavior. - Eliminates a number of bespoke catgets() wrappers, including multiple redundant caching implementations designed to work around a design peculiarity in HP/UX. - Eases building CDE without XPG internationalization support by providing the appropriate macros.
This commit is contained in:
committed by
Jon Trulson
parent
8278e0eae3
commit
7010b2c11b
@@ -1098,15 +1098,15 @@ abio_check_bil_version(
|
||||
STRING help_buf = NULL;
|
||||
STRING fileName = NULL;
|
||||
|
||||
fileName = name? name : catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 35, "NoName");
|
||||
fileName = name? name : CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 35, "NoName");
|
||||
fileName = strdup(fileName);
|
||||
|
||||
if (ver > Util_major_version)
|
||||
{
|
||||
errmsg = strdup(catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 32,
|
||||
errmsg = strdup(CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 32,
|
||||
"Incompatible BIL version"));
|
||||
|
||||
help_msg = catgets(UTIL_MESSAGE_CATD,
|
||||
help_msg = CATGETS(UTIL_MESSAGE_CATD,
|
||||
UTIL_MESSAGE_SET, 33,
|
||||
"The version of the BIL file %s (%3.2f)\nis not supported in this version of App Builder.");
|
||||
|
||||
@@ -1116,10 +1116,10 @@ abio_check_bil_version(
|
||||
}
|
||||
else if (ver == 0.0)
|
||||
{
|
||||
errmsg = strdup(catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 30,
|
||||
errmsg = strdup(CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 30,
|
||||
"Unrecognized file format"));
|
||||
|
||||
help_msg = catgets(UTIL_MESSAGE_CATD,
|
||||
help_msg = CATGETS(UTIL_MESSAGE_CATD,
|
||||
UTIL_MESSAGE_SET, 31,
|
||||
"The file %s does not appear to be in BIL\nformat. Either a BIL header (:bil-version) was\nnot found or the header is corrupt.");
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ istr_create (
|
||||
if (insert_array(1,num_count, string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ istr_create (
|
||||
if(int_array[freelist[freecount-1]].refcount != 0)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
"ISTR: error in allocating space for string\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ istr_create (
|
||||
if (insert_array(1,freelist[freecount-1], string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ istr_create (
|
||||
if (insert_array(1, num_count, string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ istr_create (
|
||||
if(int_array[freelist[freecount-1]].refcount != 0)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
"ISTR: error in allocating space for string\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -232,7 +232,7 @@ istr_create (
|
||||
freelist[freecount-1], string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -248,7 +248,7 @@ istr_create (
|
||||
if (new_bucket == NULL)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
"ISTR: error in allocating memory\n") );
|
||||
return NULL ;
|
||||
}
|
||||
@@ -262,7 +262,7 @@ istr_create (
|
||||
if (insert_array(1, num_count, string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -275,7 +275,7 @@ istr_create (
|
||||
if(int_array[freelist[freecount-1]].refcount != 0)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
"ISTR: error in allocating space for string\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -284,7 +284,7 @@ istr_create (
|
||||
if (insert_array(1, freelist[freecount-1], string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -336,7 +336,7 @@ istrP_create_alloced_impl(
|
||||
if (insert_array(3,num_count, *string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -349,7 +349,7 @@ istrP_create_alloced_impl(
|
||||
if(int_array[freelist[freecount-1]].refcount != 0)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
"ISTR: error in allocating space for string\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -357,7 +357,7 @@ istrP_create_alloced_impl(
|
||||
if (insert_array(3,freelist[freecount-1], *string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -379,7 +379,7 @@ istrP_create_alloced_impl(
|
||||
if (insert_array(3, num_count, *string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -392,7 +392,7 @@ istrP_create_alloced_impl(
|
||||
if(int_array[freelist[freecount-1]].refcount != 0)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
"ISTR: error in allocating space for string\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -401,7 +401,7 @@ istrP_create_alloced_impl(
|
||||
freelist[freecount-1], *string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -417,7 +417,7 @@ istrP_create_alloced_impl(
|
||||
if (new_bucket == NULL)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
"ISTR: error in allocating memory\n") );
|
||||
return NULL ;
|
||||
}
|
||||
@@ -431,7 +431,7 @@ istrP_create_alloced_impl(
|
||||
if (insert_array(3, num_count, *string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -444,7 +444,7 @@ istrP_create_alloced_impl(
|
||||
if(int_array[freelist[freecount-1]].refcount != 0)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
"ISTR: error in allocating space for string\n") );
|
||||
free(new_bucket);
|
||||
return NULL;
|
||||
@@ -454,7 +454,7 @@ istrP_create_alloced_impl(
|
||||
if (insert_array(3, freelist[freecount-1], *string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -514,7 +514,7 @@ istr_create_const(
|
||||
if (insert_array(2, num_count, string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -527,7 +527,7 @@ istr_create_const(
|
||||
if(int_array[freelist[freecount-1]].refcount != 0)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
"ISTR: error in allocating space for string\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -535,7 +535,7 @@ istr_create_const(
|
||||
if (insert_array(2, freelist[freecount-1], string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -557,7 +557,7 @@ istr_create_const(
|
||||
if (insert_array(2, num_count, string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -570,7 +570,7 @@ istr_create_const(
|
||||
if(int_array[freelist[freecount-1]].refcount != 0)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
"ISTR: error in allocating space for string\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -579,7 +579,7 @@ istr_create_const(
|
||||
freelist[freecount-1], string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -595,7 +595,7 @@ istr_create_const(
|
||||
if (new_bucket == NULL)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
"ISTR: error in allocating memory\n") );
|
||||
return NULL ;
|
||||
}
|
||||
@@ -611,7 +611,7 @@ istr_create_const(
|
||||
if (insert_array(2, num_count, string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -624,7 +624,7 @@ istr_create_const(
|
||||
if(int_array[freelist[freecount-1]].refcount != 0)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 2,
|
||||
"ISTR: error in allocating space for string\n") );
|
||||
free(new_bucket);
|
||||
return NULL;
|
||||
@@ -634,7 +634,7 @@ istr_create_const(
|
||||
if (insert_array(2, freelist[freecount-1], string) == -1)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 1,
|
||||
"ISTR: error in allocating to int array\n") );
|
||||
return NULL;
|
||||
}
|
||||
@@ -758,7 +758,7 @@ istrP_destroy_impl(
|
||||
if (freelist == NULL)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
"ISTR: error in allocating memory\n") );
|
||||
return 0 ;
|
||||
}
|
||||
@@ -779,7 +779,7 @@ istrP_destroy_impl(
|
||||
if (freelist == NULL)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
"ISTR: error in allocating memory\n") );
|
||||
return 0 ;
|
||||
}
|
||||
@@ -938,7 +938,7 @@ insert_array(
|
||||
if (int_array == NULL)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
"ISTR: error in allocating memory\n") );
|
||||
return 0 ;
|
||||
}
|
||||
@@ -973,7 +973,7 @@ insert_array(
|
||||
if (int_array == NULL)
|
||||
{
|
||||
fprintf(stderr, "%s",
|
||||
catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 3,
|
||||
"ISTR: error in allocating memory\n") );
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <nl_types.h>
|
||||
#include <Dt/MsgCatP.h>
|
||||
#include <ab_private/util.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -75,79 +75,79 @@ util_err_string(int errCode)
|
||||
switch (errCode)
|
||||
{
|
||||
case ERR_INTERNAL:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 4, "Internal error");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 4, "Internal error");
|
||||
break;
|
||||
case ERR_RECURSION:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 5, "Recursive function calls");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 5, "Recursive function calls");
|
||||
break;
|
||||
case ERR_NOT_ALLOWED:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 6, "Permission denied");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 6, "Permission denied");
|
||||
break;
|
||||
case ERR_DATA_SPACE_FULL:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 8, "Data space is full");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 8, "Data space is full");
|
||||
break;
|
||||
case ERR_BUFFER_TOO_SMALL:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 9, "Buffer is too small");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 9, "Buffer is too small");
|
||||
break;
|
||||
case ERR_NOT_IMPLEMENTED:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 10, "Functionality is not implemented");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 10, "Functionality is not implemented");
|
||||
break;
|
||||
case ERR_NOT_INITIALIZED:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 11, "Not initialized");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 11, "Not initialized");
|
||||
break;
|
||||
case ERR_CLIENT:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 12, "Client error");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 12, "Client error");
|
||||
break;
|
||||
case ERR_NOT_FOUND:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 13, "Not found");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 13, "Not found");
|
||||
break;
|
||||
case ERR_DUPLICATE_KEY:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 14, "Duplicate key");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 14, "Duplicate key");
|
||||
break;
|
||||
case ERR_BAD_PARAM:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 15, "Bad parameter");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 15, "Bad parameter");
|
||||
break;
|
||||
case ERR_IO:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 16, "I/O error");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 16, "I/O error");
|
||||
break;
|
||||
case ERR_FILE_NOT_FOUND:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 17, "File not found");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 17, "File not found");
|
||||
break;
|
||||
case ERR_OPEN:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 18, "Could not open file");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 18, "Could not open file");
|
||||
break;
|
||||
case ERR_WRITE:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 19, "Could not write to file");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 19, "Could not write to file");
|
||||
break;
|
||||
case ERR_READ:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 20, "Could not read file");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 20, "Could not read file");
|
||||
break;
|
||||
case ERR_EOF:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 21, "End of file");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 21, "End of file");
|
||||
break;
|
||||
case ERR_BAD_FILE_FORMAT:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 22, "Bad file format");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 22, "Bad file format");
|
||||
break;
|
||||
case ERR_RENAME:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 23, "Could not rename file");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 23, "Could not rename file");
|
||||
break;
|
||||
case ERR_MEMORY:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 24, "Memory error");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 24, "Memory error");
|
||||
break;
|
||||
case ERR_NO_MEMORY:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 25, "No memory");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 25, "No memory");
|
||||
break;
|
||||
case ERR_MEMORY_CORRUPT:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 26, "Memory is corrupt");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 26, "Memory is corrupt");
|
||||
break;
|
||||
case ERR_MULTIPLE_FREE:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 27, "Multiple free of memory");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 27, "Multiple free of memory");
|
||||
break;
|
||||
case ERR_READ_ONLY:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 28, "Read-only file");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 28, "Read-only file");
|
||||
break;
|
||||
case ERR_BACKUP:
|
||||
err= catgets(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 29, "Could not backup file");
|
||||
err= CATGETS(UTIL_MESSAGE_CATD, UTIL_MESSAGE_SET, 29, "Could not backup file");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user