C Character Classification for Kanji -- shift-JIS

I have started with a shift-JIS version of this library because my machinery has fonts and input methods for shift-JIS. 機械の 書体や 入力式が シフトJIS です。 因って、 ライブラリの 初版が シフトJIS なのです。
<excuse>What with the move and the new job and all, I have only been able to work on the library an average of less than an hour a day.</excuse> So I am uploading what I have done now, and I will continue updating as I complete the tests. I am also uploading the test project and two intermediate projects which I used to build parts of the library source. <申訳>引っ越し した事と 新しい仕事が できた などがあって、 ライブラリの 一日の 平均作業工数を 一時間ほども 捗っていません。</申訳> 取りあえず 今できた分を 載せて 置くことに しました。 テストの 過程が 進める度、 更新して おきます。 テスト プロジェクトも ライブラリの ソースを 組み合わせる 作業に 利用した 2つの 中間プロジェクト も載せて 置きました。
"Free source" is something of a simplistic explanation, if it is not a myth. (The folks at the Free Software Foundation basically say as much.) All program code has costs and contracts/covenants. Some is bound more to the rules of money, illusion, and arbitrary obligations. Some is bound rather to rules of personal effort and responsibility, giving freer reign to the hand of God. 「フリー ソース」 というものが ちょっと 簡単過ぎな 説明で なければ、 迷信話し です。 (フリー ソフトウェア 財団 の方々も こんな類いの 説明を してくれます。) プログラム コードは 何れも 費用を かかるし、 約定や 契約に 係わるのです。 あるものは 金銭的な 規定や 幻の制約 及び 独断義理に 縛られているのに、 また違うものが 個人努力責務の 制約に 結び付けられています。 後方は 神様の 御手が もっと自由に その御業を 進ませられるのが ございます。
All sources and local headers specified for these projects are released under God's assignment of stewardship, as detailed in the comments in the tops of the files. For those who don't want to deal with the concepts of God and stewardship, re-distribution is also permitted under the GNU General Public License or certain other arrangements, as explained in the same comments. この プロジェクトの ソース ファイル 及び ローカル インクルード ファイルが 全て、 各々の ファイルの 上部にある コメント文に (英語で) 記した 通りに、 神様の 「assignment of stewardship」 という 許諾制約を 指定して 公開しています。 神様や 「stewardship」 については 納得できない 方々のために 同コメント内に 「GNU General Public License」 その他、 私が認める 公許諾制約を 指定しました。
No other re-distribution is permitted. 指定した やり方以外は 再配布は 許可しません。
If you have questions, contact me at joel_rees@sannet.ne.jp. ご 問い合わせは joel_rees@sannet.ne.jp へどうぞ。 日本語の ご相談は とにかく 努力いたします。


Since I am doing this in Codewarrior (Mac OS X final is UNICODE!), I haven't made makefiles. So I put the dependency information in the tables below. This is easier for me for now. Each file is hyper-linked below. コード ウォーリアー で作って いますから (Mac OS X ってユニコードだよん!) メーク ファイルを 作りません でした。 ですから、 以下の 表に 依存関係の ことを 記しました。 申し訳 ございませんが 今は このままが (僕には) 簡単ですから。 以下の ファイルが ハイパー リンク されています。


Using slow version library:
library object library header included files notes
slowsjctype.o
(name depends on environment)
slowsjctype.h sjctypenv.h Indirect dependency on sjctypenv.h was a slip. Removed.


Building slow version library:
library source library header included files notes
slowsjctype.c slowsjctype.h sjctypenv.h
sj16bitChars.h
sj8bitChars.h
--


Testing slow version:
source header included files notes
sjisctypetest.c -- slowsjctype.h
sjctypenv.h
sj16bitChars.h
sj8bitChars.h
port.h
--
slowsjctype.c slowsjctype.h sjctypenv.h
sj16bitChars.h
sj8bitChars.h
--
port.c port.h -- --


Building 8-bit helper:
source header included files helps notes
showch8.c -- port.h sj8bitChars.h Lack of self inclusion clears dependency loop.
port.c port.h -- -- --


Building 16-bit helper:
source header included files helps notes
showch16.c -- sj16bitChars.h
sjctypenv.h
port.h
sj16bitChars.h Self inclusion performs some checks.
port.c port.h -- -- --


slowsjctype.o
Library object file. You have to build this yourself. The actual name of the library object file will depend on the operating system and the programming environment and settings you are using. I may have time to pre-build a few after I finish testing, but if you have reason to use this library, you should be able to build it yourself.
slowsjctype.h
Library header file. To actually use the library, all you need is this header and the object library (which you must build).
slowsjctype.c
Source for the library.
sjctypenv.h
This is mostly a place to keep the ubyte definition I used internally for keeping the code clean (thereby reducing the test burden). It is probably best to ignore the bool typedef.
sj16bitChars.h
Isolates 16-bit character constants and makes them legible in an eight bit world. Also somewhat alleviates the problems of not having a Japanese font.
sj8bitChars.h
Isolates 8-bit character constants and makes them visible in a world where a Japanese font may not be available for use with the source editor.
sjisctypetest.c
This is the source of the test program. Visually checking the output of a simple loop turns out to really burn time and disk space (and put one to sleep). Testing the output as it is produced is not a perfect method, but it helps me focus on the necessary places for the visual check. To put as much distance as possible between the tests and the library, I have directly used hexadecimal numeric and character constants in the tests.
port.h
This is where I have tried to hide declaration aspects of system dependencies. Porting should focus here second, and leave other source alone as much as possible.
port.c
This is where I have tried to hide definition aspects of system dependencies. Porting should focus here first, and leave other source alone as much as possible.
showch8.c
This file generates most of the 8-bit character constants automatically. It's a bit of a kludge. I refined my methods as I went, and didn't take time to ripple the refinements back. I apologize for allowing this to be seen in public. ;-/
showch16.c
This file generates most of the 16-bit character constants automatically. It reflects a lot of ideas I picked up while building showch8.c, so it is hopefully a little less of a kludge than showch8.c.
project files and make files
Again, once I get past the testing, I may have time to make some project files and makefiles available. The dependencies are shown above, you should be able to slap your own together without too much effort. On the other hand, if you haven't learned how yet, now is a good time. A small project like this might be good to practice on. ;->

全部を日本語になおす時間がなく、お詫びいたします。 ライセンスについて質問がございましたら、ぜひ、ご連絡ください。

Home


^v:jtype c00.00.0ej 2001.05.30