Commit Graph

39 Commits

Author SHA1 Message Date
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Andrey A. Chernov
869eb80c16 Both C99 and POSIX directly prohibits any standard function to set errno
to 0. Breaking this rule in 2001 NetBSD hack was imported which attempts
to workaround very limited glob() return codes amount. Use POSIX-compatible
workaround now with E2BIG which can't comes from other functions used
instead of prohibited 0.
2016-07-31 01:14:06 +00:00
Andrey A. Chernov
196d61a92b 1) Add all characters from ~ expansion as protected to be not interpreted
as pattern meta chars.

2) GLOB_ERR and gl_errfunc are supposed to work only for real directories
per POSIX, so don't act on missing or plain files, for ENOENT or ENOTDIR
(as TODO in the code suggested).

3) Remove the hack in the manpage describing how to skip ENOENT and ENOTDIR
in gl_errfunc, it is unneeded now.

4) Set errno to ENAMETOOLONG if g_Ctoc() expansion fails in g_opendir(),
as in other places in the code which are wrappers around system functions.
2016-07-18 18:24:31 +00:00
Andrey A. Chernov
1cecacfe73 Reflect pathnames sorting in collation order. 2016-07-17 13:10:57 +00:00
Eitan Adler
0d6d372c03 - Add restrict keyword to glob(3)
PR:		kern/161958
Submitted by:	Henning Petersen <henning.petersen@t-online.de>
Approved by:	jilles
MFC after:	3 days
2011-12-20 22:56:13 +00:00
Ed Schouten
ed65ee524d Don't forget to bump man page date for r218711. 2011-02-15 20:07:35 +00:00
Ed Schouten
b6c3206f30 Remove dead reference to regexp(3). Use regex(3) instead.
PR:		docs/149950
Submitted by:	arundel@
2011-02-15 20:04:13 +00:00
Warner Losh
c879ae3536 Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.
2007-01-09 00:28:16 +00:00
Andrey A. Chernov
4151a8cb14 Reflect int -> size_t changes in glob.h 2006-05-22 06:53:35 +00:00
Tim J. Robbins
b37ff7a592 Septepber -> September
Noticed by:	ru
2004-09-01 23:28:27 +00:00
Tim J. Robbins
e6e1974ba5 Back out the previous change. glob() still does use strcmp() to order
pathnames.
2004-09-01 11:02:55 +00:00
Tim J. Robbins
9777e82e42 Update documentation to match reality: glob() sorts its result according
to the current LC_COLLATE setting, not in "ASCII order".

PR:		54391
MFC after:	1 week
2004-08-23 12:10:44 +00:00
Tim J. Robbins
9a9aa3ffa1 Add a paragraph break in the STANDARDS section to improve readability. 2004-07-29 03:41:24 +00:00
Tim J. Robbins
ad3d799334 Remove claim of conformance to IEEE Std. 1003.2. Replace it with a list
of features required by the standard that the current implementation
does not support.

PR:	57911 (related)
2004-07-18 10:11:27 +00:00
Ruslan Ermilov
743d5d518c mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
Ruslan Ermilov
fe08efe680 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
Mike Heffner
5a63c107db Grammer fix. 2003-02-04 16:28:04 +00:00
Ruslan Ermilov
2efeeba554 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
Mike Heffner
4a59c3ab55 Update glob(3) to add all the POSIX required options, specifically:
- add GLOB_NOMATCH return value and use it when we don't get a match
- rename GLOB_ABEND to GLOB_ABORTED and use it instead of returning 1
  in some places
- add GLOB_NOESCAPE flag and retire GLOB_QUOTE to compatibility
  section

Suggestions/advice on correct usage of POSIX defines: wollman
2002-07-17 04:58:09 +00:00
Ruslan Ermilov
32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Mike Heffner
785ead5062 typo: patched->matched 2001-08-09 00:34:57 +00:00
Ruslan Ermilov
f61004566c mdoc(7) police: markup nits. 2001-08-07 12:17:32 +00:00
Mike Heffner
75dc5f1a82 Rename the GLOB_MAXPATH flag of glob(3) to GLOB_LIMIT to be compatible
with NetBSD and OpenBSD. glob(3) will now return GLOB_NOSPACE with
errno set to 0 instead of GLOB_LIMIT when we match more than `gl_matchc'
patterns. GLOB_MAXPATH has been left as an alias of GLOB_LIMIT to
maintain backwards compatibility.

Reviewed by:	sheldonh, assar
Obtained from:	NetBSD/OpenBSD
2001-07-29 00:52:37 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Jonathan Lemon
bae8632f82 Introduce the GLOB_MAXPATH flag, which allows the user to limit the
number of paths which glob(3) will return.  Remove the hardcoded limit
from the last commit, which restores the previous unbounded behavior.

Document the new flag in the manual page.
2001-03-19 19:10:06 +00:00
Ruslan Ermilov
bcdf5ca7c6 Prepare for mdocNG. 2001-02-26 09:05:48 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Ruslan Ermilov
4263595653 Prepare for mdoc(7)NG. 2000-12-29 14:08:20 +00:00
Ruslan Ermilov
c23155a43a mdoc(7) police: Er macro usage cleanup. 2000-11-22 16:02:00 +00:00
Jeroen Ruigrok van der Werven
5714e85318 Whitespace only change: trim trailing whitespace. 2000-10-30 13:23:19 +00:00
Alexey Zelkin
95010bdc53 Use suggested by mdoc(7) style section name (ERROR -> ERRORS) 2000-05-06 12:02:18 +00:00
Alexey Zelkin
25bb73e063 Introduce ".Lb" macro to libc manpages.
More libraries manpages updates following.
2000-04-21 09:42:15 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Nik Clayton
fbc400a67a Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

     .\"    $Id$
     .\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by:            bde
1999-07-12 20:50:10 +00:00
Bruce Evans
08398af376 Fixed #include and/or prototype bugs in synopsis. 1997-04-13 13:16:20 +00:00
Mike Pritchard
7bdf80e571 Correctly use .Fn instead of .Nm to reference function names
in a bunch of man pages.

Use the correct .Bx  (BSD UNIX) or .At (AT&T UNIX) macros
instead of explicitly specifying the version in the text
in a bunch of man pages.
1996-08-22 23:31:07 +00:00
Mike Pritchard
edf0e5b3f8 Correct some man page xrefs, and some other minor changes to bring some
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.
1996-04-08 04:18:31 +00:00
Mike Pritchard
064f007493 Added missing section numbers to a bunch of .Xr macros, or
converted them into .Fn macros where appropriate.  Also fixed
up some minor formatting problems.
1996-03-27 20:49:07 +00:00
Rodney W. Grimes
58f0484fa2 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00