Commit 40a253bd authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Simplify

parent d982e81a
......@@ -100,26 +100,28 @@ struct vsc {
struct VSM_fantom iter_fantom;
};
/**********************************************************************
* Precompiled VSC_type_desc's and VSC_desc's for all know VSCs.
/*--------------------------------------------------------------------
* Build the static level, type and point descriptions
*/
#define VSC_LEVEL_F(v,l,e,d) \
extern const struct VSC_level_desc VSC_level_desc_##v;
const struct VSC_level_desc VSC_level_desc_##v = \
{VSC_level_##v, l, e, d};
#include "tbl/vsc_levels.h"
#undef VSC_LEVEL_F
#define VSC_TYPE_F(n,t,l,e,d) const char *VSC_type_##n = t;
#include "tbl/vsc_types.h"
#define VSC_TYPE_F(n,t,l,e,d) \
extern const struct VSC_type_desc VSC_type_desc_##n;
const struct VSC_type_desc VSC_type_desc_##n = {l,e,d};
#include "tbl/vsc_types.h"
#undef VSC_TYPE_F
#define VSC_DO(U,l,t,h) extern const struct VSC_desc VSC_desc_##l[];
#define VSC_F(n,t,l,s,f,v,d,e)
#define VSC_DONE(U,l,t)
#define VSC_DO(U,l,t,h) const struct VSC_desc VSC_desc_##l[] = {
#define VSC_F(n,t,l,s,f,v,d,e) {#n,#t,s,f,&VSC_level_desc_##v,d,e},
#define VSC_DONE(U,l,t) };
#include "tbl/vsc_all.h"
/*--------------------------------------------------------------------*/
static struct vsc *
......@@ -496,24 +498,3 @@ VSC_LevelDesc(unsigned level)
}
}
/*--------------------------------------------------------------------
* Build the static level, type and point descriptions
*/
#define VSC_LEVEL_F(v,l,e,d) \
const struct VSC_level_desc VSC_level_desc_##v = \
{VSC_level_##v, l, e, d};
#include "tbl/vsc_levels.h"
#undef VSC_LEVEL_F
#define VSC_TYPE_F(n,t,l,e,d) const char *VSC_type_##n = t;
#include "tbl/vsc_types.h"
#define VSC_TYPE_F(n,t,l,e,d) \
const struct VSC_type_desc VSC_type_desc_##n = {l,e,d};
#include "tbl/vsc_types.h"
#define VSC_DO(U,l,t,h) const struct VSC_desc VSC_desc_##l[] = {
#define VSC_F(n,t,l,s,f,v,d,e) {#n,#t,s,f,&VSC_level_desc_##v,d,e},
#define VSC_DONE(U,l,t) };
#include "tbl/vsc_all.h"
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