Author: yamakenz
Date: Tue Jan 15 08:45:23 2008
New Revision: 5134

Modified:
  trunk/uim/uim-notify.c

Log:
* uim/uim-notify.c
 - (notify_desc): Removed
 - (uim_notify_load_stderr, uim_notify_load): Follow the
   removal of the variable


Modified: trunk/uim/uim-notify.c
==============================================================================
--- trunk/uim/uim-notify.c      (original)
+++ trunk/uim/uim-notify.c      Tue Jan 15 08:45:23 2008
@@ -87,12 +87,10 @@
static struct uim_notify_agent agent_body;
static struct uim_notify_agent *agent = &agent_body;
static void *notify_dlhandle = NULL;
-static const uim_notify_desc *notify_desc = &uim_notify_stderr_desc;

static void
uim_notify_load_stderr(void)
{
-  notify_desc = &uim_notify_stderr_desc;
  agent->init = uim_notify_stderr_init;
  agent->quit = uim_notify_stderr_quit;
  agent->notify_info = uim_notify_stderr_info;
@@ -103,13 +101,13 @@
int
uim_notify_load(const char *name)
{
-  if (!agent->quit) {
+  if (!agent->quit || !agent->desc) {
    fprintf(stderr, "uim-notify: notification agent module is not loaded\n");
    uim_notify_load_stderr();
    return 0;
  }

-  if (strcmp(notify_desc->name, name) == 0) {
+  if (strcmp(agent->desc()->name, name) == 0) {
    return 1;
  } else if (strcmp(name, "stderr") == 0) {
    agent->quit();
@@ -168,7 +166,6 @@
      return 0;
    }

-    notify_desc = agent->desc();
    agent->init();
  }
  return 1;

Reply via email to