2006-09-20 03:31:51 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2006 Jon Loeliger
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INTERPOLATE_H
|
|
|
|
#define INTERPOLATE_H
|
|
|
|
|
2006-09-25 23:19:00 +02:00
|
|
|
/*
|
|
|
|
* Convert a NUL-terminated string in buffer orig,
|
|
|
|
* performing substitutions on %-named sub-strings from
|
|
|
|
* the interpretation table.
|
|
|
|
*/
|
2006-09-20 03:31:51 +02:00
|
|
|
|
|
|
|
struct interp {
|
|
|
|
char *name;
|
|
|
|
char *value;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern int interpolate(char *result, int reslen,
|
2006-09-25 23:19:00 +02:00
|
|
|
const char *orig,
|
|
|
|
const struct interp *interps, int ninterps);
|
2006-09-20 03:31:51 +02:00
|
|
|
|
|
|
|
#endif /* INTERPOLATE_H */
|