updated ali-flist, with batch edit of others
[mmh] / man / ap.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH AP %manext8% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 ap \- parse addresses 822-style
8 .SH SYNOPSIS
9 .HP 5
10 .B %libdir%/ap
11 .RB [ \-form
12 .IR formatfile ]
13 .RB [ \-format
14 .IR string ]
15 .RB [ \-normalize " | " \-nonormalize ]
16 .RB [ \-width
17 .IR columns ]
18 .RB [ \-version ]
19 .RB [ \-help ] 
20 .I addrs
21 \&...
22 .SH DESCRIPTION
23 .B Ap
24 is a program that parses addresses according to the ARPA
25 Internet standard.  It also understands many non\-standard formats.
26 It is useful for seeing how
27 .B nmh
28 will interpret an address.
29 .PP
30 The
31 .B ap
32 program treats each argument as one or more addresses, and
33 prints those addresses out in the official 822\-format.  Hence, it is
34 usually best to enclose each argument in double\-quotes for the shell.
35 .PP
36 To override the output format used by
37 .BR ap ,
38 the
39 .B \-format
40 .I string
41 or
42 .B \-format
43 .I file
44 switches are used.  This permits individual fields of
45 the address to be extracted with ease.  The string is simply a format
46 string, and the file is simply a format file.  See
47 .BR mh\-format (5)
48 for the details.
49 .PP
50 In addition to the standard escapes,
51 .B ap
52 also recognizes the following additional escape:
53 .PP
54 .RS 5
55 .fc ^ ~
56 .nf
57 .ta \w'Escape  'u +\w'Returns  'u
58 .I Escape       Returns Description
59 error   string  A diagnostic if the parse failed
60 .RE
61 .fi
62 .PP
63 If the
64 .B \-normalize
65 switch is given,
66 .B ap
67 will try to track down
68 the official hostname of the address.
69 .PP
70 Here is the default format string used by
71 .BR ap :
72 .PP
73 .RS 5
74 %<{error}%{error}: %{text}%|%(putstr(proper{text}))%>
75 .RE
76 .PP
77 which says that if an error was detected, print the error, a `:', and
78 the address in error.  Otherwise, output the 822\-proper format of
79 the address.
80
81 .SH FILES
82 .fc ^ ~
83 .nf
84 .ta \w'/usr/local/nmh/etc/ExtraBigFileName  'u
85 ^$HOME/\&.mh\(ruprofile~^The user profile
86 ^%etcdir%/mts.conf~^nmh mts configuration file
87
88 .SH "PROFILE COMPONENTS"
89 None
90
91 .SH "SEE ALSO"
92 dp(8),
93 .I "Standard for the Format of ARPA Internet Text Messages"
94 (RFC\-822)
95
96 .SH "DEFAULTS"
97 .nf
98 .RB ` \-format "' defaults as described above"
99 .RB ` \-normalize '
100 .RB ` \-width "' defaults to the width of the terminal"
101
102 .SH CONTEXT
103 None
104
105 .SH BUGS
106 The argument to the
107 .B \-format
108 switch must be interpreted as a single token
109 by the shell that invokes
110 .BR ap .
111 Therefore,
112 one must usually place the argument to this switch inside double\-quotes.