rename hangul_ic_filter to hangul_ic_process
authorChoe Hwanjin <choe.hwanjin@gmail.com>
Sat, 11 Feb 2006 04:52:10 +0000 (13:52 +0900)
committerChoe Hwanjin <choe.hwanjin@gmail.com>
Sat, 11 Feb 2006 04:52:10 +0000 (13:52 +0900)
git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@51 8f00fcd2-89fc-0310-932e-b01be5b65e01

hangul/hangul.h
hangul/hangulinputcontext.c
pyhangul/pyhangul.c
test/test.c

index d4636e9..8fab484 100644 (file)
@@ -109,7 +109,7 @@ struct _HangulInputContext {
 
 HangulInputContext* hangul_ic_new(HangulKeyboardType keyboard);
 void hangul_ic_delete(HangulInputContext *hic);
-bool hangul_ic_filter(HangulInputContext *hic, int ascii);
+bool hangul_ic_process(HangulInputContext *hic, int ascii);
 void hangul_ic_reset(HangulInputContext *hic);
 void hangul_ic_flush(HangulInputContext *hic);
 bool hangul_ic_backspace(HangulInputContext *hic);
index 3c394e6..63470b5 100644 (file)
@@ -298,7 +298,7 @@ hangul_ic_save_commit_string(HangulInputContext *hic)
 }
 
 static bool
-hangul_ic_filter_jamo(HangulInputContext *hic, ucschar ch)
+hangul_ic_process_jamo(HangulInputContext *hic, ucschar ch)
 {
     ucschar jong;
     ucschar combined;
@@ -393,7 +393,7 @@ none_hangul:
 }
 
 static bool
-hangul_ic_filter_jaso(HangulInputContext *hic, ucschar ch)
+hangul_ic_process_jaso(HangulInputContext *hic, ucschar ch)
 {
     if (hangul_is_choseong(ch)) {
        if (hic->buffer.choseong == 0) {
@@ -456,7 +456,7 @@ hangul_ic_filter_jaso(HangulInputContext *hic, ucschar ch)
 }
 
 bool
-hangul_ic_filter(HangulInputContext *hic, int ascii)
+hangul_ic_process(HangulInputContext *hic, int ascii)
 {
     ucschar ch;
 
@@ -469,9 +469,9 @@ hangul_ic_filter(HangulInputContext *hic, int ascii)
     hic->commit_string[0] = 0;
 
     if (hic->type == HANGUL_INPUT_FILTER_JAMO)
-       return hangul_ic_filter_jamo(hic, ch);
+       return hangul_ic_process_jamo(hic, ch);
     else
-       return hangul_ic_filter_jaso(hic, ch);
+       return hangul_ic_process_jaso(hic, ch);
 }
 
 const ucschar*
index dd6c3cd..b91944e 100644 (file)
@@ -78,17 +78,17 @@ void inithangul(void)
 } 
 
 /* im's member function */
-static PyObject *_pyhangulic_filter(PY_HANGULIC *self, PyObject *args)
+static PyObject *_pyhangulic_process(PY_HANGULIC *self, PyObject *args)
 {
     int ret;
     int ascii; 
 
     if(!PyArg_ParseTuple(args,"i", &ascii)) {
-       PyErr_SetString(_pyhangul_error,"Usage: filter(ascii)");
+       PyErr_SetString(_pyhangul_error,"Usage: process(ascii)");
        return NULL;
     }
 
-    ret = hangul_ic_filter(self->hic, ascii);
+    ret = hangul_ic_process(self->hic, ascii);
 
     return Py_BuildValue("i", ret);
 }
@@ -162,7 +162,7 @@ static PyObject *_pyhangulic_commit_string(PY_HANGULIC *self, PyObject *args)
 
 /* PY_HANGULIC methods */
 static PyMethodDef PY_HANGULIC_methods[] = {
-    { "filter",        (PyCFunction)_pyhangulic_filter,         METH_VARARGS, NULL},
+    { "process",       (PyCFunction)_pyhangulic_process,        METH_VARARGS, NULL},
     { "reset",         (PyCFunction)_pyhangulic_reset,          METH_VARARGS, NULL},
     { "flush",         (PyCFunction)_pyhangulic_flush,          METH_VARARGS, NULL},
     { "backspace",     (PyCFunction)_pyhangulic_backspace,      METH_VARARGS, NULL},
index db17845..a013e1e 100644 (file)
@@ -29,7 +29,7 @@ main(int argc, char *argv[])
     }
 
     for (ascii = getchar(); ascii != EOF; ascii = getchar()) {
-       int ret = hangul_ic_filter(hic, ascii);
+       int ret = hangul_ic_process(hic, ascii);
        commit_string = (wchar_t*)hangul_ic_get_commit_string(hic);
        n = wcstombs(commit, commit_string, sizeof(commit));
        commit[n] = '\0';