interpolate.hon commit return the prune-packed progress display to the inner loop (93ff3f6)
   1/*
   2 * Copyright 2006 Jon Loeliger
   3 */
   4
   5#ifndef INTERPOLATE_H
   6#define INTERPOLATE_H
   7
   8/*
   9 * Convert a NUL-terminated string in buffer orig,
  10 * performing substitutions on %-named sub-strings from
  11 * the interpretation table.
  12 */
  13
  14struct interp {
  15        const char *name;
  16        char *value;
  17};
  18
  19extern void interp_set_entry(struct interp *table, int slot, const char *value);
  20extern void interp_clear_table(struct interp *table, int ninterps);
  21
  22extern unsigned long interpolate(char *result, unsigned long reslen,
  23                                 const char *orig,
  24                                 const struct interp *interps, int ninterps);
  25
  26#endif /* INTERPOLATE_H */