aboutsummaryrefslogtreecommitdiff
path: root/src/wydawca.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-07-24 14:14:47 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-07-24 14:27:11 +0300
commitc047ed856d6d23137ef1df01c1297db36bad3f8c (patch)
tree1999db947cb5e38df8a85d314daa0eef7c7624d0 /src/wydawca.h
parent07ea006a31def46ba6ea936dbea366219152d9b6 (diff)
downloadwydawca-c047ed856d6d23137ef1df01c1297db36bad3f8c.tar.gz
wydawca-c047ed856d6d23137ef1df01c1297db36bad3f8c.tar.bz2
Use wordsplit to expand variables in strings.
* NEWS: Raise version number. * configure.ac: Link wydawca.h to include/wydawca Raise version number * doc/wydawca.texi: Document changes. * etc/wydawca.rc: Fix the syntax. * grecs: Upgrace. * include/wydawca/wydawca.h (wy_vlog): New proto. (wy_log, wy_dbg): Format is const char *. (wy_triplet_t): Change typedef. (wy_metadef): Remove struct. (wy_vardef): New struct. (wy_triplet_expand_param) (wy_expand_copy): New protos. * modules/logstat/mod_logstat.c: Update. * modules/mailutils/Makefile.am (AM_CPPFLAGS): Modify, * modules/mailutils/mod_mailutils.c: Update. * src/Makefile.am (wydawca_SOURCES): Remove meta.c * src/dictionary.c: Fix comment. * src/directive.c (directive_get_value): Triplet pointer is const. * src/meta.c: Remove. * src/timer.c: (timer_fill_meta) (timer_free_meta): Remove. * src/triplet.c: Use wordsplit for expansions. * src/wydawca.c (wy_vlog): New function. (wy_stat_expansion): New function. * src/wydawca.h: Remove metadef protos. * tests/etc/notify.rcin: Update variable reference syntax.
Diffstat (limited to 'src/wydawca.h')
-rw-r--r--src/wydawca.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/wydawca.h b/src/wydawca.h
index 580d0be..63da9bb 100644
--- a/src/wydawca.h
+++ b/src/wydawca.h
@@ -277,12 +277,6 @@ void notify_stats(void);
void notify_flush(struct spool *sp);
-char *meta_expand_string(const char *string, struct wy_metadef *def, void *data,
- struct dictionary *dict, void *handle);
-void meta_free(struct wy_metadef *def);
-struct wy_metadef *metadef_join(struct wy_metadef *a, struct wy_metadef *b);
-
-
/* Modules */
struct module {
@@ -365,7 +359,6 @@ extern struct notification *default_notification;
} while (0)
int stat_mask_p(unsigned long mask);
-struct wy_metadef *make_stat_expansion(size_t count);
void initstats(void);
void logstats(void);
@@ -412,7 +405,7 @@ struct wy_triplet *link_processable_triplets(void);
size_t count_collected_triplets(void);
char *triplet_expand_dictionary_query(struct dictionary *dict, void *handle,
- struct wy_triplet const *trp);
+ struct wy_triplet *trp);
void triplet_remove_file(struct spool *spool, const char *name);
@@ -447,7 +440,7 @@ struct wy_user *uploader_find_frp(struct wy_user *list,
/* Directive file support */
int directive_parse(struct wy_triplet *trp);
-int directive_get_value(struct wy_triplet *trp, const char *key,
+int directive_get_value(struct wy_triplet const *trp, const char *key,
const char **pval);
int directive_pack_version(const char *val, unsigned *pversion);
int directive_unpack_version(unsigned version, char **pbuf, size_t * psize);
@@ -521,8 +514,6 @@ double timer_get_user(wydawca_timer_t t);
double timer_get_system(wydawca_timer_t t);
char *timer_format_time(double t);
size_t timer_get_count(void);
-void timer_fill_meta(struct wy_metadef *def, size_t num);
-void timer_free_meta(struct wy_metadef *def, size_t num);
void report_init(void);
void report_add(const char *fmt, ...);
@@ -572,3 +563,5 @@ int watcher_run(int);
# define watcher_init() -1
# define watcher_run(c)
#endif
+
+int wy_stat_expansion(char **ret, char const *name, size_t len);

Return to:

Send suggestions and report system problems to the System administrator.