saphire shell beta

What is this program?
    a shell working with linux. Because of existing bugs, I've destributed saphire shell as beta version.

Checked environment
    Debian 5.0.3 (coLinux)
    Ubuntu 8.0.4 (VMWare)
    OSX 10.4.1(Mac)
    cygwin 1.7.1

Attension
    Use this on your responsibility. I can't take the responsibility on your works with this program. 

How do I compile this?
    Before compiling, you need to resolve the dependencies which saphire used.

    saphire depends on gcc, make, libc, libm, libncurses, libreadline, oniguruma which is a regex library. Optionary if you are japanese, you can use C/Migemo for ro-maji completion.
    After installed thise, type below commands on your shell.

    ./configure 
    make lib
    sudo make lib-install
    make
    sudo make install

    or

    ./configure
    make lib
    su
    make lib-install
    exit
    make 
    su
    make install

    As default, the make program will install saphire at /usr/locall.

    the configure options are 

    --prefix --> installed directory.
    --with-migemo --> enable C/Migemo
    --with-onig-dir --> oniguruma installed directory which is prefix of oniguruma.
    --with-migemo-dir --> C/Migemo installed directory
    --with-readline-dir --> readline installed directory
    --with-system-migemo-dir --> C/Migemo dictonary directory
    --with-debug --> use debug mode. you can detect memory leaks and debug with gdb.
    --with-gprof-debug --> use gprof debug mode. you can profile saphire with gprof

    After that, because saphire made libraries, add the directory which installed libsaphire.so to /etc/ld.so.conf. (default is /use/local/lib)
    And type blow on shell command line to refresh the cache of shaed libraries.
    
    sudo ldconfig
    
    or

    su
    ldconfig

    if you are not root, set $LD_LIBRARY_PATH as the directory installed libsaphire.so or set DYLD_LIBRARY_PATH if you use Mac OS X.

used files by saphire shell
    /usr/local/bin/saphire --> the program
    /usr/local/bin/sash --> interactive shell
    /usr/local/etc/saphire.sa --> source of setting file
    /usr/local/etc/saphire.sao --> obeject file of setting
    ~/.saphire/.saphire.sao --> user setting object file which saphire read after /usr/local/etc/saphire.sao
    ~/.saphire/.history --> command line history
    ~/.saphire/tmp --> temp file directory which saphire use
    /usr/local/share/migemo/{utf-8,eucjp.sjis}/{han2zen.dat,hira2kana.dat,migemo-dict,roma2hira.dat} --> C/Migemo dictionary file
    /usr/share/cmigemo/{utf-8,eucjp.sjis}/{han2zen.dat,hira2kana.dat,migemo-dict,roma2hira.dat} --> C/Migemo dictionay file

Used encoding
    saphire script file must be witten with utf encoding, and not CRLF or CR but LF line field. saphire can work with eucjp, sjis text data which is used in Japan, and CR, CRLF, LF line field text data.
    saphire is expected to run on UTF8 terminal.

How to use
    You can use sash program as interactive shell with readline, saphire program as runnig a script engine. If you want to run a command in commandline, use -c option with saphire program. In sash program, you can run "shelp" inner command to see help.

with cygwin
    saphire need to cygsever because of InterProcces Communication.
    Before runnig saphire, run "cygserver-config" and "net start cygserver" on your commandline shell and after running saphire run "net stop cygserver".
    If you can't run cygserver with the above mentioned, type "export CYGWIN=server; /usr/sbin/cygserver &" on your bash shell before running saphire.

embedded saphire to your application
    See main.c and saphire.h in saphire source files.

with OS X
    compile readline because OSX's readline is libedit, saphire need GNU readline
    I can compile with readline 6.1 on OSX 10.4.
    The prefix is /usr/local.

    compile oniguruma which is fast regex library.

    ./configure --with-readline-dir=/usr/local
    make lib && sudo make lib-install && sudo make && sudo make install

    ok. you can run saphire on OS X. have a fun.

Files
    AUTHORS 
    CHANGELOG.txt --> changing log
    GPL --> License
    Makefile --> used by make program
    Makefile.in --> used by configure program to generate Makefile
    README.ja.txt --> Japanese README
    README.en.txt --> English README
    USAGE.ja.txt --> Japanese Manual
    USAGE.en.txt --> English Manual
    config.h --> generated by configure program
    config.h.in --> used by configure program to generate config.h
    config.log --> configure log 
    config.status --> related in configure program
    configure --> configure program
    configure.in --> used by autoconf to generate configure program
    install.sh --> used by configure program
    saphire.h --> used to be embedded in a apllication.
    saphire.sa --> saphire run time script source file
    saphire_commands.c --> saphire inner command
    saphire_inner.h --> used by saphire inner defined
    saphire_main.c --> saphire main
    saphire_parser.c --> saphire parser
    saphire_vm.c --> saphire virtual machine
    main.c --> interacive shell main program which embedded saphire
    saphire_curses.c --> original terminal operating library
    saphire_curses.h
    saphire_debug.c --> original debugging library
    saphire_debug.h
    saphire_extra.c --> extra useful library
    saphire_extra.h
    saphire_hash.c --> saphire hash container library
    saphire_hash.h
    saphire_kanji.c --> saphire Japanese encode library
    saphire_kanji.h
    saphire_list.c --> saphire list container library
    saphire_list.h
    saphire_string.c --> saphire string library
    saphire_string.h
    saphire_vector.c --> saphire dynamic array library
    saphire_vector.h
    readline.c --> operating readline code

LISENCE
    Daisuke Minato has copyright. Lisence is GPL.

