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