~ubuntu-branches/ubuntu/maverick/uim/maverick

« back to all changes in this revision

Viewing changes to fep/draw.c

  • Committer: Bazaar Package Importer
  • Author(s): Masahito Omote
  • Date: 2008-06-25 19:56:33 UTC
  • mfrom: (3.1.18 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080625195633-8jljph4rfq00l8o7
Tags: 1:1.5.1-2
* uim-tcode: provide tutcode-custom.scm, tutcode-bushudic.scm
  and tutcode-rule.scm (Closes: #482659)
* Fix FTBFS: segv during compile (Closes: #483078).
  I personally think this bug is not specific for uim but is a optimization
  problem on gcc-4.3.1. (https://bugs.freedesktop.org/show_bug.cgi?id=16477)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 
3
 
  Copyright (c) 2003-2006 uim Project http://uim.freedesktop.org/
 
3
  Copyright (c) 2003-2008 uim Project http://code.google.com/p/uim/
4
4
 
5
5
  All rights reserved.
6
6
 
37
37
#ifdef HAVE_CONFIG_H
38
38
#include <config.h>
39
39
#endif
40
 
#ifndef DEBUG
 
40
#if (!defined(DEBUG) && !defined(NDEBUG))
41
41
#define NDEBUG
42
42
#endif
43
43
#ifdef HAVE_STRING_H
141
141
  char sendbuf[CANDSIZE];
142
142
  if (s_candbuf[0] == '\0') {
143
143
    /* �⡼��ɽ�� */
144
 
    sprintf(sendbuf, "%s%s", s_win_no, s_modebuf);
 
144
    snprintf(sendbuf, sizeof(sendbuf), "%s%s", s_win_no, s_modebuf);
145
145
  } else {
146
146
    /* �������ɽ�� */
147
 
    sprintf(sendbuf, "%s", s_candbuf);
 
147
    strlcpy(sendbuf,  s_candbuf, sizeof(sendbuf));
148
148
  }
149
149
  sendline(sendbuf);
150
150
}