yiyantang.c
	sig_winch() handle master pty size change.
    main function.
    Parse configurations.
    Get psuedo tty.
    Start Command with child process.
	hook up atexit function in setty.c to clean up tty when exit.
	hook up window size change signal to handle window size.
    start loop for conversion.
    
yiyantang_init.c
    Parse command line with opt. Set up things we need.
	We use gengetopt to generate getopt parse automatically.

cmdline.c
	getopt parsing functions generated by gengetopt. The source file
	is in cmdline.ggo. Add command line options here.
    
setty.c
    Set up psuedo tty. We will use the forkpty which is in <pty.h>
    now. Which might not be portable but I don't want to be burdened
    with portibility. Use glibc! It is free and good!

    Since we use forkpty, now only provide some utility functions
    to manipulate tty in this file.
    
loop.c
    The actual loop that read/write b/w master tty and Input/Output.
    Struct curconfig keep the current state of the program.
	fromcode: Should be called incoming code. (convert-from)
	tocode: local encoding. (convert-to)
	
    We use 'select' to handle READ/WRITE.

    Standard input will be convert to 'fromcode' if we know what
    'fromcode' is. We always know what 'tocode' is.
    Before doing conversion, parse_input() will search for specific
    input that controls the program's working mode. The mode can
    disable/enable conversion, set 'fromcode' in case we always
    guess wrong.

    Standard output buffer are feed to zhconv() for guess/convert.
    In order to make output string encoding guess accurate, we will
    break buffer at the hanzi boundary (hzsegment) before feed the 
    code for guess/convert. Also record buffer boundary which helps
	for cursors like programs. see zhconv()
    
parseinput.c
    Search input keys for commands that control the program's operation.
    
hzsegment.c
    Break hanzi into segments at the boundary of the hanzi. We don't use
    newline as boundary because for curses like program, newline is not
    use for line breaking. Whitespace is ignored because there are might
    whitespace insert b/w hanzi for easier line breaking.
    
zhconv.c
    Actual hanzi guessing and conversion program. Won't guess if 'fromcode'
    is known. Won't convert if 'tocode' is 0. 
	
	And reset half-hanzi when we are at not at buffer boundary. So
	half-hanzi in the last hzsegment won't be carried over to the
	next hzsegment. Necessary for cursors/slang programs which don't
	take care about double-byte encodings.
    
zhinit.c
	Don't need this anymore when we switched to hz_setup->hz_search->
	hz_convert method of libhz.

    Initialize zh-autoconvert libhz. We search and convert functions
    in libhz in the future might eliminate this file.

yyt_util.c
    Some utility functions found in "Advanced Programming in the Unix
    Environment". We don't really need it.

test_hzsegment.c
    Test program for hzsegment.

/* vi: set ts=4:sw=4: */
