pak.e for getting data out of id-style pak files

functions:

-------------<loadpakdir>--------------
 sequence pd
 pd = loadpakdir("somepak.pak")
 pd now contains:
   { name_of_pakfile,
     { offset, size, name },
     { offset, size, name },
     ... for each entry.
   }
 and the pakfile is NOT left open.

---------------<loadpakentry>---------------
sequence pe
pe = loadpakentry(pd, whichone)
 whichone can be a number, if you know the order of your pak entries
 whichone can be the name of an entry, and loadpakdir will try to find it
 gets offset, size from the list, re-opens the pakfile, and gets the entry
 pe now contains a file from within the pakfile
 and the pakfile is NOT left open

----------- note:
 to extract a file from a pakfile, example:
 include pak.e
 sequence plisting, blah
 atom f
 plisting=loadpakdir("e:\\quake\\borg\\pak0.pak") -- substitute your filename
 blah=loadpakentry(plisting,"config.cfg")
 f=open("lookat.me","wb")
 puts(f,blah)
 close(f)
 -- done. extracted config.cfg from pak0.pak,
 -- and put it in a file called "lookat.me"
