From 5ba9bc5cfbcd3bd67ab77b74806cd4426ed4145f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 15 Aug 2026 11:16:07 -0700 Subject: [PATCH] sed: basicdefs.h trimdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * basicdefs.h: Move inclusion of locale.h to sed/sed.c. (obstack_chunk_alloc, obstack_chunk_free): Move these macro definitions to sed/compile.c. * sed/debug.c: Don’t include basicdefs.h, as sed.h does that for us. --- basicdefs.h | 5 ----- sed/compile.c | 3 +++ sed/debug.c | 2 +- sed/sed.c | 1 + 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/basicdefs.h b/basicdefs.h index 8a9114e..f16f7ae 100644 --- a/basicdefs.h +++ b/basicdefs.h @@ -17,15 +17,10 @@ #ifndef BASICDEFS_H #define BASICDEFS_H -#include - #include #define _(String) gettext(String) #include "idx.h" #include "xalloc.h" -#define obstack_chunk_alloc xzalloc -#define obstack_chunk_free free - #endif /*!BASICDEFS_H*/ diff --git a/sed/compile.c b/sed/compile.c index 77aa4ae..4af4420 100644 --- a/sed/compile.c +++ b/sed/compile.c @@ -30,6 +30,9 @@ #include "progname.h" #include "xalloc.h" +#define obstack_chunk_alloc xzalloc +#define obstack_chunk_free free + /* let's not confuse text editors that have only dumb bracket-matching... */ #define OPEN_BRACKET '[' #define CLOSE_BRACKET ']' diff --git a/sed/debug.c b/sed/debug.c index 502c993..1719d0a 100644 --- a/sed/debug.c +++ b/sed/debug.c @@ -19,7 +19,7 @@ /* debug.c: debugging functions */ #include "sed.h" -#include "basicdefs.h" + #include #include #include diff --git a/sed/sed.c b/sed/sed.c index 791904e..217604b 100644 --- a/sed/sed.c +++ b/sed/sed.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include