Compare commits
2 Commits
master
...
submit/rep
Author | SHA1 | Date | |
---|---|---|---|
|
bd8b6980ca | ||
|
08dfb34d62 |
11
dix/atom.c
11
dix/atom.c
|
@ -51,6 +51,7 @@ SOFTWARE.
|
||||||
#include <X11/X.h>
|
#include <X11/X.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
|
#include "dix/atom_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -159,12 +160,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 +196,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");
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
/* SPDX-License-Identifier: MIT OR X11
|
||||||
|
*
|
||||||
|
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||||
|
*/
|
||||||
|
#ifndef _XSERVER_DIX_ATOM_PRIV_H
|
||||||
|
#define _XSERVER_DIX_ATOM_PRIV_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief initialize atom table
|
||||||
|
*/
|
||||||
|
void InitAtoms(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief free all atoms and atom table
|
||||||
|
*/
|
||||||
|
void FreeAllAtoms(void);
|
||||||
|
|
||||||
|
#endif /* _XSERVER_DIX_ATOM_PRIV_H */
|
|
@ -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__
|
||||||
|
|
|
@ -85,6 +85,7 @@ Equipment Corporation.
|
||||||
#include <X11/fonts/libxfont2.h>
|
#include <X11/fonts/libxfont2.h>
|
||||||
|
|
||||||
#include "config/hotplug_priv.h"
|
#include "config/hotplug_priv.h"
|
||||||
|
#include "dix/atom_priv.h"
|
||||||
#include "dix/callback_priv.h"
|
#include "dix/callback_priv.h"
|
||||||
#include "dix/cursor_priv.h"
|
#include "dix/cursor_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
|
|
@ -257,16 +257,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
|
|
||||||
FreeAllAtoms(void);
|
|
||||||
|
|
||||||
extern _X_EXPORT void
|
|
||||||
InitAtoms(void);
|
|
||||||
|
|
||||||
/* main.c */
|
/* main.c */
|
||||||
|
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "dix/atom_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <X11/extensions/XI2.h>
|
#include <X11/extensions/XI2.h>
|
||||||
|
|
||||||
|
#include "dix/atom_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/exevents_priv.h"
|
#include "dix/exevents_priv.h"
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
|
#include "dix/atom_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue