Back to index

im-sdk  12.3.91
testEIMIL.c
Go to the documentation of this file.
00001 /*
00002 Copyright 1990-2001 Sun Microsystems, Inc. All Rights Reserved.
00003 
00004 Permission is hereby granted, free of charge, to any person obtaining a
00005 copy of this software and associated documentation files (the
00006 "Software"), to deal in the Software without restriction, including
00007 without limitation the rights to use, copy, modify, merge, publish,
00008 distribute, sublicense, and/or sell copies of the Software, and to
00009 permit persons to whom the Software is furnished to do so, subject to
00010 the following conditions: The above copyright notice and this
00011 permission notice shall be included in all copies or substantial
00012 portions of the Software.
00013 
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018 IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE
00019 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00020 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
00021 THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
00022 ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
00023 
00024 
00025 Except as contained in this notice, the names of The Open Group and/or
00026 Sun Microsystems, Inc. shall not be used in advertising or otherwise to
00027 promote the sale, use or other dealings in this Software without prior
00028 written authorization from The Open Group and/or Sun Microsystems,
00029 Inc., as applicable.
00030 
00031 
00032 X Window System is a trademark of The Open Group
00033 
00034 OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
00035 logo, LBX, X Window System, and Xinerama are trademarks of the Open
00036 Group. All other trademarks and registered trademarks mentioned herein
00037 are the property of their respective owners. No right, title or
00038 interest in or to any trademark, service mark, logo or trade name of
00039 Sun Microsystems, Inc. or its licensors is granted.
00040 
00041 */
00042 
00043 #include <stdio.h>
00044 #include "SunIM.h"
00045 #include <EIMIL.h>
00046 
00047 static char testEIMIL_class[] = "org.OpenI18N.testEIMIL";
00048 static char testEIMIL_confdir[] = "../locale/common/testEIMIL";
00049 
00050 Bool    if_testEIMIL_OpenIF();
00051 Bool    if_testEIMIL_CloseIF();
00052 Bool    if_testEIMIL_GetIFValue();
00053 Bool    if_testEIMIL_SetIFValue();
00054 Bool    if_testEIMIL_OpenDesktop();
00055 Bool    if_testEIMIL_CloseDesktop();
00056 Bool    if_testEIMIL_CreateSC();
00057 Bool    if_testEIMIL_DestroySC();
00058 Bool    if_testEIMIL_GetSCValue();
00059 Bool    if_testEIMIL_SetSCValue();
00060 IMText  *if_testEIMIL_ResetSC();
00061 void    if_testEIMIL_SetSCFocus();
00062 void    if_testEIMIL_UnsetSCFocus();
00063 void    if_testEIMIL_SendEvent();
00064 
00065 /* IF Method */
00066 if_methods_t testEIMIL_method_table = {
00067     if_testEIMIL_OpenIF,
00068     if_testEIMIL_CloseIF,
00069     if_testEIMIL_GetIFValue,
00070     if_testEIMIL_SetIFValue,
00071 
00072     if_testEIMIL_OpenDesktop,
00073     if_testEIMIL_CloseDesktop,
00074 
00075     if_testEIMIL_CreateSC,
00076     if_testEIMIL_DestroySC,
00077     if_testEIMIL_GetSCValue,
00078     if_testEIMIL_SetSCValue,
00079     if_testEIMIL_ResetSC,
00080     if_testEIMIL_SetSCFocus,
00081     if_testEIMIL_UnsetSCFocus,
00082     if_testEIMIL_SendEvent,
00083 };
00084 
00085 UTFCHAR lename_string[] = {0x304B, 0x3093, 0x306A, 0x4C, 0x45, 0x0};
00086 UTFCHAR jahrn_string[] = {0x65E5, 0x672C, 0x8A9E, 0x0};
00087 UTFCHAR lookup_choice_title[] = {0x5019, 0x88DC, 0x9078, 0x629E, 0x0};
00088 
00089 static IMLEName lename = {
00090     "testEIMIL", lename_string     /* LE id, HRN */
00091 };
00092 
00093 static IMLocale locales[] = {
00094     {"ja", jahrn_string},   /* locale id, HRN */
00095     NULL
00096 };
00097 
00098 /*
00099   Session data:
00100 */
00101 
00102 typedef struct
00103 {
00104     int conv_flag;
00105     int luc_start;
00106     int preedit_start;
00107     int status_start;
00108     EIMIL_handle eh;
00109 } TestEIMILSession;
00110 
00111 static TestEIMILSession*
00112 testEIMIL_session_data(iml_session_t *s)
00113 {
00114     return (TestEIMILSession*)(s->specific_data);
00115 }
00116 
00117 static EIMIL_handle
00118 testEIMIL_handle(iml_session_t *s)
00119 {
00120     return ((TestEIMILSession*)(s->specific_data))->eh;
00121 }
00122 
00123 static iml_session_t*
00124 testEIMIL_session(EIMIL_handle eh)
00125 {
00126     return (iml_session_t*) EIMIL_get_private(eh);
00127 }
00128 
00129 /*
00130   AUX Object:
00131 */
00132 
00133 IMObjectDescriptorStruct *objects = NULL;
00134 void init_objects()
00135 {
00136 }
00137 
00138 /*
00139   IMText operations:
00140 */
00141 
00142 static IMFeedbackList*
00143 create_feedback(iml_session_t *s, int size)
00144 {
00145     int i;
00146     IMFeedbackList *feedback, *fbl;
00147     IMFeedback *fb;
00148     
00149     if (!s) return NULL;
00150 
00151     feedback = ((IMFeedbackList *)
00152               s->If->m->iml_new(s, sizeof(IMFeedbackList) * size));
00153     for (i = 0; i < size; i++) {
00154         IMFeedbackList *fbl = &feedback[i];
00155         fbl->count_feedbacks = 1;
00156        fb = ((IMFeedback *) s->If->m->iml_new(s, sizeof(IMFeedback) * 4));
00157        fbl->feedbacks = fb;
00158         memset(fbl->feedbacks, 0, sizeof(IMFeedback) * 4);
00159     }
00160     return feedback;
00161 }
00162 
00163 static IMText*
00164 create_IMText(iml_session_t *s, int len)
00165 {
00166     int i;
00167     IMText *p;
00168     
00169     if (!s) return NULL;
00170 
00171     p = (IMText *) s->If->m->iml_new(s, sizeof(IMText));
00172     memset(p, 0, sizeof(IMText));
00173     p->encoding = UTF16_CODESET;
00174     p->text.utf_chars = ((UTFCHAR *)
00175                       s->If->m->iml_new(s, sizeof(UTFCHAR) * (len + 1)));
00176     p->char_length = len;
00177     p->feedback = create_feedback(s, len);
00178 
00179     return p;
00180 }
00181 
00182 static IMText*
00183 UTFCHAR_to_IMText(iml_session_t *s, UTFCHAR *p)
00184 {
00185     IMText *pit;
00186     UTFCHAR *p2 = p;
00187     int len;
00188 
00189     for (len = 0;*p2;p2++) len++;
00190     pit = create_IMText(s, len);
00191     if (!pit) return NULL;
00192     memcpy(pit->text.utf_chars, p, (len + 1) * sizeof(UTFCHAR));
00193 
00194     return pit;
00195 }
00196 
00197 static IMText*
00198 ASCIZ_to_IMText(
00199     iml_session_t *s,
00200     unsigned char *p
00201 )
00202 {
00203     IMText *pit;
00204     UTFCHAR *pu;
00205     int len = strlen(p);
00206 
00207     pit = create_IMText(s, len);
00208     if (!pit) return NULL;
00209 
00210     pu = pit->text.utf_chars;
00211     for (;;) {
00212        *pu++ = *p++;
00213        if (!*p) break;
00214     }
00215 
00216     return pit;
00217 }
00218 
00219 /*
00220   Preedit
00221 */
00222 
00223 static void
00224 testEIMIL_preedit_draw(
00225     iml_session_t *s
00226 )
00227 {
00228     iml_inst *lp;
00229     iml_inst *rrv = NULL;
00230     IMText *p;
00231     TestEIMILSession *pes = testEIMIL_session_data(s);
00232 
00233     if (pes->preedit_start == False) {
00234         lp = s->If->m->iml_make_preedit_start_inst(s);
00235         s->If->m->iml_link_inst_tail(&rrv, lp);
00236         pes->preedit_start = True;
00237     }
00238 
00239     // TODO
00240     p = ASCIZ_to_IMText(s, "test");
00241 
00242     lp = s->If->m->iml_make_preedit_draw_inst(s, p);
00243     s->If->m->iml_link_inst_tail(&rrv, lp);
00244     s->If->m->iml_execute(s, &rrv);
00245 }
00246 
00247 static void
00248 testEIMIL_preedit_done(iml_session_t *s)
00249 {
00250     TestEIMILSession *pes = testEIMIL_session_data(s);
00251     if (pes->preedit_start == True) {
00252        iml_inst *lp;
00253         lp = s->If->m->iml_make_preedit_done_inst(s);
00254        s->If->m->iml_execute(s, &lp);
00255         pes->preedit_start = False;
00256     }
00257 }
00258 
00259 /*
00260   EIMIL handlers
00261  */
00262 
00263 static int
00264 testEIMIL_event_handler(
00265     EIMIL_handle eh,
00266     EIMIL_event *pevent
00267 )
00268 {
00269     iml_inst *lp;
00270     iml_session_t *s = testEIMIL_session(eh);
00271     IMInputEvent *piev;
00272 
00273     piev = EIMIL_convert_event_to_IMInputEvent(pevent);
00274 
00275     if (piev) {
00276        IMKeyListEvent *pimkev = (IMKeyListEvent*) piev;
00277        /* I don't process this keyevent.  Return it. */
00278        lp = s->If->m->iml_make_keypress_inst(s, ((IMKeyEventStruct *)
00279                                             pimkev->keylist));
00280        s->If->m->iml_execute(s, &lp);
00281     }
00282 
00283     return 1;
00284 }
00285 
00286 static int
00287 testEIMIL_uichange_handler(
00288     EIMIL_handle eh,
00289     EIMIL_value *pval,
00290     int uichange_flags
00291 )
00292 {
00293     iml_session_t *s = testEIMIL_session(eh);
00294 
00295     switch (uichange_flags) {
00296       case EIMIL_ENABLE_PREEDIT:
00297       case EIMIL_DISABLE_PREEDIT:
00298       case EIMIL_UPDATE_PREEDIT:
00299       case EIMIL_ENABLE_LOOKUP_CHOICE:
00300       case EIMIL_DISABLE_LOOKUP_CHOICE:
00301       case EIMIL_UPDATE_LOOKUP_CHOICE:
00302        ;
00303     }
00304 
00305     return 1;
00306 }
00307 
00308 
00309 /*
00310   LEIF operations.
00311 */
00312 
00313 static void
00314 send_commit(
00315     iml_session_t *s,
00316     IMText *p,
00317     int executep
00318 )
00319 {
00320     iml_inst *lp;
00321     iml_inst *rrv = NULL;
00322 
00323     lp = s->If->m->iml_make_commit_inst(s, p);
00324     s->If->m->iml_link_inst_tail(&rrv, lp);
00325     if (executep) {
00326        s->If->m->iml_execute(s, &rrv);
00327     }
00328     return;
00329 }
00330 
00331 /*
00332   Initialization.
00333 */
00334 
00335 static Bool
00336 testEIMIL_register_class(
00337     char *if_path
00338 )
00339 {
00340     char *buf;
00341     int ipsize;
00342 
00343     ipsize = strlen(if_path);
00344     if (ipsize < 1) return False;
00345     buf = (char*) malloc((ipsize + 2) * sizeof(char)
00346                       + sizeof(testEIMIL_confdir));
00347     strcpy(buf, if_path);
00348     buf[ipsize] = '/';
00349     buf[ipsize + 1] = '\0';
00350     strcat(buf, testEIMIL_confdir);
00351 
00352     if (!EIMIL_register_class(testEIMIL_class, buf))
00353        return False;
00354 
00355     return True;
00356 }
00357 
00358 static EIMIL_handle eh_initial;
00359 
00360 static Bool
00361 testEIMIL_init(
00362     char *if_path
00363 )
00364 {
00365     unsigned char *pfile;
00366     if (eh_initial) return True;
00367 
00368     testEIMIL_register_class(if_path);
00369     pfile = EIMIL_find_file(testEIMIL_class, "default.xml");
00370     if (!pfile) return False;
00371     if (!EIMIL_parse_file(&eh_initial, pfile)) return False;
00372     EIMIL_register_handler(eh_initial,
00373                         testEIMIL_event_handler,
00374                         NULL, NULL);
00375 
00376     return True;
00377 }
00378 
00379 void
00380 testEIMIL_status_draw(
00381     iml_session_t *s
00382 )
00383 {
00384     iml_inst *lp;
00385     iml_inst *rrv = NULL;
00386     IMText *p;
00387     TestEIMILSession *pes = testEIMIL_session_data(s);
00388 
00389     if (pes->conv_flag) {
00390        p = ASCIZ_to_IMText(s, "ON");
00391     } else {
00392        p = ASCIZ_to_IMText(s, "OFF");
00393     }
00394     if (!p) return;
00395 
00396     if (pes->status_start == False) {
00397         lp = s->If->m->iml_make_status_start_inst(s);
00398         s->If->m->iml_link_inst_tail(&rrv, lp);
00399         pes->status_start = True;
00400     }
00401 
00402     lp = s->If->m->iml_make_status_draw_inst(s, p);
00403     s->If->m->iml_link_inst_tail(&rrv, lp);
00404     
00405     s->If->m->iml_execute(s, &rrv);
00406 }
00407 
00408 void
00409 testEIMIL_start_lookup_choice(
00410     iml_session_t *s,
00411     iml_inst **prrv,
00412     int num
00413 )
00414 {
00415     TestEIMILSession *pes = testEIMIL_session_data(s);
00416     if (pes->luc_start == False) {
00417        iml_inst *lp;
00418        IMLookupStartCallbackStruct *start;
00419         start = ((IMLookupStartCallbackStruct *)
00420                s->If->m->iml_new(s, sizeof(IMLookupStartCallbackStruct)));
00421        start->whoIsMaster = IMIsMaster;
00422         start->IMPreference = (LayoutInfo *) s->If->m->iml_new(s, sizeof(LayoutInfo));
00423        memset(start->IMPreference, 0, sizeof(LayoutInfo));
00424 
00425         start->IMPreference->choice_per_window = num;
00426         start->IMPreference->ncolumns = 1;
00427         start->IMPreference->nrows = num;
00428         start->IMPreference->drawUpDirection = DrawUpHorizontally;
00429         start->IMPreference->whoOwnsLabel = IMOwnsLabel;
00430         start->CBPreference = NULL;
00431 
00432         lp = s->If->m->iml_make_lookup_start_inst(s, start);
00433        s->If->m->iml_link_inst_tail(prrv, lp);
00434         pes->luc_start = True;
00435     }
00436 }
00437 
00438 void
00439 testEIMIL_show_lookup_choice(
00440     iml_session_t *s
00441 )
00442 {
00443     int num;
00444     iml_inst *lp;
00445     iml_inst *rrv = NULL;
00446     IMText *p;
00447     IMLookupDrawCallbackStruct *draw;
00448     TestEIMILSession *pes = testEIMIL_session_data(s);
00449 
00450     draw = ((IMLookupDrawCallbackStruct *)
00451            s->If->m->iml_new(s, sizeof(IMLookupDrawCallbackStruct)));
00452     memset(draw, 0, sizeof(IMLookupDrawCallbackStruct));
00453     draw->title = UTFCHAR_to_IMText(s, lookup_choice_title);
00454 
00455     /* set choices */
00456     {
00457        /* TODO */
00458 #if 0
00459        fprintf(stderr, "draw->index_of_first_candidate=%x\n",
00460               draw->index_of_first_candidate);
00461        fprintf(stderr, "draw->index_of_last_candidate=%x\n",
00462               draw->index_of_last_candidate);
00463        fprintf(stderr, "draw->n_choices=%x\n",
00464               draw->n_choices);
00465        fprintf(stderr, "draw->choices=%x\n",
00466               draw->choices);
00467        fprintf(stderr, "draw->choices->label=%x\n",
00468               draw->choices->label);
00469        fprintf(stderr, "draw->max_len=%x\n", max_len);
00470        fprintf(stderr, "draw->index_of_current_candidate=%x\n",
00471               draw->index_of_current_candidate);
00472 #endif
00473     }
00474     testEIMIL_start_lookup_choice(s, &rrv, num);
00475     lp = s->If->m->iml_make_lookup_draw_inst(s, draw);
00476     s->If->m->iml_link_inst_tail(&rrv, lp);
00477     s->If->m->iml_execute(s, &rrv);
00478 }
00479 
00480 void
00481 testEIMIL_lookup_choice_done(iml_session_t *s)
00482 {
00483     TestEIMILSession *pes = testEIMIL_session_data(s);
00484     if (pes->luc_start == True) {
00485        iml_inst *lp;
00486         lp = s->If->m->iml_make_lookup_done_inst(s);
00487        s->If->m->iml_execute(s, &lp);
00488         pes->luc_start = False;
00489     }
00490 }
00491 
00492 void
00493 testEIMIL_make_conversion_off(
00494     iml_session_t *s
00495 )
00496 {
00497     TestEIMILSession *pes = testEIMIL_session_data(s);
00498 
00499     pes->conv_flag = 0;
00500     testEIMIL_status_draw(s);
00501     testEIMIL_lookup_choice_done(s);
00502     testEIMIL_preedit_done(s);
00503 }
00504 
00505 void
00506 testEIMIL_make_conversion_on(
00507     iml_session_t  *s
00508 )
00509 {
00510     TestEIMILSession *pes = testEIMIL_session_data(s);
00511 
00512     pes->conv_flag = 1;
00513     testEIMIL_status_draw(s);
00514 }
00515 
00516 /*
00517   IF offer.
00518 */
00519 
00520 void
00521 if_GetIfInfo(IMArgList args, int num_args)
00522 {
00523     int i;
00524     init_objects();
00525     for (i = 0; i < num_args; i++, args++) {
00526         switch (args->id) {
00527          case IF_VERSION:
00528           args->value = (IMArgVal) "1.2";
00529           break;
00530          case IF_METHOD_TABLE:
00531           args->value = (IMArgVal) &testEIMIL_method_table;
00532           break;
00533          case IF_LE_NAME:
00534           args->value = (IMArgVal) &lename;
00535           break;
00536          case IF_SUPPORTED_LOCALES:
00537           args->value = (IMArgVal) &locales;
00538           break;
00539          case IF_SUPPORTED_OBJECTS:
00540           args->value = (IMArgVal) objects;
00541           break;
00542          case IF_NEED_THREAD_LOCK:
00543           args->value = (IMArgVal) True;
00544           break;
00545        default:
00546            break;
00547        }
00548     }
00549 }
00550 
00551 /*
00552   IFs
00553 */
00554 
00555 Bool
00556 if_testEIMIL_OpenIF(
00557     iml_if_t *If
00558 )
00559 {
00560     return testEIMIL_init(If->ifpath_name);
00561 }
00562 
00563 Bool
00564 if_testEIMIL_CloseIF(
00565     iml_if_t *If
00566 )
00567 {
00568     EIMIL_free_handle(eh_initial);
00569     return True;
00570 }
00571 
00572 Bool
00573 if_testEIMIL_GetIFValue(
00574     iml_if_t *If,
00575     IMArgList args,
00576     int num_args
00577 )
00578 {
00579     return True;
00580 }
00581 
00582 Bool
00583 if_testEIMIL_SetIFValue(
00584     iml_if_t *If,
00585     IMArgList args,
00586     int num_args
00587 )
00588 {
00589     return True;
00590 }
00591 
00592 Bool
00593 if_testEIMIL_OpenDesktop(
00594     iml_desktop_t * desktop,
00595     IMArgList args,
00596     int num_args
00597 )
00598 {
00599     return True;
00600 }
00601 
00602 Bool
00603 if_testEIMIL_CloseDesktop(
00604     iml_desktop_t * desktop
00605 )
00606 {
00607     return True;
00608 }
00609 
00610 Bool
00611 if_testEIMIL_CreateSC(
00612     iml_session_t *s,
00613     IMArgList args,
00614     int num_args
00615 )
00616 {
00617     EIMIL_handle eh;
00618     TestEIMILSession *pes = (TestEIMILSession*) malloc(sizeof(TestEIMILSession));
00619 
00620     if (!pes) return False;
00621 
00622     if (!EIMIL_duplicate_handle(&eh, eh_initial)) return False;
00623     EIMIL_set_private(eh, s);
00624 
00625     pes->eh = eh;
00626     s->specific_data = (void*) pes;
00627 
00628     return True;
00629 }
00630 
00631 Bool
00632 if_testEIMIL_DestroySC(
00633     iml_session_t *s
00634 )
00635 {
00636     EIMIL_free_handle(testEIMIL_handle(s));
00637 
00638     return True;
00639 }
00640 
00641 IMText*
00642 if_testEIMIL_ResetSC(
00643     iml_session_t *s
00644 )
00645 {
00646     iml_inst *lp;
00647     TestEIMILSession *pes = testEIMIL_session_data(s);
00648 
00649     EIMIL_free_handle(testEIMIL_handle(s));
00650     EIMIL_duplicate_handle(pes->eh, eh_initial);
00651 
00652     /* erase preedit. */
00653     lp = s->If->m->iml_make_preedit_erase_inst(s);
00654     s->If->m->iml_execute(s, &lp);
00655 
00656     return (IMText*) NULL;
00657 }
00658 
00659 Bool
00660 if_testEIMIL_SetSCValue(
00661     iml_session_t *s,
00662     IMArgList args,
00663     int num
00664 )
00665 {
00666     int i;
00667     IMArg *p = args;
00668 
00669     for (i = 0; i < num; i++, p++) {
00670         switch (p->id) {
00671        case SC_TRIGGER_ON_NOTIFY:
00672            testEIMIL_make_conversion_on(s);
00673            break;
00674        case SC_TRIGGER_OFF_NOTIFY:
00675            testEIMIL_make_conversion_off(s);
00676            break;
00677        case SC_REALIZE:
00678            /* currently do nothing. */
00679            break;
00680        case SC_LOOKUP_LABELTYPE:
00681            break;
00682        default:
00683            break;
00684        }
00685     }
00686 
00687     return True;
00688 }
00689 
00690 Bool
00691 if_testEIMIL_GetSCValue(iml_session_t *s, IMArgList args, int num_args)
00692 {
00693     int i;
00694     IMArg *p = args;
00695 
00696     /* Canna uses at least LATIN, HIRAGANA, KATAKANA,
00697        and KANJI scripts.
00698        That's all to it? */
00699     static int charsubset[] = {
00700         67,                 /* LATIN */
00701         47,                 /* HIRAGANA */
00702         48,                 /* KATAKANA */
00703         71,                 /* KANJI */
00704         0
00705     };
00706 
00707     for (i = 0; i < num_args; i++, p++) {
00708         switch (p->id) {
00709             case SC_SUPPORTED_CHARACTER_SUBSETS:
00710                 /* specify CHARACTER_SUBSETS */
00711                 p->value = (IMArgVal) charsubset;
00712                 break;
00713             default:
00714                 break;
00715             }
00716     }
00717     return True;
00718 }
00719 
00720 void
00721 if_testEIMIL_SetSCFocus(iml_session_t *s)
00722 {
00723     testEIMIL_status_draw(s);
00724 }
00725 
00726 void
00727 if_testEIMIL_UnsetSCFocus(iml_session_t *s)
00728 {
00729     /* do nothing. */
00730 }
00731 
00732 void
00733 if_testEIMIL_SendEvent(iml_session_t *s, IMInputEvent *ev)
00734 {
00735     int n;
00736     EIMIL_value **ppevs;
00737     EIMIL_handle eh = testEIMIL_handle(s);
00738 
00739     n = EIMIL_construct_events_from_IMInputEvent(ev, &ppevs);
00740     for (; n > 0; n--, ppevs++) {
00741        if (ppevs) EIMIL_send_event(eh, *ppevs);
00742     }
00743     return;
00744 }
00745 
00746 /* Local Variables: */
00747 /* c-file-style: "iiim-project" */
00748 /* End: */