This is magic.egg.info, produced by makeinfo version 4.7 from
eggdoc-output.texi.

INFO-DIR-SECTION The Algorithmic Language Scheme
START-INFO-DIR-ENTRY
* magic.egg: (magic.egg).		Identifies file types
END-INFO-DIR-ENTRY


File: magic.egg.info,  Node: Top,  Next: About this egg,  Up: (dir)

magic egg
*********

Identifies file types

Written by Peter Busser

   This manual corresponds to version 1.0 of the magic extension
library for Chicken Scheme.

* Menu:

* About this egg::
* Documentation::
* Examples::
* License::
* Index::


File: magic.egg.info,  Node: About this egg,  Next: Documentation,  Prev: Top,  Up: Top

1 About this egg
****************

* Menu:

* Version history::
* Usage::


File: magic.egg.info,  Node: Version history,  Next: Usage,  Up: About this egg

1.1 Version history
===================

`1.0'
     Initial release


File: magic.egg.info,  Node: Usage,  Prev: Version history,  Up: About this egg

1.2 Usage
=========

Load this egg like so:

   `(require-extension magic)'


File: magic.egg.info,  Node: Documentation,  Next: Examples,  Prev: About this egg,  Up: Top

2 Documentation
***************

These functions operate on the magic database file which is described
in magic(5).  For more information, consult the libmagic(3) manual page.

* Menu:

* Procedures::
* Flags::


File: magic.egg.info,  Node: Procedures,  Next: Flags,  Up: Documentation

2.1 Procedures
==============


(magic-open FLAGS) -> MAGIC-T
(magic-load MAGIC-T FILENAME)
(magic-error MAGIC-T) -> STRING
(magic-file MAGIC-T FILENAME) -> STRING
(magic-close MAGIC-T)
(magic-setflags MAGIC-T FLAGS)
(magic-errno MAGIC-T) -> INT


File: magic.egg.info,  Node: Flags,  Prev: Procedures,  Up: Documentation

2.2 Flags
=========


MAGIC_NONE
MAGIC_DEBUG
MAGIC_SYMLINK
MAGIC_COMPRESS
MAGIC_DEVICES
MAGIC_MIME
MAGIC_CONTINUE
MAGIC_CHECK
MAGIC_PRESERVE_ATIME
MAGIC_RAW
MAGIC_ERROR


File: magic.egg.info,  Node: Examples,  Next: License,  Prev: Documentation,  Up: Top

3 Examples
**********


(display "load extension") (newline)
(require-extension magic)

(display "create cookie") (newline)
(define cookie (magic-open (+ MAGIC_MIME MAGIC_SYMLINK)))

(display "open the file") (newline)
(magic-load cookie #f)

(display "test file") (newline)
(display (magic-file cookie "/bin/ls")) (newline)

(display "close") (newline)
(magic-close cookie)


File: magic.egg.info,  Node: License,  Next: Index,  Prev: Examples,  Up: Top

4 License
*********


Copyright (c) 2005, Peter Busser
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:

  Redistributions of source code must retain the above copyright notice, this list of conditions and the following
    disclaimer.
  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
    disclaimer in the documentation and/or other materials provided with the distribution.
  Neither the name of the author nor the names of its contributors may be used to endorse or promote
    products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.


File: magic.egg.info,  Node: Index,  Prev: License,  Up: Top

Index
*****

 [index ]
* Menu:


Tag Table:
Node: Top222
Node: About this egg538
Node: Version history704
Node: Usage856
Node: Documentation1016
Node: Procedures1324
Node: Flags1648
Node: Examples1895
Node: License2360
Node: Index3945

End Tag Table
