diff options
author | Christos Zoulas <christos@zoulas.com> | 2013-01-06 20:56:52 +0000 |
---|---|---|
committer | Christos Zoulas <christos@zoulas.com> | 2013-01-06 20:56:52 +0000 |
commit | 0d83f6fea3159ea0d010361a0043e47281105b4e (patch) | |
tree | 244503fcf27b76013ae968ba3db046e3e25639d8 /doc | |
parent | eb2bc96a82e8e1b7618abae6ed4b3b7e25abefff (diff) | |
download | file-git-0d83f6fea3159ea0d010361a0043e47281105b4e.tar.gz |
document magic_version
Diffstat (limited to 'doc')
-rw-r--r-- | doc/libmagic.man | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/doc/libmagic.man b/doc/libmagic.man index 6c1f3372..c5f6bdb0 100644 --- a/doc/libmagic.man +++ b/doc/libmagic.man @@ -1,4 +1,4 @@ -.\" $File: libmagic.man,v 1.25 2011/11/10 13:42:09 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 December 19, 2011 +.Dd January 6, 2012 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -37,7 +37,9 @@ .Nm magic_setflags , .Nm magic_check , .Nm magic_compile , -.Nm magic_load +.Nm magic_list , +.Nm magic_load , +.Nm magic_version .Nd Magic number recognition library .Sh LIBRARY .Lb libmagic @@ -67,6 +69,8 @@ .Fn magic_list "magic_t cookie" "const char *filename" .Ft int .Fn magic_load "magic_t cookie" "const char *filename" +.Ft int +.Fn magic_version "void" .Sh DESCRIPTION These functions operate on the magic database file @@ -246,6 +250,16 @@ 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_version +command returns the version number of this library which is compiled into +the shared library using the constant +.Dv MAGIC_VERSION +from +.In magic.h . +This can be used by client programs to verify that the version they compile +against is the same as the version that they run against. .Sh RETURN VALUES The function .Fn magic_open @@ -276,6 +290,9 @@ function returns a textual description of the errors of the above functions, or .Dv NULL if there was no error. +The +.Fn magic_version +always returns the version number of the library. Finally, .Fn magic_setflags returns \-1 on systems that don't support |