Reducing external/bsd/file differences

Change-Id: I0d025059ba0b200ac1162ea5a764fd756600ecd0
This commit is contained in:
2013-04-12 13:25:18 +02:00
parent c979136e4e
commit 08ff44c446
67 changed files with 1177 additions and 734 deletions
+20 -5
View File
@@ -1,6 +1,6 @@
.\" $NetBSD: libmagic.3,v 1.9 2011/11/10 13:41:00 christos Exp $
.\" $NetBSD: libmagic.3,v 1.10 2012/02/22 17:53:50 christos Exp $
.\"
.\" $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.
@@ -27,7 +27,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
@@ -66,6 +66,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
@@ -221,6 +223,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
@@ -246,15 +259,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.