diff options
Diffstat (limited to 'libmagic.man')
| -rw-r--r-- | libmagic.man | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/libmagic.man b/libmagic.man index 2f218db2216c..272b8386a30e 100644 --- a/libmagic.man +++ b/libmagic.man @@ -1,4 +1,4 @@ -.\" $File: libmagic.man,v 1.24 2011/05/13 22:11:44 christos Exp $ +.\" $File: libmagic.man,v 1.26 2011/12/19 17:49:31 christos Exp $ .\" .\" Copyright (c) Christos Zoulas 2003. .\" All Rights Reserved. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 14, 2011 +.Dd December 19, 2011 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -52,9 +52,9 @@ .Ft int .Fn magic_errno "magic_t cookie" .Ft const char * -.Fn magic_descriptor "magic_t cookie, "int fd" +.Fn magic_descriptor "magic_t cookie" "int fd" .Ft const char * -.Fn magic_file "magic_t cookie, const char *filename" +.Fn magic_file "magic_t cookie" "const char *filename" .Ft const char * .Fn magic_buffer "magic_t cookie" "const void *buffer" "size_t length" .Ft int @@ -64,6 +64,8 @@ .Ft int .Fn magic_compile "magic_t cookie" "const char *filename" .Ft int +.Fn magic_list "magic_t cookie" "const char *filename" +.Ft int .Fn magic_load "magic_t cookie" "const char *filename" .Sh DESCRIPTION These functions @@ -126,7 +128,7 @@ Don't get extra information on MS Composite Document Files. Don't look inside compressed files. .It Dv MAGIC_NO_CHECK_ELF Don't print ELF details. -.It Dv NO_CHECK_ENCODING +.It Dv MAGIC_NO_CHECK_ENCODING Don't check text encodings. .It Dv MAGIC_NO_CHECK_SOFT Don't consult magic files. @@ -219,6 +221,17 @@ of each file argument with appended to it. .Pp The +.Fn magic_list +function dumps all magic entries in a human readable format, +dumping first the entries that are matched against binary files and then the +ones that match text files. +It takes and optional +.Fa filename +argument which is a colon separated list of database files, or +.Dv NULL +for the default database. +.Pp +The .Fn magic_load function must be used to load the the colon separated list of database files passed in as @@ -243,15 +256,17 @@ It will set errno to .Er EINVAL if an unsupported value for flags was given. The +.Fn magic_list , .Fn magic_load , .Fn magic_compile , and .Fn magic_check functions return 0 on success and \-1 on failure. The -.Fn magic_file , +.Fn magic_buffer , +.Fn magic_getpath , and -.Fn magic_buffer +.Fn magic_file , functions return a string on success and .Dv NULL on failure. |
