summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-11-10 13:14:17 +0200
committerSergey Poznyakoff <gray@gnu.org>2019-11-10 13:14:17 +0200
commit367aa99dd28cc74febe4e8c5f81df9812a41e05a (patch)
tree74a405d79ab690793095dd882f1b50482606cc57
parentea10f1a4ca849cd44d2b9cf79c679fb8c2924f48 (diff)
downloadmailutils-367aa99dd28cc74febe4e8c5f81df9812a41e05a.tar.gz
mailutils-367aa99dd28cc74febe4e8c5f81df9812a41e05a.tar.bz2
Remove deprecated MU_IOCTL_LOGSTREAM_GET_LOCUS and MU_IOCTL_LOGSTREAM_SET_LOCUS
-rw-r--r--include/mailutils/stream.h15
-rw-r--r--include/mailutils/types.hin19
-rw-r--r--libmailutils/stream/logstream.c70
3 files changed, 3 insertions, 101 deletions
diff --git a/include/mailutils/stream.h b/include/mailutils/stream.h
index bd4c3e7ae..aa216167f 100644
--- a/include/mailutils/stream.h
+++ b/include/mailutils/stream.h
@@ -109,16 +109,7 @@ enum mu_buffer_type
- /* The following two subcommands are deprecated and provided for
- backward compatibility. Please use the MU_IOCTL_LOGSTREAM_GET_LOCUS_RANGE
- and MU_IOCTL_LOGSTREAM_SET_LOCUS_RANGE instead. */
- /* Get or set locus.
- Arg: struct mu_locus_DEPRECATED *
+ /* Codes 2 and 3 are unused now.
+ For their prior use, see
+ http://mailutils.org/wiki/Source_location_API#Deprecated_interface
*/
-#define MU_IOCTL_LOGSTREAM_GET_LOCUS_DEPRECATED 2
-#define MU_IOCTL_LOGSTREAM_SET_LOCUS_DEPRECATED 3
-int mu_ioctl_logstream_get_locus_deprecated (void) MU_DEPRECATED;
-#define MU_IOCTL_LOGSTREAM_GET_LOCUS mu_ioctl_logstream_get_locus_deprecated ()
-int mu_ioctl_logstream_set_locus_deprecated (void) MU_DEPRECATED;
-#define MU_IOCTL_LOGSTREAM_SET_LOCUS mu_ioctl_logstream_set_locus_deprecated ()
-
/* Get or set log mode.
diff --git a/include/mailutils/types.hin b/include/mailutils/types.hin
index 274433c7b..fe02297c5 100644
--- a/include/mailutils/types.hin
+++ b/include/mailutils/types.hin
@@ -156,21 +156,2 @@ mu_prstr (char const *s)
-/* This structure used to be called mu_locus in mailutils up to
- 3.2.91-46 [release-3.2-71-g719e64a]. It is superseded by
- structs mu_locus_point and mu_locus_range, defined in
- <mailutils/locus.h>.
-
- This definition is provided for backward compatibility. Authors are
- urged to switch to the new API as soon as their time permits.
-
- Please see http://mailutils.org/wiki/Source_location_API#Deprecated_interface
- for detailed guidelines.
-*/
-struct mu_locus_DEPRECATED
-{
- char *mu_file;
- unsigned mu_line;
- unsigned mu_col;
-};
-#define mu_locus mu_locus_DEPRECATED
-
#ifdef __cplusplus
diff --git a/libmailutils/stream/logstream.c b/libmailutils/stream/logstream.c
index 89314056d..234260365 100644
--- a/libmailutils/stream/logstream.c
+++ b/libmailutils/stream/logstream.c
@@ -477,44 +477,2 @@ _log_ctl (struct _mu_stream *str, int code, int opcode, void *arg)
break;
-
- case MU_IOCTL_LOGSTREAM_GET_LOCUS_DEPRECATED:
- if (!arg)
- return EINVAL;
- else
- {
- struct mu_locus_DEPRECATED *ploc = arg;
- if (sp->locrange.beg.mu_file)
- {
- ploc->mu_file = strdup (sp->locrange.beg.mu_file);
- if (!ploc->mu_file)
- return ENOMEM;
- }
- else
- ploc->mu_file = NULL;
- ploc->mu_line = sp->locrange.beg.mu_line;
- ploc->mu_col = sp->locrange.beg.mu_col;
- }
- break;
-
- case MU_IOCTL_LOGSTREAM_SET_LOCUS_DEPRECATED:
- {
- struct mu_locus_DEPRECATED *ploc = arg;
-
- mu_ident_deref (sp->locrange.end.mu_file);
- sp->locrange.end.mu_file = NULL;
- if (arg)
- {
- status = lr_set_file (&sp->locrange, ploc->mu_file, 0, 0);
- if (status)
- return status;
- lr_set_line (&sp->locrange, ploc->mu_line, 0);
- lr_set_col (&sp->locrange, ploc->mu_col, 0);
- }
- else
- {
- mu_ident_deref (sp->locrange.beg.mu_file);
- sp->locrange.beg.mu_file = NULL;
- }
-
- break;
- }
@@ -642,30 +600,2 @@ mu_log_stream_create (mu_stream_t *pstr, mu_stream_t transport)
}
-
-static char wiki_url[] = "http://mailutils.org/wiki/Source_location_API#Deprecated_interface";
-
-int
-mu_ioctl_logstream_get_locus_deprecated (void)
-{
- static int warned;
- if (!warned)
- {
- mu_error (_("the program uses MU_IOCTL_LOGSTREAM_GET_LOCUS, which is deprecated"));
- mu_error (_("please see %s, for detailed guidelines"), wiki_url);
- warned = 1;
- }
- return MU_IOCTL_LOGSTREAM_GET_LOCUS_DEPRECATED;
-}
-
-int
-mu_ioctl_logstream_set_locus_deprecated (void)
-{
- static int warned;
- if (!warned)
- {
- mu_error (_("program uses MU_IOCTL_LOGSTREAM_SET_LOCUS, which is deprecated"));
- mu_error (_("please see %s, for detailed guidelines"), wiki_url);
- warned = 1;
- }
- return MU_IOCTL_LOGSTREAM_SET_LOCUS_DEPRECATED;
-}

Return to:

Send suggestions and report system problems to the System administrator.