diff options
author | Christos Zoulas <christos@zoulas.com> | 2011-12-19 17:49:31 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2011-12-19 17:49:31 +0000 |
commit | 857cd33bc1c8622009eafaa214acae62d8a950da (patch) | |
tree | 8cd4db645438c1880b5f0788722a744476912223 /doc | |
parent | 94664f47436e38283222333fd99fee113369a02f (diff) | |
download | file-git-857cd33bc1c8622009eafaa214acae62d8a950da.tar.gz |
Fix markup typos and document magic_list.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/libmagic.man | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/doc/libmagic.man b/doc/libmagic.man index 86847859..6c1f3372 100644 --- a/doc/libmagic.man +++ b/doc/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.25 2011/11/10 13:42:09 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 @@ -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. |