cvsuser 03/12/12 03:27:54
Modified: examples/assembly ncurses_life.imc pcre.imc
library libpcre.imc
Log:
update examples
Revision Changes Path
1.10 +4 -4 parrot/examples/assembly/ncurses_life.imc
Index: ncurses_life.imc
===================================================================
RCS file: /cvs/public/parrot/examples/assembly/ncurses_life.imc,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -r1.9 -r1.10
--- ncurses_life.imc 30 Sep 2003 16:03:39 -0000 1.9
+++ ncurses_life.imc 12 Dec 2003 11:27:52 -0000 1.10
@@ -277,7 +277,7 @@
total = size * size
.sym int cols
.sym int rows
- .sym var ENV
+ .sym pmc ENV
ENV = new Env
$S0 = ENV["COLUMNS"]
cols = $S0
@@ -584,7 +584,7 @@
.end
.pcc_sub _load_file prototyped
- .param var argv
+ .param pmc argv
.param int size
.sym string world
@@ -593,7 +593,7 @@
.sym string file
file = argv[1]
err = "File not found " . file
- .sym var io
+ .sym pmc io
open io, file, "<"
$I0 = defined io
unless $I0 goto nok
@@ -611,7 +611,7 @@
.const int PICTURE = 1
.const int ABS = 2
.const int REL = 3
- .sym var points
+ .sym pmc points
loop:
readline line, io
1.5 +4 -4 parrot/examples/assembly/pcre.imc
Index: pcre.imc
===================================================================
RCS file: /cvs/public/parrot/examples/assembly/pcre.imc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- pcre.imc 11 Oct 2003 12:01:51 -0000 1.4
+++ pcre.imc 12 Dec 2003 11:27:52 -0000 1.5
@@ -1,6 +1,6 @@
# experimental string match with pcre
.pcc_sub _main prototyped
- .param var argv
+ .param pmc argv
.include "library/pcre.imc"
.sym int argc
argc = argv
@@ -14,17 +14,17 @@
print " =~ /"
print pat
print "/\n"
- .sym var PCRE_LIB
+ .sym pmc PCRE_LIB
.PCRE_INIT(PCRE_LIB)
.sym string error
.sym int errptr
- .sym var code
+ .sym pmc code
.PCRE_COMPILE(pat, 0, code, error, errptr)
$I0 = defined code
unless $I0 goto match_err
.sym int ok
- .sym var result
+ .sym pmc result
.PCRE_MATCH(code, s, 0, 0, ok, result)
if ok < 0 goto nomatch
print ok
1.2 +9 -9 parrot/library/libpcre.imc
Index: libpcre.imc
===================================================================
RCS file: /cvs/public/parrot/library/libpcre.imc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- libpcre.imc 11 Oct 2003 12:01:49 -0000 1.1
+++ libpcre.imc 12 Dec 2003 11:27:54 -0000 1.2
@@ -33,10 +33,10 @@
.param string pat
.param int options
- .sym var NULL
- .sym var code
+ .sym pmc NULL
+ .sym pmc code
.sym string error
- .sym var COMPILE
+ .sym pmc COMPILE
COMPILE = global "pcre::compile"
repeat error, " ", 500 # could be enough
.sym int errptr
@@ -69,18 +69,18 @@
=cut
.pcc_sub _pcre_exec prototyped
- .param var regex
+ .param pmc regex
.param string s
.param int start
.param int options
.sym int len
length len, s
- .sym var NULL
+ .sym pmc NULL
null NULL
- .sym var ovector
+ .sym pmc ovector
ovector = new ManagedStruct
ovector = 120 # 1/(2/3) * 4 * 2 * 10 for 10 result pairs
- .sym var EXEC # on 32 bit systems
+ .sym pmc EXEC # on 32 bit systems
EXEC = global "pcre::exec"
.pcc_begin prototyped
@@ -113,7 +113,7 @@
.pcc_sub _pcre_result prototyped
.param string s
.param int ok
- .param var ovector
+ .param pmc ovector
.param int n
.sym string match
@@ -122,7 +122,7 @@
.local int ovecs
.local int ovece
- .sym var struct
+ .sym pmc struct
struct = new SArray
struct = 3
.include "datatypes.pasm"