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

« back to all changes in this revision

Viewing changes to emacs/uim-el-helper-agent.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
 
  Copyright (c) 2006 uim Project http://uim.freedesktop.org/
 
2
  Copyright (c) 2006-2008 uim Project http://code.google.com/p/uim/
3
3
 
4
4
  All rights reserved.
5
5
 
206
206
  debug_printf(DEBUG_NOTE, "read command\n");
207
207
 
208
208
  do {
209
 
        len = read(STDIN_FILENO, rbuf, sizeof(rbuf) - 1);
210
 
        rbuf[len] = '\0';
 
209
        if ((len = read(STDIN_FILENO, rbuf, sizeof(rbuf) - 1)) == -1 || len == 0) {
 
210
          rbuf[0] = '\n';
 
211
          rbuf[1] = '\0';
 
212
          len = 1;
 
213
          debug_printf(DEBUG_NOTE, "stdin has corrupted\n");
 
214
        } else
 
215
          rbuf[len] = '\0';
211
216
 
212
217
        if (strlen(cmdbuf) + len + 1 > cmdbuf_len) {
213
218
          cmdbuf_len += DEFAULT_MESSAGE_SIZE;