Magic Numbers

JamesBowen

19+ years progress programming and still learning.
Hi.

One thing I like to do is "reinvent the wheel", in a figure of speech. I like to take exciting tools from linux and try an make light portable cross platform equivalent tool into Progress.

For example since the introduction of Hex, md5, sh1 functions into OPENEDGE I have created a very fast robust HASH MAC algorithm. Now I don't don't need to shell out to the OS and run C code, also performance has been increased.

OK. What the heck I am talking about. Well Linux has a nice command line tool called "file". I far as I can see it uses a magic number file which it uses to interrogates a select file and returns back it mime type. Nice.

What is the best way to use this magic number file to create my own internal 'file function' which could be cross platform compatible and does not shell out to the OS.

Many Thanks.
 
Back
Top