---
 surf.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/surf.c b/surf.c
index 474c01b..57ae7c0 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -37,7 +37,13 @@
 #define LENGTH(x)               (sizeof(x) / sizeof(x[0]))
 #define CLEANMASK(mask)         (mask & (MODKEY|GDK_SHIFT_MASK))
 
-enum { AtomFind, AtomGo, AtomUri, AtomUTF8, AtomLast };
+enum {
+	AtomFind,
+	AtomGo,
+	AtomUri,
+	AtomUTF8,
+	AtomLast
+};
 
 enum {
 	OnDoc   = WEBKIT_HIT_TEST_RESULT_CONTEXT_DOCUMENT,
_AT_@ -259,6 +265,13 @@ static int modparams[ParameterLast];
 static int spair[2];
 char *argv0;
 
+static char *atomnames[AtomLast] = {
+	[AtomFind] = "_SURF_FIND",
+	[AtomGo] = "_SURF_GO",
+	[AtomUri] = "_SURF_URI",
+	[AtomUTF8] = "UTF8_STRING",
+};
+
 static ParamName loadtransient[] = {
 	Certificate,
 	CookiePolicies,
_AT_@ -340,10 +353,7 @@ setup(void)
 		die("Can't open default display");
 
 	/* atoms */
-	atoms[AtomFind] = XInternAtom(dpy, "_SURF_FIND", False);
-	atoms[AtomGo] = XInternAtom(dpy, "_SURF_GO", False);
-	atoms[AtomUri] = XInternAtom(dpy, "_SURF_URI", False);
-	atoms[AtomUTF8] = XInternAtom(dpy, "UTF8_STRING", False);
+	XInternAtoms(dpy, atomnames, AtomLast, False, atoms);
 
 	gtk_init(NULL, NULL);
 
-- 
2.37.3
Received on Wed Oct 05 2022 - 03:42:15 CEST
This archive was generated by hypermail 2.3.0 : Wed Oct 05 2022 - 03:48:36 CEST