Commit 2edb31b0 authored by Martin Mareš's avatar Martin Mareš

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

C declarations etc.).
parent decc99fb
......@@ -19,6 +19,7 @@ m4_define(DNL, `m4_dnl')
# Define macros for defining sections
m4_define(CF_ZONE, `m4_divert($1)/* $2 from m4___file__ */')
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_GRAMMAR, `CF_ZONE(3, Grammar)')
m4_define(CF_CODE, `CF_ZONE(4, C Code)')
......
......@@ -16,6 +16,8 @@
CF_HDR
CF_DEFINES
#define P(a,b) ((a<<8) | b)
CF_DECLS
......
......@@ -8,13 +8,15 @@
CF_HDR
static struct proto_config *this_proto;
static struct iface_patt *this_ipatt;
#include "nest/rt-dev.h"
#include "nest/password.h"
#include "nest/cmds.h"
CF_DEFINES
static struct proto_config *this_proto;
static struct iface_patt *this_ipatt;
CF_DECLS
CF_KEYWORDS(ROUTER, ID, PROTOCOL, PREFERENCE, DISABLED, DEBUG, ALL, OFF, DIRECT)
......
......@@ -17,6 +17,8 @@ CF_HDR
#include "proto/rip/rip.h"
#include "nest/iface.h"
CF_DEFINES
#define RIP_CFG ((struct rip_proto_config *) this_proto)
#define RIP_IPATT ((struct rip_patt *) this_ipatt)
......
......@@ -10,6 +10,8 @@ CF_HDR
#include "proto/static/static.h"
CF_DEFINES
static struct static_route *this_srt;
CF_DECLS
......
......@@ -10,6 +10,8 @@ CF_HDR
#include "lib/krt.h"
CF_DEFINES
#define THIS_KRT ((struct krt_config *) this_proto)
#define THIS_KIF ((struct kif_config *) this_proto)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment