glob.3.patch   [plain text]


--- glob.3	2004-11-25 11:38:01.000000000 -0800
+++ glob.3.edit	2006-09-05 14:47:53.000000000 -0700
@@ -46,9 +46,16 @@
 .Sh SYNOPSIS
 .In glob.h
 .Ft int
-.Fn glob "const char *pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t *pglob"
+.Fo glob
+.Fa "const char *restrict pattern"
+.Fa "int flags"
+.Fa "int (*errfunc)(const char *epath, int eerno)"
+.Fa "glob_t *restrict pglob"
+.Fc
 .Ft void
-.Fn globfree "glob_t *pglob"
+.Fo globfree
+.Fa "glob_t *pglob"
+.Fc
 .Sh DESCRIPTION
 The
 .Fn glob
@@ -337,7 +344,7 @@
 On successful completion,
 .Fn glob
 returns zero.
-In addition the fields of
+In addition, the fields of
 .Fa pglob
 contain the values described below:
 .Bl -tag -width GLOB_NOCHECK
@@ -418,6 +425,11 @@
 g.gl_pathv[1] = "-l";
 execvp("ls", g.gl_pathv);
 .Ed
+.Sh CAVEATS
+The
+.Fn glob
+function will not match filenames that begin with a period
+unless this is specifically requested (e.g., by ".*").
 .Sh SEE ALSO
 .Xr sh 1 ,
 .Xr fnmatch 3 ,