Back to index

im-sdk  12.3.91
Classes | Defines | Typedefs | Enumerations | Functions
EIMILint.h File Reference
#include <threaddef.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  EIMIL_attrs
struct  EIMIL_attr_template
struct  EIMIL_element_template
struct  EIMIL_XMLNS
struct  EIMIL_parser_state
struct  EIMIL_engine_table
struct  EIMIL_engine
struct  EIMIL_cdata
struct  EIMIL_data
struct  EIMIL_journal

Defines

#define EIMIL_MAXERRMSG   1024
#define EIMIL_element_contain_pcdatap(pdt)   ((pdt)->option | EIMIL_allow_PCDATA)
#define EIMIL_SET_CURRENT_SUBELEMENT_TEMPLATE(pps, pet)   ((pps)->psubet = (pet))
#define EIMIL_EVENT_QUEUESIZE   16
#define EIMIL_JOURNAL_ID_MAX   ((1 << 28) - 2)
#define EIMIL_JOURNAL_NONRECORD_TID   (EIMIL_JOURNAL_ID_MAX + 1)
#define EIMIL_JOURNAL_EMPTY_TID   0
#define EIMIL_JOURNAL_EMPTY_SLOT(ej)   ((ej).id == 0)

Typedefs

typedef struct EIMIL_attrs
typedef struct EIMIL_attr_template
typedef struct EIMIL_element_template
typedef struct EIMIL_dictionary
typedef struct EIMIL_XMLNS
typedef struct EIMIL_parser_state
typedef struct EIMIL_engine_table
typedef struct EIMIL_engine
typedef struct EIMIL_cdata
typedef struct EIMIL_data
typedef struct EIMIL_journal
typedef int(* EIMIL_parser_function )(EIMIL_data *, EIMIL_attrs *, enum EIMIL_TAG_TYPE type, UTF8 *pchars, void **pprivate)
typedef enum EIMIL_ENGINE_STATUS(* EIMIL_engine_execute_handler )(void *private)
typedef void *(* EIMIL_engine_handler )(enum EIMIL_ENGINE_COMMAND m, EIMIL_data *ped, void *class_private, void *handle_private)

Enumerations

enum  EIMIL_TAG_TYPE {
  EIMIL_START_TAG, EIMIL_END_TAG, EIMIL_EMPTY_TAG, EIMIL_PI_TAG,
  EIMIL_DOCTYPE_TAG, EIMIL_COMMENT_TAG, EIMIL_CDATA_TAG, EIMIL_CHARDATA,
  EIMIL_INVALID_TAG
}
enum  EIMIL_attr_template_option { EIMIL_attr_NORMAL, EIMIL_attr_REQUIRED, EIMIL_attr_IMPLIED, EIMIL_attr_FIXED }
enum  EIMIL_element_template_option {
  EIMIL_element_single = (1 << 0), EIMIL_element_0or1, EIMIL_element_multiple, EIMIL_element_morethan1,
  EIMIL_element_option_mask = ((1 << 8) - 1), EIMIL_subelement_ordered = (1 << 8), EIMIL_allow_PCDATA = (1 << 9), EIMIL_PCDATA_TOKEN = (1 << 10),
  EIMIL_PCDATA_QUOTED_TOKEN = (1 << 11), EIMIL_element_lock_template = (1 << 12), EIMIL_element_EMPTY = (1 << 13)
}
enum  EIMIL_ENGINE_STATUS {
  EIMIL_ENGINE_STATUS_SUCCESS = 0, EIMIL_ENGINE_STATUS_SUSPENDED, EIMIL_ENGINE_STATUS_INTERRUPTED, EIMIL_ENGINE_STATUS_SKIPPED,
  EIMIL_ENGINE_STATUS_ERROR
}
enum  EIMIL_ENGINE_COMMAND { EIMIL_ENGINE_INSTANCIATE, EIMIL_ENGINE_DUPLICATE, EIMIL_ENGINE_DESTRUCT, EIMIL_ENGINE_UNINSTANCIATE }

Functions

