commit b66e7d4d797290c7056dc20a215a6525d9d44042 from: Omar Polo date: Tue Feb 06 13:35:47 2024 UTC include compat.h explicitly in all files don't do it in telescope.h, remove telescope.h from gencmd.awk and sort the headers in parse.y while here. commit - cbe2da3279946cae9bb365a672e6600268de9cce commit + b66e7d4d797290c7056dc20a215a6525d9d44042 blob - 7ae780a0b0e0120f09b81338617fadfd983b56bb blob + 6c102ed01aae22cdbcc39663ff133594adcb5a9c --- gencmd.awk +++ gencmd.awk @@ -1,7 +1,7 @@ BEGIN { FS = "[(,)]"; - print "#include \"telescope.h\"" + print "#include \"compat.h\"" print "#include \"cmd.h\"" print "struct cmd cmds[] = {"; } blob - 3bf5a9dcaa9acfa615c1571b816f8a2bbb0cd0c4 blob + 74be21dae9822f167e4bd8b6ee67688c1f132f01 --- parse.y +++ parse.y @@ -20,10 +20,7 @@ %{ -#include "cmd.h" -#include "keymap.h" -#include "telescope.h" -#include "utils.h" +#include "compat.h" #include #include @@ -34,8 +31,12 @@ #include #include +#include "cmd.h" #include "defaults.h" #include "iri.h" +#include "keymap.h" +#include "telescope.h" +#include "utils.h" typedef struct { union { blob - 41cd7ea789351d34778753b6cd226bfd8d4aa666 blob + 0cab9fe9dc36a7fd833a2125853a7d0aed09da9c --- parser_textpatch.c +++ parser_textpatch.c @@ -18,6 +18,8 @@ * A streaming text/x-patch parser */ +#include "compat.h" + #include #include blob - 325e06eff619f6c4962579e5ca7b96d7e5118adc blob + f46fa3e7f472b31fb5dd6cc4ce787409974d4d30 --- parser_textplain.c +++ parser_textplain.c @@ -18,6 +18,8 @@ * A streaming text/plain "parser." */ +#include "compat.h" + #include #include blob - 5f8516da9397241e1e5bc081f52256d0250b2acb blob + 5606b819462af0eb3ae524f2e0ec2083c7f8d44e --- telescope.h +++ telescope.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Omar Polo + * Copyright (c) 2021, 2024 Omar Polo * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -16,8 +16,6 @@ #ifndef TELESCOPE_H #define TELESCOPE_H - -#include "compat.h" #include #include /* XXX: for parsers.h */