1) To get it, do:
Use "wget" or "curl" (or similar) to fetch:
http://shell.xmission.com:PORT/fopen.zip
(where "PORT" is 65401)
2) To build it, do (as mentioned in the .c file):
a) unzip fopen -d fopen
b) cd fopen
c) gcc -shared -W -Wall -Werror -fPIC -o fopen.so fopen.c
3) To test it, do:
gawk -l ./fopen 'BEGIN { print fopen_version() }'
4) Assuming this all goes off without any problems, you can test further
with the included "Marc.awk" file. When I run this on my /etc/group file,
the output is as shown below:
$ gawk4 -f Marc.awk /etc/group
Library version: fopen extension: version 1.0 (Apr 26 2017 at 06:51:03)
fd = 3
fd = 3
String: sys:*:3:root
String: netusers:*:52:
$
Notes:
1) This was all developed on OSX, so reflects a POSIX-centered
world-view, but it should work on Windows using Cygwin. My
understanding is that you (Marc) are primarily a Windows user, but
it should be OK for you if you can get Cygwin installed and
working on your system. I do not have a Cygwin-configured Windows
system at the moment to test with, so I am relying on you for that
part of the effort.
2) The bugaboo in all of this is going to be what exactly to use for
the offset type, in the ftell and fseek calls. The current,
barebones, implementation just uses 'long' (i.e., the simple 'long'
versions of the calls), but that probably only works for files up
to 2G size. It is my understanding that you want to be able to use
this on files larger than that. There are ways to do that, but I
wanted to keep this first implementation as simple as possible.
Anyway, let me know if/when you are able to get this working.
P.S. Just to re-iterate: It should on Cygwin (Cygwin bash shell) exactly
as it does in OSX. It should just compile and should "just work".
--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/Aspergers