From 5122b0b61cc195236d0997e0d065eb8fd4e20ad3 Mon Sep 17 00:00:00 2001 From: rocky Date: Fri, 11 Apr 2003 17:33:03 +0000 Subject: [PATCH] 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) --- lib/sector.c | 16 ++++++++++++++-- lib/sector.h | 31 ++++++++++++++----------------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/lib/sector.c b/lib/sector.c index 94e352f5..323bf25d 100644 --- a/lib/sector.c +++ b/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 @@ -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) { diff --git a/lib/sector.h b/lib/sector.h index 51122c57..f34ec6b7 100644 --- a/lib/sector.h +++ b/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 Copyright (C) 2003 Rocky Bernstein @@ -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_ */