EIMIL_symbolEIMIL_intern_soft (EIMIL_dictionary *pdic, unsigned char *name)
EIMIL_symbolEIMIL_register_symbol (EIMIL_data *ped, EIMIL_dictionary *pdic, unsigned char *name, enum EIMIL_CATEGORY cat, enum EIMIL_TYPE type)
EIMIL_symbolEIMIL_lookup_symbol_internal (EIMIL_dictionary *pdic, CARD32BIT id)
void EIMIL_destruct_symbol (EIMIL_symbol *psym)
EbyteEIMIL_get_attr_cdata (Ebyte *val, UTF8 **result)
EbyteEIMIL_get_attr_nmtoken (Ebyte *val, UTF8 **result)
EbyteEIMIL_get_attr_nmtokens (Ebyte *val, UTF8 **result)
void EIMIL_remove_attr (EIMIL_attrs *patr)
int EIMIL_register_engine (const UTF8 *classname, EIMIL_element_template *pet, EIMIL_engine_handler handler, EIMIL_engine_execute_handler execute_handler, const UTF8 *uri)
EIMIL_dataEIMIL_make_handle_data (EIMIL_cdata *pbase)
char * EIMIL_class_to_pathname (char *classname)
void EIMIL_destruct_mtext (EIMIL_mtext *pm)
int EIMIL_journal_initialize (EIMIL_handle eh)
void EIMIL_journal_free (EIMIL_handle eh)
void EIMIL_set_error (EIMIL_data *pps, const char *fmt,...)
void EIMIL_set_outof_memory (EIMIL_data *pps)
int EIMIL_parse_start (EIMIL_data *ped)
EIMIL_dictionaryEIMIL_new_dictionary (int size, int id_req_p)
void EIMIL_free_dictionary (EIMIL_dictionary *pdic)
void EIMIL_free_dictionary_and_symbol (EIMIL_dictionary *pdic)
EIMIL_dictionaryEIMIL_duplicate_dictionary (EIMIL_dictionary *psdic)
int EIMIL_toggle_preedit (EIMIL_data *ped, int flag)
int EIMIL_update_preedit (EIMIL_data *ped)
int EIMIL_toggle_lookup_choice (EIMIL_data *ped, int flag)
int EIMIL_update_lookup_choice (EIMIL_data *ped)
int EIMIL_reply_event (EIMIL_data *ped, EIMIL_value *pv_event)
int EIMIL_queue_event (EIMIL_data *ped, EIMIL_value *pv_event)
EIMIL_valueEIMIL_next_event (EIMIL_data *ped)
void EIMIL_set_out_of_memory (EIMIL_data *ped)
int EIMILFile_init ()
int PCE_init ()
int EIMIL_mtext_diff (EIMIL_mtext *porig, EIMIL_mtext *pnew, IMDifferential *pdiff)

Class Documentation

struct EIMIL_attrs

Definition at line 48 of file EIMILint.h.

Class Members
UTF8 * name
Ebyte * val
struct EIMIL_attr_template

Definition at line 60 of file EIMILint.h.

Class Members
char * name
struct EIMIL_element_template

Definition at line 80 of file EIMILint.h.

Collaboration diagram for EIMIL_element_template:
Class Members
EIMIL_attr_template * attrtpls
EIMIL_parser_function func
const char * name
const int option
void * private
EIMIL_element_template * subelems
struct EIMIL_XMLNS

Definition at line 98 of file EIMILint.h.

Class Members
UTF8 * prefix
UTF8 * uri
struct EIMIL_parser_state

Definition at line 103 of file EIMILint.h.

Collaboration diagram for EIMIL_parser_state:
Class Members
unsigned char * buf
Ebyte * current
const UTF8 * current_uri
int element_depth
int element_idx
Ebyte * end
int lineno
EIMIL_element_template * pcet
EIMIL_element_template * psubet
EIMIL_XMLNS * pxmlns
Ebyte * start
int xmlns_alloced
int xmlns_entries
struct EIMIL_engine_table

Definition at line 151 of file EIMILint.h.

Collaboration diagram for EIMIL_engine_table:
Class Members
UTF8 * classname
EIMIL_engine_execute_handler execute_handler
EIMIL_engine_handler handler
EIMIL_element_template * pet
UTF8 * uri
struct EIMIL_engine

Definition at line 159 of file EIMILint.h.

Collaboration diagram for EIMIL_engine:
Class Members
int idx
UTF8 * name
void * private
EIMIL_engine_table * ptable
struct EIMIL_cdata

Definition at line 166 of file EIMILint.h.

Collaboration diagram for EIMIL_cdata:
Class Members
EIMIL_EVENT_PROC evproc
int id_counter
int num_engines
EIMIL_OPISSUE_PROC opproc
EIMIL_engine * pengine
EIMIL_parser_state ps
THREAD_SYNC_OBJECT sync_object
EIMIL_UICHANGE_PROC uiproc
struct EIMIL_data

Definition at line 180 of file EIMILint.h.

Collaboration diagram for EIMIL_data:
Class Members
int commitnotify_numops
EIMIL_symbol ** commitnotify_ops
EIMIL_TID current_journal_id
int duplicated
char errstr
EIMIL_cdata * pcommon
EIMIL_value ** pcur_ev
EIMIL_dictionary * pdic
void ** pengine_context
EIMIL_journal * pjst
EIMIL_value ** pqueue_ev
void * private
EIMIL_symbol * psym_uidata
EIMIL_value * queueslots
struct EIMIL_journal

Definition at line 215 of file EIMILint.h.

Collaboration diagram for EIMIL_journal:
Class Members
EIMIL_TID id
struct EIMIL_journal * next
struct EIMIL_journal * prev
EIMIL_symbol * psym
EIMIL_value * pv

Define Documentation

#define EIMIL_element_contain_pcdatap (   pdt)    ((pdt)->option | EIMIL_allow_PCDATA)

Definition at line 88 of file EIMILint.h.

#define EIMIL_EVENT_QUEUESIZE   16

Definition at line 179 of file EIMILint.h.

#define EIMIL_JOURNAL_EMPTY_SLOT (   ej)    ((ej).id == 0)

Definition at line 221 of file EIMILint.h.

#define EIMIL_JOURNAL_EMPTY_TID   0

Definition at line 212 of file EIMILint.h.

#define EIMIL_JOURNAL_ID_MAX   ((1 << 28) - 2)

Definition at line 210 of file EIMILint.h.

Definition at line 211 of file EIMILint.h.

#define EIMIL_MAXERRMSG   1024

Definition at line 10 of file EIMILint.h.

#define EIMIL_SET_CURRENT_SUBELEMENT_TEMPLATE (   pps,
  pet 
)    ((pps)->psubet = (pet))

Definition at line 121 of file EIMILint.h.


Typedef Documentation

typedef struct EIMIL_attr_template

Definition at line 17 of file EIMILint.h.

typedef struct EIMIL_attrs

Definition at line 16 of file EIMILint.h.

typedef struct EIMIL_cdata

Definition at line 24 of file EIMILint.h.

typedef struct EIMIL_data

Definition at line 25 of file EIMILint.h.

typedef struct EIMIL_dictionary

Definition at line 19 of file EIMILint.h.

typedef struct EIMIL_element_template

Definition at line 18 of file EIMILint.h.

typedef struct EIMIL_engine

Definition at line 23 of file EIMILint.h.

typedef enum EIMIL_ENGINE_STATUS(* EIMIL_engine_execute_handler)(void *private)

Definition at line 133 of file EIMILint.h.

typedef void*(* EIMIL_engine_handler)(enum EIMIL_ENGINE_COMMAND m, EIMIL_data *ped, void *class_private, void *handle_private)

Definition at line 144 of file EIMILint.h.

typedef struct EIMIL_engine_table

Definition at line 22 of file EIMILint.h.

typedef struct EIMIL_journal

Definition at line 26 of file EIMILint.h.

typedef int(* EIMIL_parser_function)(EIMIL_data *, EIMIL_attrs *, enum EIMIL_TAG_TYPE type, UTF8 *pchars, void **pprivate)

Definition at line 40 of file EIMILint.h.

typedef struct EIMIL_parser_state

Definition at line 21 of file EIMILint.h.

typedef struct EIMIL_XMLNS

Definition at line 20 of file EIMILint.h.


Enumeration Type Documentation

Enumerator:
EIMIL_attr_NORMAL 
EIMIL_attr_REQUIRED 
EIMIL_attr_IMPLIED 
EIMIL_attr_FIXED 

Definition at line 53 of file EIMILint.h.

Enumerator:
EIMIL_element_single 
EIMIL_element_0or1 
EIMIL_element_multiple 
EIMIL_element_morethan1 
EIMIL_element_option_mask 
EIMIL_subelement_ordered 
EIMIL_allow_PCDATA 
EIMIL_PCDATA_TOKEN 
EIMIL_PCDATA_QUOTED_TOKEN 
EIMIL_element_lock_template 
EIMIL_element_EMPTY 

Definition at line 66 of file EIMILint.h.

Enumerator:
EIMIL_ENGINE_INSTANCIATE 
EIMIL_ENGINE_DUPLICATE 
EIMIL_ENGINE_DESTRUCT 
EIMIL_ENGINE_UNINSTANCIATE 

Definition at line 137 of file EIMILint.h.

Enumerator:
EIMIL_ENGINE_STATUS_SUCCESS 
EIMIL_ENGINE_STATUS_SUSPENDED 
EIMIL_ENGINE_STATUS_INTERRUPTED 
EIMIL_ENGINE_STATUS_SKIPPED 
EIMIL_ENGINE_STATUS_ERROR 

Definition at line 124 of file EIMILint.h.

Enumerator:
EIMIL_START_TAG 
EIMIL_END_TAG 
EIMIL_EMPTY_TAG 
EIMIL_PI_TAG 
EIMIL_DOCTYPE_TAG 
EIMIL_COMMENT_TAG 
EIMIL_CDATA_TAG 
EIMIL_CHARDATA 
EIMIL_INVALID_TAG 

Definition at line 28 of file EIMILint.h.


Function Documentation

char* EIMIL_class_to_pathname ( char *  classname)

Definition at line 400 of file EIMILTextUtil.c.

{
    int i, j;
    EIMIL_mtext_props *pmp;
    EIMIL_value **ppv;
    EIMIL_prop *pprop;


    if (pmt->pslots) {
       for (pmp = pmt->pslots, i = 0;
            i < pmt->slotsnum;
            i++, pmp++) {
           if (pmp->pprops) {
              for (ppv = pmp->pprops, j = 0;
                   j < pmp->num;
                   j++, ppv++) {
                  ASSERT((*ppv)->type == EIMIL_TYPE_PROP);
                  pprop = &(*ppv)->v.prop;
                  ASSERT(pprop->target == pmt);
                  pprop->st = pprop->end = -1;
                  pprop->target = NULL;
                  EIMIL_RMREF(**ppv);
              }
              free(pmp->pprops);
           }
       }
       free(pmt->pslots);
    }
    if (pmt->ustr) free(pmt->ustr);

    return;
}

Here is the caller graph for this function:

Definition at line 2202 of file EIMIL.c.

{

    if (!psym) return;

    if (psym->name) free(psym->name);
    switch(psym->cat) {
      case EIMIL_CAT_VARIABLE:
       if (psym->obj.v.pv) {
         if (!psym->obj.v.constp)
             EIMIL_RMREF(*psym->obj.v.pv);
       }
       break;
      case EIMIL_CAT_EXCEPTION:
      {
         if (psym->obj.e.msgs) {
             EIMIL_message *msgs;
             for (msgs = psym->obj.e.msgs;msgs->lang;msgs++) {
                free(msgs->lang);
                free(msgs->msg);
             }
             free(psym->obj.e.msgs);
         }
      }
      case EIMIL_CAT_OPERATION:
      {
         int i, n;
         EIMIL_dependency *pdeps;
         EIMIL_symbol **pps;

         n = psym->obj.o.numdepends;
         pdeps = psym->obj.o.pdeps;
         for (i = 0;i < n;i++, pdeps++) {
             pps = pdeps->depends;
             if (pps) free(pps);
             pps = pdeps->affects;
             if (pps) free(pps);
         }
         free(pdeps);
         break;
      }
      case EIMIL_CAT_FUNCTION:
       /* TODO */
       break;
      default:
       break;
    }

    free(psym);
}

Here is the caller graph for this function:

Definition at line 2379 of file EIMIL.c.

