Commit fe143d9a fe143d9a28ddd7cc885e8def47d07669f1cee48f by Sergey Poznyakoff

Removed definitions of __P() scattered over multiple header

files. Included <mailutils/mu_features.h> instead.
1 parent c207ab9a
......@@ -89,14 +89,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct imap4d_command
{
const char *name;
......
......@@ -19,14 +19,7 @@
#define _MAILUTILS_ADDRESS_H
#include <sys/types.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" {
......
......@@ -19,19 +19,12 @@
#define _MAILUTILS_ATTRIBUTE_H
#include <sys/types.h>
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct _attribute;
typedef struct _attribute * attribute_t;
......
......@@ -19,16 +19,9 @@
#define _MAILUTILS_AUTH_H
#include <sys/types.h>
#include <mailutils/mu_features.h>
#include <mailutils/url.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -19,16 +19,9 @@
#define _MAILUTILS_BODY_H
#include <sys/types.h>
#include <mailutils/mu_features.h>
#include <mailutils/stream.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /* __P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -20,14 +20,7 @@
#include <sys/types.h>
#include <stdarg.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" {
......
......@@ -19,19 +19,12 @@
# define _MAILUTILS_ENVELOPE_H
#include <sys/types.h>
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" { /*}*/
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct _envelope;
typedef struct _envelope *envelope_t;
......
......@@ -19,19 +19,13 @@
#define _MAILUTILS_ERRNO_H 1
#include <sys/types.h>
#include <errno.h>
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __P
# if __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*!__P */
#define MU_ERR_BASE 0x1000
#define MU_ERR_NO_HANDLER (MU_ERR_BASE | 0x001)
......
......@@ -19,14 +19,7 @@
#define _MAILUTILS_ERROR_H
#include <stdarg.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" {
......
......@@ -23,18 +23,11 @@
#define _MAILUTILS_FILTER_H
#include <stdlib.h>
#include <mailutils/mu_features.h>
#include <mailutils/list.h>
#include <mailutils/property.h>
#include <mailutils/stream.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <mailutils/mu_features.h>
#include <mailutils/url.h>
#include <mailutils/observer.h>
#include <mailutils/debug.h>
......@@ -32,14 +33,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
/* Forward declaration. */
struct _folder;
typedef struct _folder *folder_t;
......
......@@ -19,16 +19,9 @@
#define _MAILUTILS_HEADER_H
#include <sys/types.h>
#include <mailutils/mu_features.h>
#include <mailutils/stream.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -18,17 +18,10 @@
#ifndef _MAILUTILS_ITERATOR_H
#define _MAILUTILS_ITERATOR_H
#include <mailutils/mu_features.h>
#include <mailutils/list.h>
#include <sys/types.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -18,16 +18,9 @@
#ifndef _MAILUTILS_LIST_H
#define _MAILUTILS_LIST_H
#include <mailutils/mu_features.h>
#include <sys/types.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -18,20 +18,13 @@
#ifndef _MAILUTILS_LOCKER_H
#define _MAILUTILS_LOCKER_H
#include <mailutils/mu_features.h>
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct _locker;
typedef struct _locker *locker_t;
......
......@@ -19,6 +19,7 @@
#define _MAILUTILS_MAILBOX_H
#include <sys/types.h>
#include <mailutils/mu_features.h>
/* Forward declaration. */
struct _mailbox;
......@@ -37,13 +38,7 @@ typedef struct _mailbox *mailbox_t;
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
extern char *mu_path_maildir;
/* Constructor/destructor and possible types. */
extern int mailbox_create __P ((mailbox_t *, const char *));
......
......@@ -20,6 +20,7 @@
#include <sys/types.h>
#include <mailutils/mu_features.h>
#include <mailutils/address.h>
#include <mailutils/debug.h>
#include <mailutils/message.h>
......@@ -28,14 +29,6 @@
#include <mailutils/stream.h>
#include <mailutils/url.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /* __P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -19,6 +19,7 @@
#define _MAILUTILS_MESSAGE_H
#include <sys/types.h>
#include <mailutils/mu_features.h>
/* forward declaration */
struct _message;
......@@ -33,14 +34,6 @@ typedef struct _message *message_t;
#include <mailutils/observer.h>
#include <mailutils/stream.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /* __P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -19,17 +19,10 @@
#define _MAILUTILS_MIME_H
#include <sys/types.h>
#include <mailutils/mu_features.h>
#include <mailutils/header.h>
#include <mailutils/stream.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /* __P */
/* mime flags */
#define MIME_INCREAMENTAL_PARSER 0x1
......
......@@ -19,19 +19,12 @@
#define _MAILUTILS_MONITOR_H
#include <sys/types.h>
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct _monitor
{
void *data;
......
......@@ -24,14 +24,7 @@
*/
#include <time.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" {
......@@ -80,6 +73,9 @@ extern char * mu_normalize_path __P((char *path, const char *delim));
extern char * mu_normalize_maildir __P((const char *dir));
extern int mu_tempfile __P((const char *tmpdir, char **namep));
extern char * mu_get_full_path __P((const char *file));
extern char * mu_getcwd __P((void));
#ifdef __cplusplus
}
#endif
......
......@@ -19,14 +19,7 @@
#define _MAILUTILS_OBSERVER_H
#include <sys/types.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" {
......
......@@ -22,17 +22,10 @@
#ifndef _MAILUTILS_PARSE822_H
#define _MAILUTILS_PARSE822_H
#include <mailutils/mu_features.h>
#include <mailutils/address.h>
#include <mailutils/mutil.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -19,14 +19,7 @@
#define _MAILUTILS_PROPERTY_H
#include <sys/types.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" {
......
......@@ -20,20 +20,13 @@
#include <sys/types.h>
#include <mailutils/mu_features.h>
#include <mailutils/url.h>
#include <mailutils/mailbox.h>
#include <mailutils/mailer.h>
#include <mailutils/folder.h>
#include <mailutils/list.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -21,20 +21,13 @@
#include <stdio.h>
#include <sys/types.h>
#include <mailutils/mu_features.h>
#include <mailutils/property.h>
#ifdef __cplusplus
extern "C" { /*}*/
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct _stream;
typedef struct _stream *stream_t;
......
......@@ -19,19 +19,12 @@
#define _MAILUTILS_URL_H 1
#include <sys/types.h>
#include <mailutils/mu_features.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __P
# if __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*!__P */
/* forward declaration */
struct _url;
typedef struct _url * url_t;
......
......@@ -71,14 +71,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
/* Type definitions */
#ifndef function_t
typedef int function_t __P ((int, char **));
......
......@@ -24,14 +24,6 @@
#include <mailutils/address.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -28,14 +28,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct _attribute
{
void *owner;
......
......@@ -25,14 +25,6 @@
#include <mailutils/auth.h>
#include <sys/types.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -28,14 +28,6 @@
#include <stdio.h>
#include <sys/types.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /* __P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -22,14 +22,6 @@
# include <dmalloc.h>
#endif
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#include <mailutils/debug.h>
#ifdef __cplusplus
......
......@@ -28,14 +28,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct _envelope
{
void *owner;
......
......@@ -27,14 +27,6 @@
#include <mailutils/monitor.h>
#include <mailutils/property.h>
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -32,14 +32,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct _folder
{
/* Data */
......
......@@ -29,14 +29,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
/* The structure members are offset that point to the begin/end of header
fields. */
struct _hdr
......
......@@ -31,14 +31,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
#define CLEAR_STATE(f_imap) \
f_imap->selected = NULL, f_imap->state = IMAP_NO_STATE
......
......@@ -24,14 +24,6 @@
#include <mailutils/iterator.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -27,15 +27,6 @@
#include <mailutils/list.h>
#include <mailutils/monitor.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -32,14 +32,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct _mailbox
{
/* Data */
......
......@@ -30,20 +30,12 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
// mailer states
/* mailer states */
#define MAILER_STATE_HDR 1
#define MAILER_STATE_MSG 2
#define MAILER_STATE_COMPLETE 3
// mailer messages
/* mailer messages */
#define MAILER_HELO 1
#define MAILER_MAIL 2
#define MAILER_RCPT 3
......
......@@ -33,14 +33,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
struct _message
{
/* Who is the owner. */
......
......@@ -25,14 +25,6 @@
#include <sys/types.h>
#include <mailutils/mime.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -32,15 +32,7 @@
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __P
# if __STDC__
# define __P(x) x
# else
# define __P(x)
# endif
#endif
/* FIXME: any protos? */
#ifdef __cplusplus
}
#endif
......
......@@ -24,14 +24,6 @@
#include <mailutils/observer.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -29,14 +29,6 @@
#include <mailutils/property.h>
#include <mailutils/monitor.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -28,14 +28,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
/* The pop and imap defines are all wrong now, since they seem intertwined
with the old url parsing code. Also, "pop://" is not the POP scheme,
at least not as a scheme is described in the RFCs.
......
......@@ -27,14 +27,6 @@
extern "C" {
#endif
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*__P */
/* Read buffer */
struct rbuffer
{
......
......@@ -28,14 +28,6 @@
extern "C" {
#endif
#ifndef __P
# if __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /*!__P */
struct _url
{
/* Data */
......
......@@ -162,14 +162,6 @@
#define ERR_UNKNOWN 15
#define ERR_MBOX_SYNC 16
#ifndef __P
# ifdef __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif /* __P */
extern mailbox_t mbox;
extern int state;
extern char *username;
......
......@@ -35,13 +35,5 @@
#include <mailutils/filter.h>
#include <mailutils/registrar.h>
#ifndef __P
#ifdef __STDC__
#define __P(args) args
#else
#define __P(args) ()
#endif
#endif /*__P */
int msglist __P ((mailbox_t mbox, int show_all, int argc, char **argv, int **set, int *n));
#endif
......