file identification using libmagic

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

file identification using libmagic

Marc Santhoff-2
Hi,

I have made a header port of libmagic which is used by the file(1)
command to identify the type of files. Usage examples are availble, too.

Since it could be of general interest, I'm posting it here. Test it,
stick it in LCCR or whatever.

Have fun,
Marc


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

libmagic.pp (6K) Download Attachment
libmagictest1.lpr (1K) Download Attachment
libmagictest2.lpr (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: file identification using libmagic

José Mejuto
El 14/12/2016 a las 19:53, Marc Santhoff escribió:
> Hi,
>
> I have made a header port of libmagic which is used by the file(1)
> command to identify the type of files. Usage examples are availble, too.

Hello,

Just a note, I was using magic.dll for Windows a few years ago and I was
being forced to use dynamic loading as my code must process thousands of
streams/files and in magic_close the dll left an allocated memory block
and the only way to remove it was unloading the DLL.

--

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: file identification using libmagic

Michael Van Canneyt
In reply to this post by Marc Santhoff-2

I will add it to the FPC packages.

Michael.

On Wed, 14 Dec 2016, Marc Santhoff wrote:

> Hi,
>
> I have made a header port of libmagic which is used by the file(1)
> command to identify the type of files. Usage examples are availble, too.
>
> Since it could be of general interest, I'm posting it here. Test it,
> stick it in LCCR or whatever.
>
> Have fun,
> Marc
>
>
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal