~ubuntu-branches/ubuntu/vivid/kakasi/vivid

« back to all changes in this revision

Viewing changes to src/dict.c

  • Committer: Package Import Robot
  • Author(s): Osamu Aoki
  • Date: 2014-02-01 20:45:09 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20140201204509-kulokzsr9xc0lp7j
Tags: 2.3.5-1
* New upstream release.
* Update package with M-A and fortify.
* Fix manpages over - etc.
* Add symbols support to libkakasi2.
* Use UTF-8 for the Japanese documenmtation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * KAKASI (Kanji Kana Simple inversion program)
3
 
 * $Id: dict.c,v 1.10 2006-04-18 07:03:29 knok Exp $
 
3
 * $Id: dict.c,v 1.12 2013-02-20 05:36:43 knok Exp $
4
4
 * Copyright (C) 1992
5
5
 * Hironobu Takahashi (takahasi@tiny.or.jp)
6
6
 *
42
42
# include <malloc.h>
43
43
#endif
44
44
#include <stdlib.h>
 
45
#ifdef HAVE_STDINT_H
 
46
# include <stdint.h>
 
47
#else
 
48
#define uintptr_t (int)
 
49
#endif
45
50
#include "kakasi.h"
46
51
 
47
52
#define BUFLEN 1024
119
124
        char *cptr;
120
125
        cptr = malloc((CELLALLOC+1)*sizeof(struct kanji_yomi));
121
126
        add_ary_cellalloc(cptr);
122
 
        if ((int)cptr & 7) cptr += 8 - ((int)cptr & 7);
 
127
        if ((uintptr_t)cptr & 7) cptr += 8 - ((uintptr_t)cptr & 7);
123
128
        ptr_cellalloc = (struct kanji_yomi *) cptr;
124
129
        point_cellalloc = 0;
125
130
    }