• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

The MinGW.org Windows System Libraries


Commit MetaInfo

修訂45437ae46ecd1f4f82758b394771420ddca71062 (tree)
時間2020-04-12 04:58:43
作者Keith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

Manpage stylistic consistency updates.

Change Summary

差異

--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,10 @@
1+2020-04-11 Keith Marshall <keith@users.osdn.me>
2+
3+ Manpage stylistic consistency updates.
4+
5+ * man/dirname.3.man man/getline.3.man: Miscellaneous stylistic
6+ formatting changes.
7+
18 2020-04-08 Keith Marshall <keith@users.osdn.me>
29
310 Ensure PDF manpages are generated from local sources.
--- a/mingwrt/man/dirname.3.man
+++ b/mingwrt/man/dirname.3.man
@@ -1,6 +1,6 @@
11 '\" t
22 .\" vim: ft=nroff
3-.TH %PAGEREF% MinGW "Programmer's Reference Manual"
3+.TH %PAGEREF% MinGW "MinGW Programmer's Reference Manual"
44 .
55 .SH NAME
66 .
@@ -48,16 +48,16 @@ Additionally,
4848 if the
4949 .I second
5050 character of
51-.I path
51+.I \%path
5252 is a colon
5353 .RB (\(dq : \(dq),
5454 the first two characters of
55-.I path
55+.I \%path
5656 are interpreted as an MS\-Windows drive designator,
5757 which will be included in the
5858 .B directory name
5959 component of
60-.IR path ,
60+.IR \%path ,
6161 but is never considered to form part of the
6262 .B file name
6363 component.
@@ -66,13 +66,13 @@ component.
6666 In normal usage,
6767 .BR \%dirname ()
6868 returns a pointer to a string representing the path name component of
69-.IR path ,
69+.IR \%path ,
7070 up to but not including the rightmost directory separator,
7171 while
7272 .BR \%basename ()
7373 returns a pointer to the component following this separator.
7474 Any trailing directory separators present in
75-.I path
75+.I \%path
7676 are disregarded,
7777 when determining the rightmost separator,
7878 and, in the case of the return value from
@@ -82,7 +82,7 @@ are each reduced to a single such character.
8282 .
8383 .PP
8484 If
85-.I path
85+.I \%path
8686 contains no MS\-Windows drive designator,
8787 and no directory separator character,
8888 then
@@ -92,9 +92,9 @@ returns the string
9292 and
9393 .BR \%basename ()
9494 returns a copy of
95-.IR path.
95+.IR \%path.
9696 If
97-.I path
97+.I \%path
9898 does commence with an MS\-Windows drive designator,
9999 but contains no directory separators,
100100 then
@@ -107,14 +107,14 @@ represents the drive designator,
107107 while
108108 .BR \%basename ()
109109 returns a copy of
110-.IR path ,
110+.IR \%path ,
111111 with its initial two characters,
112112 (i.e.\ the drive designator),
113113 deleted.
114114 .
115115 .PP
116116 If
117-.I path
117+.I \%path
118118 is a NULL pointer,
119119 or is a pointer to an empty string,
120120 then both
@@ -126,7 +126,7 @@ return the string
126126 .
127127 .PP
128128 If
129-.I path
129+.I \%path
130130 is the string
131131 .RB \(dq / \(dq,
132132 or the string
@@ -143,7 +143,7 @@ respectively.
143143 .
144144 .PP
145145 If
146-.I path
146+.I \%path
147147 commences with
148148 .I exactly
149149 two directory separator characters,
@@ -156,13 +156,13 @@ This construct does not affect the string returned by
156156 neither is this behaviour replicated by
157157 .BR \%dirname (),
158158 if
159-.I path
159+.I \%path
160160 includes an MS\-Windows drive designator.
161161 .
162162 .PP
163163 In the special case,
164164 where
165-.I path
165+.I \%path
166166 is specified as
167167 .I exactly
168168 two identical directory separator characters,
@@ -170,7 +170,7 @@ with no MS\-Windows drive designator,
170170 and no following path name,
171171 .BR \%dirname ()
172172 returns
173-.I path
173+.I \%path
174174 unchanged;
175175 .BR \%basename ()
176176 normalises the return string to only a single character,
@@ -179,7 +179,7 @@ either
179179 or
180180 .RB \(dq \e \(dq,
181181 matching the characters used to specify
182-.IR path .
182+.IR \%path .
183183 .
184184 .PP
185185 Concatenating the string returned by
@@ -222,7 +222,7 @@ the test program defines the following function:\(em
222222 .
223223 .PP
224224 .RS
225-.nf
225+.EX
226226 #include <stdio.h>
227227 #include <string.h>
228228 #include <libgen.h>
@@ -238,7 +238,7 @@ void result( char *path )
238238 free( dir );
239239 free( file );
240240 }
241-.fi
241+.EE
242242 .RE
243243 .PP
244244 This illustrates the correct use of the
@@ -247,14 +247,14 @@ and the
247247 .BR \%basename ()
248248 functions,
249249 with copies of the original
250-.I path
250+.I \%path
251251 string being passed in the function calls.
252252 Note that the return values from each function are used immediately,
253253 in the
254-.BR printf ()
254+.BR \%printf ()
255255 call,
256256 and the temporary copies of
257-.I path
257+.I \%path
258258 are discarded,
259259 and the associated memory is freed,
260260 before these go out of scope.
@@ -373,7 +373,7 @@ The
373373 .BR \%dirname ()
374374 function returns a pointer to a null terminated string,
375375 which represents the directory path component of the passed
376-.I path
376+.I \%path
377377 string,
378378 without any trailing directory separator character,
379379 and with all internal sequences of directory separator characters
@@ -385,13 +385,13 @@ The
385385 function
386386 returns a pointer to a null terminated string,
387387 which represents the rightmost element of the passed
388-.I path
388+.I \%path
389389 string,
390390 with all trailing directory separator characters removed.
391391 .
392392 .PP
393393 If any MS\-Windows drive designator is specified in the input
394-.I path
394+.I \%path
395395 string,
396396 it is included in the return value of the
397397 .BR \%dirname ()
@@ -413,10 +413,10 @@ The
413413 and
414414 .BR \%basename ()
415415 functions may modify the
416-.I path
416+.I \%path
417417 string passed to them.
418418 Therefore, it is an error to pass a character constant as the
419-.I path
419+.I \%path
420420 parameter;
421421 to do so may result in memory violation errors,
422422 (segmentation faults),
@@ -424,14 +424,14 @@ and consequent abnormal program termination.
424424 .PP
425425 Also note that,
426426 since the
427-.I path
427+.I \%path
428428 argument may be modified by the
429429 .BR \%dirname ()
430430 or the
431431 .BR \%basename ()
432432 function call,
433433 if you wish to preserve the original content of
434-.IR path ,
434+.IR \%path ,
435435 you should pass a copy to the function.
436436 Furthermore,
437437 either function may return its result in a statically allocated buffer,
@@ -443,13 +443,13 @@ and
443443 .BR \%basename ()
444444 functions parse path name strings,
445445 they are basically just
446-.I string
446+.I \%string
447447 functions.
448448 The presence of an MS\-Windows drive designator is determined
449449 by the appearance of a colon
450450 .RB (\(dq : \(dq)
451451 as the second character of the
452-.I path
452+.I \%path
453453 string,
454454 but neither function performs any check
455455 to ensure that the first character represents a valid file system device;
@@ -461,7 +461,8 @@ represents a valid path name.
461461 .SH AUTHOR
462462 .
463463 This manpage was written by \%Keith\ Marshall,
464-\%<keithmarshall@users.sourceforge.net>, to document the
464+\%<keith@users.osdn.me>,
465+to document the
465466 .BR \%basename ()
466467 and
467468 .BR \%dirname ()
@@ -469,7 +470,7 @@ functions as they have been implemented for the MinGW.org Project.
469470 It may be copied, modified and redistributed,
470471 without restriction of copyright,
471472 provided this acknowledgement of contribution by
472-the original author remains unchanged.
473+the original author remains in place.
473474 .
474475 .
475476 .\" EOF
--- a/mingwrt/man/getline.3.man
+++ b/mingwrt/man/getline.3.man
@@ -1,5 +1,5 @@
11 .\" vim: ft=nroff
2-.TH %PAGEREF% MinGW "Programmer's Reference Manual"
2+.TH %PAGEREF% MinGW "MinGW Programmer's Reference Manual"
33 .
44 .SH NAME
55 .BR getline ,\0 getdelim
@@ -28,8 +28,7 @@
2828 .BI * stream
2929 .B );
3030 .
31-.PP
32-.in -4n
31+.IP \& -4n
3332 Feature Test Macro Requirements for libmingwex:
3433 .TP 4
3534 .BR getdelim (),\~ getline ():
@@ -41,52 +40,52 @@ Available since libmingwex version 3.22:
4140 .
4241 .SH DESCRIPTION
4342 The
44-.BR getdelim ()
43+.BR \%getdelim ()
4544 function reads data from
46-.IR stream ,
45+.IR \%stream ,
4746 until either a character entity matching
48-.IR delim ,
47+.IR \%delim ,
4948 or
5049 .I EOF
5150 is encountered;
5251 the data so read,
5352 including the
54-.I delim
53+.I \%delim
5554 character if present,
5655 is stored into the buffer referenced by the pointer at
5756 .B *\c
58-.IR linebuf ,
57+.IR \%linebuf ,
5958 and is
6059 .I NUL
6160 terminated.
6261 .PP
6362 The
64-.BR getline ()
63+.BR \%getline ()
6564 function is a special case of
66-.BR getdelim (),
65+.BR \%getdelim (),
6766 with the
68-.I delim
67+.I \%delim
6968 argument implicitly specified as the POSIX newline character,
7069 .IR '\en' .
7170 .
7271 .PP
7372 The
74-.I linebuf
73+.I \%linebuf
7574 argument must be a reference to a pointer which is safe to pass to
76-.BR free ();
75+.BR \%free ();
7776 either a
78-.I NULL
77+.I \%NULL
7978 pointer,
8079 or a pointer to a buffer of size as indicated by
8180 .B *\c
8281 .IR n ,
8382 allocated by
84-.BR malloc ().
83+.BR \%malloc ().
8584 Passing a value of
86-.I NULL
85+.I \%NULL
8786 in
8887 .B *\c
89-.IR linebuf ,
88+.IR \%linebuf ,
9089 with a value of zero in
9190 .B *\c
9291 .IR n ,
@@ -96,7 +95,7 @@ of a default buffer.
9695 .
9796 .PP
9897 The
99-.I delim
98+.I \%delim
10099 argument is specified as an
101100 .BR int ;
102101 it must be passed a value which is representable as an
@@ -108,21 +107,21 @@ otherwise the behaviour is undefined.
108107 If
109108 .BI * linebuf
110109 is initially passed as a
111-.I NULL
110+.I \%NULL
112111 pointer,
113112 then
114-.BR getdelim ()
113+.BR \%getdelim ()
115114 or
116-.BR getline ()
115+.BR \%getline ()
117116 will call
118-.BR malloc (),
117+.BR \%malloc (),
119118 in an attempt to allocate
120119 .BI * n
121120 bytes,
122121 or an arbitrarily sized smaller default buffer,
123122 if such an allocation is not achievable.
124123 In either case,
125-.BI * linebuf
124+.BI \%* linebuf
126125 and
127126 .BI * n
128127 will be updated to reflect the allocated buffer location,
@@ -132,11 +131,11 @@ and the actual size allocated.
132131 If,
133132 at any time during collection of the input record,
134133 the buffer referenced by
135-.BI * linebuf
134+.BI \%* linebuf
136135 becomes too small to store the record,
137136 it will be expanded as necessary,
138137 and both
139-.BI * linebuf
138+.BI \%* linebuf
140139 and
141140 .BI * n
142141 will be adjusted to reflect the change in allocation.
@@ -145,14 +144,14 @@ will be adjusted to reflect the change in allocation.
145144 .SH RETURN VALUE
146145 .
147146 On successful completion,
148-.BR getline ()
147+.BR \%getline ()
149148 and
150-.BR getdelim ()
149+.BR \%getdelim ()
151150 return the number of characters stored into the buffer at
152151 .B *\c
153-.IR linebuf ,
152+.IR \%linebuf ,
154153 including the
155-.I delim
154+.I \%delim
156155 character if this was encountered before
157156 .IR EOF ,
158157 but excluding the terminating
@@ -162,22 +161,22 @@ character.
162161 .PP
163162 If no characters were read,
164163 and
165-.I stream
164+.I \%stream
166165 is at end-of-file,
167-.BR getline ()
166+.BR \%getline ()
168167 and
169-.BR getdelim ()
168+.BR \%getdelim ()
170169 return \(mi1,
171170 and the end-of-file indicator is set for
172-.IR stream .
171+.IR \%stream .
173172 .
174173 .PP
175174 If an error occurs,
176-.BR getline ()
175+.BR \%getline ()
177176 and
178-.BR getdelim ()
177+.BR \%getdelim ()
179178 set
180-.IR errno ,
179+.IR \%errno ,
181180 as indicated under the heading
182181 .B ERROR CONDITIONS
183182 below,
@@ -186,95 +185,100 @@ and return \(mi1.
186185 .
187186 .SH ERROR CONDITIONS
188187 .
189-.BR getline ()
188+.BR \%getline ()
190189 and
191-.BR getdelim
190+.BR \%getdelim
192191 may fail for any of the reasons described as failure conditions for
193-.BR fgetc ();
192+.BR \%fgetc ();
194193 when any such error occurs,
195-.I errno
194+.I \%errno
196195 is left as set by
197-.BR fgetc (),
196+.BR \%fgetc (),
198197 and
199-.BR getline ()
198+.BR \%getline ()
200199 or
201-.BR getdelim ()
200+.BR \%getdelim ()
202201 returns \(mi1.
203202 .
204203 .PP
205204 In addition to
206-.BR fgetc ()
205+.BR \%fgetc ()
207206 failure conditions,
208-.BR getline ()
207+.BR \%getline ()
209208 and
210-.BR getdelim ()
209+.BR \%getdelim ()
211210 may fail,
212211 returning \(mi1 after setting
213-.I errno
212+.I \%errno
214213 to indicate occurrence of any of the following errors:
215214 .
216215 .RS 4
217216 .TP 10
218-.B EINVAL
219-.I linebuf
217+.B \%EINVAL
218+.I \%linebuf
220219 or
221220 .I n
222221 is
223-.IR NULL .
222+.IR \%NULL .
224223 .
225224 .TP 10
226225 .B EBADF
227-.I stream
226+.I \%stream
228227 is a
229-.I NULL
228+.I \%NULL
230229 pointer,
231230 or otherwise is not a valid stream opened for reading,
232231 as determined by
233-.BR fgetc ().
232+.BR \%fgetc ().
234233 .
235234 .TP 10
236235 .B ENOMEM
237236 An attempt to allocate a buffer,
238237 or to expand the buffer referenced by
239238 .B *
240-.IR linebuf ,
239+.IR \%linebuf ,
241240 was unsuccessful.
242241 .
243242 .TP 10
244243 .B ERANGE
245244 More than
246-.B SSIZE_MAX
245+.B \%SSIZE_MAX
247246 characters were read,
248247 without finding
249-.IR delim .
250-(Note that POSIX specifies that
248+.IR \%delim .
249+(Note that
250+.B \%POSIX.1
251+specifies that
251252 .I errno
252253 should be set to
253-.B EOVERFLOW
254+.B \%EOVERFLOW
254255 for this error condition;
255256 see heading
256257 .B CAVEATS AND BUGS
257258 below,
258259 for the rationale for the use of
259-.B ERANGE
260+.B \%ERANGE
260261 in this implementation).
261262 .RE
262263 .
263264 .
264-.SH CONFORMING TO
265+.SH STANDARDS CONFORMANCE
265266 .
266267 Originally implemented as GNU extension functions,
267268 both
268-.BR getline ()
269+.BR \%getline ()
269270 and
270-.BR getdelim ()
271-were adopted into POSIX.1-2008;
272-implementations conforming to this POSIX standard have been
273-integrated into libmingwex from version 3.22 onwards.
271+.BR \%getdelim ()
272+were adopted into
273+.BR \%POSIX.1\(hy2008 ;
274+implementations conforming to this
275+.B \%POSIX.1
276+standard have been integrated into libmingwex
277+from version 3.22 onwards.
274278 .
275279 .
276280 .SH EXAMPLE
277-.nf
281+.EX
278282 #include <stdio.h>
279283 #include <stdlib.h>
280284
@@ -297,62 +301,63 @@ int main ()
297301 fclose (fp);
298302 return 0;
299303 }
300-.fi
304+.EE
301305 .
302306 .
303307 .SH CAVEATS AND BUGS
304308 .
305309 A return value of \(mi1 may indicate that
306-.I stream
310+.I \%stream
307311 is already at end-of-file when
308-.BR getline ()
312+.BR \%getline ()
309313 or
310-.BR getdelim ()
314+.BR \%getdelim ()
311315 is called,
312316 or it may indicate an error condition;
313317 use
314-.BR ferror ()
318+.BR \%ferror ()
315319 or
316-.BR feof ()
320+.BR \%feof ()
317321 to distinguish error and end-of-file conditions.
318322 .
319323 .PP
320324 The return type of
321-.I ssize_t
325+.I \%ssize_t
322326 can accommodate a maximum character count of
323-.BR SSIZE_MAX ,
327+.BR \%SSIZE_MAX ,
324328 and thus,
325329 the return value will overflow if
326-.BR getline ()
330+.BR \%getline ()
327331 or
328-.BR getdelim ()
332+.BR \%getdelim ()
329333 reads
330-.B SSIZE_MAX
334+.B \%SSIZE_MAX
331335 characters without encountering a line delimiter;
332336 for this overflow condition,
333-POSIX.1-2008 stipulates an
337+.B \%POSIX.1\(hy2008
338+stipulates an
334339 .I errno
335340 condition code of
336-.B EOVERFLOW .
341+.B \%EOVERFLOW .
337342 However,
338343 MSVCRT.DLL provides no significant interpretation for
339344 an arbitrarily assigned
340-.B EOVERFLOW
341-.I errno
345+.B \%EOVERFLOW
346+.I \%errno
342347 code.
343348 Thus,
344349 this implementation of
345-.BR getline ()
350+.BR \%getline ()
346351 and
347-.BR getdelim ()
352+.BR \%getdelim ()
348353 substitutes the semantically similar,
349354 (but not semantically identical),
350-.B ERANGE
351-.I errno
355+.B \%ERANGE
356+.I \%errno
352357 code for
353-.BR EOVERFLOW ,
358+.BR \%EOVERFLOW ,
354359 to ensure that MSVCRT.DLL's
355-.BR strerror ()
360+.BR \%strerror ()
356361 can return an acceptable description for this error condition.
357362 .
358363 .
@@ -361,20 +366,21 @@ can return an acceptable description for this error condition.
361366 Please refer to Microsoft's documentation,
362367 on MSDN,
363368 for standard I/O streams,
364-.BR fgetc (),
365-.BR ferror (),
366-.BR feof (),
367-.BR malloc (),
368-.BR free (),
369-.BR strerror (),
369+.BR \%fgetc (),
370+.BR \%ferror (),
371+.BR \%feof (),
372+.BR \%malloc (),
373+.BR \%free (),
374+.BR \%strerror (),
370375 and
371-.BR errno .
376+.BR \%errno .
372377 .
373378 .
374379 .SH AUTHOR
375380 .
376381 This manpage was written by \%Keith\ Marshall,
377-\%<keithmarshall@users.sourceforge.net>, to document the
382+\%<keith@users.osdn.me>,
383+to document the
378384 .BR \%getline ()
379385 and
380386 .BR \%getdelim ()
@@ -382,6 +388,6 @@ functions as they have been implemented for the MinGW.org Project.
382388 It may be copied, modified and redistributed,
383389 without restriction of copyright,
384390 provided this acknowledgement of contribution by
385-the original author remains unchanged.
391+the original author remains in place.
386392 .
387393 .\" EOF