~ubuntu-branches/ubuntu/maverick/zapping/maverick

« back to all changes in this revision

Viewing changes to libvbi/conv.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-08 11:07:34 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108110734-ygvf6uljvgcjmca7
Tags: 0.9.6-1ubuntu1
* Resynchronise with Debian (Closes: #4022):
  - Fix desktop file to not use absolute path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
19
 */
20
20
 
21
 
/* $Id: conv.c,v 1.5 2005/01/31 07:11:31 mschimek Exp $ */
 
21
/* $Id: conv.c,v 1.6 2005/06/28 01:01:10 mschimek Exp $ */
22
22
 
23
23
#ifdef HAVE_CONFIG_H
24
24
#  include "config.h"
29
29
#include <errno.h>
30
30
#include <langinfo.h>
31
31
#include <assert.h>
32
 
#include "common/intl-priv.h"
 
32
#include "intl-priv.h"
33
33
#include "misc.h"               /* N_ELEMENTS() */
34
34
#include "conv.h"
35
35
 
96
96
iconv_t
97
97
vbi3_iconv_ucs2_open            (const char *           dst_format,
98
98
                                 char **                dst,
99
 
                                 unsigned int           dst_size)
 
99
                                 unsigned long          dst_size)
100
100
{
101
101
        assert (NULL != dst);
102
102
 
181
181
vbi3_bool
182
182
vbi3_iconv_ucs2                 (iconv_t                cd,
183
183
                                 char **                dst,
184
 
                                 unsigned int           dst_size,
 
184
                                 unsigned long          dst_size,
185
185
                                 const uint16_t *       src,
186
 
                                 unsigned int           src_size)
 
186
                                 unsigned long          src_size)
187
187
{
188
188
        const char *s;
189
189
        size_t sleft;
231
231
vbi3_bool
232
232
vbi3_iconv_unicode              (iconv_t                cd,
233
233
                                 char **                dst,
234
 
                                 unsigned int           dst_size,
 
234
                                 unsigned long          dst_size,
235
235
                                 unsigned int           unicode)
236
236
{
237
237
        uint16_t t[1];
265
265
strdup_iconv                    (const char *           dst_format,
266
266
                                 const char *           src_format,
267
267
                                 const char *           src,
268
 
                                 unsigned int           src_size,
 
268
                                 unsigned long          src_size,
269
269
                                 unsigned int           csize)
270
270
{
271
271
        char *buf;
272
272
        char *buf2;
273
 
        unsigned int buf_size;
 
273
        unsigned long buf_size;
274
274
        iconv_t cd;
275
275
        const char *s;
276
276
        char *d;
354
354
char *
355
355
vbi3_strdup_iconv_ucs2          (const char *           dst_format,
356
356
                                 const uint16_t *       src,
357
 
                                 unsigned int           src_size)
 
357
                                 unsigned long          src_size)
358
358
{
359
359
        return strdup_iconv (dst_format, NULL,
360
360
                             (const char *) src, src_size * 2, 2);
378
378
 */
379
379
char *
380
380
_vbi3_strdup_locale_ucs2                (const uint16_t *       src,
381
 
                                 unsigned int           src_size)
 
381
                                 unsigned long          src_size)
382
382
{
383
383
        const char *dst_format;
384
384
 
415
415
_vbi3_strdup_locale_utf8                (const char *           src)
416
416
{
417
417
        const char *dst_format;
418
 
        unsigned int src_size;
 
418
        unsigned long src_size;
419
419
 
420
420
        if (!src)
421
421
                return NULL;
440
440
 */
441
441
char *
442
442
_vbi3_strdup_locale_teletext    (const uint8_t *        src,
443
 
                                 unsigned int           src_size,
 
443
                                 unsigned long          src_size,
444
444
                                 const vbi3_character_set *cs)
445
445
{
446
446
        uint16_t buffer[64];
447
 
        unsigned int begin;
448
 
        unsigned int end;
449
 
        unsigned int i;
 
447
        unsigned long begin;
 
448
        unsigned long end;
 
449
        unsigned long i;
450
450
 
451
451
        if (!src)
452
452
                return NULL;
487
487
uint16_t *
488
488
_vbi3_strdup_ucs2_utf8          (const char *           src)
489
489
{
490
 
        unsigned int src_size;
 
490
        unsigned long src_size;
491
491
 
492
492
        if (!src)
493
493
                return NULL;
515
515
vbi3_stdio_cd_ucs2              (FILE *                 fp,
516
516
                                 iconv_t                cd,
517
517
                                 const uint16_t *       src,
518
 
                                 unsigned int           src_size)
 
518
                                 unsigned long          src_size)
519
519
{
520
520
        char buffer[4096];
521
521
        const char *s;
569
569
vbi3_stdio_iconv_ucs2           (FILE *                 fp,
570
570
                                 const char *           dst_format,
571
571
                                 const uint16_t *       src,
572
 
                                 unsigned int           src_size)
 
572
                                 unsigned long          src_size)
573
573
{
574
574
        char buffer[4096];
575
575
        iconv_t cd;