dix: replace AtomError() by better messages

Not used by any exteral drivers (and really should not be used by them),
so can be replaced by more fitting error messages.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-05-22 17:29:10 +02:00
parent 9d78e139a0
commit 39b0c088d5
3 changed files with 3 additions and 13 deletions

View File

@ -159,12 +159,6 @@ NameForAtom(Atom atom)
return node->string; return node->string;
} }
void
AtomError(void)
{
FatalError("initializing atoms");
}
static void static void
FreeAtom(NodePtr patom) FreeAtom(NodePtr patom)
{ {
@ -201,9 +195,9 @@ InitAtoms(void)
tableLength = InitialTableSize; tableLength = InitialTableSize;
nodeTable = xallocarray(InitialTableSize, sizeof(NodePtr)); nodeTable = xallocarray(InitialTableSize, sizeof(NodePtr));
if (!nodeTable) if (!nodeTable)
AtomError(); FatalError("creating atom table");
nodeTable[None] = NULL; nodeTable[None] = NULL;
MakePredeclaredAtoms(); MakePredeclaredAtoms();
if (lastAtom != XA_LAST_PREDEFINED) if (lastAtom != XA_LAST_PREDEFINED)
AtomError(); FatalError("builtin atom number mismatch");
} }

View File

@ -10,7 +10,7 @@ do_line() {
local name="$1" local name="$1"
[ "$2" != "@" ] && return 0 [ "$2" != "@" ] && return 0
echo " if (MakeAtom(\"$name\", ${#name}, 1) != XA_$name)" echo " if (MakeAtom(\"$name\", ${#name}, 1) != XA_$name)"
echo " AtomError();" echo " FatalError(\"adding builtin atom\");"
} }
cat > "$OUTPUT" << __END__ cat > "$OUTPUT" << __END__

View File

@ -202,10 +202,6 @@ extern _X_EXPORT Bool ValidAtom(Atom /*atom */ );
extern _X_EXPORT const char *NameForAtom(Atom /*atom */ ); extern _X_EXPORT const char *NameForAtom(Atom /*atom */ );
extern _X_EXPORT void
AtomError(void)
_X_NORETURN;
extern _X_EXPORT void extern _X_EXPORT void
FreeAllAtoms(void); FreeAllAtoms(void);