<?xml version="1.0"?>
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>rfc822</title><link rel="stylesheet" type="text/css" href="style.css"/><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"/><link rel="home" href="#idm247873168272" title="rfc822"/><link xmlns="" rel="stylesheet" type="text/css" href="manpage.css"/><meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/><link xmlns="" rel="icon" href="icon.gif" type="image/gif"/><!--
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>rfc822</title><link rel="stylesheet" type="text/css" href="style.css"/><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"/><link rel="home" href="#idm255220883504" title="rfc822"/><link xmlns="" rel="stylesheet" type="text/css" href="manpage.css"/><meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/><link xmlns="" rel="icon" href="icon.gif" type="image/gif"/><!--
Copyright 1998 - 2009 Double Precision, Inc. See COPYING for distribution
information.
---></head><body><div class="refentry"><a id="idm247873168272" shape="rect"> </a><div class="titlepage"/><div class="refnamediv"><h2>Name</h2><p>rfc822 — RFC 822 parsing library</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="informalexample"><pre class="programlisting" xml:space="preserve">
+--></head><body><div class="refentry"><a id="idm255220883504" shape="rect"> </a><div class="titlepage"/><div class="refnamediv"><h2>Name</h2><p>rfc822 — RFC 822 parsing library</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="informalexample"><pre class="programlisting" xml:space="preserve">
#include <rfc822.h>
#include <rfc2047.h>
cc ... -lrfc822
-</pre></div></div><div class="refsect1"><a id="idm247873116928" shape="rect"> </a><h2>DESCRIPTION</h2><p>
+</pre></div></div><div class="refsect1"><a id="idm255222283024" shape="rect"> </a><h2>DESCRIPTION</h2><p>
The rfc822 library provides functions for parsing E-mail headers in the RFC
822 format. This library also includes some functions to help with encoding
and decoding 8-bit text, as defined by RFC 2047.</p><p>
its logical components: names and E-mail addresses.</p><p>
2) Access those individual components.</p><p>
3) Allow some limited modifications of the parsed structure, and then
-convert it back into a text string.</p><div class="refsect2"><a id="idm247873111200" shape="rect"> </a><h3>Tokenizing an E-mail header</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
+convert it back into a text string.</p><div class="refsect2"><a id="idm255222277632" shape="rect"> </a><h3>Tokenizing an E-mail header</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
struct rfc822t *tokens=rfc822t_alloc_new(const char *header,
void (*err_func)(const char *, int, void *),
void *func_arg);
modified by <code class="function">rfc822t_alloc</code>(), however the
<span class="structname">rfc822t</span> structure contains
pointers to portions of the supplied <em class="parameter"><code>header</code></em>,
-and they must remain valid.</p></div></div><div class="refsect2"><a id="idm247873153904" shape="rect"> </a><h3>Extracting E-mail addresses</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
+and they must remain valid.</p></div></div><div class="refsect2"><a id="idm255216930544" shape="rect"> </a><h3>Extracting E-mail addresses</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
struct rfc822a *addrs=rfc822a_alloc(struct rfc822t *tokens);
void rfc822a_free(addrs);
'<code class="literal">(</code>'.</p><p>
Note that it's possible that <em class="structfield"><code>len</code></em> might be zero.
This happens with null addresses used as return addresses for delivery status
-notifications.</p></div><div class="refsect2"><a id="idm247867853536" shape="rect"> </a><h3>Working with E-mail addresses</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
+notifications.</p></div><div class="refsect2"><a id="idm255216882768" shape="rect"> </a><h3>Working with E-mail addresses</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
void rfc822_deladdr(struct rfc822a *addrs, int index);
void rfc822tok_print(const struct rfc822token *list,
The function <code class="function">rfc822_getaddrs_wrap</code>() is similar to
<code class="function">rfc822_getaddrs</code>(), except
that the generated text is wrapped on or about the 73rd column, using
-newline characters.</p></div><div class="refsect2"><a id="idm247867812992" shape="rect"> </a><h3>Working with dates</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
+newline characters.</p></div><div class="refsect2"><a id="idm255216842112" shape="rect"> </a><h3>Working with dates</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
time_t timestamp=rfc822_parsedt(const char *datestr)
const char *datestr=rfc822_mkdate(time_t timestamp);
void rfc822_mkdate_buf(time_t timestamp, char *buffer);
the given timestamp.
<code class="function">rfc822_mkdate_buf</code>() writes the date string into the
given buffer instead,
-which must be big enough to accommodate it.</p></div><div class="refsect2"><a id="idm247867806656" shape="rect"> </a><h3>Working with 8-bit MIME-encoded headers</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
+which must be big enough to accommodate it.</p></div><div class="refsect2"><a id="idm255216835776" shape="rect"> </a><h3>Working with 8-bit MIME-encoded headers</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
int error=rfc2047_decode(const char *text,
int (*callback_func)(const char *, int, const char *, void *),
void *callback_arg);
and <em class="parameter"><code>callback_arg</code></em>.</p><p>
The function <code class="function">rfc2047_encode_header</code>() is basically
equivalent to <code class="function">rfc822_getaddrs</code>(), followed by
-<code class="function">rfc2047_encode_str</code>();</p></div><div class="refsect2"><a id="idm247867777760" shape="rect"> </a><h3>Working with subjects</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
+<code class="function">rfc2047_encode_str</code>();</p></div><div class="refsect2"><a id="idm255220181808" shape="rect"> </a><h3>Working with subjects</h3><div class="informalexample"><pre class="programlisting" xml:space="preserve">
char *basesubj=rfc822_coresubj(const char *subj);
char *basesubj=rfc822_coresubj_nouc(const char *subj);
must be <code class="function">free</code>(3)-ed after use.</p><p>
<code class="function">rfc822_coresubj_nouc</code>() is like
<code class="function">rfc822_coresubj</code>(), except that the subject
-is not converted to uppercase.</p></div></div><div class="refsect1"><a id="idm247867765456" shape="rect"> </a><h2>SEE ALSO</h2><p>
+is not converted to uppercase.</p></div></div><div class="refsect1"><a id="idm255216808064" shape="rect"> </a><h2>SEE ALSO</h2><p>
<a class="ulink" href="rfc2045.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">rfc2045</span>(3)</span></a>,
<a class="ulink" href="reformail.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">reformail</span>(1)</span></a>,
<a class="ulink" href="reformime.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">reformime</span>(1)</span></a>.</p></div></div></body></html>