#!/usr/bin/perl -s

#use lib "$ENV{HOME}/perl_lib/i386-linux-thread-multi" ;
use lib "$ENV{HOME}/perl_lib/x86_64-linux-thread-multi" ;

use perl2c ;

use strict ;

my $nb_lines ;
my $ptr_array ;

convert () ;

sub convert {
  $nb_lines = 5000 ;
  $ptr_array = perl2c::init_lines () ;
#  foreach (@set_2d) {
  for (0..5) {
print "ptr: $ptr_array, $nb_lines\n" ;
    $ptr_array = perl2c::add_lines ($ptr_array, ++$nb_lines) ;
    }
  print "NB lines: ", $nb_lines, "\n" ;
#  perl2c::print_lines ($ptr_array, $nb_lines, 2) ;
#  perl2c::free_lines ($ptr_array) ;
  }


