Split CF_HDR section to CF_HDR (only includes) and CF_DEFINES (defines,

C declarations etc.).
This commit is contained in:
Martin Mares 2000-04-28 15:11:10 +00:00
parent decc99fbbd
commit 2edb31b097
6 changed files with 14 additions and 3 deletions

View file

@ -19,6 +19,7 @@ m4_define(DNL, `m4_dnl')
# Define macros for defining sections # Define macros for defining sections
m4_define(CF_ZONE, `m4_divert($1)/* $2 from m4___file__ */') m4_define(CF_ZONE, `m4_divert($1)/* $2 from m4___file__ */')
m4_define(CF_HDR, `CF_ZONE(1, Headers)') m4_define(CF_HDR, `CF_ZONE(1, Headers)')
m4_define(CF_DEFINES, `CF_ZONE(1, Defines)')
m4_define(CF_DECLS, `CF_ZONE(2, Declarations)') m4_define(CF_DECLS, `CF_ZONE(2, Declarations)')
m4_define(CF_GRAMMAR, `CF_ZONE(3, Grammar)') m4_define(CF_GRAMMAR, `CF_ZONE(3, Grammar)')
m4_define(CF_CODE, `CF_ZONE(4, C Code)') m4_define(CF_CODE, `CF_ZONE(4, C Code)')

View file

@ -16,6 +16,8 @@
CF_HDR CF_HDR
CF_DEFINES
#define P(a,b) ((a<<8) | b) #define P(a,b) ((a<<8) | b)
CF_DECLS CF_DECLS

View file

@ -8,13 +8,15 @@
CF_HDR CF_HDR
static struct proto_config *this_proto;
static struct iface_patt *this_ipatt;
#include "nest/rt-dev.h" #include "nest/rt-dev.h"
#include "nest/password.h" #include "nest/password.h"
#include "nest/cmds.h" #include "nest/cmds.h"
CF_DEFINES
static struct proto_config *this_proto;
static struct iface_patt *this_ipatt;
CF_DECLS CF_DECLS
CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT) CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)

View file

@ -17,6 +17,8 @@ CF_HDR
#include "proto/rip/rip.h" #include "proto/rip/rip.h"
#include "nest/iface.h" #include "nest/iface.h"
CF_DEFINES
#define RIP_CFG ((struct rip_proto_config *) this_proto) #define RIP_CFG ((struct rip_proto_config *) this_proto)
#define RIP_IPATT ((struct rip_patt *) this_ipatt) #define RIP_IPATT ((struct rip_patt *) this_ipatt)

View file

@ -10,6 +10,8 @@ CF_HDR
#include "proto/static/static.h" #include "proto/static/static.h"
CF_DEFINES
static struct static_route *this_srt; static struct static_route *this_srt;
CF_DECLS CF_DECLS

View file

@ -10,6 +10,8 @@ CF_HDR
#include "lib/krt.h" #include "lib/krt.h"
CF_DEFINES
#define THIS_KRT ((struct krt_config *) this_proto) #define THIS_KRT ((struct krt_config *) this_proto)
#define THIS_KIF ((struct kif_config *) this_proto) #define THIS_KIF ((struct kif_config *) this_proto)