summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2019-11-10 11:14:17 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2019-11-10 11:14:17 (GMT)
commit367aa99dd28cc74febe4e8c5f81df9812a41e05a (patch) (side-by-side diff)
tree74a405d79ab690793095dd882f1b50482606cc57
parentea10f1a4ca849cd44d2b9cf79c679fb8c2924f48 (diff)
downloadmailutils-367aa99dd28cc74febe4e8c5f81df9812a41e05a.tar.gz
mailutils-367aa99dd28cc74febe4e8c5f81df9812a41e05a.tar.bz2
Remove deprecated MU_IOCTL_LOGSTREAM_GET_LOCUS and MU_IOCTL_LOGSTREAM_SET_LOCUS
Diffstat (more/less context) (ignore whitespace changes)
-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 bd4c3e7..aa21616 100644
--- a/include/mailutils/stream.h
+++ b/include/mailutils/stream.h
@@ -107,20 +107,11 @@ enum mu_buffer_type
#define MU_IOCTL_LOGSTREAM_GET_SEVERITY 0
#define MU_IOCTL_LOGSTREAM_SET_SEVERITY 1
- /* 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.
Arg: int *
*/
diff --git a/include/mailutils/types.hin b/include/mailutils/types.hin
index 274433c..fe02297 100644
--- a/include/mailutils/types.hin
+++ b/include/mailutils/types.hin
@@ -154,25 +154,6 @@ mu_prstr (char const *s)
#define MU_DEFAULT_RECORD _MU_DEFAULT_RECORD_
-/* 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
}
#endif
diff --git a/libmailutils/stream/logstream.c b/libmailutils/stream/logstream.c
index 8931405..2342603 100644
--- a/libmailutils/stream/logstream.c
+++ b/libmailutils/stream/logstream.c
@@ -475,48 +475,6 @@ _log_ctl (struct _mu_stream *str, int code, int opcode, void *arg)
lr->end.mu_col = sp->locrange.end.mu_col;
}
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;
- }
case MU_IOCTL_LOGSTREAM_SET_LOCUS_LINE:
if (!arg)
@@ -640,33 +598,5 @@ mu_log_stream_create (mu_stream_t *pstr, mu_stream_t transport)
return 0;
}
-
-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.