Tired of all those unused warings. Remove the static inline stuff.
It's probably not worth the performance gains. (And if it is we can turn into a #define)
This commit is contained in:
16
lib/sector.c
16
lib/sector.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: sector.c,v 1.1 2003/03/24 19:01:09 rocky Exp $
|
||||
$Id: sector.c,v 1.2 2003/04/11 17:33:03 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "sector.h"
|
||||
#include "util.h"
|
||||
|
||||
static const char _rcsid[] = "$Id: sector.c,v 1.1 2003/03/24 19:01:09 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: sector.c,v 1.2 2003/04/11 17:33:03 rocky Exp $";
|
||||
|
||||
void
|
||||
cdio_lba_to_msf (uint32_t lba, msf_t *msf)
|
||||
@@ -38,6 +38,18 @@ cdio_lba_to_msf (uint32_t lba, msf_t *msf)
|
||||
msf->f = to_bcd8 (lba % 75);
|
||||
}
|
||||
|
||||
lba_t
|
||||
cdio_lba_to_lsn (lba_t lba)
|
||||
{
|
||||
return lba - CDIO_PREGAP_SECTORS;
|
||||
}
|
||||
|
||||
lba_t
|
||||
cdio_lsn_to_lba (lsn_t lsn)
|
||||
{
|
||||
return lsn + CDIO_PREGAP_SECTORS;
|
||||
}
|
||||
|
||||
void
|
||||
cdio_lsn_to_msf (lsn_t lsn, msf_t *msf)
|
||||
{
|
||||
|
||||
31
lib/sector.h
31
lib/sector.h
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: sector.h,v 1.8 2003/04/09 11:15:06 rocky Exp $
|
||||
$Id: sector.h,v 1.9 2003/04/11 17:33:03 rocky Exp $
|
||||
|
||||
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||
@@ -25,6 +25,10 @@
|
||||
#ifndef _CDIO_SECTOR_H_
|
||||
#define _CDIO_SECTOR_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define CDIO_PREGAP_SECTORS 150
|
||||
@@ -125,26 +129,15 @@
|
||||
#define msf_t_SIZEOF 3
|
||||
|
||||
/* warning, returns new allocated string */
|
||||
char *
|
||||
cdio_lba_to_msf_str (lba_t lba);
|
||||
char *cdio_lba_to_msf_str (lba_t lba);
|
||||
|
||||
static inline lba_t
|
||||
cdio_lba_to_lsn (lba_t lba)
|
||||
{
|
||||
return lba - CDIO_PREGAP_SECTORS;
|
||||
}
|
||||
lba_t cdio_lba_to_lsn (lba_t lba);
|
||||
|
||||
void
|
||||
cdio_lba_to_msf(lba_t lba, msf_t *msf);
|
||||
void cdio_lba_to_msf(lba_t lba, msf_t *msf);
|
||||
|
||||
static inline lba_t
|
||||
cdio_lsn_to_lba (lsn_t lsn)
|
||||
{
|
||||
return lsn + CDIO_PREGAP_SECTORS;
|
||||
}
|
||||
lba_t cdio_lsn_to_lba (lsn_t lsn);
|
||||
|
||||
void
|
||||
cdio_lsn_to_msf (lsn_t lsn, msf_t *msf);
|
||||
void cdio_lsn_to_msf (lsn_t lsn, msf_t *msf);
|
||||
|
||||
uint32_t
|
||||
cdio_msf_to_lba (const msf_t *msf);
|
||||
@@ -152,6 +145,10 @@ cdio_msf_to_lba (const msf_t *msf);
|
||||
uint32_t
|
||||
cdio_msf_to_lsn (const msf_t *msf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _CDIO_SECTOR_H_ */
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user