~ubuntu-branches/ubuntu/maverick/libcdio/maverick

« back to all changes in this revision

Viewing changes to lib/util.c

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Boullis
  • Date: 2005-02-06 00:17:06 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050206001706-d54gpyhfixexuj2d
Tags: 0.71-2
* Comment out all extraneous declarations of
  'gl_default_cdio_log_handler'. (Closes: 289694)
* Fix the broken symbol-versionning script.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
    $Id: util.c,v 1.2 2003/04/22 12:09:09 rocky Exp $
 
2
    $Id: util.c,v 1.6 2004/11/15 01:34:09 rocky Exp $
3
3
 
4
4
    Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
5
 
    Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
 
5
    Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
6
6
 
7
7
    This program is free software; you can redistribute it and/or modify
8
8
    it under the terms of the GNU General Public License as published by
28
28
#include <stdio.h>
29
29
#include <string.h>
30
30
 
 
31
#ifdef HAVE_INTTYPES_H
 
32
#include "inttypes.h"
 
33
#endif
 
34
 
31
35
#include "cdio_assert.h"
 
36
#include <cdio/types.h>
32
37
#include <cdio/util.h>
33
38
 
34
 
static const char _rcsid[] = "$Id: util.c,v 1.2 2003/04/22 12:09:09 rocky Exp $";
 
39
static const char _rcsid[] = "$Id: util.c,v 1.6 2004/11/15 01:34:09 rocky Exp $";
35
40
 
36
41
size_t
37
42
_cdio_strlenv(char **str_array)
169
174
}
170
175
 
171
176
uint8_t
172
 
to_bcd8 (uint8_t n)
 
177
cdio_to_bcd8 (uint8_t n)
173
178
{
174
 
  cdio_assert (n < 100);
 
179
  /*cdio_assert (n < 100);*/
175
180
 
176
181
  return ((n/10)<<4) | (n%10);
177
182
}
178
183
 
179
184
uint8_t
180
 
from_bcd8(uint8_t p)
 
185
cdio_from_bcd8(uint8_t p)
181
186
{
182
187
  return (0xf & p)+(10*(p >> 4));
183
188
}