1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- Subject: Document changes
- Upstream-Author: Christos Zoulas <christos@zoulas.com>
- Date: Thu Nov 27 16:15:06 2014 +0000
- Origin: FILE5_20-35-g5063ca3
- Last-Update: 2015-01-05
- diff --git a/doc/file.man b/doc/file.man
- index b8f7e84..f6c91e7 100644
- --- a/doc/file.man
- +++ b/doc/file.man
- @@ -16,6 +16,7 @@
- .Op Fl F Ar separator
- .Op Fl f Ar namefile
- .Op Fl m Ar magicfiles
- +.Op Fl R Ar maxrecursion
- .Ar
- .Ek
- .Nm
- @@ -295,6 +296,11 @@ Don't translate unprintable characters to \eooo.
- Normally
- .Nm
- translates unprintable characters to their octal representation.
- +.It Fl R , Fl Fl recursion Ar maxlevel
- +Set the maximum recursion level for indirect type magic or name/use entry
- +invocations.
- +The default is
- +.Dv 15 .
- .It Fl s , Fl Fl special-files
- Normally,
- .Nm
- diff --git a/doc/libmagic.man b/doc/libmagic.man
- index 272b838..0a2ed9a 100644
- --- a/doc/libmagic.man
- +++ b/doc/libmagic.man
- @@ -37,7 +37,8 @@
- .Nm magic_setflags ,
- .Nm magic_check ,
- .Nm magic_compile ,
- -.Nm magic_load
- +.Nm magic_setparam ,
- +.Nm magic_getparam ,
- .Nd Magic number recognition library
- .Sh LIBRARY
- .Lb libmagic
- @@ -67,6 +68,10 @@
- .Fn magic_list "magic_t cookie" "const char *filename"
- .Ft int
- .Fn magic_load "magic_t cookie" "const char *filename"
- +.Ft int
- +.Fn magic_getparam "magic_t cookie" "int param" "void *value"
- +.Ft int
- +.Fn magic_setparam "magic_t cookie" "int param" "const void *value"
- .Sh DESCRIPTION
- These functions
- operate on the magic database file
- @@ -246,6 +251,21 @@ If that variable is not set, the default database file name is __MAGIC__.
- adds
- .Dq .mgc
- to the database filename as appropriate.
- +.Pp
- +The
- +.Fn magic_getparam
- +and
- +.Fn magic_setparam
- +allow getting and setting various limits related to the the magic
- +library.
- +.Bl -column "MAGIC_PARAM_MAX_RECURSION" "size_t" "Default" -offset indent
- +.It Sy "Parameter" Ta Sy "Type" Ta Sy "Default
- +.It Li MAGIC_PARAM_MAX_RECURSION Ta size_t Ta 15
- +.El
- +The
- +.Dv MAGIC_PARAM_MAX_RECURSION
- +parameter controls how many levels of recursion will be followed for
- +indirect magic entries or for name/use calls.
- .Sh RETURN VALUES
- The function
- .Fn magic_open
|