Re: [perl #28251] [PATCH] generated files in '.cvsignore'

2004-04-05 Thread Leopold Toetsch
Bernhard Schmalhofer [EMAIL PROTECTED] wrote:

 Hi,

 this patch tells CVS about some more generated files.
 This should reduce line noise when looking at diffs or when generating
 patches.

Thanks, applied.
leo


[PATCH] parrotobject.pmc return cleanup

2004-04-05 Thread Andrew Dougherty
Two spots in parrotobject.pmc are apparently trying to return something
from a void function.  gcc apparently doesn't mind, but non-gcc compilers
might.  This simple patch might help the laudanum (AIX) tinderbox.

--- parrot-current/classes/parrotobject.pmc Sat Apr  3 19:00:05 2004
+++ parrot-andy/classes/parrotobject.pmcMon Apr  5 09:31:11 2004
@@ -143,11 +143,13 @@
 }

 void set_attr(INTVAL idx, PMC* value) {
-return Parrot_set_attrib_by_num(interpreter, SELF, idx, value);
+   Parrot_set_attrib_by_num(interpreter, SELF, idx, value);
+return;
 }

 void set_attr_str(STRING* idx, PMC* value) {
-return Parrot_set_attrib_by_str(interpreter, SELF, idx, value);
+   Parrot_set_attrib_by_str(interpreter, SELF, idx, value);
+return;
 }

 PMC* get_class() {
-- 
Andy Dougherty  [EMAIL PROTECTED]


Re: [BUG] very stange behavior

2004-04-05 Thread Leopold Toetsch
Jens Rieks [EMAIL PROTECTED] wrote:
 tar xzf err15.tgz
 cd err15
 ../parrot error.imc
 store_sub_in_namespace: sub '__stream_base_onload' namespace #1635018099 too
 big

The namespace wasn't cleared correctly. Fixed

Thanks,
leo


Re: [PATCH] ops2c.pl fails under perl5.005

2004-04-05 Thread Leopold Toetsch
Andrew Dougherty [EMAIL PROTECTED] wrote:

Thanks, applied.
leo


Re: [PATCH] parrotobject.pmc return cleanup

2004-04-05 Thread Leopold Toetsch
Andrew Dougherty [EMAIL PROTECTED] wrote:
 Two spots in parrotobject.pmc are apparently trying to return something

Thanks, applied.
leo


Re: Missing dependency for dynoplibs?

2004-04-05 Thread Leopold Toetsch
Andrew Dougherty wrote:

Nearly every tinderbox is failing t/pmc/objects.t tests 35-36 with an
error about failing to load 'runtime/parrot/dynext/myops_ops.dylib'
(or equivalent).
Oops sorry cut'n paste error. Fixed.

leo




Re: Missing dependency for dynoplibs?

2004-04-05 Thread Andrew Dougherty
On Mon, 5 Apr 2004, Leopold Toetsch wrote:

 Andrew Dougherty wrote:

  Nearly every tinderbox is failing t/pmc/objects.t tests 35-36 with an
  error about failing to load 'runtime/parrot/dynext/myops_ops.dylib'
  (or equivalent).

 Oops sorry cut'n paste error. Fixed.

Oh, no problem.  I was going to suggest a fix, but I thought perhaps I was
missing something.

-- 
Andy Dougherty  [EMAIL PROTECTED]


Re: New SDL Parrot Bindings Underway

2004-04-05 Thread chromatic
On Mon, 2004-03-29 at 23:33, chromatic wrote:

 With the improved object system in place, I've been porting the existing
 SDL Parrot bindings.

Here's a quick status update.  With helpful suggestions from Jens and
Allison, I've just finished porting the existing files in examples/sdl
to the new libraries.  They're a lot nicer.

I've still some documentation to write (as well as a long list of rough
edges to smooth), but I'll fix that up shortly and check in some new
code.  To whet your appetites, here's the new version of
examples/sdl/move_parrot_logo.imc.

Suggestions always welcome.

-- c
=head1 TITLE

move_parrot_logo.imc - move a Parrot logo with the SDL Parrot bindings

=head1 SYNOPSIS

To run this file, be in the Parrot directory and run the following command:

$ parrot examples/sdl/move_parrot_logo.imc
$

=cut

