From cd0b9ff4e9cfd4a60f08fd606063e5818a3db573 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 4 Sep 2024 16:01:11 +0200 Subject: [PATCH] (!1670) dix: drop remains of ancient code generator This script used to generated xproto header as well as a piece of source for initializing the builtin atoms in the Xserver (MakePredeclaredAtoms()). At least with R6.6 baseline it didn't seem to be used anymore, and - at least since the modularization - it's completely broken and useless. Since we now have a new generator, running directly in the build process, this ancient script can be dropped. Signed-off-by: Enrico Weigelt, metux IT consult --- dix/buildatoms | 43 ------------------------------------------- dix/generate-atoms | 2 +- 2 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 dix/buildatoms diff --git a/dix/buildatoms b/dix/buildatoms deleted file mode 100644 index dfbbca8a9..000000000 --- a/dix/buildatoms +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -hfile=../../../include/Xatom.h -cfile=initatoms.c -rm -f $hfile $cfile -umask 222 -awk ' -BEGIN { - hfile = "'$hfile'"; - cfile = "'$cfile'"; - hformat = "#define XA_%s ((Atom) %d)\n"; - printf("#ifndef XATOM_H\n") > hfile; - printf("#define XATOM_H 1\n\n") > hfile; - printf("/* THIS IS A GENERATED FILE\n") > hfile; - printf(" *\n") > hfile; - printf(" * Do not change! Changing this file implies a protocol change!\n") > hfile; - printf(" */\n\n") > hfile; - - printf("/* THIS IS A GENERATED FILE\n") > cfile; - printf(" *\n") > cfile; - printf(" * Do not change! Changing this file implies a protocol change!\n") > cfile; - printf(" */\n\n") > cfile; - printf("#include \"X.h\"\n") > cfile; - printf("#include \"Xatom.h\"\n") > cfile; - printf("#include \"misc.h\"\n") > cfile; - printf("#include \"dix.h\"\n") > cfile; - printf("void MakePredeclaredAtoms()\n") > cfile; - printf("{\n") > cfile; - - } - -NF == 2 && $2 == "@" { - printf(hformat, $1, ++atomno) > hfile ; - printf(" if (MakeAtom(\"%s\", %d, 1) != XA_%s) AtomError();\n", $1, length($1), $1) > cfile ; - } - -END { - printf("\n") > hfile; - printf(hformat, "LAST_PREDEFINED", atomno) > hfile ; - printf("#endif /* XATOM_H */\n") > hfile; - printf("}\n") > cfile ; - } -' BuiltInAtoms -exit 0 diff --git a/dix/generate-atoms b/dix/generate-atoms index 20687f157..86b1477a7 100755 --- a/dix/generate-atoms +++ b/dix/generate-atoms @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: MIT OR X11 # # Copyright © 2024 Enrico Weigelt, metux IT consult