-/*
- * rfc822.c -- code for slicing and dicing RFC822 mail headers
- *
- * Copyright 1997 by Eric S. Raymond
- * For license terms, see the file COPYING in this directory.
- */
+/*****************************************************************************
+
+NAME:
+ rfc822.c -- code for slicing and dicing RFC822 mail headers
+
+ENTRY POINTS:
+ nextaddr() -- parse the next address out of an RFC822 header
+ reply_hack() -- append hostname to local header addresses
+
+THEORY:
+ How to parse RFC822 headers in C. This is not a fully conformant
+implementation of RFC822 or RFC2822, but it has been in production use
+in a widely-deployed MTA (fetcmail) since 1996 without complaints.
+Really perverse combinations of quoting and commenting could break it.
+
+AUTHOR:
+ Eric S. Raymond <esr@thyrsus.com>, 1997. This source code example
+is part of fetchmail and the Unix Cookbook, and are released under the
+MIT license. Compile with -DMAIN to build the demonstrator.
+
+******************************************************************************/
+
+#define _XOPEN_SOURCE 600
+#define __BSD_VISIBLE 1
+
+#include "config.h"
+#include "fetchmail.h"