Back to index

im-sdk  12.3.91
Functions
ximp40.c File Reference
#include <X11/Xlibint.h>
#include "XimpIm.h"
#include "ximp40.h"

Go to the source code of this file.

Functions

XIMXimpRecXimp_OpenIM (XLCd lcd)
void Ximp_CloseIM (XIMXimpRec *ximp_impart)

Function Documentation

void Ximp_CloseIM ( XIMXimpRec ximp_impart)

Definition at line 78 of file ximp40.c.

                                      {
  _XlcCloseConverter(ximp_impart->ctom_conv);
  _XlcCloseConverter(ximp_impart->ctow_conv); 
  if (ximp_impart) Xfree(ximp_impart);
  return;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 50 of file ximp40.c.

                      {

  XIMXimpRec *ximp_impart;
  XlcConv ctom_conv, ctow_conv;

  if (!(ctom_conv = _XlcOpenConverter(lcd, XlcNCompoundText,
                                  lcd, XlcNMultiByte))) {
    return((XIMXimpRec*)NULL);
  }
  if (!(ctow_conv = _XlcOpenConverter(lcd, XlcNCompoundText,
                                  lcd, XlcNWideChar))) {
    return((XIMXimpRec*)NULL);
  }

  ximp_impart = (XIMXimpRec*)Xmalloc(sizeof(XIMXimpRec));
  if (ximp_impart == (XIMXimpRec *)NULL) {
    return((XIMXimpRec*)NULL);
  }
  memset(ximp_impart, 0, sizeof(XIMXimpRec));

  /* only ctom_conv and ctow_conv are used */
  ximp_impart->ctom_conv = ctom_conv;
  ximp_impart->ctow_conv = ctow_conv;

  return ximp_impart;
}

Here is the call graph for this function:

Here is the caller graph for this function: