aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/main.c b/src/main.c
index 49d0217a..66a97808 100644
--- a/src/main.c
+++ b/src/main.c
@@ -377,3 +377,3 @@ opt_variable(struct mu_parseopt *po, struct mu_option *op,
char *p;
- struct locus locus = { "<command line>", 1, 0 };
+ struct mu_locus_range locus = {{ "<command line>", 1, 0 }};
@@ -423,3 +423,2 @@ opt_set_milter_timeout(struct mu_parseopt *po, struct mu_option *op,
{
- int rc;
time_t v;
@@ -678,4 +677,3 @@ cb_set_variable(void *data, mu_config_value_t *arg)
char *alloc_str = NULL;
- struct mu_locus mloc;
- struct locus locus;
+ struct mu_locus_range locus = MU_LOCUS_RANGE_INITIALIZER;
@@ -714,20 +712,6 @@ cb_set_variable(void *data, mu_config_value_t *arg)
- locus.leng = 0;
- if (mu_stream_ioctl (mu_strerr, MU_IOCTL_LOGSTREAM,
- MU_IOCTL_LOGSTREAM_GET_LOCUS, &mloc)) {
- locus.file = "<unknown>";
- locus.line = 0;
- locus.point = 0;
- } else {
- if (mloc.mu_file) {
- struct literal *lit = string_alloc(mloc.mu_file,
- strlen(mloc.mu_file));
- free(mloc.mu_file);
- locus.file = lit->text;
- } else
- locus.file = "<unknown>";
- locus.line = mloc.mu_line;
- locus.point = mloc.mu_col;
- }
+ mu_stream_ioctl (mu_strerr, MU_IOCTL_LOGSTREAM,
+ MU_IOCTL_LOGSTREAM_GET_LOCUS_RANGE, &locus);
defer_initialize_variable(arg->v.arg.v[0].v.string, value, &locus);
+ mu_locus_range_deinit(&locus);
free(alloc_str);
@@ -1121,3 +1105,2 @@ args_in_order(int argc, char **argv)
int i;
- int flag = 0;
for (i = 0; i < argc; i++) {
@@ -1246,3 +1229,2 @@ main(int argc, char **argv)
{
- int rc;
prog_counter_t entry_point;

Return to:

Send suggestions and report system problems to the System administrator.