#ifndef VAR_EXPAND_PRIVATE_H
struct var_expand_context {
/* current variables */
/* caller provided function table */
/* caller provided context */
void *context;
/* last offset, negative counts from end*/
int offset;
/* last width, negative counts from end */
int width;
/* last zero padding */
};
/* this can be used to register a *global* function that is
prepended to function table. These can be used to register some
special handling for keys.
you can call var_expand_with_funcs if you need to
expand something inside here.
return -1 on error, 0 on unknown variable, 1 on success
*/
typedef int
struct var_expand_extension_func_table {
const char *key;
};
void var_expand_extensions_init(void);
void var_expand_extensions_deinit(void);
/* Functions registered here are placed before in-built functions,
so you can include your own implementation of something.
Be careful. Use NULL terminated list.
*/
#endif