.sub _main @MAIN
load_bytecode library/SDL/App.imc
load_bytecode library/SDL/Color.imc
load_bytecode library/SDL/Rect.imc
load_bytecode library/SDL/Image.imc
load_bytecode library/SDL/Sprite.imc
load_bytecode library/SDL/EventHandler.imc
load_bytecode library/SDL/Event.imc

.local pmc app_args
new app_args, .PerlHash
set app_args[ 'width'  ], 640
set app_args[ 'height' ], 480
set app_args[ 'bpp'],   0
set app_args[ 'flags'  ],   0

.local pmc app
.local int app_type

find_type app_type, 'SDL::App'
app = new app_type

.local pmc main_screen
main_screen = app.'BUILD'( app_args )

.local pmc black
.local int color_type

find_type color_type, 'SDL::Color'
black = new color_type

.local pmc color_args
color_args = new PerlHash

color_args[ 'r' ] = 0
color_args[ 'g' ] = 0
color_args[ 'b' ] = 0

black.'_new'( color_args )

.local pmc image
.local int image_type

find_type image_type, 'SDL::Image'
image = new image_type

image.'_new'( 'examples/sdl/parrot_small.png' )

.local pmc sprite
.local int sprite_type

find_type sprite_type, 'SDL::Sprite'
sprite = new sprite_type

.local pmc sprite_args
sprite_args = new PerlHash
sprite_args[ 'surface'  ] = image
sprite_args[ 'source_x' ] = 0
sprite_args[ 'source_y' ] = 0
sprite_args[ 'dest_x'   ] =   270
sprite_args[ 'dest_y'   ] =   212
sprite_args[ 'width'] =   100
sprite_args[ 'height'   ] =56
sprite_args[ 'bgcolor'  ] = black

sprite.'_new'( sprite_args )

.local pmc parent_class
.local pmc class_type
getclass parent_class, 'SDL::EventHandler'
subclass class_type, parent_class, 'MoveLogo::EventHandler'

.local pmc event_handler
.local int handler_type

find_type handler_type, 'MoveLogo::EventHandler'
event_handler = new handler_type

.local pmc event
.local int event_type

find_type event_type, 'SDL::Event'
event = new event_type

event.'_new'()
.local pmc handler_args
handler_args = new .PerlHash
handler_args[ 'screen' ] = main_screen
handler_args[ 'sprite' ] = sprite

event_handler.draw_screen( main_screen, sprite )
event.wait_event( event_handler, handler_args )

.end

.namespace [ 'MoveLogo::EventHandler' ]

.sub draw_screen method
.param pmc screen
.param pmc sprite

.local pmc prev_rect
.local pmc rect
(prev_rect, rect) = sprite.draw_undraw( screen )
screen.'update_rects'( prev_rect, rect )

.end

.sub key_down_down method
.param pmc event_args

.local pmc screen
.local pmc sprite

screen = event_args[ 'screen' ]
sprite = event_args[ 'sprite' ]

.local int y
y = sprite.'y'()
if y == 480 goto _draw
inc y
sprite.'y'( y )

_draw:
self.'draw_screen'( screen, sprite )

.end

.sub key_down_up method
.param pmc event_args

.local pmc screen
.local pmc sprite

screen = event_args[ 'screen' ]
sprite = event_args[ 'sprite' ]

.local int y
y = sprite.'y'()
if y == 0 goto _draw
dec y
sprite.'y'( y )

_draw:
self.'draw_screen'( screen, sprite )

.end

.sub key_down_left method
.param pmc event_args

.local pmc screen
.local pmc sprite

screen = event_args[ 'screen' ]
sprite = event_args[ 'sprite' ]

.local int x
x = sprite.'x'()
if x == 0 goto _draw
dec x
sprite.'x'( x )

_draw:
self.'draw_screen'( screen, sprite )

.end

.sub key_down_right method
.param pmc event_args

.local pmc screen
.local pmc sprite

screen = event_args[ 'screen' ]
sprite 

Re: Missing dependency for dynoplibs?

2004-04-05 Thread Leopold Toetsch
Andrew Dougherty [EMAIL PROTECTED] wrote:

 Where in the build process should that file get built?  Should the main
 Makefile have a line that does something like the following
 as part of the test_prep target:

   cd dynoplibs ${make_and} $(MAKE) ${make_and} cd ..

That's still another issue. If we have some tests and config vars
that dynamic loading is working, this step (and others) should be done.

leo