[Goodie][Beta]Regular Expressions Plugin (RePlugin 3.3beta)
Ned Konz
ned at bike-nomad.com
Sat Aug 17 18:41:13 UTC 2002
On Friday 16 August 2002 08:10 pm, Andrew C. Greenberg wrote:
> At the above URI, please find a changeset and machine-independent
> source codes for the 3.3beta version of RePlugin. This is an
> "early adopters" version to get the code in the hands of VM
> builders who might assemble and test on various platforms (I built
> an internal plugin on MacOSX that passed all tests in the SUnit
> suite -- that's it so far). I'd be obliged for reports and copies
> of the 3.3beta plugin.
Couldn't get it to compile.
Installation (using VMMaker on Linux):
cd Squeak-3.2-5devel # top of VMMaker tree
mkdir platforms/Cross/plugins/rePlugin
cp /downloads/Squeak/RePlugin3.3beta/*.[ch] platforms/Cross/plugins/rePlugin
squeak devel.image
# Load RePlugin3.3.1.cs into new CS
# VMMaker openInWorld
# now choose RePlugin as external, all others as internal, but don't build DropPlugin or SecurityPlugin.
# hit "Generate all"
cd platforms/unix/config
make
cd -
platforms/unix/config/build
# much activity ensues, ending with:
/home/ned/Squeak/Squeak-3.2-5devel/bld-i386/rePlugin
/bin/sh /home/ned/Squeak/Squeak-3.2-5devel/bld-i386/libtool --mode=compile gcc -I/usr/X11R6/include -g -O2 -fomit-frame-pointer -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home/ned/Squeak/Squeak-3.2-5devel/bld-i386 -I/home/ned/Squeak/Squeak-3.2-5devel/platforms/unix/vm -I/home/ned/Squeak/Squeak-3.2-5devel/platforms/Cross/vm -I/usr/X11R6/include -I/home/ned/Squeak/Squeak-3.2-5devel/platforms/Cross/plugins/rePlugin -c -o rePlugin.lo /home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c
gcc -I/usr/X11R6/include -g -O2 -fomit-frame-pointer -DLSB_FIRST=1 -DHAVE_CONFIG_H -I/home/ned/Squeak/Squeak-3.2-5devel/bld-i386 -I/home/ned/Squeak/Squeak-3.2-5devel/platforms/unix/vm -I/home/ned/Squeak/Squeak-3.2-5devel/platforms/Cross/vm -I/usr/X11R6/include -I/home/ned/Squeak/Squeak-3.2-5devel/platforms/Cross/plugins/rePlugin -c /home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c -fPIC -DPIC -o rePlugin.lo
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c: In function `primPCRECompile':
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c:216: warning: passing arg 3 of `pcre_compile' from incompatible pointer type
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c:219: warning: passing arg 3 of `pcre_study' from incompatible pointer type
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c: In function `primPCREExec':
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c:270: warning: passing arg 6 of `pcre_exec' makes integer from pointer without a cast
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c:270: warning: passing arg 7 of `pcre_exec' makes pointer from integer without a cast
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c:270: too few arguments to function `pcre_exec'
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c: In function `primPCREExecfromto':
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c:324: warning: passing arg 6 of `pcre_exec' makes integer from pointer without a cast
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c:324: warning: passing arg 7 of `pcre_exec' makes pointer from integer without a cast
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c:324: too few arguments to function `pcre_exec'
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c: In function `rcvrExtraPtr':
/home/ned/Squeak/Squeak-3.2-5devel/src/plugins/rePlugin/rePlugin.c:365: warning: return makes integer from pointer without a cast
make[1]: *** [rePlugin.lo] Error 1
make: *** [rePlugin.la] Error 2
$
Hmm... let's check to make sure the files are in fact correct and in the right places.
Yup, looks OK (these are the same files as in the distro):
$ ls -lt platforms/*/plugins/rePl* src/plugins/rePlugin/
platforms/Cross/plugins/rePlugin:
total 212
-rw-r--r-- 1 ned ned 7021 Aug 17 11:02 chartables.c
-rw-r--r-- 1 ned ned 1946 Aug 17 11:02 config.h
-rw-r--r-- 1 ned ned 7425 Aug 17 11:02 get.c
-rw-r--r-- 1 ned ned 16372 Aug 17 11:02 internal.h
-rw-r--r-- 1 ned ned 153208 Aug 17 11:02 pcre.c
-rw-r--r-- 1 ned ned 3323 Aug 17 11:02 pcre.h
-rw-r--r-- 1 ned ned 1259 Aug 17 11:02 rePlugin.h
-rw-r--r-- 1 ned ned 10978 Aug 17 11:02 study.c
src/plugins/rePlugin/:
total 16
-rw-rw-r-- 1 ned ned 15321 Aug 17 11:12 rePlugin.c
platforms/unix/plugins/rePlugin:
total 4
-rw-r--r-- 1 ned ned 39 Jul 25 22:37 acinclude.m4
OK, so what's it complaining about?
In pcre.h (which is marked as version 3.9, a current version), we have:
extern int pcre_exec(const pcre *, const pcre_extra *, const char *,
int, int, int, int *, int);
but it's being called at line 270 of the generated code in
src/plugins/rePlugin/rePlugin.c (in primPCRECompile) as:
result = pcre_exec((pcre *)pcrePtr, (pcre_extra *)extraPtr,
searchBuffer, length, matchFlags, matchSpacePtr, matchSpaceSize);
which has one too few arguments, and therefore generates several errors.
Now, this would have been correct given the old pcre.h (which had seven args), but isn't with this version.
The date on the offending method (primPCRECompile) is three years old; is there a version mismatch somewhere?
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|