slanglib (S-Lang extension module for ruby)
              ver 0.22 25-AUG-1999 Kikutani, Makoto <kikutani@sprintmail.com>


INTRODUCTION

This is an extension module for S-Lang screen management library
by John E. Davis. S-Lang is famous for the fact that jed(editor) and 
slrn(news reader) use it. You can find useful information of S-Lang in: 
http://www.s-lang.org/

My Japanese page for S-lang is:
http://home.sprintmail.com/~kikutani/slang.html

I mainly implemented SLsmg functions for ruby.
Because jed and slrn use such high level interface functions for their
screen control.

Currently the following SLsmg functions are supported:

slsmg_set_char_set
slsmg_suspend_smg
slsmg_resume_smg
slsmg_erase_eos
slsmg_char_at
slsmg_draw_object
slsmg_set_screen_start
slsmg_write_color_chars
slsmg_read_raw
slsmg_write_raw
slsmg_set_color_in_region
slsmg_normal_video
slsmg_reverse_video
slsmg_gotorc
slsmg_printf
slsmg_erase_eol
slsmg_erase_eol2
slsmg_refresh
slsmg_write_string
slsmg_write_wrapped_string
slsmg_set_color
slsmg_forward
slsmg_write_nchars
slsmg_write_char
slsmg_cls
slsmg_draw_hline
slsmg_draw_vline
slsmg_draw_box
slsmg_touch_lines
slsmg_get_column
slsmg_tab_width
slsmg_reset_smg
slsmg_init_smg
slsmg_fill_region
slsmg_get_row

Other SLtt, SLsig, and SLkp functions are:

sltt_screen_rows
sltt_screen_cols
sltt_get_screen_size
sltt_set_color
sltt_beep
sltt_get_terminfo
sltt_set_mouse_mode
sltty_set_suspend_state

slsig_block_signals
slsig_unblock_signals

slkp_getkey
slkp_define_keysym
slkp_init


In addition, I created "Pager" class.
You see the sample of its usage in pager.rb in this directory.
Since ruby has modules for Japanese handling and MIME handling,
it's easy to write a mailer or a news reader by ruby/slang.
Please see my mailer, "cur", in
http://home.sprintmail.com/~kikutani/cur.html


INSTALL

1) install S-Lang library according to its document.
  Both static lib and shared lib can work with slanglib for ruby.

If you want to display Japanese, please fetch "Japanized" S-Lang
from my page.

2) extract this source under ruby's ext directory.
Make ruby in an ordinary way.
Recent slanglib is tested only with ruby-1.4.x.


SAMPLES

  pager.rb

Ruby implementation of pager.c in S-Lang demo directory.
This is a typical usage of Pager class.

  smgtest.rb

Ruby implementation of smgtest.c in S-Lang demo directory.

  fm.rb

A demo of Tree_Pager class. Simple directory browser.

  urlview.rb

Fetch URLs string from standard input so that user can
select URL to browse.

For example, if you are a mutt user, .muttrc should have
the following line:

macro pager \cb "|~/bin/urlview.rb\ -b\ lynx\ -m\n"


DOCUMENT

I'm sorry I haven't yet provided slanglib manuals.
Please see sample programs or slmodule.c source file.
You can see how to use S-Lang library in doc/cslang.tex
in S-Lang source directory.

BUG

If you find bugs(yes, slanglib must have a lot of bugs),
please report it to me or ruby-talk mailing-list.

COPYRIGTH

GNU GENERAL PUBLIC LICENSE Version 2


DISCLAIMER

The author of slanglib is not responsible for any damage
which you might have by using slanglib.