{
    int i, j, n, size;
    EIMIL_symbol **ppss, **ppsd, **ppsdh;
    EIMIL_symbol *psym;
    EIMIL_dictionary *pddic;

    pddic = EIMIL_new_dictionary(psdic->size, (psdic->iddic != NULL));
    if (!pddic) return NULL;

    /* STEP1: shallow copy */
    for (i = 0; i < psdic->size; i++) {
       ppss = psdic->namedic[i];
       if (!ppss) continue;
       for (n = 0; *ppss; ppss++, n++);
       ppss = psdic->namedic[i];
       size = (((n / EIMIL_DICTIONARY_SUBSLOT_UNIT) + 1)
              * EIMIL_DICTIONARY_SUBSLOT_UNIT);
       ppsdh = (EIMIL_symbol**) malloc(sizeof(EIMIL_symbol*) * size);
       if (!ppsdh) return NULL;
       ppsd = ppsdh;
       ppsd[n] = NULL;
       for (j = 0; j < n; j++, ppss++, ppsd++) {
           *ppsd = *ppss;
           register_symbol_id(pddic, *ppsd);
       }
       pddic->namedic[i] = ppsd;
    }
    /* STEP2: variable duplication. */
    for (i = 0; i < psdic->size; i++) {
       ppss = psdic->namedic[i];
       if (!ppss) continue;
       ppsd = pddic->namedic[i];
       for (; *ppss; ppss++, ppsd++) {
           if (ppss[0]->cat == EIMIL_CAT_VARIABLE) {
              psym = duplicate_variable_symbol(*ppss);
              if (!psym) return NULL;
              *ppsd = psym;
              re_register_symbol_internal(pddic, psym);
           }
       }
    }
    /* STEP3: rebuild operation symbol.  */
    for (i = 0; i < psdic->size; i++) {
       ppss = psdic->namedic[i];
       if (!ppss) continue;
       ppsd = pddic->namedic[i];
       for (; *ppss; ppss++, ppsd++) {
           if (ppss[0]->cat == EIMIL_CAT_OPERATION) {
              psym = rebuild_operation_symbol(pddic, *ppss);
              if (!psym) return NULL;
              *ppsd = psym;
              re_register_symbol_internal(pddic, psym);
           }
       }
    }

    return pddic;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1775 of file EIMIL.c.

{
    if (!pdic) return;

    /* TODO: free EIMIL_objects!!! */
    free(pdic->namedic);
    if (pdic->iddic) free(pdic->iddic);
    free(pdic);
    return;
}

Here is the caller graph for this function:

Definition at line 1789 of file EIMIL.c.

{
    int i;
    EIMIL_symbol **pps;

    if (!pdic) return;

    for (i = 0; i < pdic->size; i++) {
       for (pps = pdic->namedic[i]; (pps && *pps); pps++) {
           EIMIL_destruct_symbol(*pps);
       }
        if (pdic->namedic[i]) free(pdic->namedic[i]);
    }
    if (pdic->iddic) {
        for (i = 0; i < pdic->size; i++) {
            if (pdic->iddic[i]) free(pdic->iddic[i]);
        }
    }
    EIMIL_free_dictionary(pdic);
    return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Ebyte* EIMIL_get_attr_cdata ( Ebyte val,
UTF8 **  result 
)

Definition at line 647 of file EIMIL.c.

{
    Ebyte *e;

    for (e = val; *e; e++);

    if (result) {
       *result = EIMIL_resolve_reference(val, e);
       if (!(*result)) return NULL;
    }

    return e;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Ebyte* EIMIL_get_attr_nmtoken ( Ebyte val,
UTF8 **  result 
)

Definition at line 665 of file EIMIL.c.

{
    Ebyte *s, *e, *p;

    for (s = val; (*s && EIMIL_isspace(*s)); s++);
    if (!(*s)) return NULL;
    for (e = s; (*e && !EIMIL_isspace(*e)); e++);
    for (p = e; *p; p++) {
       if (!EIMIL_isspace(*p)) return NULL;
    }

    if (result) {
       *result = EIMIL_resolve_reference(s, e);
       if (!(*result)) return NULL;
    }

    return e;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Ebyte* EIMIL_get_attr_nmtokens ( Ebyte val,
UTF8 **  result 
)

Definition at line 691 of file EIMIL.c.

{
    Ebyte *s, *e;

    for (s = val; (*s && EIMIL_isspace(*s)); s++);
    if (!(*s)) return NULL;
    for (e = s; (*e && !EIMIL_isspace(*e)); e++);

    if (result) {
       *result = EIMIL_resolve_reference(s, e);
       if (!(*result)) return NULL;
    }

    return e;
}

Here is the call graph for this function:

Here is the caller graph for this function:

EIMIL_symbol* EIMIL_intern_soft ( EIMIL_dictionary pdic,
unsigned char *  name 
)

Definition at line 2157 of file EIMIL.c.

{
    EIMIL_symbol *psym;
    if ((psym = lookup_predefined_symbol(name)) != NULL) return psym;

    return lookup_symbol(pdic, name);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 53 of file EIMILJournal.c.

{
    int i;
    EIMIL_data *ped = (EIMIL_data*) eh;
    EIMIL_journal *pj, *pjh;

    pjh = NULL;
    pj = ped->pjst;
    for (i = 0; i < EIMIL_JOURNAL_MAX_SLOT_SIZE; i++) {
        fprintf(stderr, "hoge\n");
        if (!pj) break;
       if (pj->pv) EIMIL_RMREF(*pj->pv);
       if ((pj->next - pj) < 0) pjh = pj->next;
       pj = pj->next;
    }

    if (pjh) free(pjh);
    /*
    ASSERT(pjh);
    free(pjh);
    */
}

Here is the caller graph for this function:

Definition at line 29 of file EIMILJournal.c.

{
    int i;
    EIMIL_data *ped = (EIMIL_data*) eh;
    EIMIL_journal *pj, *pjh;
    pj = (EIMIL_journal*) malloc(sizeof(EIMIL_journal)
                             * EIMIL_JOURNAL_MAX_SLOT_SIZE);
    if (!pj) return 0;
    memset(pj, 0, sizeof(EIMIL_journal) * EIMIL_JOURNAL_MAX_SLOT_SIZE);
    ped->pjst = pjh = pj;
    for (i = 0;i < EIMIL_JOURNAL_MAX_SLOT_SIZE - 1;i++) {
       pj->next = &pj[1];
       pj[1].prev = pj;
       pj++;
    }
    pj->next = pjh;
    pjh->prev = pj;

    return 1;
}

Definition at line 2169 of file EIMIL.c.

{
    int idx;
    EIMIL_symbol **p, *psym;

    switch (id) {
      case EIMIL_SYMBOL_ID_NIL:
       return pEIMIL_nil_sym;
      case EIMIL_SYMBOL_ID_T:
       return pEIMIL_t_sym;
      case EIMIL_SYMBOL_ID_FEEDBACK:
       return pEIMIL_feedback_sym;
      case EIMIL_SYMBOL_ID_CANDIDATES:
       return pEIMIL_candidates_sym;
      default:
       if (!pdic->iddic) return NULL;
       idx = id % pdic->size;
       p = pdic->iddic[idx];
       if (!p) return NULL;
       
       for (; *p; p++) {
          psym = *p;
          if (psym->symbolid == id) return psym;
       }
    }

    return NULL;
}

Here is the caller graph for this function:

Definition at line 3408 of file EIMIL.c.

{
    EIMIL_data *ped;
    EIMIL_dictionary *pdic;

    ped = (EIMIL_data*) malloc(sizeof(EIMIL_data));
    if (!ped) return NULL;
    memset(ped, 0, sizeof(EIMIL_data));

    if (!pbase) {
       pbase = (EIMIL_cdata*) malloc(sizeof(EIMIL_cdata));
       if (!pbase) {
           free(ped);
           return NULL;
       }
       memset(pbase, 0, sizeof(EIMIL_cdata));
       INIT_SYNC_OBJECT(pbase->sync_object);

       /* 
          EIMIL_duplicate_handle() make its own dictionary,
          so it must not create a new dictionary here.
        */
       pdic = EIMIL_new_dictionary(0, 1);
       if (!pdic) {
           free(ped);
           return NULL;
       }
       ped->pdic = pdic;
    } else {
       ped->duplicated = 1;
    }
    ped->pcommon = pbase;

    ped->pcur_ev = ped->pqueue_ev = ped->queueslots;

    return ped;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int EIMIL_mtext_diff ( EIMIL_mtext porig,
EIMIL_mtext pnew,
IMDifferential pdiff 
)

Definition at line 1533 of file EIMILTextUtil.c.

{
    /* TODO: make it more efficient!!! */
    if (!EIMIL_convert_mtext_to_IMText(&pdiff->text, pnew)) return 0;
    pdiff->chg_first = 0;
    pdiff->chg_len = 0;

    return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

EIMIL_dictionary* EIMIL_new_dictionary ( int  size,
int  id_req_p 
)

Definition at line 1736 of file EIMIL.c.

{
    EIMIL_dictionary *pdic;
    EIMIL_symbol ***pppsym;

    if (size == 0)
       size = EIMIL_DICTIONARY_DEFAULT_SIZE;

    pdic = malloc(sizeof(EIMIL_dictionary));
    if (!pdic) {
       return NULL;
    }
    pdic->size = size;
    pppsym = (EIMIL_symbol***) malloc(sizeof(EIMIL_dictionary**) * size);
    if (!pppsym) {
       free(pdic);
       return NULL;
    }
    memset(pppsym, 0, sizeof(EIMIL_dictionary**) * size);
    pdic->namedic = pppsym;
    if (id_req_p) {
       pppsym = (EIMIL_symbol***) malloc(sizeof(EIMIL_dictionary**) * size);
       if (!pppsym) {
           free(pdic->namedic);
           free(pdic);
           return NULL;
       }
       memset(pppsym, 0, sizeof(EIMIL_dictionary**) * size);
       pdic->iddic = pppsym;
    } else {
       pdic->iddic = NULL;
    }
    return pdic;
}

Here is the caller graph for this function:

Definition at line 3798 of file EIMIL.c.

{
    EIMIL_value **pqn, *pev;

    if (ped->pcur_ev == ped->pqueue_ev) return NULL;

    if (ped->pcur_ev == (ped->queueslots + EIMIL_EVENT_QUEUESIZE - 1))
       pqn = ped->queueslots;
    else
       pqn = ped->pcur_ev + 1;

    pev = *ped->pcur_ev;
    ped->pcur_ev = pqn;

    if (pev) EIMIL_RMREF_WITHOUT_DESTRUCTION(*pev);

    return pev;
}

Here is the caller graph for this function:

int EIMIL_parse_start ( EIMIL_data ped)

Definition at line 3453 of file EIMIL.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int EIMIL_queue_event ( EIMIL_data ped,
EIMIL_value pv_event 
)

Definition at line 3775 of file EIMIL.c.

{
    EIMIL_value **pqn;


    if (ped->pqueue_ev == (ped->queueslots + EIMIL_EVENT_QUEUESIZE - 1))
       pqn = ped->queueslots;
    else
       pqn = ped->pqueue_ev + 1;

    if (pqn == ped->pcur_ev) return 0;

    *ped->pqueue_ev = pv_event;
    ped->pqueue_ev = pqn;
    EIMIL_ADDREF(*pv_event);

    return 1;
}

Here is the caller graph for this function:

int EIMIL_register_engine ( const UTF8 classname,
EIMIL_element_template pet,
EIMIL_engine_handler  handler,
EIMIL_engine_execute_handler  execute_handler,
const UTF8 uri 
)

Definition at line 3276 of file EIMIL.c.

{
    EIMIL_engine_table *p;
    p = EIMIL_get_engine(classname);
    if (!p) {
       p = (EIMIL_engine_table*) realloc(pengines,
                                     sizeof(EIMIL_engine_table)
                                     * (num_engines + 1));
       if (!p) return 0;
       pengines = p;
       p += num_engines;
       p->classname = strdup(classname);
       if (!p->classname) return 0;
       p->uri = strdup(uri);
       if (!p->uri) {
           free(p->classname);
           return 0;
       }
       num_engines++;
    } else {
       if (p->uri) free(p->uri);
       p->uri = strdup(uri);
       if (!p->uri) {
           free(p->classname);
           return 0;
       }
    }

    p->execute_handler = execute_handler;
    p->handler = handler;
    p->pet = pet;

    return 1;
}

Here is the call graph for this function:

Here is the caller graph for this function:

EIMIL_symbol* EIMIL_register_symbol ( EIMIL_data ped,
EIMIL_dictionary pdic,
unsigned char *  name,
enum EIMIL_CATEGORY  cat,
enum EIMIL_TYPE  type 
)

Definition at line 2139 of file EIMIL.c.

{
    int id;
    int id_req_p = pdic->iddic ? 1 : 0;

    if (id_req_p) id = EIMIL_generate_symbolid(ped, cat, type);
    else id = 0;

    return register_symbol(pdic, name, cat, id);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void EIMIL_remove_attr ( EIMIL_attrs patr)

Definition at line 635 of file EIMIL.c.

{
    EIMIL_attrs *p;

    ASSERT(patr->name);
    for (p = patr + 1; p->name; patr++, p++) *patr = *p;
    *patr = *p;
}

Here is the caller graph for this function:

int EIMIL_reply_event ( EIMIL_data ped,
EIMIL_value pv_event 
)

Definition at line 3762 of file EIMIL.c.

{
    if (!ped->pcommon->evproc) return 0;

    ASSERT(pv_event->type == EIMIL_TYPE_EVENT);

    return (*ped->pcommon->evproc)(ped, &pv_event->v.event);
}

Here is the caller graph for this function:

void EIMIL_set_error ( EIMIL_data pps,
const char *  fmt,
  ... 
)

Definition at line 163 of file EIMIL.c.

{
    va_list va;
    char errbuf[EIMIL_MAXERRMSG];

    va_start(va, fmt);
    vsnprintf(errbuf, sizeof(errbuf), fmt, va);
    snprintf(ped->errstr, sizeof(ped->errstr),
            "%s\n", errbuf);
    va_end(va);
}

Here is the caller graph for this function:

Definition at line 205 of file EIMIL.c.

{
    EIMIL_set_error(ped, "Out of memory.");
}

Here is the call graph for this function:

Here is the caller graph for this function:

int EIMIL_toggle_lookup_choice ( EIMIL_data ped,
int  flag 
)

Definition at line 3731 of file EIMIL.c.

{
    int r;

    if (!ped->pcommon->uiproc) return 0;

    if (flag)
       r = (*ped->pcommon->uiproc)(ped, ped->psym_uidata->obj.v.pv,
                                EIMIL_ENABLE_LOOKUP_CHOICE);
    else
       r = (*ped->pcommon->uiproc)(ped, ped->psym_uidata->obj.v.pv,
                                EIMIL_DISABLE_LOOKUP_CHOICE);

    return r;
}
int EIMIL_toggle_preedit ( EIMIL_data ped,
int  flag 
)

Definition at line 3702 of file EIMIL.c.

{
    int r;

    if (!ped->pcommon->uiproc) return 0;

    if (flag)
       r = (*ped->pcommon->uiproc)(ped, ped->psym_uidata->obj.v.pv,
                                EIMIL_ENABLE_PREEDIT);
    else
       r = (*ped->pcommon->uiproc)(ped, ped->psym_uidata->obj.v.pv,
                                EIMIL_DISABLE_PREEDIT);

    return r;
}

Definition at line 3751 of file EIMIL.c.

{
    if (!ped->pcommon->uiproc) return 0;

    return (*ped->pcommon->uiproc)(ped, ped->psym_uidata->obj.v.pv,
                               EIMIL_UPDATE_LOOKUP_CHOICE);
}

Definition at line 3722 of file EIMIL.c.

{
    return (*ped->pcommon->uiproc)(ped, ped->psym_uidata->obj.v.pv,
                               EIMIL_UPDATE_PREEDIT);
}
int EIMILFile_init ( )

Definition at line 322 of file EIMILFile.c.

{
    INIT_SYNC_OBJECT(clsstg);
    return 1;
}

Here is the caller graph for this function:

int PCE_init ( )

Definition at line 4908 of file PCE.c.

Here is the call graph for this function:

Here is the caller graph for this function: