bp/definitions.h

29 lines
648 B
C
Raw Normal View History

//
2021-01-15 19:35:39 -08:00
// definitions.h - Header file defining pattern rules
//
2021-01-15 19:35:39 -08:00
#ifndef DEFINITIONS__H
#define DEFINITIONS__H
2020-09-11 01:28:06 -07:00
#include "pattern.h"
//
// Pattern matching rule definition(s)
//
typedef struct def_s {
size_t id;
size_t namelen;
const char *name;
pat_t *pat;
struct def_s *next;
} def_t;
2020-09-11 01:28:06 -07:00
__attribute__((nonnull(3,4), returns_nonnull))
def_t *with_def(def_t *defs, size_t namelen, const char *name, pat_t *pat);
__attribute__((pure, nonnull(3)))
def_t *lookup(def_t *defs, size_t namelen, const char *name);
__attribute__((nonnull(1)))
def_t *free_defs(def_t *defs, def_t *stop);
2020-09-11 01:28:06 -07:00
#endif
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0