mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
This function probably been (half?) auto generated somewhere back in the dark ages (there're still remains of the former generator, which doesn't work anymore, and hasn't been updated for ages). It's been added to SCM with R6.6 baseline - and from that on manually maintained. Adding a little generator to create source from "BuiltInAtoms" file, directly in the build process. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1670>
38 lines
726 B
Bash
Executable File
38 lines
726 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# SPDX-License-Identifier: MIT OR X11
|
|
#
|
|
# Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
|
|
|
|
INPUT="$1"
|
|
OUTPUT="$2"
|
|
|
|
do_line() {
|
|
local name="$1"
|
|
[ "$2" != "@" ] && return 0
|
|
echo " if (MakeAtom(\"$name\", ${#name}, 1) != XA_$name)"
|
|
echo " AtomError();"
|
|
}
|
|
|
|
cat > "$OUTPUT" << __END__
|
|
/* THIS IS A GENERATED FILE
|
|
*
|
|
* Do not change! Changing this file implies a protocol change!
|
|
*/
|
|
|
|
#ifdef HAVE_DIX_CONFIG_H
|
|
#include <dix-config.h>
|
|
#endif
|
|
|
|
#include <X11/X.h>
|
|
#include <X11/Xatom.h>
|
|
#include "misc.h"
|
|
#include "dix.h"
|
|
void
|
|
MakePredeclaredAtoms(void)
|
|
{
|
|
__END__
|
|
|
|
( grep '@' < "$INPUT" ) | ( while read l ; do do_line $l ; done ) >> "$OUTPUT"
|
|
|
|
echo "}" >> "$OUTPUT"
|