Cooper Stevenson wrote:
> Hello,
> 
> ...
> I would like to interface what seems to be a straightforward main
> program (as I understand it that's all I need to interface, not the rest
> of the .c files, please correct me if this is in error) and have
> achieved a compile with an empty Init function like so:
> 
>    void
>    Init_jzipr()
>    {
> 
>    }
> 
> irb works:
> 
>   $ irb
>   irb(main):001:0> require 'jzipr'
>   => true
> 
> I am finding the next step--creating the class--difficult. Here's
> jzip.c--it's doesn't look like much but doing it for the first time...

What are you trying to achieve?
Do you want to start the main function from ruby?
(I don't see the benefit here, just shell out to the program)

If so, write a small wrapper like

VALUE rb_main(VALUE self, VALUE args)
{
// you could/should use args here to build up a C array with parameters
  main(0, 0);
  return self;
}

and call rb_define_method in your Init_jzipr to make that method available
in ruby.

void
Init_jzipr()
{
  rb_define_method(rb_cObject, "main", rb_main, -2)
}

cheers

Simon