develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35078 - trunk/examples/nci

From:
kjs
Date:
January 6, 2009 11:54
Subject:
[svn:parrot] r35078 - trunk/examples/nci
Message ID:
20090106195436.83E80CB9F9@x12.develooper.com
Author: kjs
Date: Tue Jan  6 11:54:35 2009
New Revision: 35078

Modified:
   trunk/examples/nci/ls.pir

Log:
[examples] fix wrong syntax, but still doesn't work. "null libc"?? Why null and why not load the lib?

Modified: trunk/examples/nci/ls.pir
==============================================================================
--- trunk/examples/nci/ls.pir	(original)
+++ trunk/examples/nci/ls.pir	Tue Jan  6 11:54:35 2009
@@ -24,7 +24,7 @@
      store_global 'libc::readdir', readdir
      store_global 'libc::closedir', closedir
      .local pmc curdir
-     curdir = libc::opendir("docs")
+     curdir = opendir("docs")
      .local pmc entry
 
      .include "datatypes.pasm"
@@ -42,7 +42,7 @@
      push $P2, 256
      push $P2, 0           # 11
 lp_dir:
-     entry = libc::readdir(curdir)
+     entry = readdir(curdir)
      $I0 = get_addr entry
      unless $I0 goto done
      assign entry, $P2
@@ -59,7 +59,7 @@
      print "\n"
      goto lp_dir
 done:
-     libc::closedir(curdir)
+     closedir(curdir)
 .end
 
 # Local Variables:



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About